termuxgui.oo package¶
Module contents¶
- class termuxgui.oo.Activity(c: Connection, t: Optional[Task])¶
Bases:
Activity
,ABC
Abstract base class for Activities.
- class Type(value)¶
Bases:
Enum
An enumeration.
- DIALOG = 4¶
- DIALOG_NO_CANCEL_OUTSIDE = 5¶
- LOCKSCREEN = 3¶
- NORMAL = 1¶
- PIP = 2¶
- intercept_back() bool ¶
Specify if you want to intercept back events.
- on_back()¶
- on_config(config: Configuration)¶
- on_create()¶
- on_destroy(finishing: bool)¶
- on_pause(finishing: bool)¶
- on_pipchanged(pip: bool)¶
- on_resume()¶
- on_start()¶
- on_stop(finishing: bool)¶
- on_userleavehint()¶
- class termuxgui.oo.Button(activity: Activity, text: str, parent: Optional[View] = None, allcaps: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a Button.
- class termuxgui.oo.Checkbox(activity: Activity, text: str, parent: Optional[View] = None, checked: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a CheckBox.
- class termuxgui.oo.Connection¶
Bases:
Connection
This represents a connection to the Termux:GUI plugin and contains all functions that don’t act on any particular View, Activity or Task.
- event_loop()¶
- class termuxgui.oo.EditText(activity: Activity, text: str, parent: Optional[View] = None, singleline: bool = False, line: bool = True, blockinput: bool = False, inputtype: Literal['text', 'textMultiLine', 'phone', 'date', 'time', 'datetime', 'number', 'numberDecimal', 'numberPassword', 'numberSigned', 'numberDecimalSigned', 'textEmailAddress', 'textPassword'] = 'text', visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents an EditText.
- class termuxgui.oo.FrameLayout(activity: Activity, parent: Optional[ViewGroup] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
ViewGroup
,FrameLayout
This represents a FrameLayout.
- class termuxgui.oo.GridLayout(activity: Activity, rows: int, cols: int, parent: Optional[ViewGroup] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
ViewGroup
,GridLayout
This represents a GridLayout.
- class termuxgui.oo.HorizontalScrollView(activity: Activity, parent: Optional[ViewGroup] = None, fillviewport: bool = False, snapping: bool = False, nobar: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
FrameLayout
,HorizontalScrollView
This represents a HorizontalScrollView.
- class termuxgui.oo.ImageView(activity: Activity, parent: Optional[View] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents an ImageView.
- class termuxgui.oo.LinearLayout(activity: Activity, parent: Optional[ViewGroup] = None, vertical: bool = True, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
ViewGroup
,LinearLayout
This represents a LinearLayout.
- class termuxgui.oo.NestedScrollView(activity: Activity, parent: Optional[View] = None, fillviewport: bool = False, snapping: bool = False, nobar: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
FrameLayout
,NestedScrollView
This represents a NestedScrollView.
- class termuxgui.oo.ProgressBar(activity: Activity, parent: Optional[View] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
View
,ProgressBar
This represents a ProgressBar.
- class termuxgui.oo.RadioButton(activity: Activity, text: str, parent: Optional[View] = None, checked: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
View
,RadioButton
This represents a RadioButton.
- class termuxgui.oo.RadioGroup(activity: Activity, parent: Optional[View] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
ViewGroup
,RadioGroup
This represents a RadioGroup.
Only one RadioButton inside a RadioGroup can be checked at once, and the RadioGroup emits events when the checked button has changed.
- class termuxgui.oo.Space(activity: Activity, parent: Optional[View] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a Space. You can use this to create empty space in your layout.
- class termuxgui.oo.Spinner(activity: Activity, parent: Optional[View] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a Spinner.
- class termuxgui.oo.SwipeRefreshLayout(activity: Activity, parent: Optional[View] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
ViewGroup
,SwipeRefreshLayout
This represents a SwipeRefreshLayout.
- class termuxgui.oo.Switch(activity: Activity, text: str, parent: Optional[View] = None, checked: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a Switch.
- class termuxgui.oo.TabLayout(activity: Activity, parent: Optional[ViewGroup] = None, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a TabLayout.
- class termuxgui.oo.TextView(activity: Activity, text: str, parent: Optional[View] = None, selectabletext: bool = False, clickablelinks: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
-
This represents a TextView.
- class termuxgui.oo.ToggleButton(activity: Activity, parent: Optional[View] = None, checked: bool = False, visibility: Optional[Literal[0, 1, 2]] = None)¶
Bases:
View
,ToggleButton
This represents a ToggleButton.
- class termuxgui.oo.View(activity: Activity, id: int, parent: Optional[termuxgui.oo.viewgroup.ViewGroup])¶
Bases:
View
,ABC
This represents a generic View.
- delete()¶
Deletes this View from the layout.