Glitter2 App
Glitter2 App
The main module that provides the app that runs the GUI.
- class glitter2.main.Glitter2App(**kw)
Bases:
base_kivy_app.app.BaseKivyApp
The app which runs the GUI.
- build()
Similar to App’s build, but it takes the root widget if provided and if
inspect
is True, it activates kivy’s inspector.- Parameters
root – The root widget instance.
- Returns
The root widget
- check_close()
Returns whether the app can close now. Otherwise, a message telling the user it cannot close now with message
_close_message
will be shown.
- clean_up()
Called by
run_app()
orrun_app_async()
after the app closes to clean up any remaining resources.By default, if
inspect
is enabled, it cleans up after it.
- on_start()
Event handler for the on_start event which is fired after initialization (after build() has been called) but before the application has started running.
- set_tittle(*largs)
Sets the title of the window.
- yesno_prompt
Stores a instance of
YesNoPrompt
that is automatically created by this app class. That class is described inbase_kivy_app/graphics.kv
.
- class glitter2.main.MainView(**kwargs)
Bases:
kivy.uix.behaviors.focus.FocusBehavior
,kivy.uix.boxlayout.BoxLayout
The root widget displayed in the GUI.
- keyboard_on_key_down(window, keycode, text, modifiers)
The method bound to the keyboard when the instance has focus.
When the instance becomes focused, this method is bound to the keyboard and will be called for every input press. The parameters are the same as
kivy.core.window.WindowBase.on_key_down()
.When overwriting the method in the derived widget, super should be called to enable tab cycling. If the derived widget wishes to use tab for its own purposes, it can call super after it has processed the character (if it does not wish to consume the tab).
Similar to other keyboard functions, it should return True if the key was consumed.
- keyboard_on_key_up(window, keycode)
The method bound to the keyboard when the instance has focus.
When the instance becomes focused, this method is bound to the keyboard and will be called for every input release. The parameters are the same as
kivy.core.window.WindowBase.on_key_up()
.When overwriting the method in the derived widget, super should be called to enable de-focusing on escape. If the derived widget wishes to use escape for its own purposes, it can call super after it has processed the character (if it does not wish to consume the escape).
- glitter2.main.run_app()
The function that starts the GUI and the entry point for the main script.