Model Railroad System
2.2.2
|
Tabbed Notebook with scrollable tabs. More...
Public Member Functions | |
ScrollTabNotebook (name,...) | |
Constructor: create a ScrollTabNotebook. More... | |
compute_size () | |
(Re-)compute the size of the widget. More... | |
add (window,...) | |
Add a window to the end of the page list. More... | |
insert (pos, window,...) | |
Insert a window at the specified position. More... | |
tab (tabid,...) | |
Updates the tab options for tabid. More... | |
tabs () | |
Return all tabs. More... | |
forget (tabid) | |
Removes the tab specified by tabid, unmaps and unmanages the associated window. More... | |
select (tabid="") | |
Selects the specified tab. More... | |
see (tabid) | |
Make the specified tabid visible. More... | |
index (tabid) | |
Returns the numeric index of the tab specified by tabid, or the total number of tabs if tabid is the string "end". More... | |
Private Member Functions | |
_test_page (page) | |
Test to see if page is managed. More... | |
_compute_width () | |
Recompute tab width. More... | |
_compute_height () | |
Recompute tab height. More... | |
_get_x_page (pos) | |
Get X position of the page at pos. More... | |
_xview (inc) | |
Shift the tabs to the left or right. More... | |
_highlight (flag, page) | |
Turn highlighting on or off for the specified tab. More... | |
_select (page) | |
Make the specified page the selected page. More... | |
_redraw () | |
Redraw the tabs and all. More... | |
_draw_page (page, create) | |
Draw a tab for the specified page, creating a new tab if asked or moving an old one otherwise. More... | |
_draw_arrows () | |
Draw the arrow buttons if needed. More... | |
_resize () | |
Resize the widget. More... | |
_themeChanged_ () | |
Theme Changed method. More... | |
Static Private Member Functions | |
static | _themeChanged (w) |
Theme Changed typemethod. More... | |
static | _Configure (widget, width, height) |
Configure typemethod. More... | |
static | get3dcolor (path, bgcolor) |
Compute 3D colors. More... | |
Private Attributes | |
tabrow | |
Row containing the tabs. More... | |
left | |
Left arrow button. More... | |
tabs | |
Scrolling tab frame (canvas). More... | |
right | |
Right arrow button. More... | |
select | |
The currently selected page. More... | |
_clientRow | |
Grid row for client pages (1 is bottom). More... | |
_tabrow | |
Grid row for tabs (0 is top). More... | |
_hpage | |
Height of tabrow. More... | |
_wpage | |
Width of tabrow. More... | |
_textid | |
Scratch text id. More... | |
realized | |
Flag to indicate if the widget is realized. More... | |
pages | |
The list of available pages. More... | |
pages_opts | |
The options for the available pages. More... | |
base | |
Leftmost visible tab. More... | |
dbg | |
Darker tab background. More... | |
lbg | |
Lighter tab background. More... | |
Static Private Attributes | |
static | _tabsides |
Tabside type checker. More... | |
static | _radiustype |
Tab radius and bevelsize type checker. More... | |
static | _paddingtype |
Tab padding type checker. More... | |
static | _warrow |
Width of an arrow button. More... | |
static | _left |
Bitmap for the left button. More... | |
static | _right |
Bitmap for the right button. More... | |
Tabbed Notebook with scrollable tabs.
This is a Tabbed Notebook widget, with scrollable tabs. It implements left and right arrows, as needed, to shift the tab row to the left or right to allow for more tabs than will fit in the available space.
Options:
ScrollTabNotebook::ScrollTabNotebook | ( | name | , |
... | |||
) |
Constructor: create a ScrollTabNotebook.
name | Pathname of the widget. |
... | Options:
|
|
private |
Recompute tab height.
|
private |
Recompute tab width.
|
staticprivate |
Configure typemethod.
widget | The widget the Configure event happened for. |
width | The new width. |
height | The new height. |
|
private |
Draw the arrow buttons if needed.
|
private |
Draw a tab for the specified page, creating a new tab if asked or moving an old one otherwise.
page | The page whose tab we will draw. |
create | Flag indicating if the tab needs to be created. |
|
private |
Get X position of the page at pos.
pos | The page position. |
|
private |
Turn highlighting on or off for the specified tab.
flag | Flag to indicate turning highlighting on or off. |
page | The page whose tab to turn highlighting on or off. |
|
private |
Redraw the tabs and all.
|
private |
Resize the widget.
|
private |
Make the specified page the selected page.
page | The page to select. |
|
private |
Test to see if page is managed.
page | The page to test. |
|
staticprivate |
Theme Changed typemethod.
w | The widget the theme changed for. |
|
private |
Theme Changed method.
|
private |
Shift the tabs to the left or right.
inc | The shift increment, negative to the left, positive to the right. |
ScrollTabNotebook::add | ( | window | , |
... | |||
) |
Add a window to the end of the page list.
Adds a new window (page) to the list of managed pages.
window | The window to add. |
... | Tab options:
|
ScrollTabNotebook::compute_size | ( | ) |
(Re-)compute the size of the widget.
ScrollTabNotebook::forget | ( | tabid | ) |
Removes the tab specified by tabid, unmaps and unmanages the associated window.
tabid | The tab to remove. |
|
staticprivate |
Compute 3D colors.
path | Window path. |
bgcolor | Background color to use as a base. |
ScrollTabNotebook::index | ( | tabid | ) |
Returns the numeric index of the tab specified by tabid, or the total number of tabs if tabid is the string "end".
tabid | The tabid to get the index of. |
ScrollTabNotebook::insert | ( | pos | , |
window | , | ||
... | |||
) |
Insert a window at the specified position.
Inserts a new window (page) to the list of managed pages at the specified position.
pos | The insert position. |
window | The window to insert. |
... | Tab options:
|
ScrollTabNotebook::see | ( | tabid | ) |
Make the specified tabid visible.
tabid | The tabid to make visible. |
ScrollTabNotebook::select | ( | tabid | = "" | ) |
Selects the specified tab.
The associated slave window will be displayed, and the previously-selected window (if different) is unmapped. If tabid is omitted, returns the widget name of the currently selected pane.
tabid | The tab to select. |
ScrollTabNotebook::tab | ( | tabid | , |
... | |||
) |
Updates the tab options for tabid.
tabid | The tab index. |
... | Tab options:
|
ScrollTabNotebook::tabs | ( | ) |
Return all tabs.
|
private |
Grid row for client pages (1 is bottom).
|
private |
Height of tabrow.
|
staticprivate |
Bitmap for the left button.
|
staticprivate |
Tab padding type checker.
|
staticprivate |
Tab radius and bevelsize type checker.
|
staticprivate |
Bitmap for the right button.
|
private |
Grid row for tabs (0 is top).
|
staticprivate |
Tabside type checker.
|
private |
Scratch text id.
|
staticprivate |
Width of an arrow button.
|
private |
Width of tabrow.
|
private |
Leftmost visible tab.
|
private |
Darker tab background.
|
private |
Lighter tab background.
|
private |
Left arrow button.
|
private |
The list of available pages.
|
private |
The options for the available pages.
|
private |
Flag to indicate if the widget is realized.
|
private |
Right arrow button.
|
private |
The currently selected page.
|
private |
Row containing the tabs.
|
private |
Scrolling tab frame (canvas).