Skip to content

Latest commit

 

History

History
413 lines (255 loc) · 9.85 KB

pysimplegui_wrapper.md

File metadata and controls

413 lines (255 loc) · 9.85 KB

PySimpleGUIWrapper

Cli2gui Index / Cli2gui / Gui / PySimpleGUIWrapper

Auto-generated documentation for cli2gui.gui.pysimplegui_wrapper module.

PySimpleGUIWrapper

Show source in pysimplegui_wrapper.py:16

Wrapper class for PySimpleGUI.

Signature

class PySimpleGUIWrapper(AbstractGUI):
    def __init__(self, base24Theme: list[str], psg_lib: str) -> None: ...

See also

PySimpleGUIWrapper()._button

Show source in pysimplegui_wrapper.py:109

Return a button.

Signature

def _button(self, text: str) -> Any: ...

PySimpleGUIWrapper()._check

Show source in pysimplegui_wrapper.py:99

Return a checkbox.

Signature

def _check(self, key: str, default: str | None = None) -> Any: ...

PySimpleGUIWrapper()._dropdown

Show source in pysimplegui_wrapper.py:130

Return a dropdown.

Signature

def _dropdown(self, key: str, argItems: list[str]) -> Any: ...

PySimpleGUIWrapper()._fileBrowser

Show source in pysimplegui_wrapper.py:139

Return a fileBrowser button and field.

Signature

def _fileBrowser(
    self,
    key: str,
    default: str | None = None,
    _type: ItemType = ItemType.File,
    additional_properties: dict | None = None,
) -> list[Any]: ...

See also

PySimpleGUIWrapper()._helpArgHelp

Show source in pysimplegui_wrapper.py:188

Return a label for the arg help text.

Signature

def _helpArgHelp(self, helpText: str) -> Any: ...

PySimpleGUIWrapper()._helpArgName

Show source in pysimplegui_wrapper.py:184

Return a label for the arg name.

Signature

def _helpArgName(self, displayName: str, commands: list[str]) -> Any: ...

PySimpleGUIWrapper()._helpArgNameAndHelp

Show source in pysimplegui_wrapper.py:192

Return a column containing the argument name and help text.

Signature

def _helpArgNameAndHelp(
    self, commands: list[str], helpText: str, displayName: str
) -> Any: ...

PySimpleGUIWrapper()._helpCounterWidget

Show source in pysimplegui_wrapper.py:243

Return a set of self that make up an arg with text.

Signature

def _helpCounterWidget(self, item: Item) -> list[Any]: ...

See also

PySimpleGUIWrapper()._helpDropdownWidget

Show source in pysimplegui_wrapper.py:268

Return a set of self that make up an arg with a choice.

Signature

def _helpDropdownWidget(self, item: Item) -> list[Any]: ...

See also

PySimpleGUIWrapper()._helpFileWidget

Show source in pysimplegui_wrapper.py:255

Return a set of self that make up an arg with a file.

Signature

def _helpFileWidget(self, item: Item) -> list[Any]: ...

See also

PySimpleGUIWrapper()._helpFlagWidget

Show source in pysimplegui_wrapper.py:218

Return a set of self that make up an arg with true/ false.

Signature

def _helpFlagWidget(self, item: Item) -> list[Any]: ...

See also

PySimpleGUIWrapper()._helpTextWidget

Show source in pysimplegui_wrapper.py:230

Return a set of self that make up an arg with text.

Signature

def _helpTextWidget(self, item: Item) -> list[Any]: ...

See also

PySimpleGUIWrapper()._inputText

Show source in pysimplegui_wrapper.py:78

Return an input text field.

Signature

def _inputText(self, key: str, default: str | None = None) -> Any: ...

PySimpleGUIWrapper()._label

Show source in pysimplegui_wrapper.py:118

Return a label.

Signature

def _label(self, text: str, font: int = 11) -> Any: ...

PySimpleGUIWrapper()._spin

Show source in pysimplegui_wrapper.py:88

Return an input text field.

Signature

def _spin(self, key: str, default: str | None = None) -> Any: ...

PySimpleGUIWrapper()._title

Show source in pysimplegui_wrapper.py:199

Return a set of self that make up the application header.

Signature

def _title(self, text: str, image: str = "") -> list[Any]: ...

PySimpleGUIWrapper().addItemsAndGroups

Show source in pysimplegui_wrapper.py:371

Items and groups and return a list of psg Elements.

Arguments

  • section Group - section with a name to display and items

Returns

Type: list[list[Element]] updated argConstruct

Signature

def addItemsAndGroups(self, section: Group) -> list[list[Any]]: ...

See also

PySimpleGUIWrapper().addWidgetFromItem

Show source in pysimplegui_wrapper.py:287

Select a widget based on the item type.

Arguments

  • item Item - the item

Signature

def addWidgetFromItem(self, item: Item) -> list[Any]: ...

See also

PySimpleGUIWrapper().createLayout

Show source in pysimplegui_wrapper.py:396

Create the pysimplegui layout from the build spec.

Arguments

  • buildSpec FullBuildSpec - build spec containing widget :param str | list[str] menu: menu definition. containing menu keys

Returns

Type: list[list[Any]] list of self (layout list)

Signature

def createLayout(
    self, buildSpec: FullBuildSpec, menu: str | list[str]
) -> list[list[Any]]: ...

See also

PySimpleGUIWrapper().generatePopup

Show source in pysimplegui_wrapper.py:311

Create the popup window.

Arguments


  • buildSpec FullBuildSpec - [description] values (Union[dict[Any, Any]): Returned when a button is clicked. Such as the menu

Returns


  • Window - A PySimpleGui Window

Signature

def generatePopup(
    self, buildSpec: FullBuildSpec, values: dict[Any, Any] | list[Any]
) -> Any: ...

See also

PySimpleGUIWrapper().getImgData

Show source in pysimplegui_wrapper.py:508

Generate image data using PIL.

Signature

def getImgData(self, imagePath: str, first: bool = False) -> bytes: ...

PySimpleGUIWrapper().main

Show source in pysimplegui_wrapper.py:463

Run the gui (psg) with a given buildSpec, quit_callback, and run_callback.

Arguments

  • buildSpec FullBuildSpec - Full cli parse/ build spec :param Callable[[], None] quit_callback: generic callable used to quit :param Callable[[dict[str, Any]], None] run_callback: generic callable used to run

Signature

def main(
    self,
    buildSpec: FullBuildSpec,
    quit_callback: Callable[[], None],
    run_callback: Callable[[dict[str, Any]], None],
) -> None: ...

See also