coalispr.tk_gui.gui_widgets.opt2¶
Classes¶
Labelframe with radio buttons to select one of the subcommands that |
|
Frame with a labeled input widget for a command option, to be added |
Module Contents¶
- class coalispr.tk_gui.gui_widgets.opt2.Subcommand_frame(master, subcommand_choices, subcoms)¶
Bases:
ttkbootstrap.FrameLabelframe with radio buttons to select one of the subcommands that are available for the main command.
- choices¶
- Type:
list
- widget_group¶
Collection of frames, one for each subcommand, forming an Option_widget (value) with choices valid for that subcommand (key).
- Type:
dict
- current_widget¶
Key of visible/raised/chosen subcommand Option_widget
- Type:
str
- subcom_var¶
- Type:
tk.StringVar
- labframe¶
frame to contain subcommand radio buttons.
- Type:
ttk.Labelframe
- enabled¶
Flag to set state of input widget
- Type:
bool
- grid_column¶
- Type:
int
- choices¶
- subcommands_info¶
- widget_group¶
- current_widget = ''¶
- subcom_var¶
- labframe¶
- grid_column = 0¶
- add_widget(key, opt_widget)¶
Include a Option_widget for subcommand (key) to collection of frames from which one is raised/made visible when radio button of linked subcommand has been picked.
- reset_current_combo_widget()¶
Return combo widget to empty value.
- change_subcommand()¶
Pass subcommand linked to chosen radio button on so that related Option_widget is made visible in Options_frame.
- set_subcommand(key)¶
Make Option_widget for chosen subcommand visible in Options_frame.
- class coalispr.tk_gui.gui_widgets.opt2.Option_widget(opt_frame, master, subcom, choice_var, is_required, is_one_of_list)¶
Bases:
ttkbootstrap.FrameFrame with a labeled input widget for a command option, to be added to the command Options_frame.
- parent¶
Frame containing Option_widgets.
- Type:
- master¶
Class Option_widget derives from.
- Type:
ttk.Frame
- args¶
Dictionary ‘subcom’ describing subcommand controlled by widget.
- Type:
dict()
- argvar¶
String variable ‘choice_var’ controlled by Option_widget.
- Type:
tkStringVar
- is_required¶
Flag to indicate required option.
- Type:
bool
- is_one_of_list¶
Flag to indicate Option widget controls a list of mutual exclusive subcommands (options), one of which has to be picked from label-frame panel with radio buttons, the Subcommand_frame input widget should be linked to.
- Type:
bool
- handle¶
Name of the option, part of label on Option_widget
- Type:
str
- arg¶
ArgumentParser ‘arg’, used as key or part of label on Option_widget.
- Type:
str
- enabled¶
Flag to set state of input widget
- Type:
bool
- tip_text¶
Help information linked to option.
- Type:
str
- input¶
Value of widget as set by user.
- Type:
str
- colr¶
Colour setting
- Type:
str
- default_value¶
- Type:
str
- label0¶
Option name (handle)
- Type:
ttk.Label
- label1¶
Option arg
- Type:
ttk.Label
- choice¶
Input widget created on the basis of the kind of input/variable this Options_frame has to take care of.
- Type:
one of ttk input widgets
- parent¶
- args¶
- argvar¶
- is_one_of_list_¶
- handle¶
- arg¶
- enabled¶
- tip_text¶
- input¶
- colr = 'danger'¶
- default_value = ' '¶
- label0¶
- label1¶
- choice¶
- get_input_widget(key)¶
Return Input_widget with requested (key) input widget.
- Parameters:
key (str) – String denoting what kind of widget to generate.
- is_one_of_list()¶
Return boolean indicating whether subcommand is one of a group from which only one can be chosen at the time; determines association of the Option_widget with a Subcommand_frame.
- var_changed(event=None, int_value=False)¶
Register chosen options.
- unbind_mousewheel(combo)¶
Turn off picking a combo box value by mouse scrolling.
- validate_int(value)¶
Check whether number input is an int
- validate_name(value)¶
Check whether input is a simple name.
- validate_region(value)¶
Check whether input region will be parsable.
- on_invalid()¶
Show message when input is invalid.
- create_combo()¶
Return ttk.Combobox, pick from available choices.
- create_comboE()¶
Return ttk.Combobox, input allowed (or pick from available choices).
- create_entry()¶
Return ttk.Entry, for a number.
- create_entry2()¶
Return ttk.Entry, for a region
- create_checkbtn()¶
Return ttk.Checkbutton.