Part of elisa.plugins.pigment.widgets.list View In Hierarchy
Known subclasses: elisa.plugins.pigment.widgets.list_carrousel.ListCarrousel, elisa.plugins.pigment.widgets.list_horizontal.ListHorizontal, elisa.plugins.pigment.widgets.list_vertical.ListVertical, elisa.plugins.poblesec.base.coverflow.CoverflowList, elisa.plugins.poblesec.player_slideshow.ListFading
Abstract list widget. It displays data stored in the L{model} list. Items
of L{model} are rendered into widgets instances of the widget class passed
to the constructor using the specified L{renderer} function.
Usage example for a list of strings rendered in Text drawables:
l = List(Text)
def renderer(item, widget):
widget.label = str(item)
widget.bg_a = 0
model = range(100)
l.set_renderer(renderer)
l.set_model(model)
Emit the signals:
- item-clicked: when an item of the list is clicked
- selected-item-changed: when the selected item in the list changes
@ivar selected_item_index: index of the currently selected item in the
L{model}
@type selected_item_index: int
@ivar visible_range_size: number of rendered items
@type visible_range_size: float
@ivar model: list of data items that is rendered by the
list widget
@type model: list
@ivar drag_motion_resolution: minimum time between 2 drag events in milliseconds
@type drag_motion_resolution: int
@ivar drag_threshold: amount of movement needed to activate dragging
in canvas coordinates
@type drag_threshold: float
@ivar animated: True if the list is animated, False otherwise
@type animated: bool
@ivar preloaded: number of items that are prerendered before
they become visible
@type preloaded: int
@ivar focus_on_click: whether the button will grab focus when clicked
@type focus_on_click: boolean
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 91 | Method | __init__ | |
| 139 | Method | set_model | Set the list of items that are rendered by the list widget. Further |
| 163 | Method | set_renderer | Function used by the list widget to render an item of the model. It |
| 177 | Method | set_selector | Undocumented |
| 311 | Method | visible_range_start__get | Undocumented |
| 314 | Method | visible_range_start__set | Undocumented |
| 333 | Method | visible_range_size__get | Undocumented |
| 336 | Method | visible_range_size__set | Undocumented |
| 372 | Method | selected_item_index__get | Undocumented |
| 375 | Method | selected_item_index__set | Undocumented |
| 485 | Method | compute_height | Undocumented |
| 488 | Method | compute_width | Undocumented |
| 491 | Method | compute_x | Undocumented |
| 494 | Method | compute_y | Undocumented |
| 497 | Method | compute_z | Undocumented |
| 500 | Method | compute_opacity | Undocumented |
| 536 | Method | visible__set | Undocumented |
| 545 | Method | do_focus | Undocumented |
| 548 | Method | do_released | Undocumented |
| 553 | Method | do_scrolled | Undocumented |
| 562 | Method | do_drag_begin | Undocumented |
| 577 | Method | do_drag_end | Undocumented |
| 588 | Method | do_item_clicked | Undocumented |
| 594 | Method | do_selected_item_changed | Undocumented |
| 675 | Method | clean | Undocumented |
| 204 | Method | _connect_widget | Undocumented |
| 209 | Method | _connect_widget_signal_to_own_with_model | |
| 221 | Method | _emit_item_clicked | Undocumented |
| 229 | Method | _on_items_changed | Undocumented |
| 235 | Method | _on_items_deleted | Undocumented |
| 248 | Method | _on_items_inserted | Undocumented |
| 274 | Method | _on_items_reordered | Undocumented |
| 277 | Method | _move_widgets_from_beginning_to_end | Undocumented |
| 282 | Method | _move_widgets_from_end_to_beginning | Undocumented |
| 287 | Method | _item_index_from_widget_index | Undocumented |
| 291 | Method | _widget_index_from_item_index | Undocumented |
| 295 | Method | _render_widgets | Undocumented |
| 308 | Method | _render_all | Undocumented |
| 358 | Method | _create_widgets | Undocumented |
| 408 | Method | _selected_to_range_start | Undocumented |
| 418 | Method | _range_start_to_selected | Undocumented |
| 425 | Method | _layout_widget | Undocumented |
| 428 | Method | _prepare_all_widgets | Undocumented |
| 432 | Method | _prepare_widget | Undocumented |
| 435 | Method | _prepare_selector | Undocumented |
| 438 | Method | _layout_all_widgets | Undocumented |
| 450 | Method | _layout_selector | Undocumented |
| 465 | Method | _set_selector_opacity | Undocumented |
| 474 | Method | _set_selector_visibility | Undocumented |
| 601 | Method | _decelerate | Undocumented |
| 628 | Method | _stop_deceleration | Undocumented |
| 635 | Class Method | _demo_widget | Meant to be overidden by inheriting widgets for widget creation and |
Inherited from Widget:
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 135 | Method | state__get | The present state of the widget |
| 139 | Method | state__set | Set the state of the widget and emit the "state-changed" signal if |
| 156 | Method | do_state_changed | Default 'state-changed' handler |
| 163 | Method | style__get | The present style |
| 167 | Method | style__set | Set the present style, after binding it to the widget and subscribing |
| 187 | Method | do_style_set | Default 'style-set' signal handler |
| 209 | Method | get_parent | Get the parent, if exists. |
| 217 | Method | get_children | Get the list of direct children. |
| 225 | Method | get_root | Get the root of the widget's tree hierarchy |
| 236 | Method | get_descendants | Get the list of nodes in the subtree |
| 250 | Method | focus__get | Whether the widget has focus |
| 254 | Method | focus__set | Set or unset the focus on the widget and emit the 'focus' signal. |
| 282 | Method | focus_child__get | Get the child with focus |
| 290 | Method | do_key_press_event | Default 'key-press-event' signal handler. |
| 353 | Class Method | demo | Create a demo widget, put it on a canvas and show it in a viewport. |
| 92 | Method | _init_styles | Undocumented |
| 183 | Method | _style_property_changed | Undocumented |
| 192 | Method | _update_style_properties | Update the widget's appearence basing on the properties set. |
| 302 | Method | _do_real_key_press_event | Undocumented |
| 306 | Class Method | _demo_create_viewport | Undocumented |
| 313 | Class Method | _on_demo_delete | Undocumented |
| 332 | Class Method | _set_demo_widget_defaults | Undocumented |
Inherited from Group (via Widget):
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 82 | Method | canvas__set | Undocumented |
| 102 | Method | canvas__get | Undocumented |
| 107 | Method | layer__set | Undocumented |
| 120 | Method | layer__get | Undocumented |
| 128 | Method | add | Undocumented |
| 162 | Method | remove | Undocumented |
| 176 | Method | empty | Undocumented |
| 186 | Method | __len__ | Undocumented |
| 189 | Method | __iter__ | Undocumented |
| 192 | Method | update_absolute_x | Undocumented |
| 199 | Method | update_absolute_y | Undocumented |
| 206 | Method | update_absolute_z | Undocumented |
| 213 | Method | update_absolute_position | Undocumented |
| 220 | Method | update_absolute_width | Undocumented |
| 229 | Method | update_absolute_height | Undocumented |
| 238 | Method | update_absolute_size | Undocumented |
| 247 | Method | update_absolute_visible | Undocumented |
| 252 | Method | update_absolute_opacity | Undocumented |
| 258 | Method | regenerate | Undocumented |
| 262 | Method | absolute_width__get | Undocumented |
| 265 | Method | absolute_width__set | Undocumented |
| 270 | Method | absolute_height__get | Undocumented |
| 273 | Method | absolute_height__set | Undocumented |
| 278 | Method | absolute_x__get | Undocumented |
| 281 | Method | absolute_x__set | Undocumented |
| 287 | Method | absolute_y__get | Undocumented |
| 290 | Method | absolute_y__set | Undocumented |
| 296 | Method | absolute_z__get | Undocumented |
| 299 | Method | absolute_z__set | Undocumented |
| 150 | Method | _proxy_child_signal_scrolled | Undocumented |
| 154 | Method | _proxy_child_signal | Undocumented |
| 158 | Method | _proxy_child_signal_with_pressure | Undocumented |
Inherited from Node (via Widget, Group):
| Line # | Kind | Name | Docs |
|---|---|---|---|
| 37 | Method | parent__set | Undocumented |
| 57 | Method | parent__get | Undocumented |
| 62 | Method | x__get | Undocumented |
| 68 | Method | x__set | Undocumented |
| 84 | Method | y__get | Undocumented |
| 90 | Method | y__set | Undocumented |
| 107 | Method | z__get | Undocumented |
| 113 | Method | z__set | Undocumented |
| 130 | Method | position__get | Undocumented |
| 136 | Method | position__set | Undocumented |
| 160 | Method | width__get | Undocumented |
| 166 | Method | width__set | Undocumented |
| 184 | Method | height__get | Undocumented |
| 190 | Method | height__set | Undocumented |
| 210 | Method | size__get | Undocumented |
| 216 | Method | size__set | Undocumented |
| 236 | Method | visible__get | Undocumented |
| 260 | Method | opacity__get | Undocumented |
| 266 | Method | opacity__set | Undocumented |
| Parameters | widget_class | widget type used to render the items of the model
(type: type inheriting from elisa.plugins.pigment.widgets.widget.Widget
) |
| visible_range_size | DOCME (type: int ) |
| Parameters | model | list of items that should be rendered by the list widget (type: list ) |
| Parameters | renderer | function called to render an item of the model to the widget used for rendering (type: callable ) |
| Parameters | widget | the widget to connect to (type: elisa.plugins.pigment.widgets.widget.Widget ) |
| widget_signal | the name of the signal of the widget (type: str ) | |
| local_signal | the name of the signal of the list (type: str ) |
| Returns | elisa.plugins.pigment.widgets.Widget
| |