fzeet 0.5.2 → 0.5.3
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/Dialog.rbw +2 -2
- data/examples/Raw/UIRibbon/Command.dll +0 -0
- data/examples/Raw/UIRibbon/Command.rb +17 -11
- data/examples/Raw/UIRibbon/Command.xml +6 -0
- data/examples/Raw/UIRibbon/Minimal.dll +0 -0
- data/examples/Raw/UIRibbon/Minimal.rb +10 -6
- data/examples/Raw/UIRibbon/Minimal.xml +4 -0
- data/examples/UIRibbon/Color.rbw +12 -0
- data/examples/UIRibbon/Command.dll +0 -0
- data/examples/UIRibbon/Command.rb +17 -11
- data/examples/UIRibbon/Command.xml +6 -0
- data/examples/UIRibbon/ContextPopup.dll +0 -0
- data/examples/UIRibbon/ContextPopup.rb +23 -0
- data/examples/UIRibbon/ContextPopup.rbw +12 -0
- data/examples/UIRibbon/ContextPopup.xml +83 -0
- data/examples/UIRibbon/Minimal.dll +0 -0
- data/examples/UIRibbon/Minimal.rb +10 -6
- data/examples/UIRibbon/Minimal.xml +4 -0
- data/examples/Version.rbw +5 -0
- data/examples/res/go-next-big.bmp +0 -0
- data/examples/res/go-previous-big.bmp +0 -0
- data/lib/fzeet/Accelerator.rb +23 -3
- data/lib/fzeet/Application.rb +1 -1
- data/lib/fzeet/{common.rb → Common.rb} +2 -50
- data/lib/fzeet/{ControlButton.rb → Control/Button.rb} +1 -1
- data/lib/fzeet/{ControlCommon.rb → Control/Common.rb} +1 -1
- data/lib/fzeet/Control.rb +1 -1
- data/lib/fzeet/Dialog/Common.rb +5 -0
- data/lib/fzeet/{DialogFileDialog.rb → Dialog/FileDialog.rb} +1 -43
- data/lib/fzeet/Dialog/FolderDialog.rb +45 -0
- data/lib/fzeet/Dialog.rb +2 -1
- data/lib/fzeet/Menu.rb +77 -77
- data/lib/fzeet/UIRibbon.rb +86 -1
- data/lib/fzeet/{WindowCommon.rb → Window/Common.rb} +52 -2
- data/lib/fzeet/{WindowDialog.rb → Window/Dialog.rb} +6 -6
- data/lib/fzeet/{WindowWindow.rb → Window/Window.rb} +1 -1
- data/lib/fzeet/{WindowMethods.rb → Window/WindowMethods.rb} +49 -43
- data/lib/fzeet/Window.rb +2 -2
- data/lib/fzeet/windows/com.rb +97 -15
- data/lib/fzeet/windows/{comctlbutton.rb → comctl/Button.rb} +1 -1
- data/lib/fzeet/windows/{comctlcommon.rb → comctl/Common.rb} +1 -1
- data/lib/fzeet/windows/comctl.rb +1 -1
- data/lib/fzeet/windows/{comdlgcommon.rb → comdlg/Common.rb} +1 -1
- data/lib/fzeet/windows/{comdlgofn.rb → comdlg/FileDialog.rb} +1 -1
- data/lib/fzeet/windows/comdlg.rb +1 -1
- data/lib/fzeet/windows/common.rb +80 -5
- data/lib/fzeet/windows/gdi.rb +30 -0
- data/lib/fzeet/windows/kernel.rb +74 -21
- data/lib/fzeet/windows/ole.rb +60 -0
- data/lib/fzeet/windows/propsys.rb +40 -0
- data/lib/fzeet/windows/shell/Common.rb +10 -0
- data/lib/fzeet/windows/shell/FolderDialog.rb +39 -0
- data/lib/fzeet/windows/shell.rb +1 -43
- data/lib/fzeet/windows/uiribbon.rb +275 -18
- data/lib/fzeet/windows/user/Accelerator.rb +182 -0
- data/lib/fzeet/windows/user/Common.rb +33 -0
- data/lib/fzeet/windows/{userctlbutton.rb → user/Control/Button.rb} +1 -1
- data/lib/fzeet/windows/{userctlcommon.rb → user/Control/Common.rb} +1 -1
- data/lib/fzeet/windows/user/Control.rb +1 -0
- data/lib/fzeet/windows/user/Menu.rb +115 -0
- data/lib/fzeet/windows/{usermsg.rb → user/Message.rb} +1 -3
- data/lib/fzeet/windows/{usermbox.rb → user/MessageBox.rb} +1 -5
- data/lib/fzeet/windows/user/SystemParametersInfo.rb +244 -0
- data/lib/fzeet/windows/{userwnd.rb → user/Window.rb} +70 -38
- data/lib/fzeet/windows/user.rb +7 -7
- data/lib/fzeet/windows.rb +2 -73
- data/lib/fzeet.rb +1 -1
- metadata +39 -27
- data/lib/fzeet/DialogCommon.rb +0 -5
- data/lib/fzeet/windows/usercommon.rb +0 -8
- data/lib/fzeet/windows/userctl.rb +0 -1
- data/lib/fzeet/windows/userkbd.rb +0 -20
- data/lib/fzeet/windows/usermenu.rb +0 -50
- data/lib/fzeet/windows/userspi.rb +0 -29
- /data/examples/Dialog/{FileDialog.rbw → FileAndFolderDialog.rbw} +0 -0
data/examples/Dialog/Dialog.rbw
CHANGED
@@ -24,7 +24,7 @@ Application.run { |window|
|
|
24
24
|
}
|
25
25
|
|
26
26
|
Button.new(window, :modal, x: 90, y: 10, width: 76, height: 24) {
|
27
|
-
message
|
27
|
+
message Dialog.new(window, modal: true, caption: 'Modal', x: 150, y: 150) { |args|
|
28
28
|
dialog = args[:window]
|
29
29
|
|
30
30
|
Button.new(dialog, :ok, x: 228, y: 242, width: 76, height: 24) {
|
@@ -38,6 +38,6 @@ Application.run { |window|
|
|
38
38
|
Button.new(dialog, :button1, x: 10, y: 10, width: 76, height: 24) {
|
39
39
|
dialog.message 'clicked'
|
40
40
|
}
|
41
|
-
}.result.ok?
|
41
|
+
}.result.ok?
|
42
42
|
}
|
43
43
|
}
|
Binary file
|
@@ -9,16 +9,22 @@ CmdTab1Group1_LabelTitle_RESID = 60002
|
|
9
9
|
CmdTab1Group1_LabelDescription_RESID = 60003
|
10
10
|
CmdTab1Group1_TooltipDescription_RESID = 60004
|
11
11
|
CmdTab1Group1_SmallImages_RESID = 60005
|
12
|
-
|
12
|
+
CmdTab1Group1_SmallImages_120__RESID = 60006
|
13
|
+
CmdTab1Group1_LargeImages_RESID = 60007
|
14
|
+
CmdTab1Group1_LargeImages_120__RESID = 60008
|
13
15
|
CmdItem1 = 6
|
14
|
-
CmdItem1_LabelTitle_RESID =
|
15
|
-
CmdItem1_LabelDescription_RESID =
|
16
|
-
CmdItem1_TooltipDescription_RESID =
|
17
|
-
CmdItem1_SmallImages_RESID =
|
18
|
-
|
16
|
+
CmdItem1_LabelTitle_RESID = 60009
|
17
|
+
CmdItem1_LabelDescription_RESID = 60010
|
18
|
+
CmdItem1_TooltipDescription_RESID = 60011
|
19
|
+
CmdItem1_SmallImages_RESID = 60012
|
20
|
+
CmdItem1_SmallImages_120__RESID = 60013
|
21
|
+
CmdItem1_LargeImages_RESID = 60014
|
22
|
+
CmdItem1_LargeImages_120__RESID = 60015
|
19
23
|
CmdButton1 = 7
|
20
|
-
CmdButton1_LabelTitle_RESID =
|
21
|
-
CmdButton1_LabelDescription_RESID =
|
22
|
-
CmdButton1_TooltipDescription_RESID =
|
23
|
-
CmdButton1_SmallImages_RESID =
|
24
|
-
|
24
|
+
CmdButton1_LabelTitle_RESID = 60016
|
25
|
+
CmdButton1_LabelDescription_RESID = 60017
|
26
|
+
CmdButton1_TooltipDescription_RESID = 60018
|
27
|
+
CmdButton1_SmallImages_RESID = 60019
|
28
|
+
CmdButton1_SmallImages_120__RESID = 60020
|
29
|
+
CmdButton1_LargeImages_RESID = 60021
|
30
|
+
CmdButton1_LargeImages_120__RESID = 60022
|
@@ -9,27 +9,33 @@
|
|
9
9
|
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
10
|
<Command.SmallImages>
|
11
11
|
<Image>../../res/go-next-small.bmp</Image>
|
12
|
+
<Image MinDPI='120'>../../res/go-next.bmp</Image>
|
12
13
|
</Command.SmallImages>
|
13
14
|
<Command.LargeImages>
|
14
15
|
<Image>../../res/go-next.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../../res/go-next-big.bmp</Image>
|
15
17
|
</Command.LargeImages>
|
16
18
|
</Command>
|
17
19
|
|
18
20
|
<Command Name='cmdItem1' LabelTitle='&Item1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
21
|
<Command.SmallImages>
|
20
22
|
<Image>../../res/go-previous-small.bmp</Image>
|
23
|
+
<Image MinDPI='120'>../../res/go-previous.bmp</Image>
|
21
24
|
</Command.SmallImages>
|
22
25
|
<Command.LargeImages>
|
23
26
|
<Image>../../res/go-previous.bmp</Image>
|
27
|
+
<Image MinDPI='120'>../../res/go-previous-big.bmp</Image>
|
24
28
|
</Command.LargeImages>
|
25
29
|
</Command>
|
26
30
|
|
27
31
|
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
28
32
|
<Command.SmallImages>
|
29
33
|
<Image>../../res/go-next-small.bmp</Image>
|
34
|
+
<Image MinDPI='120'>../../res/go-next.bmp</Image>
|
30
35
|
</Command.SmallImages>
|
31
36
|
<Command.LargeImages>
|
32
37
|
<Image>../../res/go-next.bmp</Image>
|
38
|
+
<Image MinDPI='120'>../../res/go-next-big.bmp</Image>
|
33
39
|
</Command.LargeImages>
|
34
40
|
</Command>
|
35
41
|
</Application.Commands>
|
Binary file
|
@@ -9,10 +9,14 @@ CmdTab1Group1_LabelTitle_RESID = 60002
|
|
9
9
|
CmdTab1Group1_LabelDescription_RESID = 60003
|
10
10
|
CmdTab1Group1_TooltipDescription_RESID = 60004
|
11
11
|
CmdTab1Group1_SmallImages_RESID = 60005
|
12
|
-
|
12
|
+
CmdTab1Group1_SmallImages_120__RESID = 60006
|
13
|
+
CmdTab1Group1_LargeImages_RESID = 60007
|
14
|
+
CmdTab1Group1_LargeImages_120__RESID = 60008
|
13
15
|
CmdButton1 = 6
|
14
|
-
CmdButton1_LabelTitle_RESID =
|
15
|
-
CmdButton1_LabelDescription_RESID =
|
16
|
-
CmdButton1_TooltipDescription_RESID =
|
17
|
-
CmdButton1_SmallImages_RESID =
|
18
|
-
|
16
|
+
CmdButton1_LabelTitle_RESID = 60009
|
17
|
+
CmdButton1_LabelDescription_RESID = 60010
|
18
|
+
CmdButton1_TooltipDescription_RESID = 60011
|
19
|
+
CmdButton1_SmallImages_RESID = 60012
|
20
|
+
CmdButton1_SmallImages_120__RESID = 60013
|
21
|
+
CmdButton1_LargeImages_RESID = 60014
|
22
|
+
CmdButton1_LargeImages_120__RESID = 60015
|
@@ -9,18 +9,22 @@
|
|
9
9
|
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
10
|
<Command.SmallImages>
|
11
11
|
<Image>../../res/go-next-small.bmp</Image>
|
12
|
+
<Image MinDPI='120'>../../res/go-next.bmp</Image>
|
12
13
|
</Command.SmallImages>
|
13
14
|
<Command.LargeImages>
|
14
15
|
<Image>../../res/go-next.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../../res/go-next-big.bmp</Image>
|
15
17
|
</Command.LargeImages>
|
16
18
|
</Command>
|
17
19
|
|
18
20
|
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
21
|
<Command.SmallImages>
|
20
22
|
<Image>../../res/go-next-small.bmp</Image>
|
23
|
+
<Image MinDPI='120'>../../res/go-next.bmp</Image>
|
21
24
|
</Command.SmallImages>
|
22
25
|
<Command.LargeImages>
|
23
26
|
<Image>../../res/go-next.bmp</Image>
|
27
|
+
<Image MinDPI='120'>../../res/go-next-big.bmp</Image>
|
24
28
|
</Command.LargeImages>
|
25
29
|
</Command>
|
26
30
|
</Application.Commands>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'fzeet'
|
2
|
+
|
3
|
+
include Fzeet
|
4
|
+
|
5
|
+
Application.run { |window|
|
6
|
+
r = UIRibbon.new(window, 'Minimal').
|
7
|
+
on(CmdButton1) { message 'on(CmdButton1)' }
|
8
|
+
|
9
|
+
r.background.darken(20).bleach(50)
|
10
|
+
r.color.saturate(100).lighten(20)
|
11
|
+
r.highlight.shift(-20).darken(20)
|
12
|
+
}
|
Binary file
|
@@ -9,16 +9,22 @@ CmdTab1Group1_LabelTitle_RESID = 60002
|
|
9
9
|
CmdTab1Group1_LabelDescription_RESID = 60003
|
10
10
|
CmdTab1Group1_TooltipDescription_RESID = 60004
|
11
11
|
CmdTab1Group1_SmallImages_RESID = 60005
|
12
|
-
|
12
|
+
CmdTab1Group1_SmallImages_120__RESID = 60006
|
13
|
+
CmdTab1Group1_LargeImages_RESID = 60007
|
14
|
+
CmdTab1Group1_LargeImages_120__RESID = 60008
|
13
15
|
CmdItem1 = 6
|
14
|
-
CmdItem1_LabelTitle_RESID =
|
15
|
-
CmdItem1_LabelDescription_RESID =
|
16
|
-
CmdItem1_TooltipDescription_RESID =
|
17
|
-
CmdItem1_SmallImages_RESID =
|
18
|
-
|
16
|
+
CmdItem1_LabelTitle_RESID = 60009
|
17
|
+
CmdItem1_LabelDescription_RESID = 60010
|
18
|
+
CmdItem1_TooltipDescription_RESID = 60011
|
19
|
+
CmdItem1_SmallImages_RESID = 60012
|
20
|
+
CmdItem1_SmallImages_120__RESID = 60013
|
21
|
+
CmdItem1_LargeImages_RESID = 60014
|
22
|
+
CmdItem1_LargeImages_120__RESID = 60015
|
19
23
|
CmdButton1 = 7
|
20
|
-
CmdButton1_LabelTitle_RESID =
|
21
|
-
CmdButton1_LabelDescription_RESID =
|
22
|
-
CmdButton1_TooltipDescription_RESID =
|
23
|
-
CmdButton1_SmallImages_RESID =
|
24
|
-
|
24
|
+
CmdButton1_LabelTitle_RESID = 60016
|
25
|
+
CmdButton1_LabelDescription_RESID = 60017
|
26
|
+
CmdButton1_TooltipDescription_RESID = 60018
|
27
|
+
CmdButton1_SmallImages_RESID = 60019
|
28
|
+
CmdButton1_SmallImages_120__RESID = 60020
|
29
|
+
CmdButton1_LargeImages_RESID = 60021
|
30
|
+
CmdButton1_LargeImages_120__RESID = 60022
|
@@ -9,27 +9,33 @@
|
|
9
9
|
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
10
|
<Command.SmallImages>
|
11
11
|
<Image>../res/go-next-small.bmp</Image>
|
12
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
12
13
|
</Command.SmallImages>
|
13
14
|
<Command.LargeImages>
|
14
15
|
<Image>../res/go-next.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
15
17
|
</Command.LargeImages>
|
16
18
|
</Command>
|
17
19
|
|
18
20
|
<Command Name='cmdItem1' LabelTitle='&Item1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
21
|
<Command.SmallImages>
|
20
22
|
<Image>../res/go-previous-small.bmp</Image>
|
23
|
+
<Image MinDPI='120'>../res/go-previous.bmp</Image>
|
21
24
|
</Command.SmallImages>
|
22
25
|
<Command.LargeImages>
|
23
26
|
<Image>../res/go-previous.bmp</Image>
|
27
|
+
<Image MinDPI='120'>../res/go-previous-big.bmp</Image>
|
24
28
|
</Command.LargeImages>
|
25
29
|
</Command>
|
26
30
|
|
27
31
|
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
28
32
|
<Command.SmallImages>
|
29
33
|
<Image>../res/go-next-small.bmp</Image>
|
34
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
30
35
|
</Command.SmallImages>
|
31
36
|
<Command.LargeImages>
|
32
37
|
<Image>../res/go-next.bmp</Image>
|
38
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
33
39
|
</Command.LargeImages>
|
34
40
|
</Command>
|
35
41
|
</Application.Commands>
|
Binary file
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Generated by the UIRibbon build, do NOT modify
|
2
|
+
|
3
|
+
CmdAppMenu = 2
|
4
|
+
CmdQAT = 3
|
5
|
+
CmdTab1 = 4
|
6
|
+
CmdTab1_LabelTitle_RESID = 60001
|
7
|
+
CmdTab1Group1 = 5
|
8
|
+
CmdTab1Group1_LabelTitle_RESID = 60002
|
9
|
+
CmdTab1Group1_LabelDescription_RESID = 60003
|
10
|
+
CmdTab1Group1_TooltipDescription_RESID = 60004
|
11
|
+
CmdTab1Group1_SmallImages_RESID = 60005
|
12
|
+
CmdTab1Group1_SmallImages_120__RESID = 60006
|
13
|
+
CmdTab1Group1_LargeImages_RESID = 60007
|
14
|
+
CmdTab1Group1_LargeImages_120__RESID = 60008
|
15
|
+
CmdButton1 = 6
|
16
|
+
CmdButton1_LabelTitle_RESID = 60009
|
17
|
+
CmdButton1_LabelDescription_RESID = 60010
|
18
|
+
CmdButton1_TooltipDescription_RESID = 60011
|
19
|
+
CmdButton1_SmallImages_RESID = 60012
|
20
|
+
CmdButton1_SmallImages_120__RESID = 60013
|
21
|
+
CmdButton1_LargeImages_RESID = 60014
|
22
|
+
CmdButton1_LargeImages_120__RESID = 60015
|
23
|
+
CmdContextMap1 = 7
|
@@ -0,0 +1,83 @@
|
|
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
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
13
|
+
</Command.SmallImages>
|
14
|
+
<Command.LargeImages>
|
15
|
+
<Image>../res/go-next.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
17
|
+
</Command.LargeImages>
|
18
|
+
</Command>
|
19
|
+
|
20
|
+
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
21
|
+
<Command.SmallImages>
|
22
|
+
<Image>../res/go-next-small.bmp</Image>
|
23
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
24
|
+
</Command.SmallImages>
|
25
|
+
<Command.LargeImages>
|
26
|
+
<Image>../res/go-next.bmp</Image>
|
27
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
28
|
+
</Command.LargeImages>
|
29
|
+
</Command>
|
30
|
+
|
31
|
+
<Command Name='cmdContextMap1' />
|
32
|
+
</Application.Commands>
|
33
|
+
|
34
|
+
<Application.Views>
|
35
|
+
<Ribbon>
|
36
|
+
<Ribbon.ApplicationMenu>
|
37
|
+
<ApplicationMenu CommandName='cmdAppMenu'>
|
38
|
+
<MenuGroup Class='MajorItems'>
|
39
|
+
<Button CommandName='cmdButton1' />
|
40
|
+
</MenuGroup>
|
41
|
+
</ApplicationMenu>
|
42
|
+
</Ribbon.ApplicationMenu>
|
43
|
+
|
44
|
+
<Ribbon.QuickAccessToolbar>
|
45
|
+
<QuickAccessToolbar CommandName='cmdQAT'>
|
46
|
+
<QuickAccessToolbar.ApplicationDefaults>
|
47
|
+
<Button CommandName='cmdButton1' />
|
48
|
+
</QuickAccessToolbar.ApplicationDefaults>
|
49
|
+
</QuickAccessToolbar>
|
50
|
+
</Ribbon.QuickAccessToolbar>
|
51
|
+
|
52
|
+
<Ribbon.Tabs>
|
53
|
+
<Tab CommandName='cmdTab1'>
|
54
|
+
<Group CommandName='cmdTab1Group1' SizeDefinition='OneButton'>
|
55
|
+
<Button CommandName='cmdButton1' />
|
56
|
+
</Group>
|
57
|
+
</Tab>
|
58
|
+
</Ribbon.Tabs>
|
59
|
+
</Ribbon>
|
60
|
+
|
61
|
+
<ContextPopup>
|
62
|
+
<ContextPopup.MiniToolbars>
|
63
|
+
<MiniToolbar Name='miniToolbar1'>
|
64
|
+
<MenuGroup>
|
65
|
+
<Button CommandName='cmdButton1' />
|
66
|
+
</MenuGroup>
|
67
|
+
</MiniToolbar>
|
68
|
+
</ContextPopup.MiniToolbars>
|
69
|
+
|
70
|
+
<ContextPopup.ContextMenus>
|
71
|
+
<ContextMenu Name='contextMenu1'>
|
72
|
+
<MenuGroup>
|
73
|
+
<Button CommandName='cmdButton1' />
|
74
|
+
</MenuGroup>
|
75
|
+
</ContextMenu>
|
76
|
+
</ContextPopup.ContextMenus>
|
77
|
+
|
78
|
+
<ContextPopup.ContextMaps>
|
79
|
+
<ContextMap CommandName='cmdContextMap1' MiniToolbar='miniToolbar1' ContextMenu='contextMenu1' />
|
80
|
+
</ContextPopup.ContextMaps>
|
81
|
+
</ContextPopup>
|
82
|
+
</Application.Views>
|
83
|
+
</Application>
|
Binary file
|
@@ -9,10 +9,14 @@ CmdTab1Group1_LabelTitle_RESID = 60002
|
|
9
9
|
CmdTab1Group1_LabelDescription_RESID = 60003
|
10
10
|
CmdTab1Group1_TooltipDescription_RESID = 60004
|
11
11
|
CmdTab1Group1_SmallImages_RESID = 60005
|
12
|
-
|
12
|
+
CmdTab1Group1_SmallImages_120__RESID = 60006
|
13
|
+
CmdTab1Group1_LargeImages_RESID = 60007
|
14
|
+
CmdTab1Group1_LargeImages_120__RESID = 60008
|
13
15
|
CmdButton1 = 6
|
14
|
-
CmdButton1_LabelTitle_RESID =
|
15
|
-
CmdButton1_LabelDescription_RESID =
|
16
|
-
CmdButton1_TooltipDescription_RESID =
|
17
|
-
CmdButton1_SmallImages_RESID =
|
18
|
-
|
16
|
+
CmdButton1_LabelTitle_RESID = 60009
|
17
|
+
CmdButton1_LabelDescription_RESID = 60010
|
18
|
+
CmdButton1_TooltipDescription_RESID = 60011
|
19
|
+
CmdButton1_SmallImages_RESID = 60012
|
20
|
+
CmdButton1_SmallImages_120__RESID = 60013
|
21
|
+
CmdButton1_LargeImages_RESID = 60014
|
22
|
+
CmdButton1_LargeImages_120__RESID = 60015
|
@@ -9,18 +9,22 @@
|
|
9
9
|
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
10
|
<Command.SmallImages>
|
11
11
|
<Image>../res/go-next-small.bmp</Image>
|
12
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
12
13
|
</Command.SmallImages>
|
13
14
|
<Command.LargeImages>
|
14
15
|
<Image>../res/go-next.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
15
17
|
</Command.LargeImages>
|
16
18
|
</Command>
|
17
19
|
|
18
20
|
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
19
21
|
<Command.SmallImages>
|
20
22
|
<Image>../res/go-next-small.bmp</Image>
|
23
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
21
24
|
</Command.SmallImages>
|
22
25
|
<Command.LargeImages>
|
23
26
|
<Image>../res/go-next.bmp</Image>
|
27
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
24
28
|
</Command.LargeImages>
|
25
29
|
</Command>
|
26
30
|
</Application.Commands>
|
Binary file
|
Binary file
|
data/lib/fzeet/Accelerator.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'Common'
|
2
2
|
|
3
3
|
module Fzeet
|
4
4
|
module AcceleratorTableMethods
|
@@ -13,9 +13,29 @@ module Fzeet
|
|
13
13
|
args.each_with_index { |data, i|
|
14
14
|
accel = Windows::ACCEL.new(paccels + i * Windows::ACCEL.size)
|
15
15
|
|
16
|
+
data.unshift(0) if data.size == 2
|
17
|
+
|
16
18
|
accel[:fVirt] = Fzeet.flags(data[0], :f)
|
17
|
-
|
18
|
-
accel[:key] = data[1]
|
19
|
+
|
20
|
+
accel[:key] = case key = data[1]
|
21
|
+
when Integer
|
22
|
+
accel[:fVirt] |= Windows::FVIRTKEY
|
23
|
+
|
24
|
+
key
|
25
|
+
when Symbol
|
26
|
+
accel[:fVirt] |= Windows::FVIRTKEY
|
27
|
+
|
28
|
+
((key = key.to_s).length == 1) ? key.upcase.ord : Fzeet.constant(key, :vk_)
|
29
|
+
when String
|
30
|
+
if key.length == 1
|
31
|
+
key.ord
|
32
|
+
else
|
33
|
+
accel[:fVirt] |= Windows::FVIRTKEY
|
34
|
+
|
35
|
+
Fzeet.constant(key, :vk_)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
19
39
|
accel[:cmd] = Command[data[2]]
|
20
40
|
}
|
21
41
|
|
data/lib/fzeet/Application.rb
CHANGED
@@ -16,6 +16,8 @@ module Fzeet
|
|
16
16
|
|
17
17
|
Windows.EnableVisualStyles
|
18
18
|
|
19
|
+
Windows.DetonateLastError(0, :SetProcessDPIAware) if Windows::WINVER.AtLeastWindowsVista?
|
20
|
+
|
19
21
|
Windows.InitializeOle
|
20
22
|
|
21
23
|
def constant(c, *prefixes)
|
@@ -111,56 +113,6 @@ module Fzeet
|
|
111
113
|
|
112
114
|
module_function :message, :question
|
113
115
|
|
114
|
-
class WindowClass < Windows::WNDCLASSEX
|
115
|
-
def initialize(prototype, name, opts = {})
|
116
|
-
@prototype = prototype
|
117
|
-
@name = name
|
118
|
-
className = FFI::MemoryPointer.from_string(@name)
|
119
|
-
|
120
|
-
_opts = {
|
121
|
-
style: [],
|
122
|
-
wndProc: BasicWindow::WindowProc,
|
123
|
-
clsExtra: 0,
|
124
|
-
wndExtra: 0,
|
125
|
-
icon: SystemIcon.new(:application),
|
126
|
-
cursor: SystemCursor.new(:arrow),
|
127
|
-
background: SystemBrush.new(:window),
|
128
|
-
iconSm: nil
|
129
|
-
}
|
130
|
-
badopts = opts.keys - _opts.keys; raise "Bad option(s): #{badopts.join(', ')}." unless badopts.empty?
|
131
|
-
|
132
|
-
self[:cbSize] = Windows::WNDCLASSEX.size
|
133
|
-
self[:hInstance] = Windows.GetModuleHandle(nil)
|
134
|
-
self[:lpszClassName] = className
|
135
|
-
|
136
|
-
if @prototype
|
137
|
-
self[:style] = Fzeet.flags(opts[:style] || [], :cs_) | @prototype[:style]
|
138
|
-
self[:lpfnWndProc] = opts[:wndProc] || @prototype[:lpfnWndProc]
|
139
|
-
self[:cbClsExtra] = (opts[:clsExtra] || 0) + @prototype[:cbClsExtra]
|
140
|
-
self[:cbWndExtra] = (opts[:wndExtra] || 0) + @prototype[:cbWndExtra]
|
141
|
-
self[:hIcon] = (opts[:icon] && opts[:icon].handle) || @prototype[:hIcon]
|
142
|
-
self[:hCursor] = (opts[:cursor] && opts[:cursor].handle) || @prototype[:hCursor]
|
143
|
-
self[:hbrBackground] = (opts[:background] && opts[:background].handle) || @prototype[:hbrBackground]
|
144
|
-
self[:hIconSm] = (opts[:iconSm] && _opts[:iconSm].handle) || @prototype[:hIconSm]
|
145
|
-
else
|
146
|
-
_opts.merge(opts)
|
147
|
-
|
148
|
-
self[:style] = Fzeet.flags(_opts[:style], :cs_)
|
149
|
-
self[:lpfnWndProc] = _opts[:wndProc]
|
150
|
-
self[:cbClsExtra] = _opts[:clsExtra]
|
151
|
-
self[:cbWndExtra] = _opts[:wndExtra]
|
152
|
-
self[:hIcon] = _opts[:icon].handle
|
153
|
-
self[:hCursor] = _opts[:cursor].handle
|
154
|
-
self[:hbrBackground] = _opts[:background].handle
|
155
|
-
self[:hIconSm] = _opts[:iconSm] && _opts[:iconSm].handle
|
156
|
-
end
|
157
|
-
|
158
|
-
Windows.DetonateLastError(0, :RegisterClassEx, self) { className.free }
|
159
|
-
end
|
160
|
-
|
161
|
-
attr_reader :prototype, :name
|
162
|
-
end
|
163
|
-
|
164
116
|
class Point < Windows::POINT
|
165
117
|
def initialize(x = 0, y = 0) self[:x], self[:y] = x, y end
|
166
118
|
|
data/lib/fzeet/Control.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'Control/Button'
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'Common'
|
2
2
|
|
3
3
|
module Fzeet
|
4
4
|
class FileDialog
|
@@ -71,46 +71,4 @@ module Fzeet
|
|
71
71
|
path.free
|
72
72
|
end
|
73
73
|
end
|
74
|
-
|
75
|
-
class FolderDialog
|
76
|
-
def initialize(opts = {})
|
77
|
-
_opts = {
|
78
|
-
root: nil,
|
79
|
-
displayName: nil,
|
80
|
-
title: nil,
|
81
|
-
flags: 0,
|
82
|
-
hook: nil,
|
83
|
-
param: 0,
|
84
|
-
image: 0
|
85
|
-
}
|
86
|
-
badopts = opts.keys - _opts.keys; raise "Bad option(s): #{badopts.join(', ')}." unless badopts.empty?
|
87
|
-
_opts.merge!(opts)
|
88
|
-
|
89
|
-
@bi = Windows::BROWSEINFO.new
|
90
|
-
|
91
|
-
@bi[:ulFlags] = Fzeet.flags([:returnonlyfsdirs, :usenewui], :bif_)
|
92
|
-
end
|
93
|
-
|
94
|
-
attr_reader :bi
|
95
|
-
|
96
|
-
def path; @path && @path.dup end
|
97
|
-
|
98
|
-
def show(window = Application.window)
|
99
|
-
bi[:hwndOwner] = window.handle
|
100
|
-
|
101
|
-
@path = nil
|
102
|
-
|
103
|
-
DialogResult.new(((pidl = Windows.SHBrowseForFolder(bi)).null?) ? Windows::IDCANCEL : Windows::IDOK).tap { |result|
|
104
|
-
next unless result.ok?
|
105
|
-
|
106
|
-
FFI::MemoryPointer.new(:char, 4096) { |p|
|
107
|
-
Windows.SHGetPathFromIDList(pidl, p)
|
108
|
-
|
109
|
-
@path = p.read_string
|
110
|
-
}
|
111
|
-
}
|
112
|
-
ensure
|
113
|
-
Windows.CoTaskMemFree(pidl)
|
114
|
-
end
|
115
|
-
end
|
116
74
|
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative 'Common'
|
2
|
+
|
3
|
+
module Fzeet
|
4
|
+
class FolderDialog
|
5
|
+
def initialize(opts = {})
|
6
|
+
_opts = {
|
7
|
+
root: nil,
|
8
|
+
displayName: nil,
|
9
|
+
title: nil,
|
10
|
+
flags: 0,
|
11
|
+
hook: nil,
|
12
|
+
param: 0,
|
13
|
+
image: 0
|
14
|
+
}
|
15
|
+
badopts = opts.keys - _opts.keys; raise "Bad option(s): #{badopts.join(', ')}." unless badopts.empty?
|
16
|
+
_opts.merge!(opts)
|
17
|
+
|
18
|
+
@bi = Windows::BROWSEINFO.new
|
19
|
+
|
20
|
+
@bi[:ulFlags] = Fzeet.flags([:returnonlyfsdirs, :usenewui], :bif_)
|
21
|
+
end
|
22
|
+
|
23
|
+
attr_reader :bi
|
24
|
+
|
25
|
+
def path; @path && @path.dup end
|
26
|
+
|
27
|
+
def show(window = Application.window)
|
28
|
+
bi[:hwndOwner] = window.handle
|
29
|
+
|
30
|
+
@path = nil
|
31
|
+
|
32
|
+
DialogResult.new(((pidl = Windows.SHBrowseForFolder(bi)).null?) ? Windows::IDCANCEL : Windows::IDOK).tap { |result|
|
33
|
+
next unless result.ok?
|
34
|
+
|
35
|
+
FFI::MemoryPointer.new(:char, 4096) { |p|
|
36
|
+
Windows.SHGetPathFromIDList(pidl, p)
|
37
|
+
|
38
|
+
@path = p.read_string
|
39
|
+
}
|
40
|
+
}
|
41
|
+
ensure
|
42
|
+
Windows.CoTaskMemFree(pidl)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/fzeet/Dialog.rb
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'Dialog/FileDialog'
|
2
|
+
require_relative 'Dialog/FolderDialog'
|