Abstract base class for Browsers
Inherits from Widget
Subclasses: Browser
Browser_.scrollbar_width | hposition | textcolor | textsize | |
has_scrollbar | position | textfont | ||
deselect |
This is the base class for browsers. To be useful it must be subclassed and several virtual functions defined. The Forms-compatable browser and the file chooser's browser are subclassed off of this.
This has been designed so that the subclass has complete control over the storage of the data, although because next() and prev() functions are used to index, it works best as a linked list or as a large block of characters in which the line breaks must be searched for.
A great deal of work has been done so that the "height" of a data object does not need to be determined until it is drawn. This is useful if actually figuring out the size of an object requires accessing image data or doing stat() on a file or doing some other slow operation.
Deselects all items in the list and returns true if the state changed or nil if it did not.
If docallbacks is true, deselect tries to call the callback function for the widget.
position controls vertical scrolling. It's the current
vertical scrollbar position, starting from 0. If no scrollbar is
present, this will always return 0.
hposition controls horizontal panning. If no horizontal
scrollbar is present, this will always return 0.
By default you can scroll in both directions, and the scrollbars
disappear if the data will fit in the widget. has_scrollbar
describes this with values of Browser_Scrolltype:
As elsewhere, horizontal and vertical may be abbreviated to horiz and vert.
The default text font for all the lines in the browser.
The default text font size for the lines in the browser.
The default color for text items in the browser.
This field is undocumented; it appears to set the width of Browser_ scrollbars.
position: integer
hposition: integer
has_scrollbar: Browser_Scrolltype
Browser_Scrolltype.none
- No scrollbars Browser_Scrolltype.horizontal
- Only a horizontal scrollbar. Browser_Scrolltype.vertical
- Only a vertical scrollbar. Browser_Scrolltype.both
- The default is both scrollbars. Browser_Scrolltype.horizontal_always
- Horizontal scrollbar
always on, vertical always off. Browser_Scrolltype.vertical_always
- Vertical scrollbar
always on, horizontal always off. Browser_Scrolltype.both_always
- Both always on. textfont: Font
textsize: integer
textcolor: Color
Browser_.scrollbar_width: integer
doctool generated at Sun Aug 5 20:52:29 2001