Package ocempgui :: Package widgets :: Module Window :: Class Window
[show private | hide private]
[frames | no frames]

Type Window

 object --+                
          |                
INotifyable --+            
              |            
     BaseObject --+        
                  |        
     object --+   |        
              |   |        
         Sprite --+        
                  |        
         BaseWidget --+    
                      |    
                    Bin --+
                          |
                         Window

Known Subclasses:
DialogWindow

Window (title=None) -> Window

A widget class, that implements a window-like behaviour.

The Window class is a container, which provides a window-like look
and feel, can be moved around the screen and supports an additional
caption bar.

The title to display on the Window caption bar can be set using the
'title' attribute or set_title() method.

window.title = 'Window caption'
window.set_title ('Another title')

It is possible to influence the position of the attached child with
the 'align' attribute and set_align() method. Alignments can be
combined bitwise to place the child at any of the eight possible
positions.

However, not every alignment make sense, so a ALIGN_TOP | ALIGN_BOTTOM
would cause the child to be placed at the bottom. The priority
order for the alignment follows. The lower the value, the higher the
priority.

Alignment      Priority
-----------------------
ALIGN_BOTTOM      0
ALIGN_TOP         1
ALIGN_LEFT        0
ALIGN_RIGHT       1
ALIGN_NONE        2

Additionally the Window can be moved around the screen by pressing
and holding the left mouse button on its caption bar and moving the
mouse around.

Default action (invoked by activate()):
None

Mnemonic action (invoked by activate_mnemonic()):
None

Signals:
SIG_MOUSEDOWN - Invoked, when a mouse button is pressed on the
                Window.
SIG_MOUSEUP   - Invoked, when a mouse button is released on the
                Window.
SIG_MOUSEMOVE - Invoked, when the mouse moves over the Window.

Attributes:
title - The caption of the Window.
align - Alignment of the child.

Method Summary
  __init__(self, title)
  destroy(self)
D.destroy () -> None
  dispose_widget(self)
W.dispose_widget (...) -> int, int
  draw(self)
W.draw () -> None
  draw_bg(self)
W.draw_bg () -> Surface
  notify(self, event)
W.notify (event) -> None
  set_align(self, align)
W.set_align (...) -> None
  set_focus(self, focus)
W.set_focus (...) -> None
  set_title(self, text)
W.set_title (...) -> None
    Inherited from Bin
  set_child(self, child)
B.set_child (...) -> None
  set_depth(self, depth)
B.set_depth (...) -> None
  set_event_manager(self, manager)
B.set_event_manager (...) -> None
  set_indexable(self, indexable)
B.set_indexable (...) -> None
  set_padding(self, padding)
B.set_padding (...) -> None
  set_sensitive(self, sensitive)
B.set_sensitive (...) -> None
  update(self, **kwargs)
B.update (...) -> None
    Inherited from BaseWidget
  activate(self)
W.activate () -> None
  activate_mnemonic(self, mnemonic)
W.activate_mnemonic (...) -> bool
  check_sizes(self, width, height)
W.check_sizes (...) -> int, int
  create_style(self)
W.create_style () -> WidgetStyle
  debug_update(self)
For debugging usage only
  get_style(self)
W.get_style () -> WidgetStyle
  initclass(cls)
B.initclass () -> None (Class method)
  lock(self)
W.lock () -> None
  rect_to_client(self, rect)
W.rect_to_client (...) -> pygame.Rect
  set_dirty(self, dirty, update)
W.set_dirty (...) -> None
  set_entered(self, entered)
W.set_entered (...) -> None
  set_event_area(self, area)
W.set_event_area (...) -> None
  set_index(self, index)
W.set_index (...) -> None
  set_maximum_size(self, width, height)
W.set_maximum_size (...) -> None
  set_minimum_size(self, width, height)
W.set_minimum_size (...) -> None
  set_opacity(self, opacity)
W.set_opacity (...) -> None
  set_position(self, x, y)
W.set_position (...) -> None
  set_size(self, width, height)
W.set_size (...) -> None
  set_state(self, state)
W.set_state (...) -> None
  set_style(self, style)
W.set_style (...) -> None
  set_tooltip(self, tooltip)
W.set_tooltip (...) -> None
  unlock(self)
W.unlock () -> None
    Inherited from BaseObject
  connect_signal(self, signal, callback, *data)
B.connect_signal (...) -> EventCallback
  disconnect_signal(self, event)
B.disconnect_signal (...) -> None
  emit(self, signal, data)
B.emit (...) -> bool
  run_signal_handlers(self, signal, *data)
B.run_signal_handlers (...) -> None
    Inherited from Sprite
  __repr__(self)
  add(self, *groups)
add(group or list of of groups, ...) add a sprite to container
  add_internal(self, group)
  alive(self)
alive() -> bool check to see if the sprite is in any groups
  groups(self)
groups() -> list of groups list used sprite containers
  kill(self)
kill() remove this sprite from all groups
  remove(self, *groups)
remove(group or list of groups, ...) remove a sprite from container
  remove_internal(self, group)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Property Summary
  align: The alignment of the child.
  title: The title caption of the Window.
    Inherited from Bin
  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)

D.destroy () -> None

Destroys the Window and removes it from its event system.
Overrides:
ocempgui.widgets.Bin.Bin.destroy

dispose_widget(self)

W.dispose_widget (...) -> int, int

Moves the child of the Window to its correct position.

draw(self)

W.draw () -> None

Draws the Window.
Overrides:
ocempgui.widgets.BaseWidget.BaseWidget.draw

draw_bg(self)

W.draw_bg () -> Surface

Draws the background surface of the Window and returns it.
Overrides:
ocempgui.widgets.BaseWidget.BaseWidget.draw_bg

notify(self, event)

W.notify (event) -> None

Notifies the window about an event.
Overrides:
ocempgui.widgets.BaseWidget.BaseWidget.notify

set_align(self, align)

W.set_align (...) -> None

Sets the alignment for the child of the Window.

set_focus(self, focus=True)

W.set_focus (...) -> None

Sets the input and action focus of the window.

Sets the input and action focus of the window and returns True upon success or False, if the focus could not be set.
Overrides:
ocempgui.widgets.BaseWidget.BaseWidget.set_focus

set_title(self, text=None)

W.set_title (...) -> None

Sets the title caption to display on the Window.

Sets the text to display as title on the Window.

Raises a TypeError, if the passed argument is not a string or unicode.

Property Details

align

The alignment of the child.
Get Method:
unknown-696667804(...)
Set Method:
unknown-696667860(...)

title

The title caption of the Window.
Get Method:
unknown-696667692(...)
Set Method:
unknown-696667748(...)

Generated by Epydoc 2.1 on Thu Jan 10 10:18:42 2008 http://epydoc.sf.net