Package horizons :: Package gui :: Package tabs :: Module tabwidget :: Class TabWidget
[hide private]
[frames] | no frames]

Class TabWidget

source code

The TabWidget class handles widgets which consist of many different tabs(subpanels, switchable via buttons(TabButtons).

Instance Methods [hide private]
 
__init__(self, ingame_gui, tabs=None, name=None, active_tab=None) source code
 
_init_tab_buttons(self)
Add enough tabbuttons for all widgets.
source code
 
show_tab(self, number)
Used as callback function for the TabButtons.
source code
 
_apply_layout_hack(self) source code
 
_draw_widget(self)
Draws the widget, but does not show it automatically
source code
 
show(self)
Show the current widget
source code
 
hide(self, caller=None)
Hides current tab and this widget
source code
Class Variables [hide private]
  log = logging.getLogger("gui.tabs.tabwidget")
Method Details [hide private]

__init__(self, ingame_gui, tabs=None, name=None, active_tab=None)
(Constructor)

source code 
Parameters:
  • ingame_gui - IngameGui instance
  • tabs - tab instances to show
  • name - optional name for the tabwidget
  • active_tab - int id of tab, 0 <= active_tab < len(tabs)

show_tab(self, number)

source code 

Used as callback function for the TabButtons.

Parameters:
  • number - tab number that is to be shown.