Source code for ooodev.utils.partial.gui_partial_t

from __future__ import annotations
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from com.sun.star.frame import XController
    from com.sun.star.frame import XDispatchProviderInterception
    from com.sun.star.frame import XFrame
    from com.sun.star.view import XControlAccess
    from com.sun.star.view import XSelectionSupplier

    from typing_extensions import Protocol
else:
    Protocol = object


[docs]class GuiPartialT(Protocol):
[docs] def get_current_controller(self) -> XController: """ Gets controller from document. Returns: XController: controller. """ ...
[docs] def get_frame(self) -> XFrame: """ Gets frame from doc. Returns: XFrame: document frame. """ ...
[docs] def get_control_access(self) -> XControlAccess: """ Get control access from office document. Returns: XControlAccess: control access. """ ...
[docs] def get_selection_supplier(self) -> XSelectionSupplier: """ Gets selection supplier Returns: XSelectionSupplier: Selection supplier """ ...
[docs] def get_dpi(self) -> XDispatchProviderInterception: """ Gets Dispatch provider interception. Returns: XDispatchProviderInterception: Dispatch provider interception. """ ...
[docs] def activate(self) -> None: """ Activates document window. """ ...
[docs] def maximize(self) -> None: """ Maximizes document window. """ ...
[docs] def minimize(self) -> None: """ Minimizes document window. """ ...
[docs] def add_item_to_toolbar(self, toolbar_name: str, item_name: str, im_fnm: str) -> None: """ Add a user-defined icon and command to the start of the specified toolbar. Args: toolbar_name (str): toolbar name. item_name (str): item name. im_fnm (str): image file path. """ ...
[docs] def show_menu_bar(self) -> None: """ Shows the main menu bar. """ ...
[docs] def hide_menu_bar(self) -> None: """ Hides the main menu bar. """ ...
[docs] def hide_all_menu_bars(self) -> None: """ Make all the toolbars invisible. """ ...
[docs] def toggle_menu_bar(self) -> None: """ Toggles the main menu bar. """ ...