fzeet 0.5.0 → 0.5.1
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.
- data/examples/Dialog/DialogApplication.rbw +3 -0
- data/examples/Style.rbw +19 -0
- data/lib/fzeet/UIRibbon.rb +6 -0
- data/lib/fzeet/WindowMethods.rb +79 -0
- data/lib/fzeet/windows/com.rb +2 -0
- data/lib/fzeet/windows/kernel.rb +1 -0
- data/lib/fzeet/windows/userwnd.rb +58 -0
- data/lib/fzeet/windows.rb +1 -1
- metadata +5 -25
- data/examples/Raw/UIRibbon/Command.dll +0 -0
- data/examples/Raw/UIRibbon/Command.rb +0 -22
- data/examples/Raw/UIRibbon/Command.rbw +0 -51
- data/examples/Raw/UIRibbon/Command.xml +0 -65
- data/examples/Raw/UIRibbon/Minimal.dll +0 -0
- data/examples/Raw/UIRibbon/Minimal.rb +0 -16
- data/examples/Raw/UIRibbon/Minimal.rbw +0 -39
- data/examples/Raw/UIRibbon/Minimal.xml +0 -55
- data/examples/UIRibbon/Command.dll +0 -0
- data/examples/UIRibbon/Command.rb +0 -22
- data/examples/UIRibbon/Command.rbw +0 -20
- data/examples/UIRibbon/Command.xml +0 -65
- data/examples/UIRibbon/Minimal.dll +0 -0
- data/examples/UIRibbon/Minimal.rb +0 -16
- data/examples/UIRibbon/Minimal.rbw +0 -8
- data/examples/UIRibbon/Minimal.xml +0 -55
- data/examples/UIRibbon/Viewer.rbw +0 -9
@@ -8,7 +8,9 @@ Dialog.new(nil, modal: true, style: [:overlappedwindow, :center]) { |args|
|
|
8
8
|
dialog.menu = Menu.new.
|
9
9
|
append(:popup, 'Menu&1', PopupMenu.new.
|
10
10
|
append(:string, 'Item&1', :item1).
|
11
|
+
|
11
12
|
append(:separator).
|
13
|
+
|
12
14
|
append(:string, 'E&xit', :exit)
|
13
15
|
)
|
14
16
|
|
@@ -17,6 +19,7 @@ Dialog.new(nil, modal: true, style: [:overlappedwindow, :center]) { |args|
|
|
17
19
|
dialog.
|
18
20
|
on(:command, :exit) { dialog.end(:ok) }.
|
19
21
|
on(:command, :cancel) { dialog.end(:cancel) if question('Close?').yes? }.
|
22
|
+
|
20
23
|
on(:command, :item1) { message 'on(:command, :item1)' }.
|
21
24
|
on(:command, :button1) { message 'on(:command, :button1)' }
|
22
25
|
}
|
data/examples/Style.rbw
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'fzeet'
|
2
|
+
|
3
|
+
include Fzeet
|
4
|
+
|
5
|
+
Application.run { |window|
|
6
|
+
window.style >> :thickframe << :hscroll << :vscroll
|
7
|
+
|
8
|
+
window.reframe
|
9
|
+
|
10
|
+
window.menu = Menu.new.
|
11
|
+
append(:popup, '&View', PopupMenu.new.
|
12
|
+
append(:string, 'Always on &Top', :alwaysOnTop)
|
13
|
+
)
|
14
|
+
|
15
|
+
window.on(:command, :alwaysOnTop) {
|
16
|
+
window.toggle(:topmost).
|
17
|
+
menu[:alwaysOnTop].toggle(:checked)
|
18
|
+
}
|
19
|
+
}
|
data/lib/fzeet/UIRibbon.rb
CHANGED
data/lib/fzeet/WindowMethods.rb
CHANGED
@@ -4,6 +4,63 @@ module Fzeet
|
|
4
4
|
module WindowMethods
|
5
5
|
include Toggle
|
6
6
|
|
7
|
+
class Long
|
8
|
+
def initialize(window) @window = window end
|
9
|
+
|
10
|
+
def [](c)
|
11
|
+
Windows.SetLastError(0)
|
12
|
+
|
13
|
+
Windows.GetWindowLong(@window.handle, Fzeet.constant(c, :gwl_, :gwlp_, :dwl_)).tap { |result|
|
14
|
+
raise 'GetWindowLong failed.' if result == 0 && Windows.GetLastError() != 0
|
15
|
+
}
|
16
|
+
end
|
17
|
+
|
18
|
+
def []=(c, l)
|
19
|
+
Windows.SetLastError(0)
|
20
|
+
|
21
|
+
Windows.SetWindowLong(@window.handle, Fzeet.constant(c, :gwl_, :gwlp_, :dwl_), l).tap { |result|
|
22
|
+
raise 'SetWindowLong failed.' if result == 0 && Windows.GetLastError() != 0
|
23
|
+
}
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def long; Long.new(self) end
|
28
|
+
|
29
|
+
class Style
|
30
|
+
def initialize(window) @window = window end
|
31
|
+
|
32
|
+
def <<(style) @window.long[:style] = @window.long[:style] | Fzeet.constant(style, *@window.class::Prefix[:style]); self end
|
33
|
+
def >>(style) @window.long[:style] = @window.long[:style] & ~Fzeet.constant(style, *@window.class::Prefix[:style]); self end
|
34
|
+
|
35
|
+
def toggle(what) send((@window.style?(what)) ? :>> : :<<, what); self end
|
36
|
+
end
|
37
|
+
|
38
|
+
class ExStyle
|
39
|
+
def initialize(window) @window = window end
|
40
|
+
|
41
|
+
def <<(xstyle) @window.long[:exstyle] = @window.long[:exstyle] | Fzeet.constant(xstyle, *@window.class::Prefix[:xstyle]); self end
|
42
|
+
def >>(xstyle) @window.long[:exstyle] = @window.long[:exstyle] & ~Fzeet.constant(xstyle, *@window.class::Prefix[:xstyle]); self end
|
43
|
+
|
44
|
+
def toggle(what) send((@window.xstyle?(what)) ? :>> : :<<, what); self end
|
45
|
+
end
|
46
|
+
|
47
|
+
def style?(style) (long[:style] & (style = Fzeet.constant(style, *self.class::Prefix[:style]))) == style end
|
48
|
+
def style; Style.new(self) end
|
49
|
+
|
50
|
+
def xstyle?(xstyle) (long[:exstyle] & (xstyle = Fzeet.constant(xstyle, *self.class::Prefix[:xstyle]))) == xstyle end
|
51
|
+
def xstyle; ExStyle.new(self) end
|
52
|
+
|
53
|
+
def topmost?; xstyle?(:topmost) end
|
54
|
+
|
55
|
+
def topmost=(topmost)
|
56
|
+
Windows.DetonateLastError(0, :SetWindowPos,
|
57
|
+
@handle,
|
58
|
+
(topmost) ? Windows::HWND_TOPMOST : Windows::HWND_NOTOPMOST,
|
59
|
+
0, 0, 0, 0,
|
60
|
+
Windows::SWP_NOMOVE | Windows::SWP_NOSIZE
|
61
|
+
)
|
62
|
+
end
|
63
|
+
|
7
64
|
def show(cmdShow = :shownormal) Windows.ShowWindow(@handle, Fzeet.constant(cmdShow, :sw_)); self end
|
8
65
|
def update; Windows.DetonateLastError(0, :UpdateWindow, @handle); self end
|
9
66
|
|
@@ -26,6 +83,28 @@ module Fzeet
|
|
26
83
|
def enabled?; Windows.IsWindowEnabled(@handle) != 0 end
|
27
84
|
def enabled=(enabled) Windows.EnableWindow(@handle, (enabled) ? 1 : 0) end
|
28
85
|
|
86
|
+
def rect; Windows.DetonateLastError(0, :GetClientRect, @handle, r = Rect.new); r end
|
87
|
+
|
88
|
+
def position; Windows.DetonateLastError(0, :GetWindowRect, @handle, r = Rect.new); r end
|
89
|
+
def position=(a) Windows.DetonateLastError(0, :SetWindowPos, @handle, nil, a[0], a[1], a[2], a[3], Fzeet.constant(:nozorder, :swp_)) end
|
90
|
+
|
91
|
+
def location; position.lt end
|
92
|
+
def location=(a) Windows.DetonateLastError(0, :SetWindowPos, @handle, nil, a[0], a[1], 0, 0, Fzeet.flags([:nosize, :nozorder], :swp_)) end
|
93
|
+
|
94
|
+
def size; r = position; Size.new(r[:right] - r[:left], r[:bottom] - r[:top]) end
|
95
|
+
def size=(a) Windows.DetonateLastError(0, :SetWindowPos, @handle, nil, 0, 0, a[0], a[1], Fzeet.flags([:nomove, :nozorder], :swp_)) end
|
96
|
+
|
97
|
+
def reframe
|
98
|
+
Windows.DetonateLastError(0, :SetWindowPos,
|
99
|
+
@handle,
|
100
|
+
nil,
|
101
|
+
0, 0, 0, 0,
|
102
|
+
Fzeet.flags([:nomove, :nosize, :nozorder, :framechanged], :swp_)
|
103
|
+
)
|
104
|
+
|
105
|
+
self
|
106
|
+
end
|
107
|
+
|
29
108
|
def capture?; Windows.GetCapture().to_i == @handle.to_i end
|
30
109
|
def capture=(capture) (capture) ? Windows.SetCapture(@handle) : Windows.DetonateLastError(0, :ReleaseCapture) end
|
31
110
|
|
data/lib/fzeet/windows/com.rb
CHANGED
@@ -44,6 +44,7 @@ module Fzeet
|
|
44
44
|
|
45
45
|
attach_function :CoCreateInstance, [:pointer, :pointer, :ulong, :pointer, :pointer], :long
|
46
46
|
|
47
|
+
=begin
|
47
48
|
module COM
|
48
49
|
module Interface
|
49
50
|
def self.[](*args)
|
@@ -182,5 +183,6 @@ module Fzeet
|
|
182
183
|
]
|
183
184
|
|
184
185
|
Unknown = COM::Instance[IUnknown]
|
186
|
+
=end
|
185
187
|
end
|
186
188
|
end
|
data/lib/fzeet/windows/kernel.rb
CHANGED
@@ -121,6 +121,16 @@ module Fzeet
|
|
121
121
|
|
122
122
|
attach_function :RegisterClassEx, :RegisterClassExA, [:pointer], :ushort
|
123
123
|
|
124
|
+
#{ HWND_xxx
|
125
|
+
HWND_BROADCAST = FFI::Pointer.new(0xffff)
|
126
|
+
HWND_MESSAGE = FFI::Pointer.new(-3)
|
127
|
+
HWND_DESKTOP = FFI::Pointer.new(0)
|
128
|
+
HWND_TOP = FFI::Pointer.new(0)
|
129
|
+
HWND_BOTTOM = FFI::Pointer.new(1)
|
130
|
+
HWND_TOPMOST = FFI::Pointer.new(-1)
|
131
|
+
HWND_NOTOPMOST = FFI::Pointer.new(-2)
|
132
|
+
#}
|
133
|
+
|
124
134
|
#{ WS_xxx
|
125
135
|
WS_OVERLAPPED = 0x00000000
|
126
136
|
WS_POPUP = 0x80000000
|
@@ -239,6 +249,33 @@ module Fzeet
|
|
239
249
|
attach_function :DialogBoxIndirectParam, :DialogBoxIndirectParamA, [:pointer, :pointer, :pointer, :DLGPROC, :long], :int
|
240
250
|
attach_function :EndDialog, [:pointer, :int], :int
|
241
251
|
|
252
|
+
#{ GWL_xxx
|
253
|
+
GWL_WNDPROC = -4
|
254
|
+
GWL_HINSTANCE = -6
|
255
|
+
GWL_HWNDPARENT = -8
|
256
|
+
GWL_STYLE = -16
|
257
|
+
GWL_EXSTYLE = -20
|
258
|
+
GWL_USERDATA = -21
|
259
|
+
GWL_ID = -12
|
260
|
+
#}
|
261
|
+
|
262
|
+
#{ GWLP_xxx
|
263
|
+
GWLP_WNDPROC = -4
|
264
|
+
GWLP_HINSTANCE = -6
|
265
|
+
GWLP_HWNDPARENT = -8
|
266
|
+
GWLP_USERDATA = -21
|
267
|
+
GWLP_ID = -12
|
268
|
+
#}
|
269
|
+
|
270
|
+
#{ DWL_xxx
|
271
|
+
DWL_MSGRESULT = 0
|
272
|
+
DWL_DLGPROC = 4
|
273
|
+
DWL_USER = 8
|
274
|
+
#}
|
275
|
+
|
276
|
+
attach_function :GetWindowLong, :GetWindowLongA, [:pointer, :int], :long
|
277
|
+
attach_function :SetWindowLong, :SetWindowLongA, [:pointer, :int, :long], :long
|
278
|
+
|
242
279
|
SW_SHOWNORMAL = 1
|
243
280
|
|
244
281
|
attach_function :ShowWindow, [:pointer, :int], :int
|
@@ -252,6 +289,27 @@ module Fzeet
|
|
252
289
|
attach_function :IsWindowEnabled, [:pointer], :int
|
253
290
|
attach_function :EnableWindow, [:pointer, :int], :int
|
254
291
|
|
292
|
+
attach_function :GetClientRect, [:pointer, :pointer], :int
|
293
|
+
attach_function :GetWindowRect, [:pointer, :pointer], :int
|
294
|
+
|
295
|
+
SWP_NOSIZE = 0x0001
|
296
|
+
SWP_NOMOVE = 0x0002
|
297
|
+
SWP_NOZORDER = 0x0004
|
298
|
+
SWP_NOREDRAW = 0x0008
|
299
|
+
SWP_NOACTIVATE = 0x0010
|
300
|
+
SWP_FRAMECHANGED = 0x0020
|
301
|
+
SWP_SHOWWINDOW = 0x0040
|
302
|
+
SWP_HIDEWINDOW = 0x0080
|
303
|
+
SWP_NOCOPYBITS = 0x0100
|
304
|
+
SWP_NOOWNERZORDER = 0x0200
|
305
|
+
SWP_NOSENDCHANGING = 0x0400
|
306
|
+
SWP_DRAWFRAME = SWP_FRAMECHANGED
|
307
|
+
SWP_NOREPOSITION = SWP_NOOWNERZORDER
|
308
|
+
SWP_DEFERERASE = 0x2000
|
309
|
+
SWP_ASYNCWINDOWPOS = 0x4000
|
310
|
+
|
311
|
+
attach_function :SetWindowPos, [:pointer, :pointer, :int, :int, :int, :int, :uint], :int
|
312
|
+
|
255
313
|
attach_function :GetCursorPos, [:pointer], :int
|
256
314
|
|
257
315
|
attach_function :ScreenToClient, [:pointer, :pointer], :int
|
data/lib/fzeet/windows.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fzeet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 11
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
8
|
+
- 1
|
9
|
+
version: 0.5.1
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Radoslav Peev
|
@@ -15,7 +14,7 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date: 2010-08-
|
17
|
+
date: 2010-08-23 00:00:00 +03:00
|
19
18
|
default_executable:
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
@@ -24,9 +23,8 @@ dependencies:
|
|
24
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
24
|
none: false
|
26
25
|
requirements:
|
27
|
-
- -
|
26
|
+
- - ~>
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash: 1
|
30
28
|
segments:
|
31
29
|
- 0
|
32
30
|
- 6
|
@@ -97,14 +95,6 @@ files:
|
|
97
95
|
- examples/Raw/Hello.rbw
|
98
96
|
- examples/Raw/LifeCycle.rbw
|
99
97
|
- examples/Raw/Minimal.rbw
|
100
|
-
- examples/Raw/UIRibbon/Command.rbw
|
101
|
-
- examples/Raw/UIRibbon/Minimal.rbw
|
102
|
-
- examples/Raw/UIRibbon/Command.xml
|
103
|
-
- examples/Raw/UIRibbon/Minimal.xml
|
104
|
-
- examples/Raw/UIRibbon/Command.rb
|
105
|
-
- examples/Raw/UIRibbon/Minimal.rb
|
106
|
-
- examples/Raw/UIRibbon/Command.dll
|
107
|
-
- examples/Raw/UIRibbon/Minimal.dll
|
108
98
|
- examples/Command.rbw
|
109
99
|
- examples/Hello.rbw
|
110
100
|
- examples/Inheritance.rbw
|
@@ -117,6 +107,7 @@ files:
|
|
117
107
|
- examples/Minimal.rbw
|
118
108
|
- examples/MinimalOpts.rbw
|
119
109
|
- examples/Scribble.rbw
|
110
|
+
- examples/Style.rbw
|
120
111
|
- examples/Menu/ContextMenu.rbw
|
121
112
|
- examples/Menu/Menu.rbw
|
122
113
|
- examples/Menu/MenuPARGB32.rbw
|
@@ -124,15 +115,6 @@ files:
|
|
124
115
|
- examples/Dialog/Dialog.rbw
|
125
116
|
- examples/Dialog/DialogApplication.rbw
|
126
117
|
- examples/Dialog/FileDialog.rbw
|
127
|
-
- examples/UIRibbon/Command.rbw
|
128
|
-
- examples/UIRibbon/Minimal.rbw
|
129
|
-
- examples/UIRibbon/Viewer.rbw
|
130
|
-
- examples/UIRibbon/Command.xml
|
131
|
-
- examples/UIRibbon/Minimal.xml
|
132
|
-
- examples/UIRibbon/Command.rb
|
133
|
-
- examples/UIRibbon/Minimal.rb
|
134
|
-
- examples/UIRibbon/Command.dll
|
135
|
-
- examples/UIRibbon/Minimal.dll
|
136
118
|
- LICENSE
|
137
119
|
has_rdoc: true
|
138
120
|
homepage:
|
@@ -148,7 +130,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
148
130
|
requirements:
|
149
131
|
- - ">="
|
150
132
|
- !ruby/object:Gem::Version
|
151
|
-
hash: 3
|
152
133
|
segments:
|
153
134
|
- 0
|
154
135
|
version: "0"
|
@@ -157,7 +138,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
138
|
requirements:
|
158
139
|
- - ">="
|
159
140
|
- !ruby/object:Gem::Version
|
160
|
-
hash: 3
|
161
141
|
segments:
|
162
142
|
- 0
|
163
143
|
version: "0"
|
Binary file
|
@@ -1,22 +0,0 @@
|
|
1
|
-
CmdAppMenu = 2
|
2
|
-
CmdQAT = 3
|
3
|
-
CmdTab1 = 4
|
4
|
-
CmdTab1_LabelTitle_RESID = 60001
|
5
|
-
CmdTab1Group1 = 5
|
6
|
-
CmdTab1Group1_LabelTitle_RESID = 60002
|
7
|
-
CmdTab1Group1_LabelDescription_RESID = 60003
|
8
|
-
CmdTab1Group1_TooltipDescription_RESID = 60004
|
9
|
-
CmdTab1Group1_SmallImages_RESID = 60005
|
10
|
-
CmdTab1Group1_LargeImages_RESID = 60006
|
11
|
-
CmdItem1 = 6
|
12
|
-
CmdItem1_LabelTitle_RESID = 60007
|
13
|
-
CmdItem1_LabelDescription_RESID = 60008
|
14
|
-
CmdItem1_TooltipDescription_RESID = 60009
|
15
|
-
CmdItem1_SmallImages_RESID = 60010
|
16
|
-
CmdItem1_LargeImages_RESID = 60011
|
17
|
-
CmdButton1 = 7
|
18
|
-
CmdButton1_LabelTitle_RESID = 60012
|
19
|
-
CmdButton1_LabelDescription_RESID = 60013
|
20
|
-
CmdButton1_TooltipDescription_RESID = 60014
|
21
|
-
CmdButton1_SmallImages_RESID = 60015
|
22
|
-
CmdButton1_LargeImages_RESID = 60016
|
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'fzeet'
|
2
|
-
|
3
|
-
include Fzeet::Windows
|
4
|
-
|
5
|
-
def onItem1(*args)
|
6
|
-
Fzeet.message __method__
|
7
|
-
|
8
|
-
UIF.SetUICommandProperty(CmdButton1, UI_PKEY_Enabled, PROPVARIANT[:bool, true])
|
9
|
-
UIF.SetUICommandProperty(CmdItem1, UI_PKEY_Enabled, PROPVARIANT[:bool, false])
|
10
|
-
end
|
11
|
-
|
12
|
-
def onButton1(*args)
|
13
|
-
Fzeet.message __method__
|
14
|
-
|
15
|
-
UIF.SetUICommandProperty(CmdItem1, UI_PKEY_Enabled, PROPVARIANT[:bool, true])
|
16
|
-
UIF.SetUICommandProperty(CmdButton1, UI_PKEY_Enabled, PROPVARIANT[:bool, false])
|
17
|
-
end
|
18
|
-
|
19
|
-
UICH = UICommandHandler.new
|
20
|
-
|
21
|
-
def UICH.Execute(*args)
|
22
|
-
case args[0]
|
23
|
-
when CmdItem1
|
24
|
-
onItem1(*args)
|
25
|
-
when CmdButton1
|
26
|
-
onButton1(*args)
|
27
|
-
end
|
28
|
-
|
29
|
-
S_OK
|
30
|
-
end
|
31
|
-
|
32
|
-
UIA = UIApplication.new
|
33
|
-
|
34
|
-
def UIA.OnCreateUICommand(*args)
|
35
|
-
UICH.QueryInterface(UICH.class::IID, args[-1])
|
36
|
-
|
37
|
-
S_OK
|
38
|
-
end
|
39
|
-
|
40
|
-
UIF = UIFramework.new
|
41
|
-
|
42
|
-
Fzeet::Application.run { |window|
|
43
|
-
UIF.Initialize(window.handle, UIA)
|
44
|
-
UIF.LoadUI(LoadRibbonDll(), "APPLICATION_RIBBON\0".encode('utf-16le'))
|
45
|
-
|
46
|
-
window.on(:destroy) {
|
47
|
-
UICH.Release
|
48
|
-
UIA.Release
|
49
|
-
UIF.Destroy; UIF.Release
|
50
|
-
}
|
51
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8' ?>
|
2
|
-
<Application xmlns='http://schemas.microsoft.com/windows/2009/Ribbon'>
|
3
|
-
<Application.Commands>
|
4
|
-
<Command Name='cmdAppMenu' />
|
5
|
-
|
6
|
-
<Command Name='cmdQAT' />
|
7
|
-
|
8
|
-
<Command Name='cmdTab1' LabelTitle='Tab1' />
|
9
|
-
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
|
-
<Command.SmallImages>
|
11
|
-
<Image>../../res/go-next-small.bmp</Image>
|
12
|
-
</Command.SmallImages>
|
13
|
-
<Command.LargeImages>
|
14
|
-
<Image>../../res/go-next.bmp</Image>
|
15
|
-
</Command.LargeImages>
|
16
|
-
</Command>
|
17
|
-
|
18
|
-
<Command Name='cmdItem1' LabelTitle='&Item1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
|
-
<Command.SmallImages>
|
20
|
-
<Image>../../res/go-previous-small.bmp</Image>
|
21
|
-
</Command.SmallImages>
|
22
|
-
<Command.LargeImages>
|
23
|
-
<Image>../../res/go-previous.bmp</Image>
|
24
|
-
</Command.LargeImages>
|
25
|
-
</Command>
|
26
|
-
|
27
|
-
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
28
|
-
<Command.SmallImages>
|
29
|
-
<Image>../../res/go-next-small.bmp</Image>
|
30
|
-
</Command.SmallImages>
|
31
|
-
<Command.LargeImages>
|
32
|
-
<Image>../../res/go-next.bmp</Image>
|
33
|
-
</Command.LargeImages>
|
34
|
-
</Command>
|
35
|
-
</Application.Commands>
|
36
|
-
|
37
|
-
<Application.Views>
|
38
|
-
<Ribbon>
|
39
|
-
<Ribbon.ApplicationMenu>
|
40
|
-
<ApplicationMenu CommandName='cmdAppMenu'>
|
41
|
-
<MenuGroup Class='MajorItems'>
|
42
|
-
<Button CommandName='cmdItem1' />
|
43
|
-
</MenuGroup>
|
44
|
-
</ApplicationMenu>
|
45
|
-
</Ribbon.ApplicationMenu>
|
46
|
-
|
47
|
-
<Ribbon.QuickAccessToolbar>
|
48
|
-
<QuickAccessToolbar CommandName='cmdQAT'>
|
49
|
-
<QuickAccessToolbar.ApplicationDefaults>
|
50
|
-
<Button CommandName='cmdItem1' />
|
51
|
-
<Button CommandName='cmdButton1' />
|
52
|
-
</QuickAccessToolbar.ApplicationDefaults>
|
53
|
-
</QuickAccessToolbar>
|
54
|
-
</Ribbon.QuickAccessToolbar>
|
55
|
-
|
56
|
-
<Ribbon.Tabs>
|
57
|
-
<Tab CommandName='cmdTab1'>
|
58
|
-
<Group CommandName='cmdTab1Group1' SizeDefinition='OneButton'>
|
59
|
-
<Button CommandName='cmdButton1' />
|
60
|
-
</Group>
|
61
|
-
</Tab>
|
62
|
-
</Ribbon.Tabs>
|
63
|
-
</Ribbon>
|
64
|
-
</Application.Views>
|
65
|
-
</Application>
|
Binary file
|
@@ -1,16 +0,0 @@
|
|
1
|
-
CmdAppMenu = 2
|
2
|
-
CmdQAT = 3
|
3
|
-
CmdTab1 = 4
|
4
|
-
CmdTab1_LabelTitle_RESID = 60001
|
5
|
-
CmdTab1Group1 = 5
|
6
|
-
CmdTab1Group1_LabelTitle_RESID = 60002
|
7
|
-
CmdTab1Group1_LabelDescription_RESID = 60003
|
8
|
-
CmdTab1Group1_TooltipDescription_RESID = 60004
|
9
|
-
CmdTab1Group1_SmallImages_RESID = 60005
|
10
|
-
CmdTab1Group1_LargeImages_RESID = 60006
|
11
|
-
CmdButton1 = 6
|
12
|
-
CmdButton1_LabelTitle_RESID = 60007
|
13
|
-
CmdButton1_LabelDescription_RESID = 60008
|
14
|
-
CmdButton1_TooltipDescription_RESID = 60009
|
15
|
-
CmdButton1_SmallImages_RESID = 60010
|
16
|
-
CmdButton1_LargeImages_RESID = 60011
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require 'fzeet'
|
2
|
-
|
3
|
-
include Fzeet::Windows
|
4
|
-
|
5
|
-
def onButton1(*args)
|
6
|
-
Fzeet.message __method__
|
7
|
-
end
|
8
|
-
|
9
|
-
UICH = UICommandHandler.new
|
10
|
-
|
11
|
-
def UICH.Execute(*args)
|
12
|
-
case args[0]
|
13
|
-
when CmdButton1
|
14
|
-
onButton1(*args)
|
15
|
-
end
|
16
|
-
|
17
|
-
S_OK
|
18
|
-
end
|
19
|
-
|
20
|
-
UIA = UIApplication.new
|
21
|
-
|
22
|
-
def UIA.OnCreateUICommand(*args)
|
23
|
-
UICH.QueryInterface(UICH.class::IID, args[-1])
|
24
|
-
|
25
|
-
S_OK
|
26
|
-
end
|
27
|
-
|
28
|
-
UIF = UIFramework.new
|
29
|
-
|
30
|
-
Fzeet::Application.run { |window|
|
31
|
-
UIF.Initialize(window.handle, UIA)
|
32
|
-
UIF.LoadUI(LoadRibbonDll(), "APPLICATION_RIBBON\0".encode('utf-16le'))
|
33
|
-
|
34
|
-
window.on(:destroy) {
|
35
|
-
UICH.Release
|
36
|
-
UIA.Release
|
37
|
-
UIF.Destroy; UIF.Release
|
38
|
-
}
|
39
|
-
}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8' ?>
|
2
|
-
<Application xmlns='http://schemas.microsoft.com/windows/2009/Ribbon'>
|
3
|
-
<Application.Commands>
|
4
|
-
<Command Name='cmdAppMenu' />
|
5
|
-
|
6
|
-
<Command Name='cmdQAT' />
|
7
|
-
|
8
|
-
<Command Name='cmdTab1' LabelTitle='Tab1' />
|
9
|
-
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
|
-
<Command.SmallImages>
|
11
|
-
<Image>../../res/go-next-small.bmp</Image>
|
12
|
-
</Command.SmallImages>
|
13
|
-
<Command.LargeImages>
|
14
|
-
<Image>../../res/go-next.bmp</Image>
|
15
|
-
</Command.LargeImages>
|
16
|
-
</Command>
|
17
|
-
|
18
|
-
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
|
-
<Command.SmallImages>
|
20
|
-
<Image>../../res/go-next-small.bmp</Image>
|
21
|
-
</Command.SmallImages>
|
22
|
-
<Command.LargeImages>
|
23
|
-
<Image>../../res/go-next.bmp</Image>
|
24
|
-
</Command.LargeImages>
|
25
|
-
</Command>
|
26
|
-
</Application.Commands>
|
27
|
-
|
28
|
-
<Application.Views>
|
29
|
-
<Ribbon>
|
30
|
-
<Ribbon.ApplicationMenu>
|
31
|
-
<ApplicationMenu CommandName='cmdAppMenu'>
|
32
|
-
<MenuGroup Class='MajorItems'>
|
33
|
-
<Button CommandName='cmdButton1' />
|
34
|
-
</MenuGroup>
|
35
|
-
</ApplicationMenu>
|
36
|
-
</Ribbon.ApplicationMenu>
|
37
|
-
|
38
|
-
<Ribbon.QuickAccessToolbar>
|
39
|
-
<QuickAccessToolbar CommandName='cmdQAT'>
|
40
|
-
<QuickAccessToolbar.ApplicationDefaults>
|
41
|
-
<Button CommandName='cmdButton1' />
|
42
|
-
</QuickAccessToolbar.ApplicationDefaults>
|
43
|
-
</QuickAccessToolbar>
|
44
|
-
</Ribbon.QuickAccessToolbar>
|
45
|
-
|
46
|
-
<Ribbon.Tabs>
|
47
|
-
<Tab CommandName='cmdTab1'>
|
48
|
-
<Group CommandName='cmdTab1Group1' SizeDefinition='OneButton'>
|
49
|
-
<Button CommandName='cmdButton1' />
|
50
|
-
</Group>
|
51
|
-
</Tab>
|
52
|
-
</Ribbon.Tabs>
|
53
|
-
</Ribbon>
|
54
|
-
</Application.Views>
|
55
|
-
</Application>
|
Binary file
|
@@ -1,22 +0,0 @@
|
|
1
|
-
CmdAppMenu = 2
|
2
|
-
CmdQAT = 3
|
3
|
-
CmdTab1 = 4
|
4
|
-
CmdTab1_LabelTitle_RESID = 60001
|
5
|
-
CmdTab1Group1 = 5
|
6
|
-
CmdTab1Group1_LabelTitle_RESID = 60002
|
7
|
-
CmdTab1Group1_LabelDescription_RESID = 60003
|
8
|
-
CmdTab1Group1_TooltipDescription_RESID = 60004
|
9
|
-
CmdTab1Group1_SmallImages_RESID = 60005
|
10
|
-
CmdTab1Group1_LargeImages_RESID = 60006
|
11
|
-
CmdItem1 = 6
|
12
|
-
CmdItem1_LabelTitle_RESID = 60007
|
13
|
-
CmdItem1_LabelDescription_RESID = 60008
|
14
|
-
CmdItem1_TooltipDescription_RESID = 60009
|
15
|
-
CmdItem1_SmallImages_RESID = 60010
|
16
|
-
CmdItem1_LargeImages_RESID = 60011
|
17
|
-
CmdButton1 = 7
|
18
|
-
CmdButton1_LabelTitle_RESID = 60012
|
19
|
-
CmdButton1_LabelDescription_RESID = 60013
|
20
|
-
CmdButton1_TooltipDescription_RESID = 60014
|
21
|
-
CmdButton1_SmallImages_RESID = 60015
|
22
|
-
CmdButton1_LargeImages_RESID = 60016
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'fzeet'
|
2
|
-
|
3
|
-
include Fzeet
|
4
|
-
|
5
|
-
Application.run { |window|
|
6
|
-
UIRibbon.new(window).
|
7
|
-
on(CmdItem1) { |args|
|
8
|
-
message 'on(CmdItem1)'
|
9
|
-
|
10
|
-
args[:ribbon][CmdButton1].enabled = true
|
11
|
-
args[:sender].enabled = false
|
12
|
-
}.
|
13
|
-
|
14
|
-
on(CmdButton1) { |args|
|
15
|
-
message 'on(CmdButton1)'
|
16
|
-
|
17
|
-
args[:ribbon][CmdItem1].enabled = true
|
18
|
-
args[:sender].enabled = false
|
19
|
-
}
|
20
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8' ?>
|
2
|
-
<Application xmlns='http://schemas.microsoft.com/windows/2009/Ribbon'>
|
3
|
-
<Application.Commands>
|
4
|
-
<Command Name='cmdAppMenu' />
|
5
|
-
|
6
|
-
<Command Name='cmdQAT' />
|
7
|
-
|
8
|
-
<Command Name='cmdTab1' LabelTitle='Tab1' />
|
9
|
-
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
|
-
<Command.SmallImages>
|
11
|
-
<Image>../res/go-next-small.bmp</Image>
|
12
|
-
</Command.SmallImages>
|
13
|
-
<Command.LargeImages>
|
14
|
-
<Image>../res/go-next.bmp</Image>
|
15
|
-
</Command.LargeImages>
|
16
|
-
</Command>
|
17
|
-
|
18
|
-
<Command Name='cmdItem1' LabelTitle='&Item1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
|
-
<Command.SmallImages>
|
20
|
-
<Image>../res/go-previous-small.bmp</Image>
|
21
|
-
</Command.SmallImages>
|
22
|
-
<Command.LargeImages>
|
23
|
-
<Image>../res/go-previous.bmp</Image>
|
24
|
-
</Command.LargeImages>
|
25
|
-
</Command>
|
26
|
-
|
27
|
-
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
28
|
-
<Command.SmallImages>
|
29
|
-
<Image>../res/go-next-small.bmp</Image>
|
30
|
-
</Command.SmallImages>
|
31
|
-
<Command.LargeImages>
|
32
|
-
<Image>../res/go-next.bmp</Image>
|
33
|
-
</Command.LargeImages>
|
34
|
-
</Command>
|
35
|
-
</Application.Commands>
|
36
|
-
|
37
|
-
<Application.Views>
|
38
|
-
<Ribbon>
|
39
|
-
<Ribbon.ApplicationMenu>
|
40
|
-
<ApplicationMenu CommandName='cmdAppMenu'>
|
41
|
-
<MenuGroup Class='MajorItems'>
|
42
|
-
<Button CommandName='cmdItem1' />
|
43
|
-
</MenuGroup>
|
44
|
-
</ApplicationMenu>
|
45
|
-
</Ribbon.ApplicationMenu>
|
46
|
-
|
47
|
-
<Ribbon.QuickAccessToolbar>
|
48
|
-
<QuickAccessToolbar CommandName='cmdQAT'>
|
49
|
-
<QuickAccessToolbar.ApplicationDefaults>
|
50
|
-
<Button CommandName='cmdItem1' />
|
51
|
-
<Button CommandName='cmdButton1' />
|
52
|
-
</QuickAccessToolbar.ApplicationDefaults>
|
53
|
-
</QuickAccessToolbar>
|
54
|
-
</Ribbon.QuickAccessToolbar>
|
55
|
-
|
56
|
-
<Ribbon.Tabs>
|
57
|
-
<Tab CommandName='cmdTab1'>
|
58
|
-
<Group CommandName='cmdTab1Group1' SizeDefinition='OneButton'>
|
59
|
-
<Button CommandName='cmdButton1' />
|
60
|
-
</Group>
|
61
|
-
</Tab>
|
62
|
-
</Ribbon.Tabs>
|
63
|
-
</Ribbon>
|
64
|
-
</Application.Views>
|
65
|
-
</Application>
|
Binary file
|
@@ -1,16 +0,0 @@
|
|
1
|
-
CmdAppMenu = 2
|
2
|
-
CmdQAT = 3
|
3
|
-
CmdTab1 = 4
|
4
|
-
CmdTab1_LabelTitle_RESID = 60001
|
5
|
-
CmdTab1Group1 = 5
|
6
|
-
CmdTab1Group1_LabelTitle_RESID = 60002
|
7
|
-
CmdTab1Group1_LabelDescription_RESID = 60003
|
8
|
-
CmdTab1Group1_TooltipDescription_RESID = 60004
|
9
|
-
CmdTab1Group1_SmallImages_RESID = 60005
|
10
|
-
CmdTab1Group1_LargeImages_RESID = 60006
|
11
|
-
CmdButton1 = 6
|
12
|
-
CmdButton1_LabelTitle_RESID = 60007
|
13
|
-
CmdButton1_LabelDescription_RESID = 60008
|
14
|
-
CmdButton1_TooltipDescription_RESID = 60009
|
15
|
-
CmdButton1_SmallImages_RESID = 60010
|
16
|
-
CmdButton1_LargeImages_RESID = 60011
|
@@ -1,55 +0,0 @@
|
|
1
|
-
<?xml version='1.0' encoding='utf-8' ?>
|
2
|
-
<Application xmlns='http://schemas.microsoft.com/windows/2009/Ribbon'>
|
3
|
-
<Application.Commands>
|
4
|
-
<Command Name='cmdAppMenu' />
|
5
|
-
|
6
|
-
<Command Name='cmdQAT' />
|
7
|
-
|
8
|
-
<Command Name='cmdTab1' LabelTitle='Tab1' />
|
9
|
-
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
|
-
<Command.SmallImages>
|
11
|
-
<Image>../res/go-next-small.bmp</Image>
|
12
|
-
</Command.SmallImages>
|
13
|
-
<Command.LargeImages>
|
14
|
-
<Image>../res/go-next.bmp</Image>
|
15
|
-
</Command.LargeImages>
|
16
|
-
</Command>
|
17
|
-
|
18
|
-
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
|
-
<Command.SmallImages>
|
20
|
-
<Image>../res/go-next-small.bmp</Image>
|
21
|
-
</Command.SmallImages>
|
22
|
-
<Command.LargeImages>
|
23
|
-
<Image>../res/go-next.bmp</Image>
|
24
|
-
</Command.LargeImages>
|
25
|
-
</Command>
|
26
|
-
</Application.Commands>
|
27
|
-
|
28
|
-
<Application.Views>
|
29
|
-
<Ribbon>
|
30
|
-
<Ribbon.ApplicationMenu>
|
31
|
-
<ApplicationMenu CommandName='cmdAppMenu'>
|
32
|
-
<MenuGroup Class='MajorItems'>
|
33
|
-
<Button CommandName='cmdButton1' />
|
34
|
-
</MenuGroup>
|
35
|
-
</ApplicationMenu>
|
36
|
-
</Ribbon.ApplicationMenu>
|
37
|
-
|
38
|
-
<Ribbon.QuickAccessToolbar>
|
39
|
-
<QuickAccessToolbar CommandName='cmdQAT'>
|
40
|
-
<QuickAccessToolbar.ApplicationDefaults>
|
41
|
-
<Button CommandName='cmdButton1' />
|
42
|
-
</QuickAccessToolbar.ApplicationDefaults>
|
43
|
-
</QuickAccessToolbar>
|
44
|
-
</Ribbon.QuickAccessToolbar>
|
45
|
-
|
46
|
-
<Ribbon.Tabs>
|
47
|
-
<Tab CommandName='cmdTab1'>
|
48
|
-
<Group CommandName='cmdTab1Group1' SizeDefinition='OneButton'>
|
49
|
-
<Button CommandName='cmdButton1' />
|
50
|
-
</Group>
|
51
|
-
</Tab>
|
52
|
-
</Ribbon.Tabs>
|
53
|
-
</Ribbon>
|
54
|
-
</Application.Views>
|
55
|
-
</Application>
|