2.1.3.9.1. pyfx.view.json_lib.json_widget.JSONWidget¶
- class JSONWidget(node, expandable, display_key)¶
Base UI model represents a JSON tree node.
- _node¶
the node in the JSON tree that owns this widget.
- Type:
.JSONSimpleNode
- _expandable¶
A flag indicates whether this node is expandable or not.
- Type:
bool
- _display_key¶
A flag indicates whether to display the key from the parent node or not. This is mostly used to distinguish between an object and array structure in JSON.
- Type:
bool
- _inner_widget¶
the actual urwid widget.
- Type:
urwid.Widget
Methods
__init__(node, expandable, display_key)get_indent_cols()get_indented_widget()get_inner_widget()get_node()is_display_key()is_expandable()keypress(size, key)Delegates keypress into inner widget.
load_inner_widget()load_value_markup()Finds the next JSONWidget depth first from this one
Finds the previous JSONWidget depth first from this one
render(size[, focus])Always returns true.
Attributes
INDENT_COLUMNbase_widgetRead-only property that steps through decoration widgets and returns the one at the base.
focusRead-only property returning the child widget in focus for container widgets.
focus_positionProperty for reading and setting the focus position for container widgets.
get_cursor_coordsget_pref_colmouse_eventmove_cursor_to_coordspackrowssizing- keypress(size, key)¶
Delegates keypress into inner widget.
- next_inorder()¶
Finds the next JSONWidget depth first from this one
- prev_inorder()¶
Finds the previous JSONWidget depth first from this one
- selectable()¶
Always returns true.
Every line in pyfx is selectable but only non-leaf nodes are expandable.