Welcome | Get started | Dive | Contribute | Topics | Reference | Changes | More
lino.core.layouts¶
Functions
|
Classes
|
A Layout description for an action parameter panel. |
|
Base class for all Layouts ( |
|
A layout for describing the columns of a table. |
|
|
A layout panel that does not exist in the current configuration but might exist as a real panel in some other configuration. |
|
|
|
|
Base class for layout descriptions of detail and insert windows. |
|
|
|
A Layout description for a table parameter panel. |
Exceptions
|
- class lino.core.layouts.DummyPanel¶
Bases:
objectA layout panel that does not exist in the current configuration but might exist as a real panel in some other configuration.
- class lino.core.layouts.BaseLayout(main=None, datasource=None, hidden_elements=None, **kw)¶
Bases:
objectBase class for all Layouts (
FormLayout,ColumnsLayoutandParamsLayout).A Layout instance just holds the string templates. It is designed to be subclassed by applications programmers.
In some cases we still use the (deprecated) methods
set_detail_layout,set_insert_layout,add_detail_panelandadd_detail_tabon theActor.- window_size: None | tuple[int, str] = None¶
A tuple (width, height) that specifies the size of the window to be used for this layout.
For example, specifying window_size=(50, 30) means “50 characters wide and 30 lines high”. The height value can also be the string
'auto'.
- main = None¶
The description of the main element of this layout.
For a
ColumnsLayoutthis is the same ascolumn_names.
- remove_element(*args)¶
Removes specified element names from this layout’s main template.
- update(**kw)¶
Update the template of one or more panels.
- add_panel(name, tpl, label=None, **options)¶
Adds a new panel to this layout.
Arguments:
name is the internal name of the panel
tpl the template string
label an optional label
any further keyword are passed as options to the new panel
- add_tabpanel(name, tpl=None, label=None, **options)¶
Add a tab panel to an existing layout. Arguments: see
BaseLayout.add_panel(). The difference withBaseLayout.add_panel()is that this potentially turns the existing main panel to a tabbed panel.Arguments:
name is the internal name of the panel
tpl the template string
label an optional label
- class lino.core.layouts.FormLayout(main=None, datasource=None, hidden_elements=None, **kw)¶
Bases:
FieldLayoutBase class for layout descriptions of detail and insert windows.
Lino instantiates this for every
detail_layoutand for everyinsert_layout.
- class lino.core.layouts.ColumnsLayout(main=None, datasource=None, hidden_elements=None, **kw)¶
Bases:
FieldLayoutA layout for describing the columns of a table.
Lino automatically creates one instance of this for every table using the string specified in that table’s
column_namesattribute.
- class lino.core.layouts.ParamsLayout(main=None, datasource=None, hidden_elements=None, **kw)¶
Bases:
BaseLayoutA Layout description for a table parameter panel.
Lino instantiates this for every actor with
parameters, based on that actor’sparams_layout.
- class lino.core.layouts.ActionParamsLayout(main=None, datasource=None, hidden_elements=None, **kw)¶
Bases:
ParamsLayoutA Layout description for an action parameter panel.
Lino instantiates this for every
params_layoutof a custom action.A subclass of
ParamsLayout.