Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
dmui.dsl.MultiContextMenu Class Reference
Inheritance diagram for dmui.dsl.MultiContextMenu:
Collaboration diagram for dmui.dsl.MultiContextMenu:

Public Member Functions

 __init__ (self, str clazz, str cpp_name, list[str] arg_template, Optional[str] title=None, Optional[str] name=None)
 
 with_context (self, str docs)
 
 visit (self, visitor)
 
- Public Member Functions inherited from dmui.dsl.Menu
 __init__ (self, str clazz, str cpp_name, list[str] arg_template, Optional[str] description, Optional[str] name=None, Optional[str] title=None, Optional[str] available_when=None)
 
 template_args (self)
 

Additional Inherited Members

- Public Attributes inherited from dmui.dsl.Menu
 cpp_name = cpp_name
 
 clazz = clazz
 
 title = name
 
 name = title
 
 arg_template = arg_template
 
 description = description
 
 available_when = None
 

Detailed Description

A menu that changes its description based on the context it is
instantiated in.

Using this as a direct child of a Submenu is an error, you should instead
use a :py:class:`MultiContextMenuInstance`.

:param clazz: The C++ class to use for this menu item.
:param cpp_name: The variable name to use when emitting C++ code.
:param arg_template: A list of python format strings which will be used to
    generate the C++ initializer arguments.
:param name: The key in the langauge map for the string to be rendered when
    this menu item is presented for selection in a submenu. If None,
    inherited from ``title``. At least one of ``name`` or ``title`` must be
    provided.
:param title: The key in the language map for the header of this menu item
    when it's opened. If None, inherited from ``name``. At least one of
    ``name`` or ``title`` must be provided.

Member Function Documentation

◆ visit()

dmui.dsl.MultiContextMenu.visit ( self,
visitor )

Reimplemented from dmui.dsl.Menu.

◆ with_context()

dmui.dsl.MultiContextMenu.with_context ( self,
str docs )
Instantiate this menu into a specific context.

:param docs: Path to the docs describing what this menu means in this
    context.

The documentation for this class was generated from the following file: