TermTk.TTkCore.constant
TTkConstant
- class TTkConstant[source]
Class container of all the constants used in
TermTk
- class Alignment[source]
This type is used to describe alignment.
No Alignment
Aligns with the left edge.
Aligns with the right edge.
Centers horizontally in the available space.
Justifies the text in the available space.
- CENTER_ALIGN = 4
Centers horizontally in the available space.
- JUSTIFY = 8
Justifies the text in the available space.
- LEFT_ALIGN = 1
Aligns with the left edge.
- NONE = 0
No Alignment
- RIGHT_ALIGN = 2
Aligns with the right edge.
- class CheckState[source]
This class type is used to describe the check status.
The item is unchecked.
The item is partially checked.
The item is checked.
- Checked = 2
The item is checked.
- PartiallyChecked = 1
The item is partially checked. Items in hierarchical models may be partially checked if some, but not all, of their children are checked.
- Unchecked = 0
The item is unchecked.
- class Direction[source]
This class type is used to describe the direction
Horizontal direction
Vertical direction
- HORIZONTAL = 3
Horizontal direction
- VERTICAL = 12
Vertical direction
- class DragDropMode[source]
Specifies the Drag and Drop mode allowed by this widget
No Drag and Drop is allowed
Drag allowed
Drop allowed
Drag and Drop allowed
- AllowDrag = 1
Drag allowed
- AllowDragDrop = 3
Drag and Drop allowed
- AllowDrop = 2
Drop allowed
- NoDragDrop = 0
No Drag and Drop is allowed
- class FileMode[source]
The name of a file, whether it exists or not.
The name of a single existing file.
The name of a directory.
- AnyFile = 0
The name of a file, whether it exists or not.
- Directory = 2
The name of a directory. Both files and directories are displayed. However, the native Windows file dialog does not support displaying files in the directory chooser.
- ExistingFile = 1
The name of a single existing file.
- class InsertPolicy[source]
Specifies what the
TTkComboBox
should do when a new string is entered by the user.The string will not be inserted into the combobox.
The string will be inserted as the first item in the combobox.
The string will be inserted after the last item in the combobox.
- InsertAtBottom = 3
The string will be inserted after the last item in the combobox.
- InsertAtTop = 1
The string will be inserted as the first item in the combobox.
- NoInsert = 0
The string will not be inserted into the combobox.
- class ItemFlag[source]
ItemFlag
describes the properties of an itemIt does not have any properties set.
It can be selected.
It can be edited.
The user can interact with the item.
- ItemIsEditable = 2
It can be edited.
- ItemIsEnabled = 32
The user can interact with the item.
- ItemIsSelectable = 1
It can be selected.
- NoItemFlags = 0
It does not have any properties set.
- class KeyModifier[source]
Input
SpecialKey
modifiersModifier reported by
TTkKeyEvent
->mod
No modifier key is pressed.
A Shift key on the keyboard is pressed.
A Ctrl key on the keyboard is pressed.
An Alt key on the keyboard is pressed.
A Meta key on the keyboard is pressed.
A keypad button is pressed.
X11 only (unless activated on Windows by a command line argument).
The Shift keys provided on all standard keyboards.
The Meta keys.
The Ctrl keys.
The normal Alt keys, but not keys like AltGr.
- ALT = 134217728
The normal Alt keys, but not keys like AltGr.
- AltModifier = 134217728
An Alt key on the keyboard is pressed.
- CTRL = 67108864
The Ctrl keys.
- ControlModifier = 67108864
A Ctrl key on the keyboard is pressed.
- GroupSwitchModifier = 1073741824
X11 only (unless activated on Windows by a command line argument). A Mode_switch key on the keyboard is pressed.
- KeypadModifier = 536870912
A keypad button is pressed.
- META = 268435456
The Meta keys.
- MetaModifier = 268435456
A Meta key on the keyboard is pressed.
- NoModifier = 0
No modifier key is pressed.
- SHIFT = 33554432
The Shift keys provided on all standard keyboards.
- ShiftModifier = 33554432
A Shift key on the keyboard is pressed.
- class KeyType[source]
Input Key Types
Key type reported by
TTkKeyEvent
->key
Input Char Key
Input Special Key
- Character = 1
Input Char Key
- SpecialKey = 2
Input Special Key
- class LayoutItemTypes[source]
Types used internally in
TTkLayouts
Item Type Layout
Item Type Widget
- LayoutItem = 1
Item Type Layout
- WidgetItem = 2
Item Type Widget
- class LineWrapMode[source]
Those constants describes which wrapping status is required in the document
- FixedWidth = 3
Wrapping around a fixed width
- NoWrap = 0
No Wrapping is applied
- WidgetWidth = 1
Wrapping around the Widget width
- class MouseEvent[source]
Input Mouse Event
Events reported by
TTkMouseEvent
->evt
NoEvent
Press
Release
Drag
Move
WHEEL_Up
WHEEL_Down
- class MouseKey[source]
Input Mouse Key
Events reported by
TTkMouseEvent
->key
The button state does not refer to any button.
This value corresponds to a mask of all possible mouse buttons.
The left button is pressed, or an event refers to the left button.
The right button.
The middle button.
The middle button.
The wheel control
- AllButtons = 134217727
This value corresponds to a mask of all possible mouse buttons. Use to set the ‘acceptedButtons’ property of a MouseArea to accept ALL mouse buttons.
- LeftButton = 1
The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
- MidButton = 4
The middle button.
- MiddleButton = 4
The middle button.
- NoButton = 0
The button state does not refer to any button.
- RightButton = 2
The right button.
- Wheel = 8
The wheel control
- class ShortcutContext[source]
For a
TTkShortcut
event to occur, the shortcut’s key sequence must be entered by the user in a context where the shortcut is active. The possible contexts are these:The shortcut is active when its parent widget has focus.
The shortcut is active when its parent widget, or any of its children has focus.
The shortcut is active when its parent widget is a logical subwidget of the active top-level window.
The shortcut is active when one of the applications windows are active.
- ApplicationShortcut = 2
The shortcut is active when one of the applications windows are active.
- WidgetShortcut = 0
The shortcut is active when its parent widget has focus.
- WidgetWithChildrenShortcut = 3
The shortcut is active when its parent widget, or any of its children has focus. Children which are top-level widgets, except pop-ups, are not affected by this shortcut context.
- WindowShortcut = 1
The shortcut is active when its parent widget is a logical subwidget of the active top-level window.
- class SortOrder[source]
This enum describes how the items in a widget are sorted.
The items are sorted ascending e.g.
The items are sorted descending e.g.
- AscendingOrder = 0
The items are sorted ascending e.g. starts with ‘AAA’ ends with ‘ZZZ’ in Latin-1 locales
- DescendingOrder = 1
The items are sorted descending e.g. starts with ‘ZZZ’ ends with ‘AAA’ in Latin-1 locales
- class TTkItemSelectionModel[source]
These values describes the way the selection model will be updated.
No selection will be made.
The complete selection will be cleared.
All specified indexes will be selected.
All specified indexes will be deselected.
All specified indexes will be selected or deselected depending on their current state.
The current selection will be updated.
All indexes will be expanded to span rows.
All indexes will be expanded to span columns.
A combination of Select and Current, provided for convenience.
A combination of Toggle and Current, provided for convenience.
A combination of Clear and Select, provided for convenience.
- Clear = 1
The complete selection will be cleared.
- ClearAndSelect = 3
A combination of Clear and Select, provided for convenience.
- Columns = 64
All indexes will be expanded to span columns.
- Current = 16
The current selection will be updated.
- Deselect = 4
All specified indexes will be deselected.
- NoUpdate = 0
No selection will be made.
- Rows = 32
All indexes will be expanded to span rows.
- Select = 2
All specified indexes will be selected.
- SelectCurrent = 18
A combination of Select and Current, provided for convenience.
- Toggle = 8
All specified indexes will be selected or deselected depending on their current state.
- ToggleCurrent = 24
A combination of Toggle and Current, provided for convenience.
- class WindowFlag[source]
Those flags are used to enable customization of the window controls.
Adds a reduce button.
Adds a minimize button.
Adds a maximize button.
Adds a minimize and a maximize button.
Adds a close button.
- WindowCloseButtonHint = 134217728
Adds a close button.
- WindowMaximizeButtonHint = 32768
Adds a maximize button.
- WindowMinMaxButtonsHint = 49152
Adds a minimize and a maximize button.
- WindowMinimizeButtonHint = 16384
Adds a minimize button.
- WindowReduceButtonHint = 512
Adds a reduce button.
- class WrapMode[source]
Those constants describes how text is wrapped in a document.
Text is wrapped at word boundaries.
Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
- WordWrap = 1
Text is wrapped at word boundaries.
- WrapAnywhere = 3
Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
- WrapAtWordBoundaryOrAnywhere = 4
If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
TTkK
- class TTkK[source]
-
- class Alignment
This type is used to describe alignment.
No Alignment
Aligns with the left edge.
Aligns with the right edge.
Centers horizontally in the available space.
Justifies the text in the available space.
- CENTER_ALIGN = 4
Centers horizontally in the available space.
- JUSTIFY = 8
Justifies the text in the available space.
- LEFT_ALIGN = 1
Aligns with the left edge.
- NONE = 0
No Alignment
- RIGHT_ALIGN = 2
Aligns with the right edge.
- class CheckState
This class type is used to describe the check status.
The item is unchecked.
The item is partially checked.
The item is checked.
- Checked = 2
The item is checked.
- PartiallyChecked = 1
The item is partially checked. Items in hierarchical models may be partially checked if some, but not all, of their children are checked.
- Unchecked = 0
The item is unchecked.
- class ChildIndicatorPolicy
- class ColorType
- class Direction
This class type is used to describe the direction
Horizontal direction
Vertical direction
- HORIZONTAL = 3
Horizontal direction
- VERTICAL = 12
Vertical direction
- class DragDropMode
Specifies the Drag and Drop mode allowed by this widget
No Drag and Drop is allowed
Drag allowed
Drop allowed
Drag and Drop allowed
- AllowDrag = 1
Drag allowed
- AllowDragDrop = 3
Drag and Drop allowed
- AllowDrop = 2
Drop allowed
- NoDragDrop = 0
No Drag and Drop is allowed
- class FileMode
The name of a file, whether it exists or not.
The name of a single existing file.
The name of a directory.
- AnyFile = 0
The name of a file, whether it exists or not.
- Directory = 2
The name of a directory. Both files and directories are displayed. However, the native Windows file dialog does not support displaying files in the directory chooser.
- ExistingFile = 1
The name of a single existing file.
- class InsertPolicy
Specifies what the
TTkComboBox
should do when a new string is entered by the user.The string will not be inserted into the combobox.
The string will be inserted as the first item in the combobox.
The string will be inserted after the last item in the combobox.
- InsertAtBottom = 3
The string will be inserted after the last item in the combobox.
- InsertAtTop = 1
The string will be inserted as the first item in the combobox.
- NoInsert = 0
The string will not be inserted into the combobox.
- class ItemFlag
ItemFlag
describes the properties of an itemIt does not have any properties set.
It can be selected.
It can be edited.
The user can interact with the item.
- ItemIsEditable = 2
It can be edited.
- ItemIsEnabled = 32
The user can interact with the item.
- ItemIsSelectable = 1
It can be selected.
- NoItemFlags = 0
It does not have any properties set.
- class KeyModifier
Input
SpecialKey
modifiersModifier reported by
TTkKeyEvent
->mod
No modifier key is pressed.
A Shift key on the keyboard is pressed.
A Ctrl key on the keyboard is pressed.
An Alt key on the keyboard is pressed.
A Meta key on the keyboard is pressed.
A keypad button is pressed.
X11 only (unless activated on Windows by a command line argument).
The Shift keys provided on all standard keyboards.
The Meta keys.
The Ctrl keys.
The normal Alt keys, but not keys like AltGr.
- ALT = 134217728
The normal Alt keys, but not keys like AltGr.
- AltModifier = 134217728
An Alt key on the keyboard is pressed.
- CTRL = 67108864
The Ctrl keys.
- ControlModifier = 67108864
A Ctrl key on the keyboard is pressed.
- GroupSwitchModifier = 1073741824
X11 only (unless activated on Windows by a command line argument). A Mode_switch key on the keyboard is pressed.
- KeypadModifier = 536870912
A keypad button is pressed.
- META = 268435456
The Meta keys.
- MetaModifier = 268435456
A Meta key on the keyboard is pressed.
- NoModifier = 0
No modifier key is pressed.
- SHIFT = 33554432
The Shift keys provided on all standard keyboards.
- ShiftModifier = 33554432
A Shift key on the keyboard is pressed.
- class KeyType
Input Key Types
Key type reported by
TTkKeyEvent
->key
Input Char Key
Input Special Key
- Character = 1
Input Char Key
- SpecialKey = 2
Input Special Key
- class LayoutItemTypes
Types used internally in
TTkLayouts
Item Type Layout
Item Type Widget
- LayoutItem = 1
Item Type Layout
- WidgetItem = 2
Item Type Widget
- class LineWrapMode
Those constants describes which wrapping status is required in the document
- FixedWidth = 3
Wrapping around a fixed width
- NoWrap = 0
No Wrapping is applied
- WidgetWidth = 1
Wrapping around the Widget width
- class MouseEvent
Input Mouse Event
Events reported by
TTkMouseEvent
->evt
NoEvent
Press
Release
Drag
Move
WHEEL_Up
WHEEL_Down
- class MouseKey
Input Mouse Key
Events reported by
TTkMouseEvent
->key
The button state does not refer to any button.
This value corresponds to a mask of all possible mouse buttons.
The left button is pressed, or an event refers to the left button.
The right button.
The middle button.
The middle button.
The wheel control
- AllButtons = 134217727
This value corresponds to a mask of all possible mouse buttons. Use to set the ‘acceptedButtons’ property of a MouseArea to accept ALL mouse buttons.
- LeftButton = 1
The left button is pressed, or an event refers to the left button. (The left button may be the right button on left-handed mice.)
- MidButton = 4
The middle button.
- MiddleButton = 4
The middle button.
- NoButton = 0
The button state does not refer to any button.
- RightButton = 2
The right button.
- Wheel = 8
The wheel control
- class ScrollBarPolicy
- class ShortcutContext
For a
TTkShortcut
event to occur, the shortcut’s key sequence must be entered by the user in a context where the shortcut is active. The possible contexts are these:The shortcut is active when its parent widget has focus.
The shortcut is active when its parent widget, or any of its children has focus.
The shortcut is active when its parent widget is a logical subwidget of the active top-level window.
The shortcut is active when one of the applications windows are active.
- ApplicationShortcut = 2
The shortcut is active when one of the applications windows are active.
- WidgetShortcut = 0
The shortcut is active when its parent widget has focus.
- WidgetWithChildrenShortcut = 3
The shortcut is active when its parent widget, or any of its children has focus. Children which are top-level widgets, except pop-ups, are not affected by this shortcut context.
- WindowShortcut = 1
The shortcut is active when its parent widget is a logical subwidget of the active top-level window.
- class SortOrder
This enum describes how the items in a widget are sorted.
The items are sorted ascending e.g.
The items are sorted descending e.g.
- AscendingOrder = 0
The items are sorted ascending e.g. starts with ‘AAA’ ends with ‘ZZZ’ in Latin-1 locales
- DescendingOrder = 1
The items are sorted descending e.g. starts with ‘ZZZ’ ends with ‘AAA’ in Latin-1 locales
- class TTkItemSelectionModel
These values describes the way the selection model will be updated.
No selection will be made.
The complete selection will be cleared.
All specified indexes will be selected.
All specified indexes will be deselected.
All specified indexes will be selected or deselected depending on their current state.
The current selection will be updated.
All indexes will be expanded to span rows.
All indexes will be expanded to span columns.
A combination of Select and Current, provided for convenience.
A combination of Toggle and Current, provided for convenience.
A combination of Clear and Select, provided for convenience.
- Clear = 1
The complete selection will be cleared.
- ClearAndSelect = 3
A combination of Clear and Select, provided for convenience.
- Columns = 64
All indexes will be expanded to span columns.
- Current = 16
The current selection will be updated.
- Deselect = 4
All specified indexes will be deselected.
- NoUpdate = 0
No selection will be made.
- Rows = 32
All indexes will be expanded to span rows.
- Select = 2
All specified indexes will be selected.
- SelectCurrent = 18
A combination of Select and Current, provided for convenience.
- Toggle = 8
All specified indexes will be selected or deselected depending on their current state.
- ToggleCurrent = 24
A combination of Toggle and Current, provided for convenience.
- class WindowFlag
Those flags are used to enable customization of the window controls.
Adds a reduce button.
Adds a minimize button.
Adds a maximize button.
Adds a minimize and a maximize button.
Adds a close button.
- WindowCloseButtonHint = 134217728
Adds a close button.
- WindowMaximizeButtonHint = 32768
Adds a maximize button.
- WindowMinMaxButtonsHint = 49152
Adds a minimize and a maximize button.
- WindowMinimizeButtonHint = 16384
Adds a minimize button.
- WindowReduceButtonHint = 512
Adds a reduce button.
- class WrapMode
Those constants describes how text is wrapped in a document.
Text is wrapped at word boundaries.
Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.
- WordWrap = 1
Text is wrapped at word boundaries.
- WrapAnywhere = 3
Text can be wrapped at any point on a line, even if it occurs in the middle of a word.
- WrapAtWordBoundaryOrAnywhere = 4
If possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.