fzeet 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. data/LICENSE_CEF +29 -0
  2. data/checks/Bstr.rb +14 -0
  3. data/checks/Decimal.rb +27 -0
  4. data/checks/OSVERSIONINFOEX.rb +14 -0
  5. data/checks/Point.rb +65 -0
  6. data/checks/Rect.rb +104 -0
  7. data/checks/RunAll.rb +2 -0
  8. data/checks/SafeArray.rb +27 -0
  9. data/checks/Size.rb +45 -0
  10. data/checks/SystemTime.rb +43 -0
  11. data/checks/Variant.rb +160 -0
  12. data/examples/Control/DateTimePicker.rbw +1 -1
  13. data/examples/Control/MonthCalendar.rbw +1 -1
  14. data/examples/Control/{WebBrowser.rbw → WebBrowser/WebBrowser.rbw} +2 -2
  15. data/examples/Control/{WebBrowser1.rbw → WebBrowser/WebBrowser1.rbw} +0 -0
  16. data/examples/Control/WebBrowser/WebBrowser2.rbw +24 -0
  17. data/examples/Control/{WebBrowser3.rbw → WebBrowser/WebBrowser3.rbw} +0 -0
  18. data/examples/Control/{WebBrowser4.rbw → WebBrowser/WebBrowser4.rbw} +8 -3
  19. data/examples/Control/{WebBrowser4Sinatra.rb → WebBrowser/WebBrowser4Sinatra.rb} +0 -0
  20. data/examples/Control/{WebBrowser5.rbw → WebBrowser/WebBrowser5.rbw} +4 -2
  21. data/examples/Control/WebBrowser/jQueryUI.html +53 -0
  22. data/examples/Control/WebBrowser/jQueryUI.rbw +26 -0
  23. data/examples/MDI.rbw +2 -2
  24. data/examples/Raw/UIRibbon/Command.rbw +3 -3
  25. data/examples/Raw/UIRibbon/Minimal.rbw +3 -3
  26. data/examples/Version.rbw +1 -1
  27. data/lib/fzeet.rb +22 -7
  28. data/lib/fzeet/windows.rb +82 -5
  29. data/lib/fzeet/windows/com.rb +1 -318
  30. data/lib/fzeet/windows/com/Common.rb +318 -0
  31. data/lib/fzeet/windows/comctl.rb +1 -1
  32. data/lib/fzeet/windows/comctl/ComboBoxEx.rb +32 -0
  33. data/lib/fzeet/windows/comctl/DateTimePicker.rb +35 -0
  34. data/lib/fzeet/windows/comctl/Header.rb +61 -1
  35. data/lib/fzeet/windows/comctl/ListView.rb +133 -3
  36. data/lib/fzeet/windows/comctl/MonthCalendar.rb +35 -0
  37. data/lib/fzeet/windows/comctl/ProgressBar.rb +37 -0
  38. data/lib/fzeet/windows/comctl/PropertySheet.rb +50 -2
  39. data/lib/fzeet/windows/comctl/SysLink.rb +37 -0
  40. data/lib/fzeet/windows/comctl/Tab.rb +56 -0
  41. data/lib/fzeet/windows/comctl/TreeView.rb +81 -2
  42. data/lib/fzeet/windows/comctl/UpDown.rb +33 -0
  43. data/lib/fzeet/windows/comdlg.rb +1 -0
  44. data/lib/fzeet/windows/comdlg/ColorDialog.rb +41 -0
  45. data/lib/fzeet/windows/comdlg/Common.rb +87 -0
  46. data/lib/fzeet/windows/comdlg/FileDialog.rb +133 -0
  47. data/lib/fzeet/windows/comdlg/FindReplaceDialog.rb +102 -0
  48. data/lib/fzeet/windows/comdlg/FontDialog.rb +36 -0
  49. data/lib/fzeet/windows/comdlg/PrintDialog.rb +72 -0
  50. data/lib/fzeet/{Dialog → windows/comdlg}/ShellFileDialog.rb +0 -0
  51. data/lib/fzeet/windows/core.rb +5 -0
  52. data/lib/fzeet/windows/core/Common.rb +324 -0
  53. data/lib/fzeet/windows/core/Point.rb +42 -0
  54. data/lib/fzeet/windows/core/Rect.rb +114 -0
  55. data/lib/fzeet/windows/core/Size.rb +34 -0
  56. data/lib/fzeet/windows/core/SystemTime.rb +46 -0
  57. data/lib/fzeet/windows/core/Version.rb +57 -0
  58. data/lib/fzeet/windows/gdi.rb +1 -62
  59. data/lib/fzeet/windows/gdi/Common.rb +40 -0
  60. data/lib/fzeet/windows/gdi/Font.rb +64 -0
  61. data/lib/fzeet/windows/kernel.rb +1 -92
  62. data/lib/fzeet/windows/kernel/Common.rb +92 -0
  63. data/lib/fzeet/windows/libc.rb +1 -1
  64. data/lib/fzeet/windows/libcef.rb +1 -0
  65. data/lib/fzeet/windows/mshtml.rb +1 -1135
  66. data/lib/fzeet/windows/mshtml/Common.rb +1135 -0
  67. data/lib/fzeet/windows/ole.rb +1 -561
  68. data/lib/fzeet/windows/ole/Common.rb +112 -0
  69. data/lib/fzeet/windows/ole/PropVariant.rb +141 -0
  70. data/lib/fzeet/windows/oleaut.rb +3 -0
  71. data/lib/fzeet/windows/oleaut/Bstr.rb +39 -0
  72. data/lib/fzeet/windows/oleaut/Common.rb +187 -0
  73. data/lib/fzeet/windows/oleaut/SafeArray.rb +104 -0
  74. data/lib/fzeet/windows/oleaut/Variant.rb +269 -0
  75. data/lib/fzeet/windows/scintilla.rb +115 -1
  76. data/lib/fzeet/windows/{SciLexer.dll → scintilla/SciLexer.dll} +0 -0
  77. data/lib/fzeet/windows/shdocvw.rb +150 -0
  78. data/lib/fzeet/windows/shell.rb +1 -1
  79. data/lib/fzeet/windows/shell/Common.rb +94 -2
  80. data/lib/fzeet/windows/shlwapi.rb +1 -1
  81. data/lib/fzeet/windows/uiribbon.rb +416 -0
  82. data/lib/fzeet/windows/urlmon.rb +2 -2
  83. data/lib/fzeet/windows/user.rb +20 -0
  84. data/lib/fzeet/windows/user/Accelerator.rb +45 -0
  85. data/lib/fzeet/windows/user/Common.rb +3 -2
  86. data/lib/fzeet/windows/user/Control/Button.rb +54 -0
  87. data/lib/fzeet/windows/user/Control/ComboBox.rb +44 -1
  88. data/lib/fzeet/windows/user/Control/Common.rb +88 -1
  89. data/lib/fzeet/windows/user/Control/Edit.rb +50 -0
  90. data/lib/fzeet/windows/user/Control/ListBox.rb +69 -0
  91. data/lib/fzeet/windows/user/Control/Static.rb +31 -0
  92. data/lib/fzeet/windows/user/Menu.rb +130 -0
  93. data/lib/fzeet/windows/user/Message.rb +9 -0
  94. data/lib/fzeet/windows/user/MessageBox.rb +47 -0
  95. data/lib/fzeet/windows/user/SystemParametersInfo.rb +1 -1
  96. data/lib/fzeet/windows/user/Window.rb +5 -463
  97. data/lib/fzeet/{Window → windows/user/Window}/Common.rb +460 -0
  98. data/lib/fzeet/{Window → windows/user/Window}/Container.rb +0 -0
  99. data/lib/fzeet/{Window → windows/user/Window}/Dialog.rb +0 -0
  100. data/lib/fzeet/{Window → windows/user/Window}/MDI.rb +0 -0
  101. data/lib/fzeet/{Window → windows/user/Window}/View.rb +0 -0
  102. data/lib/fzeet/{Window → windows/user/Window}/Window.rb +0 -0
  103. data/lib/fzeet/{Window → windows/user/Window}/WindowMethods.rb +1 -1
  104. metadata +55 -61
  105. data/examples/Control/WebBrowser2.rbw +0 -39
  106. data/lib/fzeet/Accelerator.rb +0 -48
  107. data/lib/fzeet/Application.rb +0 -71
  108. data/lib/fzeet/Common.rb +0 -350
  109. data/lib/fzeet/Control.rb +0 -19
  110. data/lib/fzeet/Control/Button.rb +0 -57
  111. data/lib/fzeet/Control/ComboBox.rb +0 -46
  112. data/lib/fzeet/Control/ComboBoxEx.rb +0 -35
  113. data/lib/fzeet/Control/Common.rb +0 -89
  114. data/lib/fzeet/Control/DateTimePicker.rb +0 -38
  115. data/lib/fzeet/Control/Edit.rb +0 -53
  116. data/lib/fzeet/Control/ExplorerBrowser.rb +0 -66
  117. data/lib/fzeet/Control/Header.rb +0 -63
  118. data/lib/fzeet/Control/ListBox.rb +0 -72
  119. data/lib/fzeet/Control/ListView.rb +0 -133
  120. data/lib/fzeet/Control/MonthCalendar.rb +0 -38
  121. data/lib/fzeet/Control/ProgressBar.rb +0 -40
  122. data/lib/fzeet/Control/PropertySheet.rb +0 -51
  123. data/lib/fzeet/Control/Scintilla.rb +0 -117
  124. data/lib/fzeet/Control/Static.rb +0 -34
  125. data/lib/fzeet/Control/SysLink.rb +0 -40
  126. data/lib/fzeet/Control/Tab.rb +0 -59
  127. data/lib/fzeet/Control/TreeView.rb +0 -82
  128. data/lib/fzeet/Control/UpDown.rb +0 -36
  129. data/lib/fzeet/Control/WebBrowser.rb +0 -153
  130. data/lib/fzeet/Dialog.rb +0 -6
  131. data/lib/fzeet/Dialog/ColorDialog.rb +0 -44
  132. data/lib/fzeet/Dialog/Common.rb +0 -89
  133. data/lib/fzeet/Dialog/FileDialog.rb +0 -136
  134. data/lib/fzeet/Dialog/FindReplaceDialog.rb +0 -105
  135. data/lib/fzeet/Dialog/FontDialog.rb +0 -39
  136. data/lib/fzeet/Dialog/PrintDialog.rb +0 -75
  137. data/lib/fzeet/Menu.rb +0 -133
  138. data/lib/fzeet/UIRibbon.rb +0 -417
  139. data/lib/fzeet/Window.rb +0 -5
  140. data/lib/fzeet/windows/common.rb +0 -244
@@ -1,72 +0,0 @@
1
- require_relative 'Common'
2
-
3
- module Fzeet
4
- module ListBoxMethods
5
- def textlen(i) raise "GETTEXTLEN failed." if (len = sendmsg(:gettextlen, i)) == -1; len end
6
-
7
- def [](i)
8
- i = sendmsg(:getcursel) if i == :selected
9
-
10
- return '' if i == -1 || (len = textlen(i) + 1) == 1
11
-
12
- ''.tap { |item|
13
- FFI::MemoryPointer.new(:char, len) { |buf|
14
- raise "GETTEXT failed." if sendmsg(:gettext, i, buf) == -1
15
-
16
- item << buf.read_string
17
- }
18
- }
19
- end
20
-
21
- def clear; sendmsg(:resetcontent); self end
22
-
23
- def append(item)
24
- [*item].each { |item|
25
- p = FFI::MemoryPointer.from_string(item.to_s)
26
-
27
- raise 'ADDSTRING failed.' if [-1, -2].include?(sendmsg(:addstring, 0, p).tap { p.free })
28
- }
29
-
30
- self
31
- end
32
-
33
- def selected=(i)
34
- i = case i
35
- when -1; 0xffffffff
36
- when :first; 0
37
- when :last; length - 1
38
- else i
39
- end
40
-
41
- raise 'SETCURSEL failed.' if sendmsg(:setcursel, i) == -1 && i != 0xffffffff
42
-
43
- self
44
- end
45
-
46
- def length; raise 'GETCOUNT failed.' if (len = sendmsg(:getcount)) == -1; len end
47
- def each; length.times { |i| yield self[i] }; self end
48
- end
49
-
50
- class ListBox < Control
51
- include ListBoxMethods
52
-
53
- Prefix = {
54
- xstyle: [:ws_ex_],
55
- style: [:lbs_, :ws_],
56
- message: [:lb_, :wm_],
57
- notification: [:lbn_]
58
- }
59
-
60
- def initialize(parent, id, opts = {}, &block)
61
- super('ListBox', parent, id, opts)
62
-
63
- @parent.on(:command, @id, &block) if block
64
- end
65
-
66
- def on(notification, &block)
67
- @parent.on(:command, @id, Fzeet.constant(notification, *self.class::Prefix[:notification]), &block)
68
-
69
- self
70
- end
71
- end
72
- end
@@ -1,133 +0,0 @@
1
- require_relative 'Common'
2
-
3
- module Fzeet
4
- module ListViewMethods
5
- class ExStyle
6
- def initialize(listview) @listview = listview end
7
-
8
- def <<(xstyle)
9
- @listview.sendmsg(:setextendedlistviewstyle, 0,
10
- @listview.sendmsg(:getextendedlistviewstyle) | Fzeet.constant(xstyle, *@listview.class::Prefix[:xstyle])
11
- )
12
-
13
- self
14
- end
15
-
16
- def >>(xstyle)
17
- @listview.sendmsg(:setextendedlistviewstyle, 0,
18
- @listview.sendmsg(:getextendedlistviewstyle) & ~Fzeet.constant(xstyle, *@listview.class::Prefix[:xstyle])
19
- )
20
-
21
- self
22
- end
23
-
24
- def toggle(what) send((@listview.xstyle?(what)) ? :>> : :<<, what); self end
25
- end
26
-
27
- def xstyle?(xstyle) (sendmsg(:getextendedlistviewstyle) & (xstyle = Fzeet.constant(xstyle, *self.class::Prefix[:xstyle]))) == xstyle end
28
- def xstyle; ExStyle.new(self) end
29
-
30
- def insertColumn(i, text, width)
31
- lvc = Windows::LVCOLUMN.new
32
-
33
- lvc[:mask] = Fzeet.flags([:fmt, :width, :text, :subitem], :lvcf_)
34
- lvc[:fmt] = Fzeet.flags(:left, :lvcfmt_)
35
- lvc[:cx] = width
36
- lvc[:pszText] = ptext = FFI::MemoryPointer.from_string(text)
37
- lvc[:iSubItem] = i
38
-
39
- sendmsg(:insertcolumn, 0, lvc.pointer)
40
-
41
- self
42
- ensure
43
- ptext.free if ptext
44
- end
45
-
46
- class Item
47
- def initialize(lvi) @subitems = [lvi] end
48
-
49
- attr_reader :subitems
50
- end
51
-
52
- def insertItem(i, j, text)
53
- lvi = Windows::LVITEM.new
54
-
55
- lvi[:mask] = Fzeet.flags(:text, :lvif_)
56
- lvi[:iItem] = i
57
- lvi[:iSubItem] = j
58
- lvi[:pszText] = ptext = FFI::MemoryPointer.from_string(text)
59
-
60
- if j == 0
61
- @items << Item.new(lvi)
62
-
63
- lvi[:mask] |= Windows::LVIF_PARAM
64
- lvi[:lParam] = @items[i].object_id
65
-
66
- sendmsg(:insertitem, 0, lvi.pointer)
67
- else
68
- @items[i].subitems << lvi
69
-
70
- sendmsg(:setitem, 0, lvi.pointer)
71
- end
72
-
73
- @items[i].subitems[j].instance_variable_set(:@text, text)
74
-
75
- class << @items[i].subitems[j]
76
- attr_reader :text
77
- end
78
-
79
- self
80
- ensure
81
- ptext.free if ptext
82
- end
83
-
84
- def sort(j = 0)
85
- sendmsg(:sortitems, j,
86
- FFI::Function.new(:int, [:long, :long, :long], convention: :stdcall) { |lParam1, lParam2, lParamSort|
87
- yield ObjectSpace._id2ref(lParam1).subitems[lParamSort], ObjectSpace._id2ref(lParam2).subitems[lParamSort], j
88
- }
89
- )
90
-
91
- self
92
- end
93
-
94
- def clear; sendmsg(:deleteallitems); self end
95
- end
96
-
97
- class ListView < Control
98
- include ListViewMethods
99
-
100
- Prefix = {
101
- xstyle: [:lvs_ex_, :ws_ex_],
102
- style: [:lvs_, :ws_],
103
- message: [:lvm_, :ccm_, :wm_],
104
- notification: [:lvn_, :nm_]
105
- }
106
-
107
- def self.crackNotification(args)
108
- case args[:notification]
109
- when Windows::LVN_COLUMNCLICK
110
- args[:nmlv] = Windows::NMLISTVIEW.new(FFI::Pointer.new(args[:lParam]))
111
- args[:index] = args[:nmlv][:iSubItem]
112
- end
113
- end
114
-
115
- def initialize(parent, id, opts = {}, &block)
116
- super('SysListView32', parent, id, opts)
117
-
118
- @header = Handle.wrap(FFI::Pointer.new(sendmsg(:getheader)), WindowMethods, HeaderMethods)
119
-
120
- @items = []
121
-
122
- @parent.on(:notify, @id, &block) if block
123
- end
124
-
125
- attr_reader :header, :items
126
-
127
- def on(notification, &block)
128
- @parent.on(:notify, @id, Fzeet.constant(notification, *self.class::Prefix[:notification]), &block)
129
-
130
- self
131
- end
132
- end
133
- end
@@ -1,38 +0,0 @@
1
- require_relative 'Common'
2
-
3
- module Fzeet
4
- module MonthCalendarMethods
5
-
6
- end
7
-
8
- class MonthCalendar < Control
9
- include MonthCalendarMethods
10
-
11
- Prefix = {
12
- xstyle: [:ws_ex_],
13
- style: [:mcs_, :ws_],
14
- message: [:mcm_, :ccm_, :wm_],
15
- notification: [:mcn_, :nm_]
16
- }
17
-
18
- def self.crackNotification(args)
19
- case args[:notification]
20
- when Windows::MCN_SELCHANGE
21
- args[:sc] = Windows::NMSELCHANGE.new(FFI::Pointer.new(args[:lParam]))
22
- args[:st1], args[:st2] = args[:sc][:stSelStart], args[:sc][:stSelEnd]
23
- end
24
- end
25
-
26
- def initialize(parent, id, opts = {}, &block)
27
- super('SysMonthCal32', parent, id, opts)
28
-
29
- @parent.on(:notify, @id, &block) if block
30
- end
31
-
32
- def on(notification, &block)
33
- @parent.on(:notify, @id, Fzeet.constant(notification, *self.class::Prefix[:notification]), &block)
34
-
35
- self
36
- end
37
- end
38
- end
@@ -1,40 +0,0 @@
1
- require_relative 'Common'
2
-
3
- module Fzeet
4
- module ProgressBarMethods
5
- def step=(step) sendmsg(:setstep, step) end
6
- def step!; sendmsg(:stepit) end
7
-
8
- def position=(position) sendmsg(:setpos, position) end
9
-
10
- def marquee?; @marquee end
11
- def marquee=(marquee) sendmsg(:setmarquee, (@marquee = marquee) ? 1 : 0) end
12
- end
13
-
14
- class ProgressBar < Control
15
- include ProgressBarMethods
16
-
17
- Prefix = {
18
- xstyle: [:ws_ex_],
19
- style: [:pbs_, :ws_],
20
- message: [:pbm_, :ccm_, :wm_],
21
- notification: [:nm_]
22
- }
23
-
24
- def self.crackNotification(args) end
25
-
26
- def initialize(parent, id, opts = {}, &block)
27
- super('msctls_progress32', parent, id, opts)
28
-
29
- @marquee = false
30
-
31
- @parent.on(:notify, @id, &block) if block
32
- end
33
-
34
- def on(notification, &block)
35
- @parent.on(:notify, @id, Fzeet.constant(notification, *self.class::Prefix[:notification]), &block)
36
-
37
- self
38
- end
39
- end
40
- end
@@ -1,51 +0,0 @@
1
- require_relative 'Common'
2
-
3
- module Fzeet
4
- class PropertyPage
5
- class PROPSHEETPAGEA1 < FFI::Struct
6
- layout \
7
- :array, [Windows::PROPSHEETPAGE, 1]
8
- end
9
-
10
- def initialize
11
-
12
- end
13
- end
14
-
15
- class PropertySheet
16
- def initialize(parent, opts = {wizard: false})
17
- pointers = []
18
-
19
- psps = PropertyPage::PROPSHEETPAGEA1.new
20
-
21
- dt = Windows::DLGTEMPLATE.new
22
-
23
- dt[:style] = Fzeet.flags([:'3dlook', :control, :child, :tabstop], :ds_, :ws_)
24
- dt[:x], dt[:y], dt[:cx], dt[:cy] = 100, 100, 300, 150
25
-
26
- psp = psps[:array][0]
27
-
28
- psp[:dwSize] = psp.size
29
- psp[:dwFlags] = Fzeet.flags([:dlgindirect, :usetitle], :psp_)
30
- psp[:hInstance] = Windows.GetModuleHandle(nil)
31
- psp[:template][:pResource] = dt
32
- psp[:pszTitle] = pointers.push(FFI::MemoryPointer.from_string("Page")).last
33
-
34
- psh = Windows::PROPSHEETHEADER.new
35
-
36
- psh[:dwSize] = psh.size
37
- psh[:dwFlags] = Fzeet.flags(:propsheetpage, :psh_)
38
- psh[:dwFlags] |= Windows::PSH_WIZARD if opts[:wizard]
39
- psh[:hwndParent] = parent.handle
40
- psh[:hInstance] = Windows.GetModuleHandle(nil)
41
- psh[:pszCaption] = pointers.push(FFI::MemoryPointer.from_string('Sheet')).last
42
- psh[:nPages] = 1
43
- psh[:start][:nStartPage] = 0
44
- psh[:pages][:ppsp] = psps
45
-
46
- Windows.DetonateLastError(-1, :PropertySheet, psh)
47
- ensure
48
- pointers.each(&:free)
49
- end
50
- end
51
- end
@@ -1,117 +0,0 @@
1
- require_relative 'Common'
2
-
3
- module Fzeet
4
- module ScintillaMethods
5
- def text
6
- FFI::MemoryPointer.new(:uchar, len = sendmsg(:gettextlength) + 1) { |p|
7
- sendmsg(:gettext, len, p)
8
-
9
- return p.read_string
10
- }
11
- end
12
-
13
- def text=(text)
14
- p = FFI::MemoryPointer.from_string(text)
15
-
16
- sendmsg(:settext, 0, p)
17
- ensure
18
- p.free
19
- end
20
-
21
- def font
22
- FFI::MemoryPointer.new(:uchar, 33) { |p|
23
- sendmsg(:stylegetfont, Windows::STYLE_DEFAULT, p)
24
-
25
- return p.read_string
26
- }
27
- end
28
-
29
- def font=(name)
30
- p = FFI::MemoryPointer.from_string(name)
31
-
32
- sendmsg(:stylesetfont, Windows::STYLE_DEFAULT, p)
33
- ensure
34
- p.free
35
- end
36
-
37
- def fontSize; sendmsg(:stylegetsize, Windows::STYLE_DEFAULT) end
38
- def fontSize=(size) sendmsg(:stylesetsize, Windows::STYLE_DEFAULT, size) end
39
-
40
- def tabWidth; sendmsg(:gettabwidth) end
41
- def tabWidth=(tabWidth) sendmsg(:settabwidth, tabWidth) end
42
-
43
- def dirty?; @dirty end
44
- def dirty=(dirty) (dirty) ? @dirty = true : sendmsg(:setsavepoint) end
45
- end
46
-
47
- class Scintilla < Control
48
- include ScintillaMethods
49
-
50
- Prefix = {
51
- xstyle: [:ws_ex_],
52
- style: [:ws_],
53
- message: [:sci_, :wm_],
54
- notification: [:scn_, :scen_, :nm_]
55
- }
56
-
57
- def self.crackNotification(args)
58
- case args[:notification]
59
- when \
60
- Windows::SCN_STYLENEEDED,
61
- Windows::SCN_CHARADDED,
62
- Windows::SCN_SAVEPOINTREACHED,
63
- Windows::SCN_SAVEPOINTLEFT,
64
- Windows::SCN_MODIFYATTEMPTRO,
65
- Windows::SCN_KEY,
66
- Windows::SCN_DOUBLECLICK,
67
- Windows::SCN_UPDATEUI,
68
- Windows::SCN_MODIFIED,
69
- Windows::SCN_MACRORECORD,
70
- Windows::SCN_MARGINCLICK,
71
- Windows::SCN_NEEDSHOWN,
72
- Windows::SCN_PAINTED,
73
- Windows::SCN_USERLISTSELECTION,
74
- Windows::SCN_URIDROPPED,
75
- Windows::SCN_DWELLSTART,
76
- Windows::SCN_DWELLEND,
77
- Windows::SCN_ZOOM,
78
- Windows::SCN_HOTSPOTCLICK,
79
- Windows::SCN_HOTSPOTDOUBLECLICK,
80
- Windows::SCN_CALLTIPCLICK,
81
- Windows::SCN_AUTOCSELECTION,
82
- Windows::SCN_INDICATORCLICK,
83
- Windows::SCN_INDICATORRELEASE,
84
- Windows::SCN_AUTOCCANCELLED,
85
- Windows::SCN_AUTOCCHARDELETED
86
-
87
- args[:scn] = Windows::SCNotification.new(FFI::Pointer.new(args[:lParam]))
88
- end
89
- end
90
-
91
- def initialize(parent, id, opts = {}, &block)
92
- super('Scintilla', parent, id, opts)
93
-
94
- @dirty = false
95
-
96
- on(:savepointleft) { @dirty = true }
97
- on(:savepointreached) { @dirty = false }
98
-
99
- @parent.on(:notify, @id, &block) if block
100
- end
101
-
102
- def on(notification, &block)
103
- case c = Fzeet.constant(notification, *self.class::Prefix[:notification])
104
- when \
105
- Windows::SCEN_CHANGE,
106
- Windows::SCEN_SETFOCUS,
107
- Windows::SCEN_KILLFOCUS
108
-
109
- @parent.on(:command, @id, c, &block)
110
- else
111
- @parent.on(:notify, @id, c, &block)
112
- end
113
-
114
- self
115
- end
116
- end
117
- end