csc.view.DialogManager¶
- class csc.view.DialogManager¶
DialogManager class
1import csc 2 def run(scene): 3 def callback_button(): 4 def input_callback(input_values): 5 values = ''.join(input_values) 6 csc.view.DialogManager.instance().show_info("Input values", values) 7 8 input_field_count = 5 9 input_field_names = ["f1", "f2", "f3"] 10 input_field_fills = ["v1", "v2", "v3", "v4"] 11 csc.view.DialogManager.instance().show_inputs_dialog("Test1", input_field_names, input_field_fills, 12 input_field_count, input_callback) 13 14 dialog_buttons = [csc.view.DialogButton('ButtonName', callback_button), 15 csc.view.DialogButton(csc.view.StandardButton.Cancel)] 16 17 csc.view.DialogManager.instance().show_buttons_dialog("Test dialog window", "Press anything", dialog_buttons)
- __init__(*args, **kwargs)¶
Methods
__init__(*args, **kwargs)instance()Returns the instance of the dialog manager
show_buttons_dialog(self, arg0, arg1, arg2)Shows a dialog with buttons
show_info(self, arg0, arg1)Shows an info dialog
show_input_dialog(*args, **kwargs)Overloaded function.
show_inputs_dialog(self, arg0, arg1, arg2, ...)Shows an input dialog
show_styled_buttons_dialog(self, arg0, arg1, ...)Shows a dialog with styled buttons
- __annotations__ = {}¶
- __init__(*args, **kwargs)¶
- __module__ = 'csc.view'¶
- static instance() object¶
Returns the instance of the dialog manager
- Returns:
The instance of the dialog manager
- Return type:
- show_buttons_dialog(self: csc.view.DialogManager, arg0: str, arg1: str, arg2: list[csc.view.DialogButton]) None¶
Shows a dialog with buttons
- Parameters:
arg0 (str) – The title of the dialog
arg1 (str) – The text of the dialog
arg2 (List[csc.view.DialogButton]) – The list of buttons to show
- show_info(self: csc.view.DialogManager, arg0: str, arg1: str) None¶
Shows an info dialog
- show_input_dialog(*args, **kwargs)¶
Overloaded function.
show_input_dialog(self: csc.view.DialogManager, arg0: str, arg1: str, arg2: str, arg3: Callable) -> None
Shows an input dialog
- Args:
arg0 (str) : The title of the dialog arg1 (str) : The text of the dialog arg2 (str) : The hint of the dialog arg3 (Callable[List[str]]) : The handler of the dialog
show_input_dialog(self: csc.view.DialogManager, arg0: str, arg1: str, arg2: str, arg3: Callable, arg4: Callable) -> None
Shows an input dialog
- Args:
arg0 (str) : The title of the dialog arg1 (str) : The text of the dialog arg2 (str) : The hint of the dialog arg3 (Callable[List[str]]) : The handler of the dialog arg4 (Callable[List[str]]) : The validator of the dialog
- show_inputs_dialog(self: csc.view.DialogManager, arg0: str, arg1: list[str], arg2: list[str], arg3: int, arg4: Callable) None¶
Shows an input dialog
- show_styled_buttons_dialog(self: csc.view.DialogManager, arg0: str, arg1: str, arg2: list[csc.view.DialogButton]) None¶
Shows a dialog with styled buttons
- Parameters:
arg0 (str) – The title of the dialog
arg1 (str) – The text of the dialog
arg2 (List[csc.view.DialogButton]) – The list of buttons to show