Class e.p.p.w.b.Box(Widget):

Part of elisa.plugins.pigment.widgets.box View In Hierarchy

Known subclasses: elisa.plugins.pigment.widgets.box.HBox, elisa.plugins.pigment.widgets.box.VBox

Box is an abstract widget that defines a specific kind of container that layouts a variable number of widgets into a rectangular area. The former is organized into either a single row or a single column of child widgets depending upon whether the box is of type HBox or VBox, respectively.

Use repeated calls to gtk_box_pack_start to pack widgets from start to end. Use gtk_box_pack_end to add widgets from end to start.

Instance Variablesspacingamount of space between children (type: int )
alignmentdefines where the children are positioned in the rectangular area of the box (type: ALIGNMENT )
Line # Kind Name Docs
72 Method __init__ Set the default styles for the widget. Subclasses should override and
89 Method create_widgets Override this method in subclasses to create subwidgets.
99 Method update_style_properties Update the widget's appearence basing on the properties set.
139 Method clean Undocumented
146 Method pack_start Add widget to the box packed after any other widget packed using
163 Method pack_end Add widget to the box packed after any other widget packed using
180 Method remove Undocumented
195 Method pop Undocumented
218 Method __len__ Undocumented
221 Method __contains__ Undocumented
251 Method spacing__get Undocumented
254 Method spacing__set Undocumented
260 Method alignment__get Undocumented
263 Method alignment__set Undocumented
113 Method _queue_layout Undocumented
123 Method _child_resized_callback Undocumented
126 Method _child_changed_callback Undocumented
135 Method _disconnect_child Undocumented
209 Method _remove_packed_child Undocumented
232 Method _insert_new_child Undocumented
238 Method _connect_to_child_signals Undocumented
269 Method _layout Undocumented
273 Method _prelayout_children Compute the size of children packed with expand set to True and the
324 Class Method _demo_widget Meant to be overidden by inheriting widgets for widget creation and

Inherited from Widget:

Line # Kind Name Docs
185 Method set_name Set the name of the widget and potentially update its style if name
196 Method state__get The present state of the widget
200 Method state__set Set the state of the widget and emit the "state-changed" signal if
217 Method do_state_changed Default 'state-changed' signal handler
222 Method style__get The present style
226 Method style__set Set the present style, after binding it to the widget and subscribing
252 Method do_style_set Default 'style-set' signal handler
383 Method get_parent Get the parent, if exists.
391 Method get_children Get the list of direct children.
399 Method get_root Get the root of the widget's tree hierarchy
410 Method get_descendants Get the list of nodes in the subtree
447 Method focus__get Whether the widget has focus
451 Method focus__set Set the focus state on the widget emitting the 'focus' signal on the
488 Method focus_child__get Get the child with focus
494 Method do_key_press_event Default 'key-press-event' signal handler.
562 Class Method demo Create a demo widget, put it on a canvas and show it in a viewport.
98 Class Method _init_class_styles Undocumented
130 Method _init_styles Undocumented
145 Method _merge_style_from_widget_name Merge styles specific to the instance's name if not None
171 Method _get_style_for_state Return a style corresponding to a given state.
248 Method _style_property_changed Undocumented
257 Method _parse_style_key Parse a style property key into a couple (widget, attribute name).
307 Method _parse_style_value Parse a style property value.
424 Method _set_focused Set or unset the focused widget and update the focused child property of
506 Method _do_real_key_press_event Undocumented
516 Class Method _demo_create_viewport Undocumented
522 Class Method _on_demo_delete Undocumented
541 Class Method _set_demo_widget_defaults Undocumented

Inherited from Group (via Widget):

Line # Kind Name Docs
85 Method canvas__set Undocumented
105 Method canvas__get Undocumented
110 Method layer__set Undocumented
123 Method layer__get Undocumented
131 Method add Undocumented
192 Method empty Undocumented
205 Method __iter__ Undocumented
208 Method update_absolute_x Undocumented
215 Method update_absolute_y Undocumented
222 Method update_absolute_z Undocumented
229 Method update_absolute_position Undocumented
236 Method update_absolute_width Undocumented
245 Method update_absolute_height Undocumented
254 Method update_absolute_size Undocumented
263 Method update_absolute_visible Undocumented
268 Method update_absolute_opacity Undocumented
274 Method regenerate Undocumented
161 Method _proxy_child_signal_scrolled Undocumented
165 Method _proxy_child_signal Undocumented
169 Method _proxy_child_signal_with_pressure Undocumented

Inherited from Node (via Widget, Group):

Line # Kind Name Docs
40 Method absolute_width__get Undocumented
43 Method absolute_width__set Undocumented
48 Method absolute_height__get Undocumented
51 Method absolute_height__set Undocumented
56 Method absolute_x__get Undocumented
59 Method absolute_x__set Undocumented
65 Method absolute_y__get Undocumented
68 Method absolute_y__set Undocumented
74 Method absolute_z__get Undocumented
77 Method absolute_z__set Undocumented
83 Method parent__set Undocumented
96 Method parent__get Undocumented
101 Method x__get Undocumented
107 Method x__set Undocumented
123 Method y__get Undocumented
129 Method y__set Undocumented
146 Method z__get Undocumented
152 Method z__set Undocumented
169 Method position__get Undocumented
175 Method position__set Undocumented
199 Method width__get Undocumented
205 Method width__set Undocumented
223 Method height__get Undocumented
229 Method height__set Undocumented
249 Method size__get Undocumented
255 Method size__set Undocumented
275 Method visible__get Undocumented
281 Method visible__set Undocumented
302 Method opacity__get Undocumented
308 Method opacity__set Undocumented
336 Method animated__get Undocumented
def __init__(self):
Set the default styles for the widget. Subclasses should override and call "self.update_style_properties(self.style.get_items())" after calling this base class constructor.
def create_widgets(self):
Override this method in subclasses to create subwidgets.
def update_style_properties(self, props=None):
Update the widget's appearence basing on the properties set.

By default all properties that can match a public member of the widget will be applied automatically. If custom style properties not matching real subwidgets/attributes need to be defined, this method should be overridden: the custom properties should be processed first, and then the remaining properties passed to the parent's update_style_properties method.

Parameterspropsthe properties that have to be updated (type: dictionary of strings ==> anything )
def _queue_layout(self):
Undocumented
def _child_resized_callback(self, notifier, width, height):
Undocumented
def _child_changed_callback(self, notifier, property):
Undocumented
def _disconnect_child(self, child):
Undocumented
def clean(self):
Undocumented
def pack_start(self, widget, expand=False):
Add widget to the box packed after any other widget packed using pack_start. Visually widget will be positioned after any other widget packed that way.
Parameterswidgetwidget to pack in the box (type: elisa.plugins.pigment.widgets.widget.Widget )
expandTrue if widget is to be given extra space allocated to box. The extra space will be divided evenly between all widgets of box that use this option. (type: bool )
def pack_end(self, widget, expand=False):
Add widget to the box packed after any other widget packed using pack_end. Visually widget will be positioned before any other widget packed that way.
Parameterswidgetwidget to pack in the box (type: elisa.plugins.pigment.widgets.widget.Widget )
expandTrue if widget is to be given extra space allocated to box. The extra space will be divided evenly between all widgets of box that use this option. (type: bool )
def remove(self, widget):
Undocumented
def pop(self):
Undocumented
def _remove_packed_child(self, idx, child_list):
Undocumented
def __len__(self):
Undocumented
def __contains__(self, widget):
Undocumented
def _insert_new_child(self, child):
Undocumented
def _connect_to_child_signals(self, child):
Undocumented
def spacing__get(self):
Undocumented
def spacing__set(self, spacing):
Undocumented
def alignment__get(self):
Undocumented
def alignment__set(self, alignment):
Undocumented
def _layout(self):
Undocumented
def _prelayout_children(self, children, property):
Compute the size of children packed with expand set to True and the coordinate at which the first widget should be positioned depending on the number of children, their expand mode and the box alignment.
Parameterschildrenchildren for which to compute the value (type: list of Child )
propertyone of 'width', 'height' (type: str )
Returns (type: tuple of float )
@classmethod
def _demo_widget(cls, *args, **kwargs):
Meant to be overidden by inheriting widgets for widget creation and setup at demo time.
Returnselisa.plugins.pigment.widgets.Widget
API Documentation for Elisa Media Center, generated by pydoctor at 2009-04-27 17:55:12.