TTkK🌶️
- class TTkK[source]🌶️
Bases:
TTkConstant
Class container of all the constants used in
TermTk
Initialize self. See help(type(self)) for accurate signature.
TTkK Classes🌶️
- class Alignment🌶️
Bases:
int
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🌶️
Bases:
int
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🌶️
Bases:
int
- class ColorPickerReturnType🌶️
Bases:
int
This class identify the return color type used in
TTkColorDialogPicker
orTTkColorButtonPicker
The color type returned (fg or bg) is compliant of the type used in the initialization or 'Foreground' in case is missing or
TTKColor.RST
The color type returned is Foreground
The color type returned is Background
- Background = 2🌶️
The color type returned is Background
- Default = 0🌶️
The color type returned (fg or bg) is compliant of the type used in the initialization or ‘Foreground’ in case is missing or
TTKColor.RST
- Foreground = 1🌶️
The color type returned is Foreground
- class ColorType🌶️
Bases:
int
This Class type defines the various elements included in
TTkColor
.The
TTkColor
has a foreground color definedThe
TTkColor
has a background color definedThe
TTkColor
include one or more of BOLD, ITALIC, UNDERLINE, STRIKETROUGH, BLINKINGThe
TTkColor
include an hyperlinkThe
TTkColor
include a color modifier based onTTkColorModifier
- ColorModifier = 8🌶️
The
TTkColor
include a color modifier based onTTkColorModifier
- class Direction🌶️
Bases:
int
This class type is used to describe the direction
Horizontal direction
Vertical direction
- HORIZONTAL = 3🌶️
Horizontal direction
- VERTICAL = 12🌶️
Vertical direction
- class DragDropMode🌶️
Bases:
int
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🌶️
Bases:
int
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 FocusPolicy🌶️
Bases:
int
This Class type defines the various policies a widget can have with respect to acquiring keyboard focus.
The widget does not accept focus.
The widget accepts focus by clicking.
The widget accepts focus by using the mouse wheel.
The widget accepts focus by tabbing.
The parent widget forward the focus to this widget
- ClickFocus = 1🌶️
The widget accepts focus by clicking.
- NoFocus = 0🌶️
The widget does not accept focus.
- ParentFocus = 257🌶️
The parent widget forward the focus to this widget
- StrongFocus = 13🌶️
the widget accepts focus by both tabbing and clicking.
- TabFocus = 4🌶️
The widget accepts focus by tabbing.
- WheelFocus = 2🌶️
The widget accepts focus by using the mouse wheel.
- class InsertPolicy🌶️
Bases:
int
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🌶️
Bases:
int
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🌶️
Bases:
int
Input
SpecialKey
modifiersModifier reported by
TTkKeyEvent
->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🌶️
Bases:
int
Input Key Types
Key type reported by
TTkKeyEvent
->TTkKeyEvent.key
Input Char Key
Input Special Key
- Character = 1🌶️
Input Char Key
- SpecialKey = 2🌶️
Input Special Key
- class LayoutItemTypes🌶️
Bases:
int
Types used internally in
TTkLayouts
Item Type Layout
Item Type Widget
- LayoutItem = 1🌶️
Item Type Layout
- WidgetItem = 2🌶️
Item Type Widget
- class LineWrapMode🌶️
Bases:
int
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🌶️
Bases:
int
Input Mouse Event
Events reported by
TTkMouseEvent
->TTkMouseEvent.evt
NoEvent
Press
Release
Drag
Move
WHEEL_Up
WHEEL_Down
- class MouseKey🌶️
Bases:
int
Input Mouse Key
Events reported by
TTkMouseEvent
->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🌶️
Bases:
int
- class SelectionMode🌶️
Bases:
int
This class type indicates how the view responds to user selections.
Items cannot be selected.
When the user selects an item, any already-selected item becomes unselected.
When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone.
- MultiSelection = 2🌶️
When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone. Multiple items can be toggled by dragging the mouse over them.
- NoSelection = 0🌶️
Items cannot be selected.
- SingleSelection = 1🌶️
When the user selects an item, any already-selected item becomes unselected. It is possible for the user to deselect the selected item by pressing the Ctrl key when clicking the selected item.
- class ShortcutContext🌶️
Bases:
int
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🌶️
Bases:
int
This enum describes how the items in a widget are sorted.
The items are sorted ascending e.g. starts with 'AAA' ends with 'ZZZ' in Latin-1 locales.
The items are sorted descending e.g. starts with 'ZZZ' ends with 'AAA' in Latin-1 locales.
- 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🌶️
Bases:
int
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🌶️
Bases:
int
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🌶️
Bases:
int
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 Attributes🌶️
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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