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

Type TooltipWindow

 object --+            
          |            
INotifyable --+        
              |        
     BaseObject --+    
                  |    
     object --+   |    
              |   |    
         Sprite --+    
                  |    
         BaseWidget --+
                      |
                     TooltipWindow


TooltipWindow (text) -> TooltipWindow

A widget class that displays a line of text using a certain color.

The TooltipWindow widgets is able to display a short amount of text. It is a completely non-interactive widget suitable for tooltip support and notification messages.

The text to display on the TooltipWindow can be set through the 'text' attribute or set_text() method.

window.text = 'A text to display' window.set_text ('A text to display')

The 'padding' attribute and set_padding() method are used to place a certain amount of pixels between the text and the outer edges of the TooltipWindow.

window.padding = 10 window.set_padding (10)

Default action (invoked by activate()): None

Mnemonic action (invoked by activate_mnemonic()): None

Attributes: text - The text to display on the TooltipWindow. padding - Additional padding between text and borders. Default is 2.
Method Summary
  __init__(self, text)
  draw_bg(self)
T.draw_bg () -> Surface
  set_focus(self, focus)
T.set_focus (...) -> bool
  set_padding(self, padding)
T.set_padding (...) -> None
  set_text(self, text)
T.set_text (...) -> 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
  destroy(self)
W.destroy () -> None
  draw(self)
W.draw () -> None
  get_style(self)
W.get_style () -> WidgetStyle
  initclass(cls)
B.initclass () -> None (Class method)
  lock(self)
W.lock () -> None
  notify(self, event)
W.notify (...) -> None
  rect_to_client(self, rect)
W.rect_to_client (...) -> pygame.Rect
  set_depth(self, depth)
W.set_depth (...) -> None
  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_event_manager(self, manager)
W.set_event_manager (...) -> None
  set_index(self, index)
W.set_index (...) -> None
  set_indexable(self, indexable)
W.set_indexable (...) -> 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_sensitive(self, sensitive)
W.set_sensitive (...) -> 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
  update(self, **kwargs)
W.update (...) -> None
  _get_rect(self)
W._get_rect () -> pygame.Rect
  _get_rect_attr(self, attr)
W._get_rect_attr (...) -> var
  _set_rect_attr(self, attr, value)
W._set_rect_attr (...) -> 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
  padding: Additional padding between text and borders.
  text: The text to display on the TooltipWindow.
    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

draw_bg(self)

T.draw_bg () -> Surface

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

set_focus(self, focus=True)

T.set_focus (...) -> bool

Overrides the default widget input focus.

The TooltipWindow cannot be focused by default, thus this method always returns False and does not do anything.
Overrides:
ocempgui.widgets.BaseWidget.BaseWidget.set_focus

set_padding(self, padding)

T.set_padding (...) -> None

Sets the padding between the edges and text of the TooltipWindow.

The padding value is the amount of pixels to place between the edges of the TooltipWindow and the displayed text.

Raises a TypeError, if the passed argument is not a positive integer.

Note: If the 'size' attribute is set, it can influence the visible space between the text and the edges. That does not mean, that any padding is set.

set_text(self, text)

T.set_text (...) -> None

Sets the text of the TooltipWindow to the passed argument.

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

Property Details

padding

Additional padding between text and borders.
Get Method:
unknown-696441348(...)
Set Method:
unknown-696441404(...)

text

The text to display on the TooltipWindow.
Get Method:
unknown-696441236(...)
Set Method:
unknown-696441292(...)

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