Class Browser_

(back to index)

Abstract base class for Browsers

Inherits from Widget

Subclasses: Browser  

Property index

Browser_.scrollbar_widthhpositiontextcolortextsize
has_scrollbarpositiontextfont

Function index

deselect

Description

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.

Detailed reference

deselect(boolean docallbacks=nil): boolean

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: integer

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: integer

hposition controls horizontal panning. If no horizontal scrollbar is present, this will always return 0.

has_scrollbar: Browser_Scrolltype

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.

textfont: Font

The default text font for all the lines in the browser.

textsize: integer

The default text font size for the lines in the browser.

textcolor: Color

The default color for text items in the browser.

Browser_.scrollbar_width: integer

This field is undocumented; it appears to set the width of Browser_ scrollbars.


doctool generated at Sun Aug 5 20:52:29 2001