class documentation

class Window(Gtk.Window): (source)

Known subclasses: zim.gui.mainwindow.MainWindow, zim.gui.mainwindow.PageWindow

View In Hierarchy

Sub-class of Gtk.Window that will take care of hooking the window into the application framework and adds entry points so plugins can add side panes etc. It will divide the window horizontally in 3 panes, and the center pane again vertically in 3. The result is something like this:

        +-----------------------------+
        |menu                         |
        +-----+----------------+------+
        |     |  top pane      |      |
        |     |                |      |
        | s   +----------------+  s   |
        | i   | Main widget    |  i   |
        | d   |                |  d   |
        | e   |                |  e   |
        | b   +----------------+  b   |
        | a   |tabs|           |  a   |
        | r   | bottom pane    |  r   |
        |     |                |      |
        +----------------------+------+

Any pane that is not used will not been shown. The important thing is to create placeholders where plugins *might* want to add some widget.

All windows in zim must inherit from this class.

Unknown Field: signal
pane-state-changed (pane, visible, active): emitted when visibility or active tab changed for a specific pane
Method __init__ Undocumented
Method add Add the main widget. @param widget: gtk widget to add in the window
Method add_bar No summary
Method add_center_bar Add a widget in the central part of the window above the page. @param widget: the gtk widget to show in the tab
Method add_tab No summary
Method do_set_focus Undocumented
Method focus_last_focussed_sidepane Undocumented
Method focus_sidepane Undocumented
Method get_pane_state No summary
Method get_used_panes Returns a list of panes that are in use (i.e. not empty)
Method get_visible_panes Returns a list of panes that are visible
Method init_uistate Undocumented
Method move_bottom_minimized_tabs_to_statusbar Undocumented
Method pack_start Undocumented
Method present Undocumented
Method remove Remove widget from any pane @param widget: the widget to remove
Method save_uistate Undocumented
Method set_pane_state No summary
Method show Undocumented
Method show_all Undocumented
Method show_all_panes Undocumented
Method toggle_panes No summary
Class Variable __gsignals__ Undocumented
Method _get_pane_ordering Undocumented
Method _panes Undocumented
Method _set_pane_ordering Undocumented
Instance Variable _last_sidepane_focus Undocumented
Instance Variable _uistate_initialized Undocumented
Instance Variable _zim_window_bottom_minimized Undocumented
Instance Variable _zim_window_bottom_pane Undocumented
Instance Variable _zim_window_bottom_paned Undocumented
Instance Variable _zim_window_central_hbox Undocumented
Instance Variable _zim_window_central_vbox Undocumented
Instance Variable _zim_window_left_minimized Undocumented
Instance Variable _zim_window_left_pane Undocumented
Instance Variable _zim_window_left_paned Undocumented
Instance Variable _zim_window_main Undocumented
Instance Variable _zim_window_overlay Undocumented
Instance Variable _zim_window_right_minimized Undocumented
Instance Variable _zim_window_right_pane Undocumented
Instance Variable _zim_window_right_paned Undocumented
Instance Variable _zim_window_sidepanes Undocumented
Instance Variable _zim_window_top_minimized Undocumented
Instance Variable _zim_window_top_pane Undocumented
Instance Variable _zim_window_top_paned Undocumented
def __init__(self): (source)
def add(self, widget): (source)
Add the main widget.
Parameters
widgetgtk widget to add in the window
def add_bar(self, widget, position): (source)
Add a bar to top or bottom of the window. Used e.g. to add menu-, tool- & status-bars.
Parameters
widgetgtk widget for the bar
positionposition of the bar in the window TOP, BOTTOM, LEFT or RIGHT
def add_center_bar(self, widget): (source)
Add a widget in the central part of the window above the page.
Parameters
widgetthe gtk widget to show in the tab
def add_tab(self, key, widget, pane): (source)
Add a tab in one of the panes.
Parameters
keystring that is used to identify this tab in the window state
widgetthe gtk widget to show in the tab
panecan be one of: LEFT_PANE, RIGHT_PANE, TOP_PANE or BOTTOM_PANE.
def do_set_focus(self, widget): (source)

Undocumented

def focus_last_focussed_sidepane(self): (source)

Undocumented

def focus_sidepane(self): (source)

Undocumented

def get_pane_state(self, pane): (source)
Returns the state of a side pane.
Parameters
panecan be one of: LEFT_PANE, RIGHT_PANE, TOP_PANE or BOTTOM_PANE.
Returns
a 3-tuple of visibility (boolean), pane size (integer), and active tab (string).
def get_used_panes(self): (source)
Returns a list of panes that are in use (i.e. not empty)
def get_visible_panes(self): (source)
Returns a list of panes that are visible
def init_uistate(self): (source)

Undocumented

def move_bottom_minimized_tabs_to_statusbar(self, statusbar): (source)

Undocumented

def pack_start(self, *a): (source)

Undocumented

def present(self): (source)

Undocumented

def remove(self, widget): (source)
Remove widget from any pane
Parameters
widgetthe widget to remove
def save_uistate(self): (source)
def set_pane_state(self, pane, visible, size=None, activetab=None, grab_focus=False): (source)
Set the state of a side pane.
Parameters
panecan be one of: LEFT_PANE, RIGHT_PANE, TOP_PANE or BOTTOM_PANE.
visibleTrue to show the pane, False to hide
sizesize of the side pane
activetabkey of the active tab in the notebook or None (fails silently if tab is not found)
grab_focusif True active tab will grab focus
def show(self): (source)

Undocumented

def show_all(self): (source)

Undocumented

@action(_('_All Panes'), accelerator='<Primary>F9')
def show_all_panes(self): (source)

Undocumented

def toggle_panes(self, show=None): (source)
Toggle between showing and not showing panes. Will remember the panes that were shown last time this method was called but defaults to showing all panes.
Parameters
showif True show panes, if False hide them, if None toggle current state
def _get_pane_ordering(self, key): (source)

Undocumented

def _panes(self): (source)

Undocumented

def _set_pane_ordering(self, key, order): (source)

Undocumented

_last_sidepane_focus = (source)

Undocumented

_uistate_initialized: bool = (source)

Undocumented

_zim_window_bottom_minimized = (source)

Undocumented

_zim_window_bottom_pane = (source)

Undocumented

_zim_window_bottom_paned = (source)

Undocumented

_zim_window_central_hbox = (source)

Undocumented

_zim_window_central_vbox = (source)

Undocumented

_zim_window_left_minimized = (source)

Undocumented

_zim_window_left_pane = (source)

Undocumented

_zim_window_left_paned = (source)

Undocumented

_zim_window_main = (source)

Undocumented

_zim_window_overlay = (source)

Undocumented

_zim_window_right_minimized = (source)

Undocumented

_zim_window_right_pane = (source)

Undocumented

_zim_window_right_paned = (source)

Undocumented

_zim_window_sidepanes = (source)

Undocumented

_zim_window_top_minimized = (source)

Undocumented

_zim_window_top_pane = (source)

Undocumented

_zim_window_top_paned = (source)

Undocumented