View
- class todays_paper_web.widgets.view.View(params)[source]
Bases:
object- Params
Every widget’s
Paramsis aViewParamssubclass - there is no widget without one, even<column>, which has nothing to add on top ofViewParamsitself. Overridden per subclass; never unset.alias of
ViewParams
- property params: ViewParams
The parsed
Paramsmodel for this widget.
- property innerText
- property source
ViewParams
Every widget’s Params base — see Python API reference for why it lives here rather than in
params.py alongside Color/Number.
- pydantic model todays_paper_web.widgets.view.ViewParams[source]
Bases:
BaseModelBase
Paramsfor every widget - unlikeDataSource’s equivalent, this carries real fields:x/y/align/valign, read off any child by whichever container it’s placed in (box/row/column, see todays_paper_web.widgets.core.layout) to decide where to place it - not owned by the child, its parent interprets it. A few widgets (e.g.line) also happen to read their ownx/yfor unrelated, widget-specific reasons; that’s the same attribute doing double duty, not a coincidence. Every widget’sParamsinherits this, even one with no attributes of its own to add (e.g.<column>’s).The default for each field is
None, not e.g."left"for align: a container decides whether and how to apply its own default when a value wasn’t given, which needs to be able to tell “not given” apart from any real value, including a falsy one likex="0"- so this reports presence faithfully rather than pre-applying any one container’s default.