plasmac2 makes extensive use of the AXIS customization tips from the LinuxCNC docs.
The three files available in plasmac2 for user customizing are:
The AXIS GUI is written in TCL which requires calling the TCL interpreter to customize widgets.
There are two available "shortcuts" to achieve this.
rC = root_window.tk.call()
rE = root_window.tk.eval()
In the following examples, foverride is the variable name for the height override frame which has a string name of .pane.top.tabs.fmanual.override
Hiding the height override frame can be achieved by either of the above methods:
rC('grid', 'forget', f'{foverride}')
rE(f'grid forget {foverride}')
To show the override frame again you would need to find where foverride was first shown in plasmac2.py and copy the code.
Either of the following would achieve this:
rC('grid',foverride,'-column',0,'-row',3,'-padx',2,'-pady',(0,4),'-sticky','ew')
rE(f'grid {foverride} -column 0 -row 3 -padx 2 -pady [list 0 4] -sticky ew')
A list of widget names may be obtained by using an existing function that returns all the children of a widget.
Note that conversational widgets will not be shown until the conversational panel is opened at least once.
parent = '.' # '.' is the root widget
#parent = '.pane.top.tabs.fmanual' # '.pane.top.tabs.fmanual' is the manual tab
widget_list = get_all_children(parent)
print(f'\nplasmac2 has {len(widget_list)} widgets:\n{sorted(widget_list)}')
There is an example in user_periodic.py of creating a file listing all the available widgets, this requires an example HAL pin created in user_hal.py
The HAL component name for AXIS is axisui which means any pins created in user_hal.py will have axisui. as the first part of the pin name.