| Home | Trees | Index | Help |
|---|
| Package ocempgui :: Package widgets :: Module Bin :: Class Bin |
|
object--+ |INotifyable--+ |BaseObject--+ |object--+ | | |Sprite--+ |BaseWidget--+ | Bin
Alignment,
ButtonBase,
ScrolledWindow,
Window
Bin () -> Bin
A container widget class, which can hold one other widget.
The Bin widget class is an abstract class, which can hold exactly
one other widget. It is usable to serve as a container class, which
can hold various types of widgets and allows inheritors to use their
own look.
The widget to hold can be set or removed using the 'child' attribute
and set_child() method. The child will not be automatically modified
by rebinding any of its attributes.
bin.child = widget
bin.set_child (widget)
The 'padding' attribute and set_padding() method are used to place a
certain amount of pixels between the child widget and the outer
edges of the Bin.
bin.padding = 10
bin.set_padding (10)
Binding the Bin to a new event manager using the 'manager' attribute
or set_event_manager() method will cause the event manager of the
child to be set to the same.
Default action (invoked by activate()):
None
Mnemonic action (invoked by activate_mnemonic()):
None
Attributes:
child - The widget hold by the Bin.
padding - Additional padding between the child and outer edges of
the Bin. Default is 2.
| Method Summary | |
|---|---|
__init__(self)
| |
B.destroy () -> None | |
B.set_child (...) -> None | |
B.set_depth (...) -> None | |
B.set_event_manager (...) -> None | |
B.set_indexable (...) -> None | |
B.set_padding (...) -> None | |
B.set_sensitive (...) -> None | |
B.update (...) -> None | |
| Inherited from BaseWidget | |
W.activate () -> None | |
W.activate_mnemonic (...) -> bool | |
W.check_sizes (...) -> int, int | |
W.create_style () -> WidgetStyle | |
For debugging usage only | |
W.draw () -> None | |
W.draw_bg () -> Surface | |
W.get_style () -> WidgetStyle | |
B.initclass () -> None (Class method) | |
W.lock () -> None | |
W.notify (...) -> None | |
W.rect_to_client (...) -> pygame.Rect | |
W.set_dirty (...) -> None | |
W.set_entered (...) -> None | |
W.set_event_area (...) -> None | |
W.set_focus (...) -> bool | |
W.set_index (...) -> None | |
W.set_maximum_size (...) -> None | |
W.set_minimum_size (...) -> None | |
W.set_opacity (...) -> None | |
W.set_position (...) -> None | |
W.set_size (...) -> None | |
W.set_state (...) -> None | |
W.set_style (...) -> None | |
W.set_tooltip (...) -> None | |
W.unlock () -> None | |
W._get_rect () -> pygame.Rect | |
W._get_rect_attr (...) -> var | |
W._set_rect_attr (...) -> None | |
| Inherited from BaseObject | |
B.connect_signal (...) -> EventCallback | |
B.disconnect_signal (...) -> None | |
B.emit (...) -> bool | |
B.run_signal_handlers (...) -> None | |
| Inherited from Sprite | |
| |
add(group or list of of groups, ...) add a sprite to container | |
| |
alive() -> bool check to see if the sprite is in any groups | |
groups() -> list of groups list used sprite containers | |
kill() remove this sprite from all groups | |
remove(group or list of groups, ...) remove a sprite from container | |
| |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Property Summary | |
|---|---|
child: The widget hold by the Bin. | |
padding: Additional padding between child and borders. | |
| Inherited from BaseWidget | |
bottom | |
bottomleft | |
bottomright | |
center | |
centerx | |
centery | |
controls: Widgets associated with the widget. | |
depth: The z-axis layer depth of the widget. | |
dirty: Indicates, whether the widget need to be redrawn. | |
entered: Indicates, whether the widget is entered. | |
eventarea: The area, which gets the events. | |
focus: The focus of the widget. | |
h | |
height | |
image: The visible surface of the widget. | |
index: The tab index position of the widget. | |
indexable: The IIndexable, the widget is attached to. | |
left | |
locked: Indicates, whether the widget is locked. | |
maxsize: The maximum size to occupy by the widget. | |
midbottom | |
midleft | |
midright | |
midtop | |
minsize: The guaranteed size of the widget. | |
opacity: The opacity of the widget. | |
position: The position of the topleft corner. | |
rect: The area occupied by the widget. | |
right | |
sensitive: The sensitivity of the widget. | |
size | |
state: The current state of the widget. | |
style: The style of the widget. | |
tooltip: The tool tip text to display for the widget. | |
top | |
topleft | |
topright | |
w | |
width | |
x | |
y | |
| Inherited from BaseObject | |
manager: The event manager to use by the object. | |
| Instance Method Details |
|---|
destroy(self)B.destroy () -> None Destroys the Bin and removes it from its event system. |
set_child(self, child=None)B.set_child (...) -> None Sets (or resets) the child of the Bin. Creates a parent-child relationship from the Bin to the child by associating the Bin with the child and vice versa. Raises a TypeError, if the passed argument does not inherit from the BaseWidget class. Raises an Exception, if the passed argument is already attached to another parent. |
set_depth(self, depth)B.set_depth (...) -> None Sets the depth of the Bin. Sets the depth of the Bin and its child to the given value. |
set_event_manager(self, manager)B.set_event_manager (...) -> None Sets the event manager of the Bin. Adds the Bin to an event manager and causes its child to be added to the same, too. |
set_indexable(self, indexable)B.set_indexable (...) -> None Sets the indexable of the Bin. Adds the Bin to an IIndexable implementation and causes its child to be added to the same, too. |
set_padding(self, padding)B.set_padding (...) -> None Sets the padding between the child and edges of the Bin. The padding value is the amount of pixels to place between the edges of the Bin and the contained child. Raises a TypeError, if the passed argument is not a positive integer. |
set_sensitive(self, sensitive=True)B.set_sensitive (...) -> None Sets the sensitivity of the Bin and its child. |
update(self, **kwargs)B.update (...) -> None Updates the Bin and refreshes its image and rect content. Updates the Bin and causes its parent to update itself on demand. |
| Property Details |
|---|
childThe widget hold by the Bin.
|
paddingAdditional padding between child and borders.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Jan 10 10:18:43 2008 | http://epydoc.sf.net |