pyrcf.components.callback_handlers.tkinter_gui_callbacks
Classes
Abstraction for all GUICallbacks defined using Tkinter widgets. |
|
Create a slider in pybullet and specify the callback to apply the slider value to. |
|
Create multiple sliders and use values from all the sliders in a single callback. |
|
Create a button in Tk and specify the callback to call when button is pressed. |
Module Contents
- class pyrcf.components.callback_handlers.tkinter_gui_callbacks.TkGUICallback
Bases:
pyrcf.components.callback_handlers.base_callbacks.CustomCallbackBaseAbstraction for all GUICallbacks defined using Tkinter widgets.
- class pyrcf.components.callback_handlers.tkinter_gui_callbacks.TkGUISliderCallback(slider_name: str, slider_lower_lim: float, slider_upper_lim: float, slider_default_val: float, callback: Callable[[float], None], tk_master: pyrcf.utils.gui_utils.tkinter_gui_utils.TkinterWidgetMaster = None, mapping_function: Callable[[float], float] = lambda x: ..., slider_resolution: float = 0.1)
Bases:
TkGUICallbackCreate a slider in pybullet and specify the callback to apply the slider value to.
- _slider
- _callback
- run_once() None
This method has to be called for the callback to be executed.
- remove_gui_object()
- class pyrcf.components.callback_handlers.tkinter_gui_callbacks.TkMultiGUISliderSingleCallback(slider_names: List[str], slider_lower_lims: List[float], slider_upper_lims: List[float], slider_default_vals: List[float], callback: Callable[[List[float]], None], tk_master: pyrcf.utils.gui_utils.tkinter_gui_utils.TkinterWidgetMaster = None, mapping_functions: Callable[[float], float] | List[Callable[[float], float]] = lambda x: ..., slider_resolutions: List[float] | float = 0.1)
Bases:
TkGUICallbackCreate multiple sliders and use values from all the sliders in a single callback.
- _sliders: List[pyrcf.utils.gui_utils.tkinter_gui_utils.TkinterGUISlider] = []
- _callback
- run_once()
This method has to be called for the callback to be executed.
- remove_gui_object()
- get_sliders() List[pyrcf.utils.gui_utils.tkinter_gui_utils.TkinterGUISlider]
- class pyrcf.components.callback_handlers.tkinter_gui_callbacks.TkGUIButtonCallback(button_name: str, callback: Callable[[], None], tk_master: pyrcf.utils.gui_utils.tkinter_gui_utils.TkinterWidgetMaster = None)
Bases:
TkGUICallbackCreate a button in Tk and specify the callback to call when button is pressed.
- _button
- _callback
- run_once()
This method has to be called for checking button press and for the callback to be executed.
- remove_gui_object()