~ubuntu-branches/ubuntu/trusty/ruby1.9/trusty

« back to all changes in this revision

Viewing changes to ext/tk/lib/tk/autoload.rb

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2008-01-24 11:42:29 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080124114229-jw2f87rdxlq6gp11
Tags: 1.9.0.0-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Robustify check for target_os, fixing build failure on lpia.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
#  autoload
3
3
#
4
 
 
5
 
#######################
 
4
major, minor, type, type_name, patchlevel = TclTkLib.get_version
 
5
 
 
6
######################################
 
7
#  depend on version of Tcl/Tk
 
8
if major > 8 || 
 
9
    (major == 8 && minor > 5) || 
 
10
    (major == 8 && minor == 5 && type >= TclTkLib::RELEASE_TYPE::BETA) 
 
11
  # Tcl/Tk 8.5 beta or later
 
12
  autoload :Ttk, 'tkextlib/tile'
 
13
  module Tk
 
14
    autoload :Tile, 'tkextlib/tile'
 
15
  end
 
16
end
 
17
 
 
18
######################################
6
19
#  geometry manager
 
20
module Tk
 
21
  autoload :Grid,             'tk/grid'
 
22
  def Grid(*args); TkGrid.configure(*args); end
 
23
 
 
24
  autoload :Pack,             'tk/pack'
 
25
  def Pack(*args); TkPack.configure(*args); end
 
26
 
 
27
  autoload :Place,            'tk/place'
 
28
  def Place(*args); TkPlace.configure(*args); end
 
29
end
 
30
 
7
31
autoload :TkGrid,             'tk/grid'
8
32
def TkGrid(*args); TkGrid.configure(*args); end
9
33
 
14
38
def TkPlace(*args); TkPlace.configure(*args); end
15
39
 
16
40
 
17
 
#######################
18
 
# others
19
 
autoload :TkBgError,          'tk/bgerror'
20
 
 
21
 
autoload :TkBindTag,          'tk/bindtag'
22
 
autoload :TkBindTagAll,       'tk/bindtag'
23
 
autoload :TkDatabaseClass,    'tk/bindtag'
24
 
 
25
 
autoload :TkButton,           'tk/button'
26
 
 
27
 
autoload :TkConsole,          'tk/console'
28
 
 
29
 
autoload :TkCanvas,           'tk/canvas'
30
 
 
31
 
autoload :TkcTagAccess,       'tk/canvastag'
32
 
autoload :TkcTag,             'tk/canvastag'
33
 
autoload :TkcTagString,       'tk/canvastag'
34
 
autoload :TkcNamedTag,        'tk/canvastag'
35
 
autoload :TkcTagAll,          'tk/canvastag'
36
 
autoload :TkcTagCurrent,      'tk/canvastag'
37
 
autoload :TkcTagGroup,        'tk/canvastag'
38
 
 
39
 
autoload :TkCheckButton,      'tk/checkbutton'
40
 
autoload :TkCheckbutton,      'tk/checkbutton'
41
 
 
42
 
autoload :TkClipboard,        'tk/clipboard'
43
 
 
44
 
autoload :TkComposite,        'tk/composite'
45
 
 
46
 
autoload :TkConsole,          'tk/console'
47
 
 
48
 
autoload :TkDialog,           'tk/dialog'
49
 
autoload :TkDialog2,          'tk/dialog'
50
 
autoload :TkDialogObj,        'tk/dialog'
51
 
autoload :TkWarning,          'tk/dialog'
52
 
autoload :TkWarning2,         'tk/dialog'
53
 
autoload :TkWarningObj,       'tk/dialog'
54
 
 
55
 
autoload :TkEntry,            'tk/entry'
56
 
 
57
 
autoload :TkEvent,            'tk/event'
58
 
 
59
 
autoload :TkFont,             'tk/font'
60
 
autoload :TkTreatTagFont,     'tk/font'
61
 
 
62
 
autoload :TkFrame,            'tk/frame'
63
 
 
64
 
autoload :TkImage,            'tk/image'
65
 
autoload :TkBitmapImage,      'tk/image'
66
 
autoload :TkPhotoImage,       'tk/image'
67
 
 
68
 
autoload :TkItemConfigMethod, 'tk/itemconfig'
69
 
 
70
 
autoload :TkTreatItemFont,    'tk/itemfont'
71
 
 
72
 
autoload :TkKinput,           'tk/kinput'
73
 
 
74
 
autoload :TkLabel,            'tk/label'
75
 
 
76
 
autoload :TkLabelFrame,       'tk/labelframe'
77
 
autoload :TkLabelframe,       'tk/labelframe'
78
 
 
79
 
autoload :TkListbox,          'tk/listbox'
80
 
 
81
 
autoload :TkMacResource,      'tk/macpkg'
82
 
 
83
 
autoload :TkMenu,             'tk/menu'
84
 
autoload :TkMenuClone,        'tk/menu'
85
 
autoload :TkSystemMenu,       'tk/menu'
86
 
autoload :TkSysMenu_Help,     'tk/menu'
87
 
autoload :TkSysMenu_System,   'tk/menu'
88
 
autoload :TkSysMenu_Apple,    'tk/menu'
89
 
autoload :TkMenubutton,       'tk/menu'
90
 
autoload :TkOptionMenubutton, 'tk/menu'
91
 
 
92
 
autoload :TkMenubar,          'tk/menubar'
93
 
 
94
 
autoload :TkMenuSpec,         'tk/menuspec'
95
 
 
96
 
autoload :TkMessage,          'tk/message'
97
 
 
98
 
autoload :TkManageFocus,      'tk/mngfocus'
99
 
 
100
 
autoload :TkMsgCatalog,       'tk/msgcat'
101
 
autoload :TkMsgCat,           'tk/msgcat'
102
 
 
103
 
autoload :TkNamespace,        'tk/namespace'
104
 
 
105
 
autoload :TkOptionDB,         'tk/optiondb'
106
 
autoload :TkOption,           'tk/optiondb'
107
 
autoload :TkResourceDB,       'tk/optiondb'
108
 
 
109
 
autoload :TkPackage,          'tk/package'
110
 
 
111
 
autoload :TkPalette,          'tk/palette'
112
 
 
113
 
autoload :TkPanedWindow,      'tk/panedwindow'
114
 
autoload :TkPanedwindow,      'tk/panedwindow'
115
 
 
116
 
autoload :TkRadioButton,      'tk/radiobutton'
117
 
autoload :TkRadiobutton,      'tk/radiobutton'
118
 
 
119
 
autoload :TkRoot,             'tk/root'
120
 
 
121
 
autoload :TkScale,            'tk/scale'
122
 
 
123
 
autoload :TkScrollbar,        'tk/scrollbar'
124
 
autoload :TkXScrollbar,       'tk/scrollbar'
125
 
autoload :TkYScrollbar,       'tk/scrollbar'
126
 
 
127
 
autoload :TkScrollbox,        'tk/scrollbox'
128
 
 
129
 
autoload :TkSelection,        'tk/selection'
130
 
 
131
 
autoload :TkSpinbox,          'tk/spinbox'
132
 
 
133
 
autoload :TkTreatTagFont,     'tk/tagfont'
134
 
 
135
 
autoload :TkText,             'tk/text'
136
 
 
137
 
autoload :TkTextImage,        'tk/textimage'
138
 
 
139
 
autoload :TkTextMark,         'tk/textmark'
140
 
autoload :TkTextNamedMark,    'tk/textmark'
141
 
autoload :TkTextMarkInsert,   'tk/textmark'
142
 
autoload :TkTextMarkCurrent,  'tk/textmark'
143
 
autoload :TkTextMarkAnchor,   'tk/textmark'
144
 
 
145
 
autoload :TkTextTag,          'tk/texttag'
146
 
autoload :TkTextNamedTag,     'tk/texttag'
147
 
autoload :TkTextTagSel,       'tk/texttag'
148
 
 
149
 
autoload :TkTextWindow,       'tk/textwindow'
150
 
 
151
 
autoload :TkAfter,            'tk/timer'
152
 
autoload :TkTimer,            'tk/timer'
153
 
autoload :TkRTTimer,          'tk/timer'
154
 
 
155
 
autoload :TkToplevel,         'tk/toplevel'
156
 
 
157
 
autoload :TkTextWin,          'tk/txtwin_abst'
158
 
 
159
 
autoload :TkValidation,       'tk/validation'
160
 
 
161
 
autoload :TkVariable,         'tk/variable'
162
 
autoload :TkVarAccess,        'tk/variable'
163
 
 
164
 
autoload :TkVirtualEvent,     'tk/virtevent'
165
 
autoload :TkNamedVirtualEvent,'tk/virtevent'
166
 
 
167
 
autoload :TkWinfo,            'tk/winfo'
168
 
 
169
 
autoload :TkWinDDE,           'tk/winpkg'
170
 
autoload :TkWinRegistry,      'tk/winpkg'
171
 
 
172
 
autoload :TkXIM,              'tk/xim'
173
 
 
174
 
 
175
 
#######################
 
41
######################################
 
42
# Ttk (Tile) support
 
43
require 'tk/ttk_selector'
 
44
 
 
45
 
 
46
######################################
 
47
# classes on Tk module
 
48
module Tk
 
49
  autoload :Button,           'tk/button'
 
50
 
 
51
  autoload :Canvas,           'tk/canvas'
 
52
 
 
53
  autoload :CheckButton,      'tk/checkbutton'
 
54
  autoload :Checkbutton,      'tk/checkbutton'
 
55
 
 
56
  autoload :Entry,            'tk/entry'
 
57
 
 
58
  autoload :Frame,            'tk/frame'
 
59
 
 
60
  autoload :Label,            'tk/label'
 
61
 
 
62
  autoload :LabelFrame,       'tk/labelframe'
 
63
  autoload :Labelframe,       'tk/labelframe'
 
64
 
 
65
  autoload :Listbox,          'tk/listbox'
 
66
 
 
67
  autoload :Menu,             'tk/menu'
 
68
  autoload :MenuClone,        'tk/menu'
 
69
  autoload :SystemMenu,       'tk/menu'
 
70
  autoload :SysMenu_Help,     'tk/menu'
 
71
  autoload :SysMenu_System,   'tk/menu'
 
72
  autoload :SysMenu_Apple,    'tk/menu'
 
73
  autoload :Menubutton,       'tk/menu'
 
74
  autoload :OptionMenubutton, 'tk/menu'
 
75
 
 
76
  autoload :Message,          'tk/message'
 
77
 
 
78
  autoload :PanedWindow,      'tk/panedwindow'
 
79
  autoload :Panedwindow,      'tk/panedwindow'
 
80
 
 
81
  autoload :RadioButton,      'tk/radiobutton'
 
82
  autoload :Radiobutton,      'tk/radiobutton'
 
83
 
 
84
  autoload :Root,             'tk/root'
 
85
 
 
86
  autoload :Scale,            'tk/scale'
 
87
 
 
88
  autoload :Scrollbar,        'tk/scrollbar'
 
89
  autoload :XScrollbar,       'tk/scrollbar'
 
90
  autoload :YScrollbar,       'tk/scrollbar'
 
91
 
 
92
  autoload :Spinbox,          'tk/spinbox'
 
93
 
 
94
  autoload :Text,             'tk/text'
 
95
 
 
96
  autoload :Toplevel,         'tk/toplevel'
 
97
end
 
98
 
 
99
 
 
100
######################################
176
101
# sub-module of Tk
177
102
module Tk
178
103
  autoload :Clock,            'tk/clock'
 
104
 
179
105
  autoload :OptionObj,        'tk/optionobj'
 
106
 
180
107
  autoload :X_Scrollable,     'tk/scrollable'
181
108
  autoload :Y_Scrollable,     'tk/scrollable'
182
109
  autoload :Scrollable,       'tk/scrollable'
 
110
 
183
111
  autoload :Wm,               'tk/wm'
184
112
 
 
113
  autoload :MacResource,      'tk/macpkg'
 
114
 
 
115
  autoload :WinDDE,           'tk/winpkg'
 
116
  autoload :WinRegistry,      'tk/winpkg'
 
117
 
185
118
  autoload :ValidateConfigure,     'tk/validation'
186
119
  autoload :ItemValidateConfigure, 'tk/validation'
187
120
 
193
126
 
194
127
  autoload :UTF8_String,      'tk/encodedstr'
195
128
  def Tk.UTF8_String(str); Tk::UTF8_String.new(str); end
 
129
 
196
130
end
 
131
 
 
132
######################################
 
133
#  toplevel classes/modules
 
134
autoload_list = {
 
135
  :TkBgError            => 'tk/bgerror', 
 
136
 
 
137
  :TkBindTag            => 'tk/bindtag', 
 
138
  :TkBindTagAll         => 'tk/bindtag', 
 
139
  :TkDatabaseClass      => 'tk/bindtag', 
 
140
 
 
141
  :TkButton             => 'tk/button', 
 
142
 
 
143
  :TkCanvas             => 'tk/canvas', 
 
144
 
 
145
  :TkcItem              => 'tk/canvas', 
 
146
  :TkcArc               => 'tk/canvas', 
 
147
  :TkcBitmap            => 'tk/canvas', 
 
148
  :TkcImage             => 'tk/canvas', 
 
149
  :TkcLine              => 'tk/canvas', 
 
150
  :TkcOval              => 'tk/canvas', 
 
151
  :TkcPolygon           => 'tk/canvas', 
 
152
  :TkcRectangle         => 'tk/canvas', 
 
153
  :TkcText              => 'tk/canvas', 
 
154
  :TkcWindow            => 'tk/canvas', 
 
155
 
 
156
  :TkcTagAccess         => 'tk/canvastag', 
 
157
  :TkcTag               => 'tk/canvastag', 
 
158
  :TkcTagString         => 'tk/canvastag', 
 
159
  :TkcNamedTag          => 'tk/canvastag', 
 
160
  :TkcTagAll            => 'tk/canvastag', 
 
161
  :TkcTagCurrent        => 'tk/canvastag', 
 
162
  :TkcTagGroup          => 'tk/canvastag', 
 
163
 
 
164
  :TkCheckButton        => 'tk/checkbutton', 
 
165
  :TkCheckbutton        => 'tk/checkbutton', 
 
166
 
 
167
  :TkClipboard          => 'tk/clipboard', 
 
168
 
 
169
  :TkComposite          => 'tk/composite', 
 
170
 
 
171
  :TkConsole            => 'tk/console', 
 
172
 
 
173
  :TkDialog             => 'tk/dialog', 
 
174
  :TkDialog2            => 'tk/dialog', 
 
175
  :TkDialogObj          => 'tk/dialog', 
 
176
  :TkWarning            => 'tk/dialog', 
 
177
  :TkWarning2           => 'tk/dialog', 
 
178
  :TkWarningObj         => 'tk/dialog', 
 
179
 
 
180
  :TkEntry              => 'tk/entry', 
 
181
 
 
182
  :TkEvent              => 'tk/event', 
 
183
 
 
184
  :TkFont               => 'tk/font', 
 
185
  :TkTreatTagFont       => 'tk/font', 
 
186
 
 
187
  :TkFrame              => 'tk/frame', 
 
188
 
 
189
  :TkImage              => 'tk/image', 
 
190
  :TkBitmapImage        => 'tk/image', 
 
191
  :TkPhotoImage         => 'tk/image', 
 
192
 
 
193
  :TkItemConfigMethod   => 'tk/itemconfig', 
 
194
 
 
195
  :TkTreatItemFont      => 'tk/itemfont', 
 
196
 
 
197
  :TkKinput             => 'tk/kinput', 
 
198
 
 
199
  :TkLabel              => 'tk/label', 
 
200
 
 
201
  :TkLabelFrame         => 'tk/labelframe', 
 
202
  :TkLabelframe         => 'tk/labelframe', 
 
203
 
 
204
  :TkListbox            => 'tk/listbox', 
 
205
 
 
206
  :TkMacResource        => 'tk/macpkg', 
 
207
 
 
208
  :TkMenu               => 'tk/menu', 
 
209
  :TkMenuClone          => 'tk/menu', 
 
210
  :TkSystemMenu         => 'tk/menu', 
 
211
  :TkSysMenu_Help       => 'tk/menu', 
 
212
  :TkSysMenu_System     => 'tk/menu', 
 
213
  :TkSysMenu_Apple      => 'tk/menu', 
 
214
  :TkMenubutton         => 'tk/menu', 
 
215
  :TkOptionMenubutton   => 'tk/menu', 
 
216
 
 
217
  :TkMenubar            => 'tk/menubar', 
 
218
 
 
219
  :TkMenuSpec           => 'tk/menuspec', 
 
220
 
 
221
  :TkMessage            => 'tk/message', 
 
222
 
 
223
  :TkManageFocus        => 'tk/mngfocus', 
 
224
 
 
225
  :TkMsgCatalog         => 'tk/msgcat', 
 
226
  :TkMsgCat             => 'tk/msgcat', 
 
227
 
 
228
  :TkNamespace          => 'tk/namespace', 
 
229
 
 
230
  :TkOptionDB           => 'tk/optiondb', 
 
231
  :TkOption             => 'tk/optiondb', 
 
232
  :TkResourceDB         => 'tk/optiondb', 
 
233
 
 
234
  :TkPackage            => 'tk/package', 
 
235
 
 
236
  :TkPalette            => 'tk/palette', 
 
237
 
 
238
  :TkPanedWindow        => 'tk/panedwindow', 
 
239
  :TkPanedwindow        => 'tk/panedwindow', 
 
240
 
 
241
  :TkRadioButton        => 'tk/radiobutton', 
 
242
  :TkRadiobutton        => 'tk/radiobutton', 
 
243
 
 
244
  :TkRoot               => 'tk/root', 
 
245
 
 
246
  :TkScale              => 'tk/scale', 
 
247
 
 
248
  :TkScrollbar          => 'tk/scrollbar', 
 
249
  :TkXScrollbar         => 'tk/scrollbar', 
 
250
  :TkYScrollbar         => 'tk/scrollbar', 
 
251
 
 
252
  :TkScrollbox          => 'tk/scrollbox', 
 
253
 
 
254
  :TkSelection          => 'tk/selection', 
 
255
 
 
256
  :TkSpinbox            => 'tk/spinbox', 
 
257
 
 
258
  :TkTreatTagFont       => 'tk/tagfont', 
 
259
 
 
260
  :TkText               => 'tk/text', 
 
261
 
 
262
  :TkTextImage          => 'tk/textimage', 
 
263
  :TktImage             => 'tk/textimage', 
 
264
 
 
265
  :TkTextMark           => 'tk/textmark', 
 
266
  :TkTextNamedMark      => 'tk/textmark', 
 
267
  :TkTextMarkInsert     => 'tk/textmark', 
 
268
  :TkTextMarkCurrent    => 'tk/textmark', 
 
269
  :TkTextMarkAnchor     => 'tk/textmark', 
 
270
  :TktMark              => 'tk/textmark', 
 
271
  :TktNamedMark         => 'tk/textmark', 
 
272
  :TktMarkInsert        => 'tk/textmark', 
 
273
  :TktMarkCurrent       => 'tk/textmark', 
 
274
  :TktMarkAnchor        => 'tk/textmark', 
 
275
 
 
276
  :TkTextTag            => 'tk/texttag', 
 
277
  :TkTextNamedTag       => 'tk/texttag', 
 
278
  :TkTextTagSel         => 'tk/texttag', 
 
279
  :TktTag               => 'tk/texttag', 
 
280
  :TktNamedTag          => 'tk/texttag', 
 
281
  :TktTagSel            => 'tk/texttag', 
 
282
 
 
283
  :TkTextWindow         => 'tk/textwindow', 
 
284
  :TktWindow           => 'tk/textwindow', 
 
285
 
 
286
  :TkAfter              => 'tk/timer', 
 
287
  :TkTimer              => 'tk/timer', 
 
288
  :TkRTTimer            => 'tk/timer', 
 
289
 
 
290
  :TkToplevel           => 'tk/toplevel', 
 
291
 
 
292
  :TkTextWin            => 'tk/txtwin_abst', 
 
293
 
 
294
  :TkValidation         => 'tk/validation', 
 
295
 
 
296
  :TkVariable           => 'tk/variable', 
 
297
  :TkVarAccess          => 'tk/variable', 
 
298
 
 
299
  :TkVirtualEvent       => 'tk/virtevent', 
 
300
  :TkNamedVirtualEvent  => 'tk/virtevent', 
 
301
 
 
302
  :TkWinfo              => 'tk/winfo', 
 
303
 
 
304
  :TkWinDDE             => 'tk/winpkg', 
 
305
  :TkWinRegistry        => 'tk/winpkg', 
 
306
 
 
307
  :TkXIM                => 'tk/xim', 
 
308
}
 
309
autoload_list.each{|mod, lib|
 
310
  #autoload mod, lib unless 
 
311
  autoload mod, lib unless (Object.const_defined? mod) && (autoload? mod)
 
312
}