diplomat.wx_gui.helpdialog.HelpDialog

class diplomat.wx_gui.helpdialog.HelpDialog(*args: Any, **kwargs: Any)[source]

Bases: Dialog

A custom wx.Dialog. This dialog can be used to describe UI shortcuts and their related keyboard shortcuts, allowing the user to see how to use a UI.

__init__(parent, entries: List[Tuple[wx.Bitmap | Callable[[wx.Colour, Tuple[int, int]], wx.Bitmap], Tuple[int, int] | None, str]], image_sizes: Tuple[int, int], wid=wx.ID_ANY, title='Help', pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name='helpDialog')[source]

Construct a new help dialog.

Parameters:
  • parent – The parent window.

  • entries – A list of tuples, each tuple containing a wx.Bitmap being the action icon, an optional wx.AcceleratorTable style shortcut (None to disable), and a string description describing the action. These will be parsed and shown to the user in the help dialog as a table.

  • image_sizes – The size of all of the images passed to this method, a tuple of two integers.

  • wid – wx ID of the window, and integer. Defaults to wx.ID_ANY.

  • title – The string title of the help dialog, defaults to “Help”.

  • pos – WX Position of dialog. Defaults to wx.DefaultPosition.

  • size – WX Size of the dialog. Defaults to wx.DefaultSize.

  • style – WX Dialog Style. See wx.Dialog docs for possible options.

  • name – WX internal name of widget.

Methods

__init__(parent, entries, image_sizes[, ...])

Construct a new help dialog.

shortcut_to_string(shortcut)

Meant for internal use: Converts a wx.AcceleratorTable style shortcut to a string for display to the user.

Attributes

MIS_KEYS

MOD_TO_STR

classmethod shortcut_to_string(shortcut: Tuple[int, int] | None)[source]

Meant for internal use: Converts a wx.AcceleratorTable style shortcut to a string for display to the user.