fzeet 0.6.1 → 0.6.2
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/UIRibbon/ApplicationModes.dll +0 -0
- data/examples/UIRibbon/ApplicationModes.rb +40 -0
- data/examples/UIRibbon/ApplicationModes.rbw +14 -0
- data/examples/UIRibbon/ApplicationModes.xml +83 -0
- data/examples/UIRibbon/Color.rbw +1 -1
- data/examples/UIRibbon/Control/Button.dll +0 -0
- data/examples/UIRibbon/Control/Button.rb +9 -5
- data/examples/UIRibbon/Control/Button.rbw +3 -1
- data/examples/UIRibbon/Control/Button.xml +6 -0
- data/examples/UIRibbon/Control/ColorPicker.dll +0 -0
- data/examples/UIRibbon/Control/ColorPicker.rb +55 -0
- data/examples/UIRibbon/Control/ColorPicker.rbw +91 -0
- data/examples/UIRibbon/Control/ColorPicker.xml +131 -0
- data/examples/UIRibbon/Control/ComboBox.dll +0 -0
- data/examples/UIRibbon/Control/ComboBox.rb +23 -0
- data/examples/UIRibbon/Control/ComboBox.rbw +56 -0
- data/examples/UIRibbon/Control/ComboBox.xml +75 -0
- data/examples/UIRibbon/Control/FontControl.dll +0 -0
- data/examples/UIRibbon/Control/FontControl.rb +34 -0
- data/examples/UIRibbon/Control/FontControl.rbw +83 -0
- data/examples/UIRibbon/Control/FontControl.xml +96 -0
- data/examples/UIRibbon/Control/Gallery.dll +0 -0
- data/examples/UIRibbon/Control/Gallery.rb +55 -0
- data/examples/UIRibbon/Control/Gallery.rbw +124 -0
- data/examples/UIRibbon/Control/Gallery.xml +132 -0
- data/examples/UIRibbon/Control/Spinner.dll +0 -0
- data/examples/UIRibbon/Control/Spinner.rb +14 -0
- data/examples/UIRibbon/Control/Spinner.rbw +27 -0
- data/examples/UIRibbon/Control/Spinner.xml +37 -0
- data/examples/UIRibbon/Size.rbw +1 -1
- data/examples/UIRibbon/TabGroup.dll +0 -0
- data/examples/UIRibbon/TabGroup.rb +12 -0
- data/examples/UIRibbon/TabGroup.rbw +23 -0
- data/examples/UIRibbon/TabGroup.xml +42 -0
- data/examples/UIRibbon/Viewer.rbw +1 -1
- data/examples/res/applications-graphics-big.bmp +0 -0
- data/examples/res/applications-graphics-small.bmp +0 -0
- data/examples/res/applications-graphics.bmp +0 -0
- data/examples/res/document-print-big.bmp +0 -0
- data/examples/res/document-print-preview-big.bmp +0 -0
- data/examples/res/document-print-preview-small.bmp +0 -0
- data/examples/res/document-print-preview.bmp +0 -0
- data/examples/res/document-print-small.bmp +0 -0
- data/examples/res/document-print.bmp +0 -0
- data/examples/res/go-bottom-big.bmp +0 -0
- data/examples/res/go-bottom-small.bmp +0 -0
- data/examples/res/go-bottom.bmp +0 -0
- data/examples/res/preferences-desktop-font-big.bmp +0 -0
- data/examples/res/preferences-desktop-font-small.bmp +0 -0
- data/examples/res/preferences-desktop-font.bmp +0 -0
- data/examples/res/process-stop-big.bmp +0 -0
- data/examples/res/process-stop-small.bmp +0 -0
- data/examples/res/process-stop.bmp +0 -0
- data/lib/fzeet/Application.rb +6 -1
- data/lib/fzeet/Common.rb +17 -0
- data/lib/fzeet/Dialog/ShellFileDialog.rb +8 -48
- data/lib/fzeet/UIRibbon.rb +174 -7
- data/lib/fzeet/windows/com.rb +2 -0
- data/lib/fzeet/windows/common.rb +47 -6
- data/lib/fzeet/windows/gdi.rb +8 -0
- data/lib/fzeet/windows/kernel.rb +2 -0
- data/lib/fzeet/windows/ole.rb +34 -0
- data/lib/fzeet/windows/propsys.rb +7 -1
- data/lib/fzeet/windows/shell/Common.rb +44 -0
- data/lib/fzeet/windows/shlwapi.rb +10 -0
- data/lib/fzeet/windows/uiribbon.rb +15 -0
- data/lib/fzeet/windows.rb +1 -0
- metadata +51 -8
@@ -0,0 +1,34 @@
|
|
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
|
+
CmdTab1Group2 = 6
|
16
|
+
CmdTab1Group2_LabelTitle_RESID = 60009
|
17
|
+
CmdTab1Group2_LabelDescription_RESID = 60010
|
18
|
+
CmdTab1Group2_TooltipDescription_RESID = 60011
|
19
|
+
CmdTab1Group2_SmallImages_RESID = 60012
|
20
|
+
CmdTab1Group2_SmallImages_120__RESID = 60013
|
21
|
+
CmdTab1Group2_LargeImages_RESID = 60014
|
22
|
+
CmdTab1Group2_LargeImages_120__RESID = 60015
|
23
|
+
CmdTab1Group3 = 7
|
24
|
+
CmdTab1Group3_LabelTitle_RESID = 60016
|
25
|
+
CmdTab1Group3_LabelDescription_RESID = 60017
|
26
|
+
CmdTab1Group3_TooltipDescription_RESID = 60018
|
27
|
+
CmdTab1Group3_SmallImages_RESID = 60019
|
28
|
+
CmdTab1Group3_SmallImages_120__RESID = 60020
|
29
|
+
CmdTab1Group3_LargeImages_RESID = 60021
|
30
|
+
CmdTab1Group3_LargeImages_120__RESID = 60022
|
31
|
+
CmdFont1 = 8
|
32
|
+
CmdFont2 = 9
|
33
|
+
CmdFont3 = 10
|
34
|
+
CmdContextMap1 = 11
|
@@ -0,0 +1,83 @@
|
|
1
|
+
require 'fzeet'
|
2
|
+
|
3
|
+
include Fzeet
|
4
|
+
|
5
|
+
Application.run(View.new) { |window|
|
6
|
+
font = IndirectFont.new(Control::Font.logfont.tap { |lf|
|
7
|
+
lf.face = 'Comic Sans MS'
|
8
|
+
lf.size = 18
|
9
|
+
lf.bold = true
|
10
|
+
lf.italic = true
|
11
|
+
lf.underline = true
|
12
|
+
lf.strikeout = true
|
13
|
+
})
|
14
|
+
|
15
|
+
color, background = Windows.RGB(255, 255, 255), Windows.RGB(128, 0, 0)
|
16
|
+
|
17
|
+
(ribbon = UIRibbon.new(window)).
|
18
|
+
invalidate(CmdFont1).invalidate(CmdFont2).invalidate(CmdFont3).
|
19
|
+
|
20
|
+
on(:update, CmdFont1) { |args|
|
21
|
+
ribbon.fontPropsUpdate(args) { |ps| ps.update(font.logfont) }
|
22
|
+
}.
|
23
|
+
|
24
|
+
on(:update, CmdFont2) { |args|
|
25
|
+
ribbon.fontPropsUpdate(args) { |ps|
|
26
|
+
ps.update(font.logfont)
|
27
|
+
ps.uiprop(:FontProperties_ForegroundColor, Windows::PROPVARIANT[:uint, color])
|
28
|
+
}
|
29
|
+
}.
|
30
|
+
|
31
|
+
on(:update, CmdFont3) { |args|
|
32
|
+
ribbon.fontPropsUpdate(args) { |ps|
|
33
|
+
ps.update(font.logfont)
|
34
|
+
ps.uiprop(:FontProperties_ForegroundColor, Windows::PROPVARIANT[:uint, color])
|
35
|
+
ps.uiprop(:FontProperties_BackgroundColor, Windows::PROPVARIANT[:uint, background])
|
36
|
+
}
|
37
|
+
}.
|
38
|
+
|
39
|
+
on(:execute, CmdFont1) { |args|
|
40
|
+
font.dispose
|
41
|
+
|
42
|
+
ribbon.fontPropsChanged(args) { |ps|
|
43
|
+
font = IndirectFont.new(font.logfont.update(ps))
|
44
|
+
}
|
45
|
+
|
46
|
+
window.invalidate; ribbon.invalidate(CmdFont2).invalidate(CmdFont3)
|
47
|
+
}.
|
48
|
+
|
49
|
+
on(:execute, CmdFont2) { |args|
|
50
|
+
font.dispose
|
51
|
+
|
52
|
+
ribbon.fontPropsChanged(args) { |ps|
|
53
|
+
font = IndirectFont.new(font.logfont.update(ps))
|
54
|
+
color = ps.uiprop(:FontProperties_ForegroundColor).uint if ps.key(0) == Windows::UI_PKEY_FontProperties_ForegroundColor
|
55
|
+
}
|
56
|
+
|
57
|
+
window.invalidate; ribbon.invalidate(CmdFont1).invalidate(CmdFont3)
|
58
|
+
}.
|
59
|
+
|
60
|
+
on(:execute, CmdFont3) { |args|
|
61
|
+
font.dispose
|
62
|
+
|
63
|
+
ribbon.fontPropsChanged(args) { |ps|
|
64
|
+
font = IndirectFont.new(font.logfont.update(ps))
|
65
|
+
color = ps.uiprop(:FontProperties_ForegroundColor).uint if ps.key(0) == Windows::UI_PKEY_FontProperties_ForegroundColor
|
66
|
+
background = ps.uiprop(:FontProperties_BackgroundColor).uint if ps.key(0) == Windows::UI_PKEY_FontProperties_BackgroundColor
|
67
|
+
}
|
68
|
+
|
69
|
+
window.invalidate; ribbon.invalidate(CmdFont1).invalidate(CmdFont2)
|
70
|
+
}
|
71
|
+
|
72
|
+
window.
|
73
|
+
on(:paint) { window.paint { |dc| dc.select(font) {
|
74
|
+
dc.color, dc.background = color, background
|
75
|
+
dc.sms 'The quick brown fox jumps over the lazy dog. 1234567890'
|
76
|
+
}}}.
|
77
|
+
|
78
|
+
on(:contextmenu) { |args|
|
79
|
+
window.ribbon.contextualUI(CmdContextMap1, args[:x], args[:y])
|
80
|
+
}.
|
81
|
+
|
82
|
+
on(:destroy) { font.dispose }
|
83
|
+
}
|
@@ -0,0 +1,96 @@
|
|
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='FontControl' />
|
9
|
+
<Command Name='cmdTab1Group1' LabelTitle='Font&Only' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
|
+
<Command.SmallImages>
|
11
|
+
<Image>../../res/preferences-desktop-font-small.bmp</Image>
|
12
|
+
<Image MinDPI='120'>../../res/preferences-desktop-font.bmp</Image>
|
13
|
+
</Command.SmallImages>
|
14
|
+
<Command.LargeImages>
|
15
|
+
<Image>../../res/preferences-desktop-font.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../../res/preferences-desktop-font-big.bmp</Image>
|
17
|
+
</Command.LargeImages>
|
18
|
+
</Command>
|
19
|
+
<Command Name='cmdTab1Group2' LabelTitle='FontWith&Color' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
20
|
+
<Command.SmallImages>
|
21
|
+
<Image>../../res/preferences-desktop-font-small.bmp</Image>
|
22
|
+
<Image MinDPI='120'>../../res/preferences-desktop-font.bmp</Image>
|
23
|
+
</Command.SmallImages>
|
24
|
+
<Command.LargeImages>
|
25
|
+
<Image>../../res/preferences-desktop-font.bmp</Image>
|
26
|
+
<Image MinDPI='120'>../../res/preferences-desktop-font-big.bmp</Image>
|
27
|
+
</Command.LargeImages>
|
28
|
+
</Command>
|
29
|
+
<Command Name='cmdTab1Group3' LabelTitle='&RichFont' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
30
|
+
<Command.SmallImages>
|
31
|
+
<Image>../../res/preferences-desktop-font-small.bmp</Image>
|
32
|
+
<Image MinDPI='120'>../../res/preferences-desktop-font.bmp</Image>
|
33
|
+
</Command.SmallImages>
|
34
|
+
<Command.LargeImages>
|
35
|
+
<Image>../../res/preferences-desktop-font.bmp</Image>
|
36
|
+
<Image MinDPI='120'>../../res/preferences-desktop-font-big.bmp</Image>
|
37
|
+
</Command.LargeImages>
|
38
|
+
</Command>
|
39
|
+
|
40
|
+
<Command Name='cmdFont1' />
|
41
|
+
<Command Name='cmdFont2' />
|
42
|
+
<Command Name='cmdFont3' />
|
43
|
+
|
44
|
+
<Command Name='cmdContextMap1' />
|
45
|
+
</Application.Commands>
|
46
|
+
|
47
|
+
<Application.Views>
|
48
|
+
<Ribbon>
|
49
|
+
<Ribbon.ApplicationMenu>
|
50
|
+
<ApplicationMenu CommandName='cmdAppMenu'>
|
51
|
+
|
52
|
+
</ApplicationMenu>
|
53
|
+
</Ribbon.ApplicationMenu>
|
54
|
+
|
55
|
+
<Ribbon.QuickAccessToolbar>
|
56
|
+
<QuickAccessToolbar CommandName='cmdQAT'>
|
57
|
+
|
58
|
+
</QuickAccessToolbar>
|
59
|
+
</Ribbon.QuickAccessToolbar>
|
60
|
+
|
61
|
+
<Ribbon.Tabs>
|
62
|
+
<Tab CommandName='cmdTab1'>
|
63
|
+
<Group CommandName='cmdTab1Group1'>
|
64
|
+
<FontControl CommandName='cmdFont1' FontType='FontOnly' />
|
65
|
+
</Group>
|
66
|
+
|
67
|
+
<Group CommandName='cmdTab1Group2'>
|
68
|
+
<FontControl CommandName='cmdFont2' FontType='FontWithColor' />
|
69
|
+
</Group>
|
70
|
+
|
71
|
+
<Group CommandName='cmdTab1Group3'>
|
72
|
+
<FontControl CommandName='cmdFont3' FontType='RichFont' />
|
73
|
+
</Group>
|
74
|
+
</Tab>
|
75
|
+
</Ribbon.Tabs>
|
76
|
+
</Ribbon>
|
77
|
+
|
78
|
+
<ContextPopup>
|
79
|
+
<ContextPopup.MiniToolbars>
|
80
|
+
<MiniToolbar Name='miniToolbar1'>
|
81
|
+
<MenuGroup Class='StandardItems'>
|
82
|
+
<FontControl CommandName='cmdFont1' />
|
83
|
+
</MenuGroup>
|
84
|
+
</MiniToolbar>
|
85
|
+
</ContextPopup.MiniToolbars>
|
86
|
+
|
87
|
+
<ContextPopup.ContextMenus>
|
88
|
+
|
89
|
+
</ContextPopup.ContextMenus>
|
90
|
+
|
91
|
+
<ContextPopup.ContextMaps>
|
92
|
+
<ContextMap CommandName='cmdContextMap1' MiniToolbar='miniToolbar1' />
|
93
|
+
</ContextPopup.ContextMaps>
|
94
|
+
</ContextPopup>
|
95
|
+
</Application.Views>
|
96
|
+
</Application>
|
Binary file
|
@@ -0,0 +1,55 @@
|
|
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
|
+
CmdTab1Group2 = 6
|
16
|
+
CmdTab1Group2_LabelTitle_RESID = 60009
|
17
|
+
CmdTab1Group2_LabelDescription_RESID = 60010
|
18
|
+
CmdTab1Group2_TooltipDescription_RESID = 60011
|
19
|
+
CmdTab1Group2_SmallImages_RESID = 60012
|
20
|
+
CmdTab1Group2_SmallImages_120__RESID = 60013
|
21
|
+
CmdTab1Group2_LargeImages_RESID = 60014
|
22
|
+
CmdTab1Group2_LargeImages_120__RESID = 60015
|
23
|
+
CmdTab1Group3 = 7
|
24
|
+
CmdTab1Group3_LabelTitle_RESID = 60016
|
25
|
+
CmdTab1Group3_LabelDescription_RESID = 60017
|
26
|
+
CmdTab1Group3_TooltipDescription_RESID = 60018
|
27
|
+
CmdTab1Group3_SmallImages_RESID = 60019
|
28
|
+
CmdTab1Group3_SmallImages_120__RESID = 60020
|
29
|
+
CmdTab1Group3_LargeImages_RESID = 60021
|
30
|
+
CmdTab1Group3_LargeImages_120__RESID = 60022
|
31
|
+
CmdGallery1 = 8
|
32
|
+
CmdGallery1_LabelTitle_RESID = 60023
|
33
|
+
CmdGallery1_LabelDescription_RESID = 60024
|
34
|
+
CmdGallery1_TooltipDescription_RESID = 60025
|
35
|
+
CmdGallery1_SmallImages_RESID = 60026
|
36
|
+
CmdGallery1_SmallImages_120__RESID = 60027
|
37
|
+
CmdGallery1_LargeImages_RESID = 60028
|
38
|
+
CmdGallery1_LargeImages_120__RESID = 60029
|
39
|
+
CmdGallery2 = 9
|
40
|
+
CmdGallery2_LabelTitle_RESID = 60030
|
41
|
+
CmdGallery2_LabelDescription_RESID = 60031
|
42
|
+
CmdGallery2_TooltipDescription_RESID = 60032
|
43
|
+
CmdGallery2_SmallImages_RESID = 60033
|
44
|
+
CmdGallery2_SmallImages_120__RESID = 60034
|
45
|
+
CmdGallery2_LargeImages_RESID = 60035
|
46
|
+
CmdGallery2_LargeImages_120__RESID = 60036
|
47
|
+
CmdGallery3 = 10
|
48
|
+
CmdGallery3_LabelTitle_RESID = 60037
|
49
|
+
CmdGallery3_LabelDescription_RESID = 60038
|
50
|
+
CmdGallery3_TooltipDescription_RESID = 60039
|
51
|
+
CmdGallery3_SmallImages_RESID = 60040
|
52
|
+
CmdGallery3_SmallImages_120__RESID = 60041
|
53
|
+
CmdGallery3_LargeImages_RESID = 60042
|
54
|
+
CmdGallery3_LargeImages_120__RESID = 60043
|
55
|
+
CmdContextMap1 = 11
|
@@ -0,0 +1,124 @@
|
|
1
|
+
require 'fzeet'
|
2
|
+
|
3
|
+
include Fzeet
|
4
|
+
|
5
|
+
Application.run(View.new) { |window|
|
6
|
+
UIRibbon.new(window).
|
7
|
+
invalidate(CmdGallery1, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_Categories).
|
8
|
+
invalidate(CmdGallery1, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_ItemsSource).
|
9
|
+
invalidate(CmdGallery1, Windows::UI_INVALIDATIONS_STATE).
|
10
|
+
|
11
|
+
invalidate(CmdGallery2, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_Categories).
|
12
|
+
invalidate(CmdGallery2, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_ItemsSource).
|
13
|
+
invalidate(CmdGallery2, Windows::UI_INVALIDATIONS_STATE).
|
14
|
+
|
15
|
+
invalidate(CmdGallery3, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_Categories).
|
16
|
+
invalidate(CmdGallery3, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_ItemsSource).
|
17
|
+
invalidate(CmdGallery3, Windows::UI_INVALIDATIONS_STATE).
|
18
|
+
|
19
|
+
on(:update, CmdGallery1) { |args|
|
20
|
+
case args[:key]
|
21
|
+
when Windows::UI_PKEY_Categories
|
22
|
+
args[:value].unknown { |current|
|
23
|
+
current.QueryInstance(Windows::UICollection) { |categories|
|
24
|
+
categories.
|
25
|
+
add(C1 = UIRibbon::GalleryItem.new('Category1', 0)).
|
26
|
+
add(C2 = UIRibbon::GalleryItem.new('Category2', 1))
|
27
|
+
}
|
28
|
+
|
29
|
+
args[:newValue].unknown = current
|
30
|
+
}
|
31
|
+
when Windows::UI_PKEY_ItemsSource
|
32
|
+
args[:value].unknown { |current|
|
33
|
+
current.QueryInstance(Windows::UICollection) { |items|
|
34
|
+
items.
|
35
|
+
add(I1 = UIRibbon::GalleryItem.new('Item1', 0, '../../res/go-next.bmp')).
|
36
|
+
add(I2 = UIRibbon::GalleryItem.new('Item2', 1, '../../res/go-previous.bmp'))
|
37
|
+
}
|
38
|
+
|
39
|
+
args[:newValue].unknown = current
|
40
|
+
}
|
41
|
+
|
42
|
+
window.ribbon.invalidate(CmdGallery1, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_SelectedItem)
|
43
|
+
when Windows::UI_PKEY_SelectedItem
|
44
|
+
args[:newValue].uint = 0
|
45
|
+
end
|
46
|
+
}.
|
47
|
+
|
48
|
+
on(:update, CmdGallery2) { |args|
|
49
|
+
case args[:key]
|
50
|
+
when Windows::UI_PKEY_Categories
|
51
|
+
args[:value].unknown { |current|
|
52
|
+
current.QueryInstance(Windows::UICollection) { |categories|
|
53
|
+
categories.
|
54
|
+
add(C3 = UIRibbon::GalleryItem.new('Category1', 0)).
|
55
|
+
add(C4 = UIRibbon::GalleryItem.new('Category2', 1))
|
56
|
+
}
|
57
|
+
|
58
|
+
args[:newValue].unknown = current
|
59
|
+
}
|
60
|
+
when Windows::UI_PKEY_ItemsSource
|
61
|
+
args[:value].unknown { |current|
|
62
|
+
current.QueryInstance(Windows::UICollection) { |items|
|
63
|
+
items.
|
64
|
+
add(I3 = UIRibbon::GalleryItem.new('Item1', 0, '../../res/go-next.bmp')).
|
65
|
+
add(I4 = UIRibbon::GalleryItem.new('Item2', 1, '../../res/go-previous.bmp'))
|
66
|
+
}
|
67
|
+
|
68
|
+
args[:newValue].unknown = current
|
69
|
+
}
|
70
|
+
|
71
|
+
window.ribbon.invalidate(CmdGallery2, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_SelectedItem)
|
72
|
+
when Windows::UI_PKEY_SelectedItem
|
73
|
+
args[:newValue].uint = 0
|
74
|
+
end
|
75
|
+
}.
|
76
|
+
|
77
|
+
on(:update, CmdGallery3) { |args|
|
78
|
+
case args[:key]
|
79
|
+
when Windows::UI_PKEY_Categories
|
80
|
+
args[:value].unknown { |current|
|
81
|
+
current.QueryInstance(Windows::UICollection) { |categories|
|
82
|
+
categories.
|
83
|
+
add(C5 = UIRibbon::GalleryItem.new('Category1', 0)).
|
84
|
+
add(C6 = UIRibbon::GalleryItem.new('Category2', 1))
|
85
|
+
}
|
86
|
+
|
87
|
+
args[:newValue].unknown = current
|
88
|
+
}
|
89
|
+
when Windows::UI_PKEY_ItemsSource
|
90
|
+
args[:value].unknown { |current|
|
91
|
+
current.QueryInstance(Windows::UICollection) { |items|
|
92
|
+
items.
|
93
|
+
add(I5 = UIRibbon::GalleryItem.new('Item1', 0, '../../res/go-next.bmp')).
|
94
|
+
add(I6 = UIRibbon::GalleryItem.new('Item2', 1, '../../res/go-previous.bmp'))
|
95
|
+
}
|
96
|
+
|
97
|
+
args[:newValue].unknown = current
|
98
|
+
}
|
99
|
+
|
100
|
+
window.ribbon.invalidate(CmdGallery3, Windows::UI_INVALIDATIONS_PROPERTY, Windows::UI_PKEY_SelectedItem)
|
101
|
+
when Windows::UI_PKEY_SelectedItem
|
102
|
+
args[:newValue].uint = 0
|
103
|
+
end
|
104
|
+
}.
|
105
|
+
|
106
|
+
on(:execute, CmdGallery1) { |args|
|
107
|
+
message "Item with index #{args[:value].uint} selected"
|
108
|
+
}.
|
109
|
+
|
110
|
+
on(:execute, CmdGallery2) { |args|
|
111
|
+
message "Item with index #{args[:value].uint} selected"
|
112
|
+
}.
|
113
|
+
|
114
|
+
on(:execute, CmdGallery3) { |args|
|
115
|
+
message (args[:value].nil?) ? "Default action" : "Item with index #{args[:value].uint} selected"
|
116
|
+
}
|
117
|
+
|
118
|
+
window.
|
119
|
+
on(:draw, Control::Font) { |dc| dc.sms 'Right-click (or menu key) for context menu' }.
|
120
|
+
|
121
|
+
on(:contextmenu) { |args|
|
122
|
+
window.ribbon.contextualUI(CmdContextMap1, args[:x], args[:y])
|
123
|
+
}
|
124
|
+
}
|
@@ -0,0 +1,132 @@
|
|
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='Gallery' />
|
9
|
+
<Command Name='cmdTab1Group1' LabelTitle='In&RibbonGallery' 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
|
+
<Command Name='cmdTab1Group2' LabelTitle='&DropDownGallery' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
20
|
+
<Command.SmallImages>
|
21
|
+
<Image>../../res/go-down-small.bmp</Image>
|
22
|
+
<Image MinDPI='120'>../../res/go-down.bmp</Image>
|
23
|
+
</Command.SmallImages>
|
24
|
+
<Command.LargeImages>
|
25
|
+
<Image>../../res/go-down.bmp</Image>
|
26
|
+
<Image MinDPI='120'>../../res/go-down-big.bmp</Image>
|
27
|
+
</Command.LargeImages>
|
28
|
+
</Command>
|
29
|
+
<Command Name='cmdTab1Group3' LabelTitle='&SplitButtonGallery' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
30
|
+
<Command.SmallImages>
|
31
|
+
<Image>../../res/go-jump-small.bmp</Image>
|
32
|
+
<Image MinDPI='120'>../../res/go-jump.bmp</Image>
|
33
|
+
</Command.SmallImages>
|
34
|
+
<Command.LargeImages>
|
35
|
+
<Image>../../res/go-jump.bmp</Image>
|
36
|
+
<Image MinDPI='120'>../../res/go-jump-big.bmp</Image>
|
37
|
+
</Command.LargeImages>
|
38
|
+
</Command>
|
39
|
+
|
40
|
+
<Command Name='cmdGallery1' LabelTitle='In&Ribbon1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
41
|
+
<Command.SmallImages>
|
42
|
+
<Image>../../res/go-next-small.bmp</Image>
|
43
|
+
<Image MinDPI='120'>../../res/go-next.bmp</Image>
|
44
|
+
</Command.SmallImages>
|
45
|
+
<Command.LargeImages>
|
46
|
+
<Image>../../res/go-next.bmp</Image>
|
47
|
+
<Image MinDPI='120'>../../res/go-next-big.bmp</Image>
|
48
|
+
</Command.LargeImages>
|
49
|
+
</Command>
|
50
|
+
<Command Name='cmdGallery2' LabelTitle='&Drop1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
51
|
+
<Command.SmallImages>
|
52
|
+
<Image>../../res/go-down-small.bmp</Image>
|
53
|
+
<Image MinDPI='120'>../../res/go-down.bmp</Image>
|
54
|
+
</Command.SmallImages>
|
55
|
+
<Command.LargeImages>
|
56
|
+
<Image>../../res/go-down.bmp</Image>
|
57
|
+
<Image MinDPI='120'>../../res/go-down-big.bmp</Image>
|
58
|
+
</Command.LargeImages>
|
59
|
+
</Command>
|
60
|
+
<Command Name='cmdGallery3' LabelTitle='&Split1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
61
|
+
<Command.SmallImages>
|
62
|
+
<Image>../../res/go-jump-small.bmp</Image>
|
63
|
+
<Image MinDPI='120'>../../res/go-jump.bmp</Image>
|
64
|
+
</Command.SmallImages>
|
65
|
+
<Command.LargeImages>
|
66
|
+
<Image>../../res/go-jump.bmp</Image>
|
67
|
+
<Image MinDPI='120'>../../res/go-jump-big.bmp</Image>
|
68
|
+
</Command.LargeImages>
|
69
|
+
</Command>
|
70
|
+
|
71
|
+
<Command Name='cmdContextMap1' />
|
72
|
+
</Application.Commands>
|
73
|
+
|
74
|
+
<Application.Views>
|
75
|
+
<Ribbon>
|
76
|
+
<Ribbon.ApplicationMenu>
|
77
|
+
<ApplicationMenu CommandName='cmdAppMenu'>
|
78
|
+
<MenuGroup Class='MajorItems'>
|
79
|
+
<DropDownGallery CommandName='cmdGallery2' />
|
80
|
+
<SplitButtonGallery CommandName='cmdGallery3' />
|
81
|
+
</MenuGroup>
|
82
|
+
</ApplicationMenu>
|
83
|
+
</Ribbon.ApplicationMenu>
|
84
|
+
|
85
|
+
<Ribbon.QuickAccessToolbar>
|
86
|
+
<QuickAccessToolbar CommandName='cmdQAT'>
|
87
|
+
|
88
|
+
</QuickAccessToolbar>
|
89
|
+
</Ribbon.QuickAccessToolbar>
|
90
|
+
|
91
|
+
<Ribbon.Tabs>
|
92
|
+
<Tab CommandName='cmdTab1'>
|
93
|
+
<Group CommandName='cmdTab1Group1'>
|
94
|
+
<InRibbonGallery CommandName='cmdGallery1' TextPosition='Bottom' MinColumnsLarge='2' />
|
95
|
+
</Group>
|
96
|
+
|
97
|
+
<Group CommandName='cmdTab1Group2' SizeDefinition='OneButton'>
|
98
|
+
<DropDownGallery CommandName='cmdGallery2' TextPosition='Hide' />
|
99
|
+
</Group>
|
100
|
+
|
101
|
+
<Group CommandName='cmdTab1Group3' SizeDefinition='OneButton'>
|
102
|
+
<SplitButtonGallery CommandName='cmdGallery3' TextPosition='Hide' />
|
103
|
+
</Group>
|
104
|
+
</Tab>
|
105
|
+
</Ribbon.Tabs>
|
106
|
+
</Ribbon>
|
107
|
+
|
108
|
+
<ContextPopup>
|
109
|
+
<ContextPopup.MiniToolbars>
|
110
|
+
<MiniToolbar Name='miniToolbar1'>
|
111
|
+
<MenuGroup>
|
112
|
+
<DropDownGallery CommandName='cmdGallery2' />
|
113
|
+
<SplitButtonGallery CommandName='cmdGallery3' />
|
114
|
+
</MenuGroup>
|
115
|
+
</MiniToolbar>
|
116
|
+
</ContextPopup.MiniToolbars>
|
117
|
+
|
118
|
+
<ContextPopup.ContextMenus>
|
119
|
+
<ContextMenu Name='contextMenu1'>
|
120
|
+
<MenuGroup>
|
121
|
+
<DropDownGallery CommandName='cmdGallery2' />
|
122
|
+
<SplitButtonGallery CommandName='cmdGallery3' />
|
123
|
+
</MenuGroup>
|
124
|
+
</ContextMenu>
|
125
|
+
</ContextPopup.ContextMenus>
|
126
|
+
|
127
|
+
<ContextPopup.ContextMaps>
|
128
|
+
<ContextMap CommandName='cmdContextMap1' MiniToolbar='miniToolbar1' ContextMenu='contextMenu1' />
|
129
|
+
</ContextPopup.ContextMaps>
|
130
|
+
</ContextPopup>
|
131
|
+
</Application.Views>
|
132
|
+
</Application>
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
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
|
+
CmdSpinner1 = 6
|
12
|
+
CmdSpinner1_LabelTitle_RESID = 60005
|
13
|
+
CmdSpinner1_LabelDescription_RESID = 60006
|
14
|
+
CmdSpinner1_TooltipDescription_RESID = 60007
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'fzeet'
|
2
|
+
|
3
|
+
include Fzeet
|
4
|
+
|
5
|
+
Application.run { |window|
|
6
|
+
UIRibbon.new(window,
|
7
|
+
[:update, :CmdSpinner1] => proc { |args|
|
8
|
+
case args[:key]
|
9
|
+
when Windows::UI_PKEY_DecimalPlaces
|
10
|
+
args[:newValue].uint = 2
|
11
|
+
when Windows::UI_PKEY_RepresentativeString
|
12
|
+
args[:newValue].wstring = '00.00em'
|
13
|
+
when Windows::UI_PKEY_FormatString
|
14
|
+
args[:newValue].wstring = 'em'
|
15
|
+
when Windows::UI_PKEY_MinValue
|
16
|
+
args[:newValue].decimal = 1
|
17
|
+
when Windows::UI_PKEY_MaxValue
|
18
|
+
args[:newValue].decimal = 10
|
19
|
+
when Windows::UI_PKEY_Increment
|
20
|
+
args[:newValue].decimal = 3
|
21
|
+
end
|
22
|
+
}
|
23
|
+
).
|
24
|
+
on(:execute, CmdSpinner1) { |args|
|
25
|
+
message args[:value].decimal.to_f
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,37 @@
|
|
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='Spinner' />
|
9
|
+
<Command Name='cmdTab1Group1' LabelTitle='&Spinner' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...' />
|
10
|
+
|
11
|
+
<Command Name='cmdSpinner1' LabelTitle='&Spinner1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...' />
|
12
|
+
</Application.Commands>
|
13
|
+
|
14
|
+
<Application.Views>
|
15
|
+
<Ribbon>
|
16
|
+
<Ribbon.ApplicationMenu>
|
17
|
+
<ApplicationMenu CommandName='cmdAppMenu'>
|
18
|
+
|
19
|
+
</ApplicationMenu>
|
20
|
+
</Ribbon.ApplicationMenu>
|
21
|
+
|
22
|
+
<Ribbon.QuickAccessToolbar>
|
23
|
+
<QuickAccessToolbar CommandName='cmdQAT'>
|
24
|
+
|
25
|
+
</QuickAccessToolbar>
|
26
|
+
</Ribbon.QuickAccessToolbar>
|
27
|
+
|
28
|
+
<Ribbon.Tabs>
|
29
|
+
<Tab CommandName='cmdTab1'>
|
30
|
+
<Group CommandName='cmdTab1Group1'>
|
31
|
+
<Spinner CommandName='cmdSpinner1' />
|
32
|
+
</Group>
|
33
|
+
</Tab>
|
34
|
+
</Ribbon.Tabs>
|
35
|
+
</Ribbon>
|
36
|
+
</Application.Views>
|
37
|
+
</Application>
|
data/examples/UIRibbon/Size.rbw
CHANGED
Binary file
|
@@ -0,0 +1,12 @@
|
|
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
|
+
CmdTabGroup1 = 5
|
8
|
+
CmdTabGroup1_LabelTitle_RESID = 60002
|
9
|
+
CmdTabGroup1Tab1 = 6
|
10
|
+
CmdTabGroup1Tab1_LabelTitle_RESID = 60003
|
11
|
+
CmdTabGroup1Tab2 = 7
|
12
|
+
CmdTabGroup1Tab2_LabelTitle_RESID = 60004
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'fzeet'
|
2
|
+
|
3
|
+
include Fzeet
|
4
|
+
|
5
|
+
Application.run { |window|
|
6
|
+
UIRibbon.new(window).
|
7
|
+
on(:size) {
|
8
|
+
window[:edit1].position = 10, window.ribbon.height + 10, 100, 18
|
9
|
+
}
|
10
|
+
|
11
|
+
Edit.new(window, :edit1, caption: '').
|
12
|
+
on(:setfocus) {
|
13
|
+
window.ribbon.uif.SetUICommandProperty(CmdTabGroup1, Windows::UI_PKEY_ContextAvailable, Windows::PROPVARIANT[:int, 1])
|
14
|
+
}.
|
15
|
+
|
16
|
+
on(:killfocus) {
|
17
|
+
window.ribbon.uif.SetUICommandProperty(CmdTabGroup1, Windows::UI_PKEY_ContextAvailable, Windows::PROPVARIANT[:int, 0])
|
18
|
+
}.
|
19
|
+
|
20
|
+
cuebanner = 'Click here...'
|
21
|
+
|
22
|
+
window.on(:lbuttondown) { window[:edit1].focus = false if window[:edit1].focus? }
|
23
|
+
}
|