aboutsummaryrefslogtreecommitdiffstats
path: root/tagit/actions/browser.py
blob: 2eaead8fe451271224602f742f527ee534aaa79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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
394
395
396
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
514
515
516
517
518
519
520
521
522
523
524
525
526
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
"""

Part of the tagit module.
A copy of the license is provided with the project.
Author: Matthias Baumgartner, 2022
"""
# standard imports
import math
import os

# kivy imports
from kivy.lang import Builder
import kivy.properties as kp

# tagit imports
from tagit import config, dialogues
from tagit.utils import clamp
from tagit.widgets import Binding

# inner-module imports
from .action import Action

# exports
__all__ = []


## code ##

# load kv
Builder.load_file(os.path.join(os.path.dirname(__file__), 'browser.kv'))

# classes

class NextPage(Action):
    """Scroll one page downwards without moving the cursor."""
    text = kp.StringProperty('Next page')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'page_next'))

    def apply(self):
        with self.root.browser as browser:
            browser.offset = clamp(browser.offset + browser.page_size, browser.max_offset)


class PreviousPage(Action):
    """Scroll one page upwards without moving the cursor."""
    text = kp.StringProperty('Previous page')
    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'page_prev'))

    def apply(self):
        with self.root.browser as browser:
            browser.offset = max(browser.offset - browser.page_size, 0)


class ScrollUp(Action):
    """Scroll one row up without moving the cursor."""
    text = kp.StringProperty('Scroll up')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'scroll_up'))

    def on_touch_down(self, touch):
        scrollcfg = self.cfg('ui', 'standalone', 'browser', 'scroll')
        scrolldir = 'scrolldown' if scrollcfg == 'mouse' else 'scrollup'
        if self.root.browser.collide_point(*touch.pos) \
           and not self.root.keys.ctrl_pressed:
               if touch.button == scrolldir:
                self.apply()
        return super(ScrollUp, self).on_touch_down(touch)

    def apply(self):
        with self.root.browser as browser:
            browser.offset = clamp(browser.offset - browser.cols, browser.max_offset)


class ScrollDown(Action):
    """Scroll one row down without moving the cursor."""
    text = kp.StringProperty('Scroll down')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'scroll_down'))

    def on_touch_down(self, touch):
        scrollcfg = self.cfg('ui', 'standalone', 'browser', 'scroll')
        scrolldir = 'scrollup' if scrollcfg == 'mouse' else 'scrolldown'
        if self.root.browser.collide_point(*touch.pos) \
           and not self.root.keys.ctrl_pressed:
            if touch.button == scrolldir:
                self.apply()
        return super(ScrollDown, self).on_touch_down(touch)

    def apply(self):
        with self.root.browser as browser:
            browser.offset = clamp(browser.offset + browser.cols, browser.max_offset)


class JumpToPage(Action):
    """Jump to a specified offset."""
    text = kp.StringProperty('Go to page')

    def apply(self, offset=None):
        if offset is None:
            browser = self.root.browser
            dlg = dialogues.NumericInput(lo=0, hi=browser.max_offset, init_value=browser.offset)
            dlg.bind(on_ok=lambda wx: self.set_offset(wx.value))
            dlg.open()
        else:
            self.set_offset(offset)

    def set_offset(self, offset):
        with self.root.browser as browser:
            browser.offset = clamp(offset, browser.max_offset)

class ZoomIn(Action):
    """Decrease the grid size."""
    text = kp.StringProperty('Zoom in')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'zoom_in'))

    # TODO: zoom by gesture

    def on_touch_down(self, touch): # not triggered (but ScrollDown is!)
        if self.root.browser.collide_point(*touch.pos) \
           and self.root.keys.ctrl_pressed:
            if touch.button == 'scrolldown':
                self.apply()
        return super(ZoomIn, self).on_touch_down(touch)

    def apply(self):
        with self.root.browser as browser:
            step = self.cfg('ui', 'standalone', 'browser', 'zoom_step')
            if browser.gridmode == browser.GRIDMODE_LIST:
                cols = browser.cols
            else:
                cols = max(1, browser.cols - step)
            rows = max(1, browser.rows - step)
            # TODO: Zoom to center? (adjust offset)
            if cols != browser.cols or rows != browser.rows:
                # clear widgets first, otherwise GridLayout will
                # complain about too many childrens.
                browser.clear_widgets()
                # adjust the grid size
                browser.cols = cols
                browser.rows = rows


class ZoomOut(Action):
    """Increase the grid size."""
    text = kp.StringProperty('Zoom out')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'zoom_out'))

    # TODO: zoom by gesture

    def on_touch_down(self, touch):
        if self.root.browser.collide_point(*touch.pos) \
           and self.root.keys.ctrl_pressed:
            if touch.button == 'scrollup':
                self.apply()
        return super(ZoomOut, self).on_touch_down(touch)

    def apply(self):
        with self.root.browser as browser:
            # TODO: Zoom from center? (adjust offset)
            step = self.cfg('ui', 'standalone', 'browser', 'zoom_step')
            # get maxcols
            maxcols = self.cfg('ui', 'standalone', 'browser', 'maxcols')
            maxcols = float('inf') if maxcols <= 0 else maxcols
            # get maxrows
            maxrows = self.cfg('ui', 'standalone', 'browser', 'maxrows')
            maxrows = float('inf') if maxrows <= 0 else maxrows
            # set cols/rows
            if browser.gridmode != browser.GRIDMODE_LIST:
                browser.cols = min(browser.cols + step, maxcols)
            browser.rows = min(browser.rows + step, maxrows)
            # adjust offset to ensure that one full page is visible
            browser.offset = clamp(browser.offset, browser.max_offset)


class JumpToCursor(Action):
    """Focus the field of view at the cursor."""
    text = kp.StringProperty('Find cursor')

    def apply(self):
        with self.root.browser as browser:
            if browser.cursor is None:
                # cursor not set, nothing to do
                pass
            else:
                idx = browser.items.index(browser.cursor)
                if idx < browser.offset:
                    # cursor is above view, scroll up such that the cursor
                    # is in the first row.
                    offset = math.floor(idx / browser.cols) * browser.cols
                    browser.offset = clamp(offset, browser.max_offset)
                elif browser.offset + browser.page_size <= idx:
                    # cursor is below view, scroll down such that the cursor
                    # is in the last row.
                    offset = math.floor(idx / browser.cols) * browser.cols
                    offset -= (browser.page_size - browser.cols)
                    browser.offset = clamp(offset, browser.max_offset)
                else:
                    # cursor is visible, nothing to do
                    pass


class SetCursor(Action):
    """Set the cursor to a specific item."""
    text = kp.StringProperty('Set cursor')

    def apply(self, obj):
        with self.root.browser as browser:
            browser.cursor = obj
            self.root.trigger('JumpToCursor')
            # is invoked via mouse click only, hence
            # the item selection should always toggle
            self.root.trigger('Select', browser.cursor)


class MoveCursorFirst(Action):
    """Set the cursor to the first item."""
    text = kp.StringProperty('First')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'go_first'))

    def apply(self):
        with self.root.browser as browser:
            if browser.n_items == 0:
                # browser is empty, nothing to do
                pass
            else:
                # set cursor to first item
                old = browser.cursor
                browser.cursor = browser.items[0]
                # scroll to first page if need be
                self.root.trigger('JumpToCursor')
                # fix selection
                if browser.select_mode != browser.SELECT_MULTI and \
                   (browser.select_mode != browser.SELECT_SINGLE or old != browser.cursor):
                    self.root.trigger('Select', browser.cursor)


class MoveCursorLast(Action):
    """Set the cursor to the last item."""
    text = kp.StringProperty('Last')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'go_last'))

    def apply(self):
        with self.root.browser as browser:
            if browser.n_items == 0:
                # browser is empty, nothing to do
                pass
            else:
                # set cursor to last item
                old = browser.cursor
                browser.cursor = browser.items[-1]
                # scroll to last page if need be
                self.root.trigger('JumpToCursor')
                # fix selection
                if browser.select_mode != browser.SELECT_MULTI and \
                   (browser.select_mode != browser.SELECT_SINGLE or old != browser.cursor):
                    self.root.trigger('Select', browser.cursor)


class MoveCursorUp(Action):
    """Move the cursor one item upwards. Scroll if needbe."""
    text = kp.StringProperty('Cursor up')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'cursor_up'))

    def apply(self):
        with self.root.browser as browser:
            if browser.n_items == 0:
                # browser is empty, nothing to do
                pass
            elif browser.cursor is None:
                # cursor wasn't set before. Set to last item
                self.root.trigger('MoveCursorLast')
            else:
                # move cursor one row up
                old = browser.items.index(browser.cursor)
                # check if the cursor is in the first row already
                if old < browser.cols: return # first row already
                # move cursor up
                new = clamp(old - browser.cols, browser.n_items - 1)
                browser.cursor = browser.items[new]
                # fix field of view
                self.root.trigger('JumpToCursor')
                # fix selection
                if browser.select_mode != browser.SELECT_MULTI and \
                   (browser.select_mode != browser.SELECT_SINGLE or old != new):
                    self.root.trigger('Select', browser.cursor)


class MoveCursorDown(Action):
    """Move the cursor one item downwards. Scroll if needbe."""
    text = kp.StringProperty('Cursor down')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'cursor_down'))

    def apply(self):
        with self.root.browser as browser:
            if browser.n_items == 0:
                # browser is empty, nothing to do
                pass
            elif browser.cursor is None:
                # cursor wasn't set before. Set to first item
                self.root.trigger('MoveCursorFirst')
            else:
                # move cursor one row down
                old = browser.items.index(browser.cursor)
                # check if the cursor is in the last row already
                last_row = browser.n_items % browser.cols
                last_row = last_row if last_row > 0 else browser.cols
                if old >= browser.n_items - last_row: return # last row already
                # move cursor down
                new = clamp(old + browser.cols, browser.n_items - 1)
                browser.cursor = browser.items[new]
                # fix field of view
                self.root.trigger('JumpToCursor')
                # fix selection
                if browser.select_mode != browser.SELECT_MULTI and \
                   (browser.select_mode != browser.SELECT_SINGLE or old != new):
                    self.root.trigger('Select', browser.cursor)


class MoveCursorLeft(Action):
    """Move the cursor to the previous item."""
    text = kp.StringProperty('Cursor left')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'cursor_left'))

    def apply(self):
        with self.root.browser as browser:
            if browser.n_items == 0:
                # browser is empty, nothing to do
                pass
            elif browser.cursor is None:
                # cursor wasn't set before. Set to the last item
                self.root.trigger('MoveCursorLast')
            else:
                # move cursor one position to the left
                old = browser.items.index(browser.cursor)
                new = clamp(old - 1, browser.n_items - 1)
                browser.cursor = browser.items[new]
                self.root.trigger('JumpToCursor')
                # fix selection
                if browser.select_mode != browser.SELECT_MULTI and \
                   (browser.select_mode != browser.SELECT_SINGLE or old != new):
                    self.root.trigger('Select', browser.cursor)


class MoveCursorRight(Action):
    """Move the cursor to the next item."""
    text = kp.StringProperty('Cursor right')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'cursor_right'))

    def apply(self):
        with self.root.browser as browser:
            if browser.n_items == 0:
                # browser is empty, nothing to do
                pass
            elif browser.cursor is None:
                # cursor wasn't set before. Set to the last item
                self.root.trigger('MoveCursorFirst')
            else:
                # move cursor one position to the right
                old = browser.items.index(browser.cursor)
                new = clamp(old + 1, browser.n_items - 1)
                browser.cursor = browser.items[new]
                self.root.trigger('JumpToCursor')
                # fix selection
                if browser.select_mode != browser.SELECT_MULTI and \
                   (browser.select_mode != browser.SELECT_SINGLE or old != new):
                    self.root.trigger('Select', browser.cursor)


class SelectAll(Action):
    """Select all items."""
    text = kp.StringProperty('Select all')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'select_all'))

    def apply(self):
        with self.root.browser as browser:
            browser.selection = browser.items.as_set().copy()


class SelectNone(Action):
    """Clear the selection."""
    text = kp.StringProperty('Clear selection')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'select_none'))

    def apply(self):
        with self.root.browser as browser:
            browser.selection = set()


class SelectInvert(Action):
    """Invert the selection."""
    text = kp.StringProperty('Invert selection')

    def apply(self):
        with self.root.browser as browser:
            browser.selection = browser.items.as_set() - browser.selection


class SelectSingle(Action):
    """Select only the cursor."""
    text = kp.StringProperty('Select one')

    def apply(self):
        with self.root.browser as browser:
            browser.select_mode = browser.SELECT_SINGLE


class SelectAdditive(Action):
    """Set the selection mode to additive select."""
    text = kp.StringProperty('Always select')

    def apply(self):
        with self.root.browser as browser:
            browser.select_mode = browser.SELECT_ADDITIVE


class SelectSubtractive(Action):
    """Set the selection mode to subtractive select."""
    text = kp.StringProperty('Always deselect')

    def apply(self):
        with self.root.browser as browser:
            browser.select_mode = browser.SELECT_SUBTRACTIVE


class SelectMulti(Action):
    """Set the selection mode to random access."""
    text = kp.StringProperty('Select many')
    browser = kp.ObjectProperty(None, allownone=True)

    def ktrigger(self, evt):
        key, _, _ = evt
        if key in self.root.keys.modemap[self.root.keys.MODIFIERS_CTRL]:
            self.browser = self.root.browser
            self.apply()

    def on_root(self, wx, root):
        super(SelectMulti, self).on_root(wx, root)
        root.keys.bind(on_release=self.on_key_up)

    def on_key_up(self, wx, key):
        if key in self.root.keys.modemap[self.root.keys.MODIFIERS_CTRL]:
            if self.browser is not None:
                with self.browser as browser:
                    if browser.select_mode & browser.SELECT_MULTI:
                        browser.select_mode -= browser.SELECT_MULTI

    def apply(self):
        with self.root.browser as browser:
            browser.select_mode |= browser.SELECT_MULTI


class SelectRange(Action):
    """Set the selection mode to range select."""
    text = kp.StringProperty('Select range')
    browser = kp.ObjectProperty(None, allownone=True)

    def ktrigger(self, evt):
        key, _, _ = evt
        if key in self.root.keys.modemap[self.root.keys.MODIFIERS_SHIFT]:
            self.browser = self.root.browser
            self.apply()

    def on_root(self, wx, root):
        super(SelectRange, self).on_root(wx, root)
        root.keys.bind(on_release=self.on_key_up)

    def on_key_up(self, wx, key):
        if key in self.root.keys.modemap[self.root.keys.MODIFIERS_SHIFT]:
            if self.browser is not None:
                with self.browser as browser:
                    if browser.select_mode & browser.SELECT_RANGE:
                        browser.select_mode -= browser.SELECT_RANGE
                        browser.range_base = set()
                        browser.range_origin = None

    def apply(self):
        with self.root.browser as browser:
            browser.select_mode |= browser.SELECT_RANGE
            browser.range_base = browser.selection.copy()
            idx = None if browser.cursor is None else  browser.items.index(browser.cursor)
            browser.range_origin = idx


class Select(Action):
    """Select or deselect an item. How the selection changes depends on the selection mode."""
    text = kp.StringProperty('Select')

    def ktrigger(self, evt):
        return Binding.check(evt, self.cfg('bindings', 'browser', 'select'))

    def apply(self, obj=None):
        with self.root.browser as browser:
            obj = obj if obj is not None else browser.cursor

            if obj is None:
                # nothing to do
                pass

            elif browser.select_mode & browser.SELECT_ADDITIVE:
                browser.selection.add(obj)

            elif browser.select_mode & browser.SELECT_SUBTRACTIVE:
                if obj in browser.selection:
                    browser.selection.remove(obj)

            elif browser.select_mode & browser.SELECT_RANGE:
                idx = browser.items.index(obj)
                lo = min(idx, browser.range_origin)
                hi = max(idx, browser.range_origin)
                browser.selection = browser.range_base | set(browser.items[lo:hi+1])

            elif browser.select_mode & browser.SELECT_MULTI:
                # Toggle
                if obj in browser.selection:
                    browser.selection.remove(obj)
                else:
                    browser.selection.add(obj)

            elif browser.select_mode == 0: #elif browser.select_mode & browser.SELECT_SINGLE:
                # Toggle
                if obj in browser.selection:
                    browser.selection = set()
                else:
                    browser.selection = {obj}


## config ##

config.declare(('ui', 'standalone', 'browser', 'maxcols'), config.Unsigned(), 0,
    __name__, 'Column maximum', 'Maximal number of columns. This guards against aggressive zooming, because the application may become unresponsive if too many preview images are shown on the same page. A value of Infinity means that no limit is enforced.')

config.declare(('ui', 'standalone', 'browser', 'maxrows'), config.Unsigned(), 0,
    __name__, 'Row maximum', 'Maximal number of rows. This guards against aggressive zooming, because the application may become unresponsive if too many preview images are shown on the same page. A value of Infinity means that no limit is enforced.')

config.declare(('ui', 'standalone', 'browser', 'zoom_step'), config.Unsigned(), 1,
    __name__, 'Zoom step', 'Controls by how much the gridsize is increased or decreased when zoomed in or out. Affects both dimensions (cols/rows) in grid mode.')

config.declare(('ui', 'standalone', 'browser', 'scroll'), config.Enum('mouse', 'touch'), 'mouse',
    __name__, 'Inverted scroll', 'To scroll downwards, one can either move the fingers in an upward direction (touch) or use the scroll wheel in a downward direction (mouse).')

# keybindings

config.declare(('bindings', 'browser', 'page_next'),
    config.Keybind(), Binding.simple(Binding.PGDN),
    __name__, NextPage.text.defaultvalue, NextPage.__doc__)

config.declare(('bindings', 'browser', 'page_prev'),
    config.Keybind(), Binding.simple(Binding.PGUP),
    __name__, PreviousPage.text.defaultvalue, PreviousPage.__doc__)

config.declare(('bindings', 'browser', 'scroll_up'),
    config.Keybind(), Binding.simple('k', None, Binding.mALL),
    __name__, ScrollUp.text.defaultvalue, ScrollUp.__doc__)

config.declare(('bindings', 'browser', 'scroll_down'),
    config.Keybind(), Binding.simple('j', None, Binding.mALL),
    __name__, ScrollDown.text.defaultvalue, ScrollDown.__doc__)

config.declare(('bindings', 'browser', 'zoom_in'),
    config.Keybind(), Binding.simple('+'),
    __name__, ZoomIn.text.defaultvalue, ZoomIn.__doc__)

config.declare(('bindings', 'browser', 'zoom_out'),
    config.Keybind(), Binding.simple('-'),
    __name__, ZoomOut.text.defaultvalue, ZoomOut.__doc__)

config.declare(('bindings', 'browser', 'go_first'),
    config.Keybind(), Binding.simple(Binding.HOME),
    __name__, MoveCursorFirst.text.defaultvalue, MoveCursorFirst.__doc__)

config.declare(('bindings', 'browser', 'go_last'),
    config.Keybind(), Binding.simple(Binding.END),
    __name__, MoveCursorLast.text.defaultvalue, MoveCursorLast.__doc__)

config.declare(('bindings', 'browser', 'cursor_up'),
    config.Keybind(), Binding.simple(Binding.UP),
    __name__, MoveCursorUp.text.defaultvalue, MoveCursorUp.__doc__)

config.declare(('bindings', 'browser', 'cursor_down'),
    config.Keybind(), Binding.simple(Binding.DOWN),
    __name__, MoveCursorDown.text.defaultvalue, MoveCursorDown.__doc__)

config.declare(('bindings', 'browser', 'cursor_left'),
    config.Keybind(), Binding.simple(Binding.LEFT),
    __name__, MoveCursorLeft.text.defaultvalue, MoveCursorLeft.__doc__)

config.declare(('bindings', 'browser', 'cursor_right'),
    config.Keybind(), Binding.simple(Binding.RIGHT),
    __name__, MoveCursorRight.text.defaultvalue, MoveCursorRight.__doc__)

config.declare(('bindings', 'browser', 'select_all'),
    config.Keybind(), Binding.simple('a',  Binding.mCTRL, Binding.mREST),
    __name__, SelectAll.text.defaultvalue, SelectAll.__doc__)

config.declare(('bindings', 'browser', 'select_none'),
    config.Keybind(), Binding.simple('a', (Binding.mCTRL, Binding.mSHIFT), Binding.mREST),
    __name__, SelectNone.text.defaultvalue, SelectNone.__doc__)

config.declare(('bindings', 'browser', 'select'),
    config.Keybind(), Binding.simple(Binding.SPACEBAR),
    __name__, Select.text.defaultvalue, Select.__doc__)

## EOF ##