GLXCurses.Application module

class GLXCurses.Application.Singleton(name, bases, dict)[source]

Bases: type

class GLXCurses.Application.Application[source]

Bases: glxeveloop.bus.Bus, GLXCurses.Aera.Area, GLXCurses.libs.Spot.Spot, GLXCurses.libs.ApplicationHandlers.Handlers

Description:

Create a Application singleton instance.

That class have the role of a Controller and a NCurses Wrapper.

It have particularity to not be a GLXCurses.Widget, then have a tonne of function for be a fake GLXCurses.Widget.

From GLXCurses point of view everything start with it component. All widget will be display and store inside it component.

get_widget_by_id(widget_id=None)[source]
active_window

Gets the “active_window” for the application.

The active Window is the one that was most recently focused (within the application).

This window may not have the focus at the moment if another application has it — this is just the most recently-focused window within this application.

Returns:the active Window, or None if there isn’t one.
Return type:ChildElement or None
children

Store the children property value

It property is use for store a stack of windows object use during choice of the active window

Default value: []

Returns:children property value
Return type:list
app_menu
menubar

The MenuModel for the menubar.

Returns:menubar property value
Return type:GLXCurses.MenuBar or None
register_session
screensaver_active
style

The style of the Application, which contains information about how it will look (colors, etc).

The Application Style is impose to each widget

Returns:a GLXCurses.Style instance
Return type:GLXCurses.Style
instance = <GLXCurses.Application.Application object>
statusbar
messagebar

Sets the messagebar of application .

This can only be done in the primary instance of the application, after it has been registered. “startup” is a good place to call this.

Returns:the messagebar property value
Return type:GLXCurses.MessageBar or None
toolbar
add_window(window)[source]

Add a Window widget to the Application windows children’s list.

This call can only happen after the application has started; typically, you should add new application windows in response to the emission of the “activate” signal.

This call is equivalent to setting the “application” property of window to application .

Normally, the connection between the application and the window will remain until the window is destroyed, but you can explicitly remove it with application.remove_window().

Galaxie-Curses will keep the application running as long as it has any windows.

Parameters:window (GLXCurses.Window) – a window to add
Raises:TypeError – if window parameter is not a Window type
remove_window(window)[source]

Remove a Window widget from the Application windows children’s list.

Set”application” and “parent’ attribute of the GLXCurses.Window to None.

Parameters:window (GLXCurses.Window) – a window to add
Raises:TypeError – if window parameter is not a Window type
get_window_by_id(identifier=None)[source]

Returns the GtkApplicationWindow with the given ID.

Parameters:identifier (int) – an identifier number
Returns:the window with ID identifier , or None if there is no window with this ID.
Return type:int or None
Raises:TypeError – when identifier is nt a int type
refresh()[source]

Refresh the NCurses Screen, and redraw each contain widget’s

It’s a central refresh point for the entire application.

check_sizes()[source]

Just a internal method for compute every size.

It consist to a serial of testable function call

get_mouse()[source]
eveloop_input_event()[source]
eveloop_cmd()[source]
eveloop_finalization()[source]
eveloop_dispatch_application(detailed_signal, args)[source]

Flush Mainloop event to Child’s father’s for a Widget’s recursive event dispatch

Parameters:
  • detailed_signal (str) – a string containing the signal name
  • args (list) – additional parameters arg1, arg2
eveloop_keyboard_interruption()[source]