Represents a single Window
| 9808 | # Window CLASS # |
| 9809 | # ------------------------------------------------------------------------- # |
| 9810 | class Window: |
| 9811 | """ |
| 9812 | Represents a single Window |
| 9813 | """ |
| 9814 | NumOpenWindows = 0 |
| 9815 | _user_defined_icon = None |
| 9816 | hidden_master_root = None # type: tk.Tk |
| 9817 | _animated_popup_dict = {} # type: Dict |
| 9818 | _active_windows = {} # type: Dict[Window, tk.Tk] |
| 9819 | _move_all_windows = False # if one window moved, they will move |
| 9820 | _window_that_exited = None # type: Window |
| 9821 | _root_running_mainloop = None # type: tk.Tk() # (may be the hidden root or a window's root) |
| 9822 | _timeout_key = None |
| 9823 | _TKAfterID = None # timer that is used to run reads with timeouts |
| 9824 | _window_running_mainloop = None # The window that is running the mainloop |
| 9825 | _container_element_counter = 0 # used to get a number of Container Elements (Frame, Column, Tab) |
| 9826 | _read_call_from_debugger = False |
| 9827 | _timeout_0_counter = 0 # when timeout=0 then go through each window one at a time |
| 9828 | _counter_for_ttk_widgets = 0 |
| 9829 | _floating_debug_window_build_needed = False |
| 9830 | _main_debug_window_build_needed = False |
| 9831 | # rereouted stdout info. List of tuples (window, element, previous destination) |
| 9832 | _rerouted_stdout_stack = [] # type: List[Tuple[Window, Element]] |
| 9833 | _rerouted_stderr_stack = [] # type: List[Tuple[Window, Element]] |
| 9834 | _original_stdout = None |
| 9835 | _original_stderr = None |
| 9836 | |
| 9837 | |
| 9838 | def __init__(self, title, layout=None, default_element_size=None, |
| 9839 | default_button_element_size=(None, None), |
| 9840 | auto_size_text=None, auto_size_buttons=None, location=(None, None), relative_location=(None, None), auto_save_location=False, size=(None, None), |
| 9841 | element_padding=None, margins=(None, None), button_color=None, font=None, |
| 9842 | progress_bar_color=(None, None), background_color=None, border_depth=None, auto_close=False, |
| 9843 | auto_close_duration=DEFAULT_AUTOCLOSE_TIME, icon=None, force_toplevel=False, |
| 9844 | alpha_channel=None, return_keyboard_events=False, use_default_focus=True, text_justification=None, |
| 9845 | no_titlebar=False, grab_anywhere=False, grab_anywhere_using_control=True, keep_on_top=None, resizable=False, disable_close=False, |
| 9846 | disable_minimize=False, right_click_menu=None, transparent_color=None, debugger_enabled=False, |
| 9847 | right_click_menu_background_color=None, right_click_menu_text_color=None, right_click_menu_disabled_text_color=None, right_click_menu_selected_colors=(None, None), |
| 9848 | right_click_menu_font=None, right_click_menu_tearoff=False, |
| 9849 | finalize=False, element_justification='left', ttk_theme=None, use_ttk_buttons=None, modal=False, enable_close_attempted_event=False, |
| 9850 | enable_window_config_events=False, repeating_timer_ms=None, |
| 9851 | titlebar_background_color=None, titlebar_text_color=None, titlebar_font=None, titlebar_icon=None, |
| 9852 | use_custom_titlebar=None, scaling=None, |
| 9853 | sbar_trough_color=None, sbar_background_color=None, sbar_arrow_color=None, sbar_width=None, sbar_arrow_width=None, sbar_frame_color=None, sbar_relief=None, watermark=None, print_event_values=None, |
| 9854 | metadata=None): |
| 9855 | """ |
| 9856 | :param title: The title that will be displayed in the Titlebar and on the Taskbar |
| 9857 | :type title: (str) |
| 9858 | :param layout: The layout for the window. Can also be specified in the Layout method |
| 9859 | :type layout: List[List[Element]] | Tuple[Tuple[Element]] |
| 9860 | :param default_element_size: size in characters (wide) and rows (high) for all elements in this window |
| 9861 | :type default_element_size: (int, int) - (width, height) |
| 9862 | :param default_button_element_size: (width, height) size in characters (wide) and rows (high) for all Button elements in this window |
| 9863 | :type default_button_element_size: (int, int) |
| 9864 | :param auto_size_text: True if Elements in Window should be sized to exactly fir the length of text |
| 9865 | :type auto_size_text: (bool) |
| 9866 | :param auto_size_buttons: True if Buttons in this Window should be sized to exactly fit the text on this. |
| 9867 | :type auto_size_buttons: (bool) |
no outgoing calls
no test coverage detected