wxruby 1.9.9-x86-mingw32 → 1.9.10-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +53 -53
- data/README +297 -297
- data/lib/wx.rb +53 -53
- data/lib/wx/classes/bitmap.rb +29 -1
- data/lib/wx/classes/clipboard.rb +19 -3
- data/lib/wx/classes/colour.rb +6 -4
- data/lib/wx/classes/data_object.rb +14 -0
- data/lib/wx/classes/data_object_simple.rb +6 -0
- data/lib/wx/classes/dataformat.rb +23 -0
- data/lib/wx/classes/evthandler.rb +31 -4
- data/lib/wx/classes/genericdirctrl.rb +36 -0
- data/lib/wx/classes/grid.rb +8 -0
- data/lib/wx/classes/hboxsizer.rb +6 -0
- data/lib/wx/classes/icon.rb +12 -1
- data/lib/wx/classes/image.rb +13 -1
- data/lib/wx/classes/listctrl.rb +12 -0
- data/lib/wx/classes/point.rb +8 -0
- data/lib/wx/classes/rect.rb +10 -1
- data/lib/wx/classes/richtextctrl.rb +22 -0
- data/lib/wx/classes/size.rb +9 -0
- data/lib/wx/classes/sizer.rb +18 -3
- data/lib/wx/classes/toolbar.rb +4 -6
- data/lib/wx/classes/vboxsizer.rb +6 -0
- data/lib/wx/classes/window.rb +7 -0
- data/lib/wx/classes/xmlresource.rb +17 -0
- data/lib/wx/helpers.rb +16 -1
- data/lib/wx/keyword_ctors.rb +3 -2
- data/lib/wx/keyword_defs.rb +27 -5
- data/lib/wx/version.rb +1 -1
- data/lib/wxruby2.so +0 -0
- data/samples/SAMPLES-LICENSE.TXT +17 -17
- data/samples/bigdemo/About.rbw +39 -39
- data/samples/bigdemo/ColorPanel.rbw +23 -23
- data/samples/bigdemo/GridSimple.rbw +78 -78
- data/samples/bigdemo/MDIDemo.rbw +57 -57
- data/samples/bigdemo/PopupMenu.rbw +149 -149
- data/samples/bigdemo/Sizers.rbw +543 -543
- data/samples/bigdemo/bigdemo.rb +823 -823
- data/samples/bigdemo/demoTemplate.rbw +33 -33
- data/samples/bigdemo/icons/choice.xpm +27 -27
- data/samples/bigdemo/icons/combo.xpm +27 -27
- data/samples/bigdemo/icons/copy.xpm +25 -25
- data/samples/bigdemo/icons/cut.xpm +24 -24
- data/samples/bigdemo/icons/gauge.xpm +27 -27
- data/samples/bigdemo/icons/help.xpm +25 -25
- data/samples/bigdemo/icons/list.xpm +27 -27
- data/samples/bigdemo/icons/mondrian.xpm +44 -44
- data/samples/bigdemo/icons/new.xpm +24 -24
- data/samples/bigdemo/icons/ogl.ico +0 -0
- data/samples/bigdemo/icons/ogl.xpm +45 -45
- data/samples/bigdemo/icons/open.xpm +26 -26
- data/samples/bigdemo/icons/paste.xpm +38 -38
- data/samples/bigdemo/icons/preview.xpm +26 -26
- data/samples/bigdemo/icons/print.xpm +26 -26
- data/samples/bigdemo/icons/radio.xpm +27 -27
- data/samples/bigdemo/icons/robert.xpm +415 -415
- data/samples/bigdemo/icons/save.xpm +25 -25
- data/samples/bigdemo/icons/smiles.xpm +39 -39
- data/samples/bigdemo/icons/smiley.xpm +42 -42
- data/samples/bigdemo/icons/stattext.xpm +24 -24
- data/samples/bigdemo/icons/test2.bmp +0 -0
- data/samples/bigdemo/icons/test2.xpm +79 -79
- data/samples/bigdemo/icons/text.xpm +27 -27
- data/samples/bigdemo/icons/tog1.xpm +38 -38
- data/samples/bigdemo/icons/tog2.xpm +38 -38
- data/samples/bigdemo/icons/wxwin16x16.xpm +25 -25
- data/samples/bigdemo/tips.txt +7 -7
- data/samples/bigdemo/utils.rb +11 -11
- data/samples/bigdemo/wxButton.rbw +64 -64
- data/samples/bigdemo/wxCalendarCtrl.rbw +60 -60
- data/samples/bigdemo/wxCheckBox.rbw +50 -50
- data/samples/bigdemo/wxCheckListBox.rbw +65 -75
- data/samples/bigdemo/wxChoice.rbw +47 -47
- data/samples/bigdemo/wxColourDialog.rbw +31 -31
- data/samples/bigdemo/wxComboBox.rbw +77 -77
- data/samples/bigdemo/wxDialog.rbw +74 -74
- data/samples/bigdemo/wxDirDialog.rbw +29 -29
- data/samples/bigdemo/wxFileDialog.rbw +37 -37
- data/samples/bigdemo/wxFileDialog_Save.rbw +35 -35
- data/samples/bigdemo/wxFindReplaceDialog.rbw +82 -82
- data/samples/bigdemo/wxFontDialog.rbw +173 -173
- data/samples/bigdemo/wxFrame.rbw +53 -53
- data/samples/bigdemo/wxGauge.rbw +71 -71
- data/samples/bigdemo/wxGrid.rbw +66 -66
- data/samples/bigdemo/wxListBox.rbw +140 -140
- data/samples/bigdemo/wxListCtrl_virtual.rbw +112 -107
- data/samples/bigdemo/wxMDIWindows.rbw +50 -50
- data/samples/bigdemo/wxMenu.rbw +236 -236
- data/samples/bigdemo/wxMessageDialog.rbw +27 -27
- data/samples/bigdemo/wxMultipleChoiceDialog.rbw +32 -32
- data/samples/bigdemo/wxNotebook.rbw +136 -136
- data/samples/bigdemo/wxProgressDialog.rbw +43 -43
- data/samples/bigdemo/wxRadioBox.rbw +72 -72
- data/samples/bigdemo/wxRadioButton.rbw +125 -125
- data/samples/bigdemo/wxSashWindow.rbw +2 -2
- data/samples/bigdemo/wxScrolledMessageDialog.rbw +57 -57
- data/samples/bigdemo/wxScrolledWindow.rbw +199 -199
- data/samples/bigdemo/wxSingleChoiceDialog.rbw +33 -33
- data/samples/bigdemo/wxSlider.rbw +42 -42
- data/samples/bigdemo/wxSpinButton.rbw +50 -50
- data/samples/bigdemo/wxSpinCtrl.rbw +51 -51
- data/samples/bigdemo/wxSplitterWindow.rbw +63 -63
- data/samples/bigdemo/wxStaticBitmap.rbw +51 -51
- data/samples/bigdemo/wxStaticText.rbw +55 -55
- data/samples/bigdemo/wxStatusBar.rbw +126 -126
- data/samples/bigdemo/wxTextCtrl.rbw +149 -149
- data/samples/bigdemo/wxTextEntryDialog.rbw +31 -31
- data/samples/bigdemo/wxToggleButton.rbw +49 -49
- data/samples/bigdemo/wxToolBar.rbw +131 -131
- data/samples/bigdemo/wxTreeCtrl.rbw +191 -190
- data/samples/calendar/calendar.rb +256 -271
- data/samples/caret/caret.rb +282 -282
- data/samples/caret/mondrian.xpm +44 -44
- data/samples/controls/controls.rb +1136 -1136
- data/samples/controls/get_item_sample.rb +87 -87
- data/samples/controls/icons/choice.xpm +27 -27
- data/samples/controls/icons/combo.xpm +27 -27
- data/samples/controls/icons/gauge.xpm +27 -27
- data/samples/controls/icons/list.xpm +27 -27
- data/samples/controls/icons/radio.xpm +27 -27
- data/samples/controls/icons/stattext.xpm +24 -24
- data/samples/controls/icons/text.xpm +27 -27
- data/samples/controls/mondrian.xpm +44 -44
- data/samples/dialogs/dialogs.rb +797 -723
- data/samples/dialogs/tips.txt +18 -18
- data/samples/drawing/images.rb +37 -37
- data/samples/etc/activation.rb +102 -102
- data/samples/etc/choice.rb +67 -67
- data/samples/etc/miniframe.rb +79 -79
- data/samples/etc/sash.rb +130 -130
- data/samples/etc/scrollwin.rb +110 -110
- data/samples/etc/system_settings.rb +252 -252
- data/samples/etc/toolbar_sizer_additem.rb +55 -0
- data/samples/etc/wizard.rb +74 -74
- data/samples/event/update_ui_event.rb +70 -0
- data/samples/grid/gridtablebase.rb +43 -29
- data/samples/listbook/listbook.rb +174 -174
- data/samples/listbook/listbook.xrc +370 -370
- data/samples/mdi/mdi.rb +85 -77
- data/samples/minimal/minimal.rb +77 -77
- data/samples/minimal/nothing.rb +16 -16
- data/samples/text/format-text-bold.png +0 -0
- data/samples/text/format-text-italic.png +0 -0
- data/samples/text/format-text-underline.png +0 -0
- data/samples/text/rich_textctrl.rb +98 -0
- data/samples/text/textctrl.rb +111 -113
- data/samples/text/unicode.rb +242 -242
- data/samples/text/utf8.txt +14 -14
- data/samples/treectrl/treectrl.rb +1166 -1174
- data/samples/xrc/samples.xrc +46 -46
- data/samples/xrc/xrc_sample.rb +76 -96
- metadata +15 -3
@@ -1,24 +1,24 @@
|
|
1
|
-
/* XPM */
|
2
|
-
static char * stattext_xpm[] = {
|
3
|
-
/* width height ncolors chars_per_pixel */
|
4
|
-
"16 16 2 1",
|
5
|
-
/* colors */
|
6
|
-
" s None c None",
|
7
|
-
". c #000000",
|
8
|
-
/* pixels */
|
9
|
-
" ",
|
10
|
-
" ",
|
11
|
-
" ",
|
12
|
-
" .. ",
|
13
|
-
" .. ",
|
14
|
-
" .... ",
|
15
|
-
" .... .... ",
|
16
|
-
" . . .. .. ",
|
17
|
-
" .. .. .... ",
|
18
|
-
" .. .. .. .. ",
|
19
|
-
" ...... .. .. ",
|
20
|
-
".. .. .. .. ",
|
21
|
-
".. .. ..... ",
|
22
|
-
" ",
|
23
|
-
" ",
|
24
|
-
" "};
|
1
|
+
/* XPM */
|
2
|
+
static char * stattext_xpm[] = {
|
3
|
+
/* width height ncolors chars_per_pixel */
|
4
|
+
"16 16 2 1",
|
5
|
+
/* colors */
|
6
|
+
" s None c None",
|
7
|
+
". c #000000",
|
8
|
+
/* pixels */
|
9
|
+
" ",
|
10
|
+
" ",
|
11
|
+
" ",
|
12
|
+
" .. ",
|
13
|
+
" .. ",
|
14
|
+
" .... ",
|
15
|
+
" .... .... ",
|
16
|
+
" . . .. .. ",
|
17
|
+
" .. .. .... ",
|
18
|
+
" .. .. .. .. ",
|
19
|
+
" ...... .. .. ",
|
20
|
+
".. .. .. .. ",
|
21
|
+
".. .. ..... ",
|
22
|
+
" ",
|
23
|
+
" ",
|
24
|
+
" "};
|
@@ -1,27 +1,27 @@
|
|
1
|
-
/* XPM */
|
2
|
-
static char * text_xpm[] = {
|
3
|
-
/* width height ncolors chars_per_pixel */
|
4
|
-
"16 16 5 1",
|
5
|
-
/* colors */
|
6
|
-
" s None c None",
|
7
|
-
". c #000000",
|
8
|
-
"+ c #c0c0c0",
|
9
|
-
"@ c #808080",
|
10
|
-
"# c #ffffff",
|
11
|
-
/* pixels */
|
12
|
-
" ",
|
13
|
-
" ",
|
14
|
-
" ",
|
15
|
-
"@@@@@@@@@@@@@@@@",
|
16
|
-
"@..............@",
|
17
|
-
"@.############+@",
|
18
|
-
"@.#...########+@",
|
19
|
-
"@.##.#########+@",
|
20
|
-
"@.##.#########+@",
|
21
|
-
"@.#...########+@",
|
22
|
-
"@.############+@",
|
23
|
-
"@.+++++++++++++@",
|
24
|
-
"@@@@@@@@@@@@@@@@",
|
25
|
-
" ",
|
26
|
-
" ",
|
27
|
-
" "};
|
1
|
+
/* XPM */
|
2
|
+
static char * text_xpm[] = {
|
3
|
+
/* width height ncolors chars_per_pixel */
|
4
|
+
"16 16 5 1",
|
5
|
+
/* colors */
|
6
|
+
" s None c None",
|
7
|
+
". c #000000",
|
8
|
+
"+ c #c0c0c0",
|
9
|
+
"@ c #808080",
|
10
|
+
"# c #ffffff",
|
11
|
+
/* pixels */
|
12
|
+
" ",
|
13
|
+
" ",
|
14
|
+
" ",
|
15
|
+
"@@@@@@@@@@@@@@@@",
|
16
|
+
"@..............@",
|
17
|
+
"@.############+@",
|
18
|
+
"@.#...########+@",
|
19
|
+
"@.##.#########+@",
|
20
|
+
"@.##.#########+@",
|
21
|
+
"@.#...########+@",
|
22
|
+
"@.############+@",
|
23
|
+
"@.+++++++++++++@",
|
24
|
+
"@@@@@@@@@@@@@@@@",
|
25
|
+
" ",
|
26
|
+
" ",
|
27
|
+
" "};
|
@@ -1,44 +1,44 @@
|
|
1
|
-
/* XPM */
|
2
|
-
static char *mondrian_xpm[] = {
|
3
|
-
/* columns rows colors chars-per-pixel */
|
4
|
-
"32 32 6 1",
|
5
|
-
" c Black",
|
6
|
-
". c Blue",
|
7
|
-
"X c #00bf00",
|
8
|
-
"o c Red",
|
9
|
-
"O c Yellow",
|
10
|
-
"+ c Gray100",
|
11
|
-
/* pixels */
|
12
|
-
" ",
|
13
|
-
" oooooo +++++++++++++++++++++++ ",
|
14
|
-
" oooooo +++++++++++++++++++++++ ",
|
15
|
-
" oooooo +++++++++++++++++++++++ ",
|
16
|
-
" oooooo +++++++++++++++++++++++ ",
|
17
|
-
" oooooo +++++++++++++++++++++++ ",
|
18
|
-
" oooooo +++++++++++++++++++++++ ",
|
19
|
-
" oooooo +++++++++++++++++++++++ ",
|
20
|
-
" ",
|
21
|
-
" ++++++ ++++++++++++++++++ .... ",
|
22
|
-
" ++++++ ++++++++++++++++++ .... ",
|
23
|
-
" ++++++ ++++++++++++++++++ .... ",
|
24
|
-
" ++++++ ++++++++++++++++++ .... ",
|
25
|
-
" ++++++ ++++++++++++++++++ .... ",
|
26
|
-
" ++++++ ++++++++++++++++++ ",
|
27
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
28
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
29
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
30
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
31
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
32
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
33
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
34
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
35
|
-
" ++++++ ++++++++++++++++++ ++++ ",
|
36
|
-
" ++++++ ++++ ",
|
37
|
-
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
38
|
-
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
39
|
-
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
40
|
-
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
41
|
-
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
42
|
-
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
43
|
-
" "
|
44
|
-
};
|
1
|
+
/* XPM */
|
2
|
+
static char *mondrian_xpm[] = {
|
3
|
+
/* columns rows colors chars-per-pixel */
|
4
|
+
"32 32 6 1",
|
5
|
+
" c Black",
|
6
|
+
". c Blue",
|
7
|
+
"X c #00bf00",
|
8
|
+
"o c Red",
|
9
|
+
"O c Yellow",
|
10
|
+
"+ c Gray100",
|
11
|
+
/* pixels */
|
12
|
+
" ",
|
13
|
+
" oooooo +++++++++++++++++++++++ ",
|
14
|
+
" oooooo +++++++++++++++++++++++ ",
|
15
|
+
" oooooo +++++++++++++++++++++++ ",
|
16
|
+
" oooooo +++++++++++++++++++++++ ",
|
17
|
+
" oooooo +++++++++++++++++++++++ ",
|
18
|
+
" oooooo +++++++++++++++++++++++ ",
|
19
|
+
" oooooo +++++++++++++++++++++++ ",
|
20
|
+
" ",
|
21
|
+
" ++++++ ++++++++++++++++++ .... ",
|
22
|
+
" ++++++ ++++++++++++++++++ .... ",
|
23
|
+
" ++++++ ++++++++++++++++++ .... ",
|
24
|
+
" ++++++ ++++++++++++++++++ .... ",
|
25
|
+
" ++++++ ++++++++++++++++++ .... ",
|
26
|
+
" ++++++ ++++++++++++++++++ ",
|
27
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
28
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
29
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
30
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
31
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
32
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
33
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
34
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
35
|
+
" ++++++ ++++++++++++++++++ ++++ ",
|
36
|
+
" ++++++ ++++ ",
|
37
|
+
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
38
|
+
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
39
|
+
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
40
|
+
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
41
|
+
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
42
|
+
" ++++++ OOOOOOOOOOOO XXXXX ++++ ",
|
43
|
+
" "
|
44
|
+
};
|
data/samples/dialogs/dialogs.rb
CHANGED
@@ -1,723 +1,797 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
|
3
|
-
# Freely reusable code: see SAMPLES-LICENSE.TXT for details
|
4
|
-
begin
|
5
|
-
require 'rubygems'
|
6
|
-
rescue LoadError
|
7
|
-
end
|
8
|
-
require 'wx'
|
9
|
-
|
10
|
-
|
11
|
-
require 'wx'
|
12
|
-
|
13
|
-
|
14
|
-
include Wx
|
15
|
-
|
16
|
-
DIALOGS_CHOOSE_COLOUR = 1
|
17
|
-
DIALOGS_CHOOSE_COLOUR_GENERIC = 2
|
18
|
-
DIALOGS_CHOOSE_FONT = 3
|
19
|
-
DIALOGS_CHOOSE_FONT_GENERIC = 4
|
20
|
-
DIALOGS_MESSAGE_BOX = 5
|
21
|
-
DIALOGS_SINGLE_CHOICE = 6
|
22
|
-
DIALOGS_MULTI_CHOICE = 7
|
23
|
-
DIALOGS_TEXT_ENTRY = 8
|
24
|
-
DIALOGS_PASSWORD_ENTRY = 9
|
25
|
-
DIALOGS_FILE_OPEN = 10
|
26
|
-
DIALOGS_FILE_OPEN2 = 11
|
27
|
-
DIALOGS_FILES_OPEN = 12
|
28
|
-
DIALOGS_FILE_SAVE = 13
|
29
|
-
DIALOGS_DIR_CHOOSE = 14
|
30
|
-
DIALOGS_GENERIC_DIR_CHOOSE = 15
|
31
|
-
DIALOGS_TIP = 16
|
32
|
-
DIALOGS_NUM_ENTRY = 17
|
33
|
-
DIALOGS_LOG_DIALOG = 18
|
34
|
-
DIALOGS_MODAL = 19
|
35
|
-
DIALOGS_MODELESS = 20
|
36
|
-
DIALOGS_MODELESS_BTN = 21
|
37
|
-
DIALOGS_PROGRESS = 22
|
38
|
-
DIALOGS_BUSYINFO = 23
|
39
|
-
DIALOGS_FIND = 24
|
40
|
-
DIALOGS_REPLACE = 25
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
@
|
52
|
-
|
53
|
-
|
54
|
-
sizer_top.add(@
|
55
|
-
sizer_top.add(
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
sizer_top.
|
62
|
-
|
63
|
-
|
64
|
-
@btn_focused.
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
@btn_focused
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
end
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
check.
|
96
|
-
|
97
|
-
|
98
|
-
sizer_top.add(
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
sizer_top.
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
end
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
dialog2 = MessageDialog.new(self,
|
394
|
-
dialog2.show_modal()
|
395
|
-
end
|
396
|
-
end
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
end
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
dialog
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
end
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# wxRuby2 Sample Code. Copyright (c) 2004-2008 wxRuby development team
|
3
|
+
# Freely reusable code: see SAMPLES-LICENSE.TXT for details
|
4
|
+
begin
|
5
|
+
require 'rubygems'
|
6
|
+
rescue LoadError
|
7
|
+
end
|
8
|
+
require 'wx'
|
9
|
+
|
10
|
+
|
11
|
+
require 'wx'
|
12
|
+
|
13
|
+
|
14
|
+
include Wx
|
15
|
+
|
16
|
+
DIALOGS_CHOOSE_COLOUR = 1
|
17
|
+
DIALOGS_CHOOSE_COLOUR_GENERIC = 2
|
18
|
+
DIALOGS_CHOOSE_FONT = 3
|
19
|
+
DIALOGS_CHOOSE_FONT_GENERIC = 4
|
20
|
+
DIALOGS_MESSAGE_BOX = 5
|
21
|
+
DIALOGS_SINGLE_CHOICE = 6
|
22
|
+
DIALOGS_MULTI_CHOICE = 7
|
23
|
+
DIALOGS_TEXT_ENTRY = 8
|
24
|
+
DIALOGS_PASSWORD_ENTRY = 9
|
25
|
+
DIALOGS_FILE_OPEN = 10
|
26
|
+
DIALOGS_FILE_OPEN2 = 11
|
27
|
+
DIALOGS_FILES_OPEN = 12
|
28
|
+
DIALOGS_FILE_SAVE = 13
|
29
|
+
DIALOGS_DIR_CHOOSE = 14
|
30
|
+
DIALOGS_GENERIC_DIR_CHOOSE = 15
|
31
|
+
DIALOGS_TIP = 16
|
32
|
+
DIALOGS_NUM_ENTRY = 17
|
33
|
+
DIALOGS_LOG_DIALOG = 18
|
34
|
+
DIALOGS_MODAL = 19
|
35
|
+
DIALOGS_MODELESS = 20
|
36
|
+
DIALOGS_MODELESS_BTN = 21
|
37
|
+
DIALOGS_PROGRESS = 22
|
38
|
+
DIALOGS_BUSYINFO = 23
|
39
|
+
DIALOGS_FIND = 24
|
40
|
+
DIALOGS_REPLACE = 25
|
41
|
+
DIALOGS_PREFS = 26
|
42
|
+
|
43
|
+
$my_canvas = nil
|
44
|
+
|
45
|
+
class MyModalDialog < Dialog
|
46
|
+
def initialize(parent)
|
47
|
+
super(parent, -1, "Modal dialog")
|
48
|
+
|
49
|
+
sizer_top = BoxSizer.new(HORIZONTAL)
|
50
|
+
|
51
|
+
@btn_focused = Button.new(self, -1, "Default button")
|
52
|
+
@btn_delete = Button.new(self, -1, "&Delete button")
|
53
|
+
btn_ok = Button.new(self, ID_CANCEL, "&Close")
|
54
|
+
sizer_top.add(@btn_focused, 0, ALIGN_CENTER | ALL, 5)
|
55
|
+
sizer_top.add(@btn_delete, 0, ALIGN_CENTER | ALL, 5)
|
56
|
+
sizer_top.add(btn_ok, 0, ALIGN_CENTER | ALL, 5)
|
57
|
+
|
58
|
+
set_auto_layout(true)
|
59
|
+
set_sizer(sizer_top)
|
60
|
+
|
61
|
+
sizer_top.set_size_hints(self)
|
62
|
+
sizer_top.fit(self)
|
63
|
+
|
64
|
+
@btn_focused.set_focus()
|
65
|
+
@btn_focused.set_default()
|
66
|
+
|
67
|
+
evt_button(-1) {|event| on_button(event) }
|
68
|
+
end
|
69
|
+
|
70
|
+
def on_button(event)
|
71
|
+
id = event.get_id
|
72
|
+
|
73
|
+
if id == @btn_delete.get_id
|
74
|
+
@btn_focused.destroy
|
75
|
+
@btn_focused = nil
|
76
|
+
|
77
|
+
@btn_delete.disable()
|
78
|
+
elsif @btn_focused && id == @btn_focused.get_id
|
79
|
+
get_text_from_user("Dummy prompt", "Modal dialog called from dialog",
|
80
|
+
"", self)
|
81
|
+
else
|
82
|
+
event.skip()
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
|
88
|
+
class MyModelessDialog < Dialog
|
89
|
+
def initialize(parent)
|
90
|
+
super(parent, -1, "Modeless dialog")
|
91
|
+
|
92
|
+
sizer_top = BoxSizer.new(VERTICAL)
|
93
|
+
|
94
|
+
btn = Button.new(self, DIALOGS_MODELESS_BTN, "Press me")
|
95
|
+
check = CheckBox.new(self, -1, "Should be disabled")
|
96
|
+
check.disable()
|
97
|
+
|
98
|
+
sizer_top.add(btn, 1, EXPAND | ALL, 5)
|
99
|
+
sizer_top.add(check, 1, EXPAND | ALL, 5)
|
100
|
+
|
101
|
+
set_auto_layout(true)
|
102
|
+
set_sizer(sizer_top)
|
103
|
+
|
104
|
+
sizer_top.set_size_hints(self)
|
105
|
+
sizer_top.fit(self)
|
106
|
+
|
107
|
+
evt_button(DIALOGS_MODELESS_BTN) {|event| on_button(event) }
|
108
|
+
|
109
|
+
evt_close() {|event| on_close(event) }
|
110
|
+
|
111
|
+
end
|
112
|
+
|
113
|
+
def on_button(event)
|
114
|
+
message_box("Button pressed in modeless dialog", "Info",
|
115
|
+
OK | ICON_INFORMATION, self)
|
116
|
+
end
|
117
|
+
|
118
|
+
def on_close(event)
|
119
|
+
if event.can_veto()
|
120
|
+
message_box("Use the menu item to close self dialog",
|
121
|
+
"Modeless dialog",
|
122
|
+
OK | ICON_INFORMATION, self)
|
123
|
+
|
124
|
+
event.veto()
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
# PropertySheetDialog is specialised for doing preferences dialogs; it
|
130
|
+
# contains a BookCtrl of some sort
|
131
|
+
class MyPrefsDialog < Wx::PropertySheetDialog
|
132
|
+
def initialize(parent)
|
133
|
+
# Using Book type other than Notebook needs two-step construction
|
134
|
+
super()
|
135
|
+
self.sheet_style = Wx::PROPSHEET_BUTTONTOOLBOOK
|
136
|
+
self.sheet_outer_border = 1
|
137
|
+
self.sheet_inner_border = 2
|
138
|
+
img_list = Wx::ImageList.new(32, 32)
|
139
|
+
img_list << std_bitmap(Wx::ART_NORMAL_FILE)
|
140
|
+
img_list << std_bitmap(Wx::ART_CDROM)
|
141
|
+
img_list << std_bitmap(Wx::ART_REPORT_VIEW)
|
142
|
+
|
143
|
+
create(parent, -1, "Preferences")
|
144
|
+
create_buttons(Wx::ID_OK|Wx::ID_CANCEL)
|
145
|
+
book_ctrl.image_list = img_list
|
146
|
+
book_ctrl.add_page(file_panel(book_ctrl), "File", false, 0)
|
147
|
+
book_ctrl.add_page(cdrom_panel(book_ctrl), "CD ROM", false, 1)
|
148
|
+
|
149
|
+
layout_dialog
|
150
|
+
end
|
151
|
+
|
152
|
+
# Gets one of the rather ugly standard bitmaps from ArtProvider
|
153
|
+
def std_bitmap(art_id)
|
154
|
+
Wx::ArtProvider.bitmap(art_id, Wx::ART_TOOLBAR, [32, 32])
|
155
|
+
end
|
156
|
+
|
157
|
+
def file_panel(book)
|
158
|
+
panel = Wx::Panel.new(book)
|
159
|
+
panel.sizer = Wx::VBoxSizer.new
|
160
|
+
|
161
|
+
cb1 = Wx::CheckBox.new(panel, :label => 'Show hidden files')
|
162
|
+
panel.sizer.add(cb1, 0, Wx::ALL, 5)
|
163
|
+
|
164
|
+
cb2 = Wx::CheckBox.new(panel, :label => 'Always show extensions')
|
165
|
+
panel.sizer.add(cb2, 0, Wx::ALL, 5)
|
166
|
+
|
167
|
+
cb3 = Wx::CheckBox.new(panel, :label => 'Show icons')
|
168
|
+
panel.sizer.add(cb3, 0, Wx::ALL, 5)
|
169
|
+
|
170
|
+
cb4 = Wx::CheckBox.new(panel, :label => 'Show owner')
|
171
|
+
panel.sizer.add(cb4, 0, Wx::ALL, 5)
|
172
|
+
|
173
|
+
st = Wx::StaticText.new(panel, :label => "Sort by:")
|
174
|
+
panel.sizer.add(st, 0, Wx::ALL, 5)
|
175
|
+
|
176
|
+
cb1 = Wx::Choice.new(panel, :choices => %w|Name Created Modified Size|)
|
177
|
+
panel.sizer.add(cb1, 0, Wx::ALL, 5)
|
178
|
+
panel
|
179
|
+
end
|
180
|
+
|
181
|
+
def cdrom_panel(book)
|
182
|
+
panel = Wx::Panel.new(book)
|
183
|
+
panel.sizer = Wx::VBoxSizer.new
|
184
|
+
|
185
|
+
choices = [ 'Show files', 'Play media', 'Run CD', 'Do nothing' ]
|
186
|
+
rb = Wx::RadioBox.new( panel,
|
187
|
+
:label => 'When opening CD',
|
188
|
+
:choices => choices,
|
189
|
+
:major_dimension => 1)
|
190
|
+
panel.sizer.add(rb, 0, Wx::GROW|Wx::ALL, 5)
|
191
|
+
panel
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
class MyCanvas < ScrolledWindow
|
196
|
+
def initialize(parent)
|
197
|
+
super(parent,-1,DEFAULT_POSITION,DEFAULT_SIZE, NO_FULL_REPAINT_ON_RESIZE)
|
198
|
+
evt_paint { |event| on_paint(event) }
|
199
|
+
end
|
200
|
+
|
201
|
+
def clear
|
202
|
+
|
203
|
+
end
|
204
|
+
|
205
|
+
def on_paint(event)
|
206
|
+
paint do |dc|
|
207
|
+
dc.set_text_foreground( get_app.canvas_text_colour )
|
208
|
+
dc.set_font( get_app.canvas_font )
|
209
|
+
dc.draw_text("Windows common dialogs test application", 10, 10)
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
class MyFrame < Frame
|
215
|
+
def initialize(parent,
|
216
|
+
title,
|
217
|
+
pos,
|
218
|
+
size)
|
219
|
+
super(parent, -1, title, pos, size)
|
220
|
+
|
221
|
+
@dialog = nil
|
222
|
+
|
223
|
+
@dlg_find = nil
|
224
|
+
@dlg_replace = nil
|
225
|
+
|
226
|
+
@find_data = FindReplaceData.new
|
227
|
+
|
228
|
+
@ext_def = ""
|
229
|
+
@index = -1
|
230
|
+
|
231
|
+
@max = 10
|
232
|
+
|
233
|
+
create_status_bar()
|
234
|
+
|
235
|
+
evt_menu(DIALOGS_CHOOSE_COLOUR) {|event| on_choose_colour(event) }
|
236
|
+
evt_menu(DIALOGS_CHOOSE_FONT) {|event| on_choose_font(event) }
|
237
|
+
evt_menu(DIALOGS_LOG_DIALOG) {|event| on_log_dialog(event) }
|
238
|
+
evt_menu(DIALOGS_MESSAGE_BOX) {|event| on_message_box(event) }
|
239
|
+
evt_menu(DIALOGS_TEXT_ENTRY) {|event| on_text_entry(event) }
|
240
|
+
evt_menu(DIALOGS_PASSWORD_ENTRY) {|event| on_password_entry(event) }
|
241
|
+
evt_menu(DIALOGS_NUM_ENTRY) {|event| on_numeric_entry(event) }
|
242
|
+
evt_menu(DIALOGS_SINGLE_CHOICE) {|event| on_single_choice(event) }
|
243
|
+
evt_menu(DIALOGS_MULTI_CHOICE) {|event| on_multi_choice(event) }
|
244
|
+
evt_menu(DIALOGS_FILE_OPEN) {|event| on_file_open(event) }
|
245
|
+
evt_menu(DIALOGS_FILE_OPEN2) {|event| on_file_open2(event) }
|
246
|
+
evt_menu(DIALOGS_FILES_OPEN) {|event| on_files_open(event) }
|
247
|
+
evt_menu(DIALOGS_FILE_SAVE) {|event| on_file_save(event) }
|
248
|
+
evt_menu(DIALOGS_DIR_CHOOSE) {|event| on_dir_choose(event) }
|
249
|
+
evt_menu(DIALOGS_MODAL) {|event| on_modal_dlg(event) }
|
250
|
+
evt_menu(DIALOGS_MODELESS) {|event| on_modeless_dlg(event) }
|
251
|
+
evt_menu(DIALOGS_TIP) {|event| on_show_tip(event) }
|
252
|
+
evt_menu(DIALOGS_PROGRESS) {|event| on_show_progress(event) }
|
253
|
+
evt_menu(DIALOGS_BUSYINFO) {|event| on_show_busy_info(event) }
|
254
|
+
evt_menu(DIALOGS_PREFS) {|event| on_show_prefs(event) }
|
255
|
+
evt_menu(DIALOGS_FIND) {|event| on_show_find_dialog(event) }
|
256
|
+
evt_menu(DIALOGS_REPLACE) {|event| on_show_replace_dialog(event) }
|
257
|
+
evt_find(-1) {|event| on_find_dialog(event) }
|
258
|
+
evt_find_next(-1) {|event| on_find_dialog(event) }
|
259
|
+
evt_find_replace(-1) {|event| on_find_dialog(event) }
|
260
|
+
evt_find_replace_all(-1) {|event| on_find_dialog(event) }
|
261
|
+
evt_find_close(-1) {|event| on_find_dialog(event) }
|
262
|
+
evt_menu(ID_EXIT) {|event| on_exit(event) }
|
263
|
+
|
264
|
+
end
|
265
|
+
|
266
|
+
def on_choose_colour(event)
|
267
|
+
|
268
|
+
col = $my_canvas.get_background_colour()
|
269
|
+
|
270
|
+
data = ColourData.new
|
271
|
+
data.set_colour(col)
|
272
|
+
data.set_choose_full(true)
|
273
|
+
for i in 0 ... 16
|
274
|
+
colour = Colour.new(i*16, i*16, i*16)
|
275
|
+
data.set_custom_colour(i, colour)
|
276
|
+
end
|
277
|
+
|
278
|
+
dialog = ColourDialog.new(self, data)
|
279
|
+
dialog.set_title("Choose the background colour (not OS X)")
|
280
|
+
if dialog.show_modal() == ID_OK
|
281
|
+
retData = dialog.get_colour_data()
|
282
|
+
col = retData.get_colour()
|
283
|
+
$my_canvas.set_background_colour(col)
|
284
|
+
#$my_canvas.clear()
|
285
|
+
$my_canvas.refresh()
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
|
290
|
+
def on_choose_font(event)
|
291
|
+
data = FontData.new
|
292
|
+
data.set_initial_font(Wx::get_app.canvas_font)
|
293
|
+
data.set_colour(Wx::get_app.canvas_text_colour)
|
294
|
+
|
295
|
+
dialog = FontDialog.new(self, data)
|
296
|
+
|
297
|
+
if dialog.show_modal() == ID_OK
|
298
|
+
ret_data = dialog.get_font_data()
|
299
|
+
Wx::get_app.canvas_font = ret_data.get_chosen_font()
|
300
|
+
Wx::get_app.canvas_text_colour = ret_data.get_colour()
|
301
|
+
font = ret_data.get_chosen_font
|
302
|
+
msg = "Font = %s, %i pt" % [ font.get_face_name,
|
303
|
+
font.get_point_size ]
|
304
|
+
dialog2 = MessageDialog.new(self, msg, "Got font")
|
305
|
+
dialog2.show_modal()
|
306
|
+
# $my_canvas.refresh()
|
307
|
+
end
|
308
|
+
#else: cancelled by the user, don't change the font
|
309
|
+
end
|
310
|
+
|
311
|
+
|
312
|
+
def on_log_dialog(event)
|
313
|
+
|
314
|
+
# calling yield() (as ~BusyCursor does) shouldn't result in messages
|
315
|
+
# being flushed -- test it
|
316
|
+
|
317
|
+
BusyCursor.busy() do
|
318
|
+
|
319
|
+
log_message("This is some message - everything is ok so far.")
|
320
|
+
log_message("Another message...\n... self one is on multiple lines")
|
321
|
+
log_warning("And then something went wrong!")
|
322
|
+
|
323
|
+
# and if ~BusyCursor doesn't do it, then call it manually
|
324
|
+
Wx::get_app.yield()
|
325
|
+
|
326
|
+
log_error("Intermediary error handler decided to abort.")
|
327
|
+
log_error("DEMO: The top level caller detected an unrecoverable error.")
|
328
|
+
|
329
|
+
Log::flush_active()
|
330
|
+
|
331
|
+
log_message("And this is the same dialog but with only one message.")
|
332
|
+
end
|
333
|
+
end
|
334
|
+
|
335
|
+
def on_message_box(event)
|
336
|
+
|
337
|
+
dialog = MessageDialog.new(nil, "This is a message box\nA long, long string to test out the message box properly",
|
338
|
+
"Message box text", NO_DEFAULT|YES_NO|CANCEL|ICON_INFORMATION)
|
339
|
+
|
340
|
+
case dialog.show_modal()
|
341
|
+
when ID_YES
|
342
|
+
log_status("You pressed \"Yes\"")
|
343
|
+
when ID_NO
|
344
|
+
log_status("You pressed \"No\"")
|
345
|
+
when ID_CANCEL
|
346
|
+
log_status("You pressed \"Cancel\"")
|
347
|
+
else
|
348
|
+
log_error("Unexpected MessageDialog return code!")
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
|
353
|
+
def on_numeric_entry(event)
|
354
|
+
|
355
|
+
res = get_number_from_user( "This is some text, actually a lot of text.\n" +
|
356
|
+
"Even two rows of text.",
|
357
|
+
"Enter a number:", "Numeric input test",
|
358
|
+
50, 0, 100, self )
|
359
|
+
|
360
|
+
if res == -1
|
361
|
+
msg = "Invalid number entered or dialog cancelled."
|
362
|
+
icon = ICON_HAND
|
363
|
+
else
|
364
|
+
msg = sprintf("You've entered %d", res )
|
365
|
+
icon = ICON_INFORMATION
|
366
|
+
end
|
367
|
+
|
368
|
+
message_box(msg, "Numeric test result", OK | icon, self)
|
369
|
+
end
|
370
|
+
|
371
|
+
def on_password_entry(event)
|
372
|
+
|
373
|
+
pwd = get_password_from_user("Enter password:",
|
374
|
+
"Password entry dialog",
|
375
|
+
"", self)
|
376
|
+
if pwd
|
377
|
+
message_box(sprintf("Your password is '%s'", pwd),
|
378
|
+
"Got password", OK | ICON_INFORMATION, self)
|
379
|
+
end
|
380
|
+
end
|
381
|
+
|
382
|
+
|
383
|
+
def on_text_entry(event)
|
384
|
+
|
385
|
+
dialog = TextEntryDialog.new(self,
|
386
|
+
"This is a small sample\n" +
|
387
|
+
"A long, long string to test out the text entrybox",
|
388
|
+
"Please enter a string",
|
389
|
+
"Default value",
|
390
|
+
OK | CANCEL)
|
391
|
+
|
392
|
+
if dialog.show_modal() == ID_OK
|
393
|
+
dialog2 = MessageDialog.new(self, dialog.get_value(), "Got string")
|
394
|
+
dialog2.show_modal()
|
395
|
+
end
|
396
|
+
end
|
397
|
+
|
398
|
+
def on_single_choice(event)
|
399
|
+
|
400
|
+
choices = ["One", "Two", "Three", "Four", "Five"]
|
401
|
+
|
402
|
+
dialog = SingleChoiceDialog.new(self,
|
403
|
+
"This is a small sample\n" +
|
404
|
+
"A single-choice convenience dialog",
|
405
|
+
"Please select a value",
|
406
|
+
choices, nil, OK | CANCEL)
|
407
|
+
|
408
|
+
dialog.set_selection(2)
|
409
|
+
|
410
|
+
if dialog.show_modal() == ID_OK
|
411
|
+
dialog2 = MessageDialog.new(self, dialog.get_string_selection(), "Got string")
|
412
|
+
dialog2.show_modal()
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
|
417
|
+
def on_multi_choice(event)
|
418
|
+
|
419
|
+
choices = [
|
420
|
+
"One", "Two", "Three", "Four", "Five",
|
421
|
+
"Six", "Seven", "Eight", "Nine", "Ten",
|
422
|
+
"Eleven", "Twelve", "Seventeen"]
|
423
|
+
|
424
|
+
selections = get_multiple_choices("This is a small sample\n" +
|
425
|
+
"A multi-choice convenience dialog",
|
426
|
+
"Please select a value",
|
427
|
+
choices,
|
428
|
+
self)
|
429
|
+
if selections
|
430
|
+
msg = sprintf("You selected %d items:\n", selections.length)
|
431
|
+
for n in 0 ... selections.length
|
432
|
+
msg += sprintf("\t%d: %d (%s)\n", n, selections[n],
|
433
|
+
choices[selections[n]])
|
434
|
+
end
|
435
|
+
log_message(msg)
|
436
|
+
end
|
437
|
+
#else: cancelled or nothing selected
|
438
|
+
end
|
439
|
+
|
440
|
+
|
441
|
+
def on_file_open(event)
|
442
|
+
|
443
|
+
dialog = FileDialog.new(
|
444
|
+
self,
|
445
|
+
"Testing open file dialog",
|
446
|
+
"",
|
447
|
+
"",
|
448
|
+
"C++ files (*.h;*.cpp)|*.h;*.cpp"
|
449
|
+
)
|
450
|
+
|
451
|
+
dialog.set_directory(get_home_dir())
|
452
|
+
|
453
|
+
if dialog.show_modal() == ID_OK
|
454
|
+
info = sprintf("Full file name: %s\n" +
|
455
|
+
"Path: %s\n" +
|
456
|
+
"Name: %s",
|
457
|
+
dialog.get_path(),
|
458
|
+
dialog.get_directory(),
|
459
|
+
dialog.get_filename())
|
460
|
+
dialog2 = MessageDialog.new(self, info, "Selected file")
|
461
|
+
dialog2.show_modal()
|
462
|
+
end
|
463
|
+
end
|
464
|
+
|
465
|
+
|
466
|
+
# this shows how to take advantage of specifying a default extension in the
|
467
|
+
# call to FileSelector: it is remembered after each new call and the next
|
468
|
+
# one will use it by default
|
469
|
+
def on_file_open2(event)
|
470
|
+
|
471
|
+
path = file_selector(
|
472
|
+
"Select the file to load",
|
473
|
+
"", "",
|
474
|
+
@ext_def,
|
475
|
+
"Waveform (*.wav)|*.wav|Plain text (*.txt)|*.txt|All files (*.*)|*.*",
|
476
|
+
CHANGE_DIR,
|
477
|
+
self
|
478
|
+
)
|
479
|
+
|
480
|
+
if path == nil
|
481
|
+
return nil
|
482
|
+
end
|
483
|
+
|
484
|
+
# it is just a sample, would use SplitPath in real program
|
485
|
+
@ext_def = path[/[^\.]*$/]
|
486
|
+
|
487
|
+
log_message("You selected the file '%s', remembered extension '%s'",
|
488
|
+
path, @ext_def)
|
489
|
+
end
|
490
|
+
|
491
|
+
|
492
|
+
def on_files_open(event)
|
493
|
+
|
494
|
+
dialog = FileDialog.new(self, "Testing open multiple file dialog",
|
495
|
+
"", "", FILE_SELECTOR_DEFAULT_WILDCARD_STR,
|
496
|
+
MULTIPLE)
|
497
|
+
|
498
|
+
if dialog.show_modal() == ID_OK
|
499
|
+
|
500
|
+
paths = dialog.get_paths()
|
501
|
+
filenames = dialog.get_filenames()
|
502
|
+
|
503
|
+
count = paths.length
|
504
|
+
msg = ""
|
505
|
+
for n in 0 ... count
|
506
|
+
s = sprintf("File %d: %s (%s)\n",
|
507
|
+
n, paths[n], filenames[n])
|
508
|
+
msg += s
|
509
|
+
end
|
510
|
+
|
511
|
+
dialog2 = MessageDialog.new(self, msg, "Selected files")
|
512
|
+
dialog2.show_modal()
|
513
|
+
end
|
514
|
+
end
|
515
|
+
|
516
|
+
|
517
|
+
def on_file_save(event)
|
518
|
+
|
519
|
+
dialog = FileDialog.new(self,
|
520
|
+
"Testing save file dialog",
|
521
|
+
"",
|
522
|
+
"myletter.doc",
|
523
|
+
"Text files (*.txt)|*.txt|Document files (*.doc)|*.doc",
|
524
|
+
SAVE|OVERWRITE_PROMPT)
|
525
|
+
|
526
|
+
dialog.set_filter_index(1)
|
527
|
+
|
528
|
+
if dialog.show_modal() == ID_OK
|
529
|
+
|
530
|
+
log_message("%s, filter %d",
|
531
|
+
dialog.get_path(), dialog.get_filter_index())
|
532
|
+
end
|
533
|
+
end
|
534
|
+
|
535
|
+
def on_dir_choose(event)
|
536
|
+
|
537
|
+
# pass some initial dir to DirDialog
|
538
|
+
dir_home = get_home_dir()
|
539
|
+
|
540
|
+
dialog = DirDialog.new(self, "Testing directory picker", dir_home)
|
541
|
+
|
542
|
+
if dialog.show_modal() == ID_OK
|
543
|
+
log_message("Selected path: %s", dialog.get_path())
|
544
|
+
end
|
545
|
+
end
|
546
|
+
|
547
|
+
|
548
|
+
def on_modal_dlg(event)
|
549
|
+
dlg = MyModalDialog.new(self)
|
550
|
+
dlg.show_modal()
|
551
|
+
end
|
552
|
+
|
553
|
+
def on_modeless_dlg(event)
|
554
|
+
show = get_menu_bar().is_checked(event.get_id())
|
555
|
+
if show
|
556
|
+
if !@dialog
|
557
|
+
@dialog = MyModelessDialog.new(self)
|
558
|
+
end
|
559
|
+
@dialog.show(true)
|
560
|
+
else # hide
|
561
|
+
@dialog.hide()
|
562
|
+
end
|
563
|
+
end
|
564
|
+
|
565
|
+
|
566
|
+
def on_show_tip(event)
|
567
|
+
|
568
|
+
if @index == -1
|
569
|
+
@index = rand(5)
|
570
|
+
end
|
571
|
+
|
572
|
+
tip_src = File.join( File.dirname(__FILE__), 'tips.txt')
|
573
|
+
tip_provider = create_file_tip_provider(tip_src, @index)
|
574
|
+
|
575
|
+
show_at_startup = show_tip(self, tip_provider)
|
576
|
+
|
577
|
+
if show_at_startup
|
578
|
+
message_box("Will show tips on startup", "Tips dialog",
|
579
|
+
OK | ICON_INFORMATION, self)
|
580
|
+
end
|
581
|
+
|
582
|
+
@index = tip_provider.get_current_tip()
|
583
|
+
|
584
|
+
end
|
585
|
+
|
586
|
+
def on_exit(event)
|
587
|
+
close(true)
|
588
|
+
end
|
589
|
+
|
590
|
+
|
591
|
+
def on_show_prefs(event)
|
592
|
+
dialog = MyPrefsDialog.new(self)
|
593
|
+
dialog.show_modal
|
594
|
+
end
|
595
|
+
|
596
|
+
def on_show_progress(event)
|
597
|
+
|
598
|
+
dialog = ProgressDialog.new("Progress dialog example",
|
599
|
+
"An informative message",
|
600
|
+
@max, # range
|
601
|
+
self, # parent
|
602
|
+
PD_CAN_ABORT|PD_APP_MODAL|
|
603
|
+
PD_ELAPSED_TIME|PD_ESTIMATED_TIME|
|
604
|
+
PD_REMAINING_TIME)
|
605
|
+
|
606
|
+
cont = true
|
607
|
+
for i in 0 .. @max
|
608
|
+
sleep(1)
|
609
|
+
if i == @max
|
610
|
+
cont = dialog.update(i, "That's all, folks!")
|
611
|
+
elsif i == @max / 2
|
612
|
+
cont = dialog.update(i, "Only a half left (very long message)!")
|
613
|
+
else
|
614
|
+
cont = dialog.update(i)
|
615
|
+
end
|
616
|
+
|
617
|
+
if !cont
|
618
|
+
if message_box("Do you really want to cancel?",
|
619
|
+
"Progress dialog question", # caption
|
620
|
+
YES_NO | ICON_QUESTION) == YES
|
621
|
+
dialog.end_modal(ID_CANCEL)
|
622
|
+
break
|
623
|
+
end
|
624
|
+
dialog.resume()
|
625
|
+
end
|
626
|
+
end
|
627
|
+
|
628
|
+
|
629
|
+
if !cont
|
630
|
+
log_status("Progress dialog aborted!")
|
631
|
+
else
|
632
|
+
log_status("Countdown from %d finished", @max)
|
633
|
+
end
|
634
|
+
end
|
635
|
+
|
636
|
+
def on_show_busy_info(event)
|
637
|
+
WindowDisabler.disable(self) do
|
638
|
+
info = BusyInfo.busy("Working, please wait...", self) do
|
639
|
+
|
640
|
+
for i in 0 ... 18
|
641
|
+
Wx::get_app.yield()
|
642
|
+
end
|
643
|
+
sleep(2)
|
644
|
+
end
|
645
|
+
end
|
646
|
+
end
|
647
|
+
|
648
|
+
def on_show_replace_dialog(event)
|
649
|
+
|
650
|
+
if @dlg_replace
|
651
|
+
#@dlg_replace.destroy
|
652
|
+
@dlg_replace = nil
|
653
|
+
else
|
654
|
+
@dlg_replace = FindReplaceDialog.new(
|
655
|
+
self,
|
656
|
+
@find_data,
|
657
|
+
"Find and replace dialog",
|
658
|
+
FR_REPLACEDIALOG
|
659
|
+
)
|
660
|
+
|
661
|
+
@dlg_replace.show(true)
|
662
|
+
end
|
663
|
+
end
|
664
|
+
|
665
|
+
def on_show_find_dialog(event)
|
666
|
+
|
667
|
+
if @dlg_find
|
668
|
+
@dlg_find.destroy
|
669
|
+
@dlg_find = nil
|
670
|
+
else
|
671
|
+
@dlg_find = FindReplaceDialog.new(
|
672
|
+
self,
|
673
|
+
@find_data,
|
674
|
+
"Find dialog", # just for testing
|
675
|
+
FR_NOWHOLEWORD
|
676
|
+
)
|
677
|
+
|
678
|
+
@dlg_find.show(true)
|
679
|
+
end
|
680
|
+
end
|
681
|
+
|
682
|
+
def decode_find_dialog_event_flags(flags)
|
683
|
+
str = ""
|
684
|
+
str << ((flags & FR_DOWN) != 0 ? "down" : "up") << ", " \
|
685
|
+
<< ((flags & FR_WHOLEWORD) != 0 ? "whole words only, " : "") \
|
686
|
+
<< ((flags & FR_MATCHCASE) != 0 ? "" : "not ") \
|
687
|
+
<< "case sensitive"
|
688
|
+
|
689
|
+
return str
|
690
|
+
end
|
691
|
+
|
692
|
+
def on_find_dialog(event)
|
693
|
+
|
694
|
+
type = event.get_event_type()
|
695
|
+
|
696
|
+
if type == EVT_COMMAND_FIND || type == EVT_COMMAND_FIND_NEXT
|
697
|
+
log_message("Find %s'%s' (flags: %s)",
|
698
|
+
type == EVT_COMMAND_FIND_NEXT ? "next " : "",
|
699
|
+
event.get_find_string(),
|
700
|
+
decode_find_dialog_event_flags(event.get_flags()))
|
701
|
+
elsif type == EVT_COMMAND_FIND_REPLACE || type == EVT_COMMAND_FIND_REPLACE_ALL
|
702
|
+
log_message("Replace %s'%s' with '%s' (flags: %s)",
|
703
|
+
type == EVT_COMMAND_FIND_REPLACE_ALL ? "all " : "",
|
704
|
+
event.get_find_string(),
|
705
|
+
event.get_replace_string(),
|
706
|
+
decode_find_dialog_event_flags(event.get_flags()))
|
707
|
+
elsif type == EVT_COMMAND_FIND_CLOSE
|
708
|
+
dlg = event.get_dialog()
|
709
|
+
if dlg == @dlg_find
|
710
|
+
txt = "Find"
|
711
|
+
id_menu = DIALOGS_FIND
|
712
|
+
@dlg_find = nil
|
713
|
+
elsif dlg == @dlg_replace
|
714
|
+
txt = "Replace"
|
715
|
+
id_menu = DIALOGS_REPLACE
|
716
|
+
@dlg_replace = nil
|
717
|
+
else
|
718
|
+
txt = "Unknown"
|
719
|
+
id_menu = -1
|
720
|
+
log_error("unexpected event")
|
721
|
+
end
|
722
|
+
|
723
|
+
log_message("%s dialog is being closed.", txt)
|
724
|
+
|
725
|
+
if id_menu != -1
|
726
|
+
get_menu_bar().check(id_menu, false)
|
727
|
+
end
|
728
|
+
|
729
|
+
dlg.destroy()
|
730
|
+
else
|
731
|
+
log_error("Unknown find dialog event!")
|
732
|
+
end
|
733
|
+
end
|
734
|
+
|
735
|
+
end
|
736
|
+
|
737
|
+
|
738
|
+
class MyApp < App
|
739
|
+
attr_accessor :canvas_text_colour, :canvas_font
|
740
|
+
|
741
|
+
def on_init()
|
742
|
+
self.canvas_text_colour = Wx::Colour.new("BLACK")
|
743
|
+
self.canvas_font = Wx::NORMAL_FONT
|
744
|
+
# Create the main frame window
|
745
|
+
frame = MyFrame.new(nil, "Windows dialogs example",
|
746
|
+
Point.new(20, 20), Size.new(400, 300))
|
747
|
+
|
748
|
+
# Make a menubar
|
749
|
+
file_menu = Menu.new
|
750
|
+
|
751
|
+
file_menu.append(DIALOGS_CHOOSE_COLOUR, "&Choose colour")
|
752
|
+
file_menu.append_separator()
|
753
|
+
file_menu.append(DIALOGS_CHOOSE_FONT, "Choose &font")
|
754
|
+
file_menu.append_separator()
|
755
|
+
file_menu.append(DIALOGS_LOG_DIALOG, "&Log dialog\tCtrl-L")
|
756
|
+
file_menu.append(DIALOGS_MESSAGE_BOX, "&Message box\tCtrl-M")
|
757
|
+
file_menu.append(DIALOGS_TEXT_ENTRY, "Text &entry\tCtrl-E")
|
758
|
+
file_menu.append(DIALOGS_PASSWORD_ENTRY, "&Password entry\tCtrl-P")
|
759
|
+
file_menu.append(DIALOGS_NUM_ENTRY, "&Numeric entry\tCtrl-N")
|
760
|
+
file_menu.append(DIALOGS_SINGLE_CHOICE, "&Single choice\tCtrl-C")
|
761
|
+
file_menu.append(DIALOGS_MULTI_CHOICE, "M&ultiple choice\tCtrl-U")
|
762
|
+
file_menu.append_separator()
|
763
|
+
file_menu.append(DIALOGS_TIP, "&Tip of the day\tCtrl-T")
|
764
|
+
file_menu.append_separator()
|
765
|
+
file_menu.append(DIALOGS_FILE_OPEN, "&Open file\tCtrl-O")
|
766
|
+
file_menu.append(DIALOGS_FILE_OPEN2, "&Second open file\tCtrl-2")
|
767
|
+
file_menu.append(DIALOGS_FILES_OPEN, "Open &files\tShift-Ctrl-O")
|
768
|
+
file_menu.append(DIALOGS_FILE_SAVE, "Sa&ve file\tCtrl-S")
|
769
|
+
file_menu.append(DIALOGS_DIR_CHOOSE, "&Choose a directory\tCtrl-D")
|
770
|
+
file_menu.append(DIALOGS_PROGRESS, "Pro&gress dialog\tCtrl-G")
|
771
|
+
file_menu.append(DIALOGS_BUSYINFO, "&Busy info dialog\tCtrl-B")
|
772
|
+
file_menu.append(DIALOGS_PREFS, "Propert&y sheet dialog\tCtrl-Y")
|
773
|
+
file_menu.append(DIALOGS_FIND, "&Find dialog\tCtrl-F", "", ITEM_CHECK)
|
774
|
+
file_menu.append(DIALOGS_REPLACE, "Find and &replace dialog\tShift-Ctrl-F", "", ITEM_CHECK)
|
775
|
+
|
776
|
+
file_menu.append_separator()
|
777
|
+
file_menu.append(DIALOGS_MODAL, "Mo&dal dialog\tCtrl-W")
|
778
|
+
file_menu.append(DIALOGS_MODELESS, "Modeless &dialog\tCtrl-Z", "", ITEM_CHECK)
|
779
|
+
file_menu.append_separator()
|
780
|
+
file_menu.append(ID_EXIT, "E&xit\tAlt-X")
|
781
|
+
menu_bar = MenuBar.new
|
782
|
+
menu_bar.append(file_menu, "&File")
|
783
|
+
frame.set_menu_bar(menu_bar)
|
784
|
+
|
785
|
+
$my_canvas = MyCanvas.new(frame)
|
786
|
+
$my_canvas.set_background_colour(WHITE)
|
787
|
+
|
788
|
+
frame.centre(BOTH)
|
789
|
+
|
790
|
+
# Show the frame
|
791
|
+
frame.show()
|
792
|
+
end
|
793
|
+
end
|
794
|
+
|
795
|
+
app = MyApp.new()
|
796
|
+
app.main_loop()
|
797
|
+
|