TTkK🌶️
- class TTkK[source]🌶️
Bases:
TTkConstantClass container of all the constants used in
TermTkInitialize self. See help(type(self)) for accurate signature.
TTkK Classes🌶️
- class Alignment(*values)🌶️
Bases:
IntEnumThis 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:
intThis 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(*values)🌶️
Bases:
IntEnum
- class ColorPickerReturnType🌶️
Bases:
intThis class identify the return color type used in
TTkColorDialogPickerorTTkColorButtonPickerThe color type returned (fg or bg) is compliant of the type used in the initialization or 'Foreground' in case is missing or
TTKColor.RSTThe 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:
intThis Class type defines the various elements included in
TTkColor.The
TTkColorhas a foreground color definedThe
TTkColorhas a background color definedThe
TTkColorinclude one or more of BOLD, ITALIC, UNDERLINE, STRIKETROUGH, BLINKINGThe
TTkColorinclude an hyperlinkThe
TTkColorinclude a color modifier based onTTkColorModifier- ColorModifier = 8🌶️
The
TTkColorinclude a color modifier based onTTkColorModifier
- class Direction(*values)🌶️
Bases:
IntEnumThis class type is used to describe the direction
Horizontal direction
Vertical direction
- HORIZONTAL = 3🌶️
Horizontal direction
- VERTICAL = 12🌶️
Vertical direction
- class DragDropMode(*values)🌶️
Bases:
IntEnumSpecifies 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:
intThe 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(*values)🌶️
Bases:
FlagThis 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:
intSpecifies what the
TTkComboBoxshould 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:
intItemFlagdescribes 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:
intInput
SpecialKeymodifiersModifier reported by
TTkKeyEvent->TTkKeyEvent.modNo 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:
intInput Key Types
Key type reported by
TTkKeyEvent->TTkKeyEvent.keyInput Char Key
Input Special Key
- Character = 1🌶️
Input Char Key
- SpecialKey = 2🌶️
Input Special Key
- class LayoutItemTypes🌶️
Bases:
intTypes used internally in
TTkLayoutsItem Type Layout
Item Type Widget
- LayoutItem = 1🌶️
Item Type Layout
- WidgetItem = 2🌶️
Item Type Widget
- class LineWrapMode(*values)🌶️
Bases:
IntEnumThose 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:
intInput Mouse Event
Events reported by
TTkMouseEvent->TTkMouseEvent.evtNoEventPressReleaseDragMoveWHEEL_UpWHEEL_Down
- class MouseKey🌶️
Bases:
intInput Mouse Key
Events reported by
TTkMouseEvent->TTkMouseEvent.keyThe 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 SelectionFormat(*values)🌶️
Bases:
IntEnumSelection properties
Default value
When set on the characterFormat of a selection, the whole width of the text will be shown selected.
- FullWidthSelection = 24576🌶️
When set on the characterFormat of a selection, the whole width of the text will be shown selected.
- NONE = 0🌶️
Default value
- class SelectionMode(*values)🌶️
Bases:
IntEnumThis 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(*values)🌶️
Bases:
IntEnumFor a
TTkShortcutevent 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(*values)🌶️
Bases:
IntEnumThis 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(*values)🌶️
Bases:
FlagThese 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(*values)🌶️
Bases:
FlagThose 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.
- NONE = 0🌶️
Empty flag
- 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:
intThose 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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