# Released under the MIT License. See LICENSE for details. # """A dummy stub module for the real _bauiv1. The real _bauiv1 is a compiled extension module and only available in the live engine. This dummy-module allows Pylint/Mypy/etc. to function reasonably well outside of that environment. Make sure this file is never included in dirs seen by the engine! In the future perhaps this can be a stub (.pyi) file, but we will need to make sure that it works with all our tools (mypy, pylint, pycharm). NOTE: This file was autogenerated by batools.dummymodule; do not edit by hand. """ # I'm sorry Pylint. I know this file saddens you. Be strong. # pylint: disable=useless-suppression # pylint: disable=unnecessary-pass # pylint: disable=use-dict-literal # pylint: disable=use-list-literal # pylint: disable=unused-argument # pylint: disable=missing-docstring # pylint: disable=too-many-locals # pylint: disable=redefined-builtin # pylint: disable=too-many-lines # pylint: disable=redefined-outer-name # pylint: disable=invalid-name # pylint: disable=no-value-for-parameter from __future__ import annotations from typing import TYPE_CHECKING, TypeVar from typing_extensions import override if TYPE_CHECKING: from typing import Any, Callable, Literal, Sequence import babase import bauiv1 _T = TypeVar('_T') def _uninferrable() -> Any: """Get an "Any" in mypy and "uninferrable" in Pylint.""" # pylint: disable=undefined-variable return _not_a_real_variable # type: ignore class Mesh: """Category: **User Interface Classes**""" pass class Sound: """Category: **User Interface Classes**""" def play(self) -> None: """Play the sound locally.""" return None def stop(self) -> None: """Stop the sound if it is playing.""" return None class Texture: """Category: **User Interface Classes**""" pass class Widget: """Internal type for low level UI elements; buttons, windows, etc. Category: **User Interface Classes** This class represents a weak reference to a widget object in the internal C++ layer. Currently, functions such as bauiv1.buttonwidget() must be used to instantiate or edit these. """ transitioning_out: bool """Whether this widget is in the process of dying (read only). It can be useful to check this on a window's root widget to prevent multiple window actions from firing simultaneously, potentially leaving the UI in a broken state.""" def __bool__(self) -> bool: """Support for bool evaluation.""" return bool(True) # Slight obfuscation. def activate(self) -> None: """Activates a widget; the same as if it had been clicked.""" return None def add_delete_callback(self, call: Callable) -> None: """Add a call to be run immediately after this widget is destroyed.""" return None def delete(self, ignore_missing: bool = True) -> None: """Delete the Widget. Ignores already-deleted Widgets if ignore_missing is True; otherwise an Exception is thrown. """ return None def exists(self) -> bool: """Returns whether the Widget still exists. Most functionality will fail on a nonexistent widget. Note that you can also use the boolean operator for this same functionality, so a statement such as "if mywidget" will do the right thing both for Widget objects and values of None. """ return bool() def get_children(self) -> list[bauiv1.Widget]: """Returns any child Widgets of this Widget.""" import bauiv1 return [bauiv1.Widget()] def get_screen_space_center(self) -> tuple[float, float]: """Returns the coords of the bauiv1.Widget center relative to the center of the screen. This can be useful for placing pop-up windows and other special cases. """ return (0.0, 0.0) def get_selected_child(self) -> bauiv1.Widget | None: """Returns the selected child Widget or None if nothing is selected.""" import bauiv1 return bauiv1.Widget() def get_widget_type(self) -> str: """Return the internal type of the Widget as a string. Note that this is different from the Python bauiv1.Widget type, which is the same for all widgets. """ return str() def back_press() -> None: """(internal)""" return None def buttonwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, on_activate_call: Callable | None = None, label: str | bauiv1.Lstr | None = None, color: Sequence[float] | None = None, down_widget: bauiv1.Widget | None = None, up_widget: bauiv1.Widget | None = None, left_widget: bauiv1.Widget | None = None, right_widget: bauiv1.Widget | None = None, texture: bauiv1.Texture | None = None, text_scale: float | None = None, textcolor: Sequence[float] | None = None, enable_sound: bool | None = None, mesh_transparent: bauiv1.Mesh | None = None, mesh_opaque: bauiv1.Mesh | None = None, repeat: bool | None = None, scale: float | None = None, transition_delay: float | None = None, on_select_call: Callable | None = None, button_type: str | None = None, extra_touch_border_scale: float | None = None, selectable: bool | None = None, show_buffer_top: float | None = None, icon: bauiv1.Texture | None = None, iconscale: float | None = None, icon_tint: float | None = None, icon_color: Sequence[float] | None = None, autoselect: bool | None = None, mask_texture: bauiv1.Texture | None = None, tint_texture: bauiv1.Texture | None = None, tint_color: Sequence[float] | None = None, tint2_color: Sequence[float] | None = None, text_flatness: float | None = None, text_res_scale: float | None = None, enabled: bool | None = None, ) -> bauiv1.Widget: """Create or edit a button widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def checkboxwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, text: str | bauiv1.Lstr | None = None, value: bool | None = None, on_value_change_call: Callable[[bool], None] | None = None, on_select_call: Callable[[], None] | None = None, text_scale: float | None = None, textcolor: Sequence[float] | None = None, scale: float | None = None, is_radio_button: bool | None = None, maxwidth: float | None = None, autoselect: bool | None = None, color: Sequence[float] | None = None, ) -> bauiv1.Widget: """Create or edit a check-box widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def columnwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, background: bool | None = None, selected_child: bauiv1.Widget | None = None, visible_child: bauiv1.Widget | None = None, single_depth: bool | None = None, print_list_exit_instructions: bool | None = None, left_border: float | None = None, top_border: float | None = None, bottom_border: float | None = None, selection_loops_to_parent: bool | None = None, border: float | None = None, margin: float | None = None, claims_left_right: bool | None = None, claims_tab: bool | None = None, ) -> bauiv1.Widget: """Create or edit a column widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def containerwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, background: bool | None = None, selected_child: bauiv1.Widget | None = None, transition: str | None = None, cancel_button: bauiv1.Widget | None = None, start_button: bauiv1.Widget | None = None, root_selectable: bool | None = None, on_activate_call: Callable[[], None] | None = None, claims_left_right: bool | None = None, claims_tab: bool | None = None, selection_loops: bool | None = None, selection_loops_to_parent: bool | None = None, scale: float | None = None, on_outside_click_call: Callable[[], None] | None = None, single_depth: bool | None = None, visible_child: bauiv1.Widget | None = None, stack_offset: Sequence[float] | None = None, color: Sequence[float] | None = None, on_cancel_call: Callable[[], None] | None = None, print_list_exit_instructions: bool | None = None, click_activate: bool | None = None, always_highlight: bool | None = None, selectable: bool | None = None, scale_origin_stack_offset: Sequence[float] | None = None, toolbar_visibility: str | None = None, on_select_call: Callable[[], None] | None = None, claim_outside_clicks: bool | None = None, claims_up_down: bool | None = None, ) -> bauiv1.Widget: """Create or edit a container widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def get_qrcode_texture(url: str) -> bauiv1.Texture: """Return a QR code texture. The provided url must be 64 bytes or less. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Texture() def get_special_widget(name: str) -> bauiv1.Widget: """(internal)""" import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def getmesh(name: str) -> bauiv1.Mesh: """Load a mesh for use solely in the local user interface.""" import bauiv1 # pylint: disable=cyclic-import return bauiv1.Mesh() def getsound(name: str) -> bauiv1.Sound: """Load a sound for use in the ui.""" import bauiv1 # pylint: disable=cyclic-import return bauiv1.Sound() def gettexture(name: str) -> bauiv1.Texture: """Load a texture for use in the ui.""" import bauiv1 # pylint: disable=cyclic-import return bauiv1.Texture() def hscrollwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, background: bool | None = None, selected_child: bauiv1.Widget | None = None, capture_arrows: bool | None = None, on_select_call: Callable[[], None] | None = None, center_small_content: bool | None = None, color: Sequence[float] | None = None, highlight: bool | None = None, border_opacity: float | None = None, simple_culling_h: float | None = None, claims_left_right: bool | None = None, claims_up_down: bool | None = None, claims_tab: bool | None = None, ) -> bauiv1.Widget: """Create or edit a horizontal scroll widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def imagewidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, color: Sequence[float] | None = None, texture: bauiv1.Texture | None = None, opacity: float | None = None, mesh_transparent: bauiv1.Mesh | None = None, mesh_opaque: bauiv1.Mesh | None = None, has_alpha_channel: bool = True, tint_texture: bauiv1.Texture | None = None, tint_color: Sequence[float] | None = None, transition_delay: float | None = None, draw_controller: bauiv1.Widget | None = None, tint2_color: Sequence[float] | None = None, tilt_scale: float | None = None, mask_texture: bauiv1.Texture | None = None, radial_amount: float | None = None, ) -> bauiv1.Widget: """Create or edit an image widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def is_available() -> bool: """(internal)""" return bool() def is_party_icon_visible() -> bool: """(internal)""" return bool() def open_url(address: str, force_internal: bool = False) -> None: """Open a provided URL. Category: **General Utility Functions** Open the provided url in a web-browser, or display the URL string in a window if that isn't possible (or if force_internal is True). """ return None def rowwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, background: bool | None = None, selected_child: bauiv1.Widget | None = None, visible_child: bauiv1.Widget | None = None, claims_left_right: bool | None = None, claims_tab: bool | None = None, selection_loops_to_parent: bool | None = None, ) -> bauiv1.Widget: """Create or edit a row widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def scrollwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, background: bool | None = None, selected_child: bauiv1.Widget | None = None, capture_arrows: bool = False, on_select_call: Callable | None = None, center_small_content: bool | None = None, color: Sequence[float] | None = None, highlight: bool | None = None, border_opacity: float | None = None, simple_culling_v: float | None = None, selection_loops_to_parent: bool | None = None, claims_left_right: bool | None = None, claims_up_down: bool | None = None, claims_tab: bool | None = None, autoselect: bool | None = None, ) -> bauiv1.Widget: """Create or edit a scroll widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def set_party_icon_always_visible(value: bool) -> None: """(internal)""" return None def set_party_window_open(value: bool) -> None: """(internal)""" return None def textwidget( edit: bauiv1.Widget | None = None, parent: bauiv1.Widget | None = None, size: Sequence[float] | None = None, position: Sequence[float] | None = None, text: str | bauiv1.Lstr | None = None, v_align: str | None = None, h_align: str | None = None, editable: bool | None = None, padding: float | None = None, on_return_press_call: Callable[[], None] | None = None, on_activate_call: Callable[[], None] | None = None, selectable: bool | None = None, query: bauiv1.Widget | None = None, max_chars: int | None = None, color: Sequence[float] | None = None, click_activate: bool | None = None, on_select_call: Callable[[], None] | None = None, always_highlight: bool | None = None, draw_controller: bauiv1.Widget | None = None, scale: float | None = None, corner_scale: float | None = None, description: str | bauiv1.Lstr | None = None, transition_delay: float | None = None, maxwidth: float | None = None, max_height: float | None = None, flatness: float | None = None, shadow: float | None = None, autoselect: bool | None = None, rotate: float | None = None, enabled: bool | None = None, force_internal_editing: bool | None = None, always_show_carat: bool | None = None, big: bool | None = None, extra_touch_border_scale: float | None = None, res_scale: float | None = None, query_max_chars: bauiv1.Widget | None = None, query_description: bauiv1.Widget | None = None, adapter_finished: bool | None = None, glow_type: str | None = None, ) -> bauiv1.Widget: """Create or edit a text widget. Category: **User Interface Functions** Pass a valid existing bauiv1.Widget as 'edit' to modify it; otherwise a new one is created and returned. Arguments that are not set to None are applied to the Widget. """ import bauiv1 # pylint: disable=cyclic-import return bauiv1.Widget() def toolbar_test() -> bool: """(internal)""" return bool() def uibounds() -> tuple[float, float, float, float]: """(internal) Returns a tuple of 4 values: (x-min, x-max, y-min, y-max) representing the range of values that can be plugged into a root level bauiv1.ContainerWidget's stack_offset value while guaranteeing that its center remains onscreen. """ return (0.0, 0.0, 0.0, 0.0) def widget( edit: bauiv1.Widget | None = None, up_widget: bauiv1.Widget | None = None, down_widget: bauiv1.Widget | None = None, left_widget: bauiv1.Widget | None = None, right_widget: bauiv1.Widget | None = None, show_buffer_top: float | None = None, show_buffer_bottom: float | None = None, show_buffer_left: float | None = None, show_buffer_right: float | None = None, autoselect: bool | None = None, ) -> None: """Edit common attributes of any widget. Category: **User Interface Functions** Unlike other UI calls, this can only be used to edit, not to create. """ return None