Module eagle :: Class RichText
[show private | hide private]
[frames | no frames]

Type RichText

object --+        
         |        
 _EGObject --+    
             |    
     _EGWidget --+
                 |
                RichText


A Rich Text viewer

Display text with basic formatting instructions. Formatting is done using a HTML subset.
Method Summary
  __init__(self, id, text, label, link_color, fgcolor, bgcolor, callback, img_provider, expand_policy, active, visible)
RichText constructor.
  __repr__(self)
  __setup_connections__(self)
  __setup_gui__(self)
  __setup_parser__(self)
  __str__(self)
  append(self, text)
  focus(self)
Give keyboard focus to this widget.
  get_label(self)
  get_text(self)
Return current text, with formatting tags
  set_label(self, label)
  set_text(self, text)
Replace current text
    Inherited from _EGWidget
  __configure_orientation__(self, setting)
  __get_widgets__(self)
Return a list of internal widgets this Eagle widget contains.
  _get_widgets(self)
  _set_widgets(self, value)
  disable(self)
Same as set_active( False )
  enable(self, active)
Set the widget as active.
  get_active(self)
Return True if it's active (enabled) or False inactive (disabled).
  get_visible(self)
Return true if widget is visible (shown).
  hide(self)
Make widget invisible.
  is_active(self)
Return True if it's active (enabled) or False inactive (disabled).
  is_enabled(self)
Return True if it's active (enabled) or False inactive (disabled).
  is_visible(self)
Return true if widget is visible (shown).
  set_active(self, active)
Set the widget as active.
  set_inactive(self)
Same as set_active( False )
  set_visible(self, visible)
Show or hide widget based on value of 'visible'.
  show(self)
Make widget visible.
    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

Property Summary
  bgcolor
  fgcolor
  label
  link_color
  text
    Inherited from _EGWidget
  _widgets
  active
  app
  visible
    Inherited from _EGObject
  id

Class Variable Summary
int padding = 5                                                                     
classobj _Formatter = eagle._Formatter
classobj _Parser = eagle._Parser
GObjectMeta _Renderer = eagle._Renderer
    Inherited from _EGWidget
int ORIENTATION_HORIZONTAL = 1                                                                     
int ORIENTATION_VERTICAL = 0                                                                     

Method Details

__init__(self, id, text='', label=None, link_color='blue', fgcolor=None, bgcolor=None, callback=None, img_provider=None, expand_policy=None, active=True, visible=True)
(Constructor)

RichText constructor.

@param id: unique identifier.
@param text: text to use in this viewer.
@param label: label to display in the widget frame around the viewer.
       If None, no label or frame will be shown.
@param link_color: color to use for links.
@param fgcolor: color to use for foreground (text)
@param bgcolor: color to use for background.
@param callback: function (or list of functions) to call when
       user clicks a link. Links to anchor will automatically make
       the anchor/mark visible and then callback. Function will get
       as parameters:
        - App reference
        - RichText reference
        - href contents (string)
        - offset from buffer begin (integer)
@param img_provider: if images could not be resolved, call this
       function. It should get an address (string) and return an
       eagle.Image. Eagle already provides a handle to addresses
       prefixed with "eagle://", the following part should be an
       eagle.Image id, and the image should be live (not garbage
       collected) when displaying it, so remember to keep a
       reference to it! You may use img_provider to download
       files from webservers and stuff like that.
       Function signature:
          def img_provider( filename ):
              return eagle.Image( ... )
@param expand_policy: how this widget should fit space, see
       L{ExpandPolicy.Policy.Rule}.
Overrides:
eagle._EGWidget.__init__

focus(self)

Give keyboard focus to this widget.
Overrides:
eagle._EGWidget.focus (inherited documentation)

get_text(self)

Return current text, with formatting tags

set_text(self, text)

Replace current text

Property Details

bgcolor

Get Method:
get(...)
Set Method:
set(...)

fgcolor

Get Method:
get(...)
Set Method:
set(...)

label

Get Method:
get_label(self)
Set Method:
set_label(self, label)

link_color

Get Method:
get(...)
Set Method:
set(...)

text

Get Method:
get_text(self)
Set Method:
set_text(self, text)

Class Variable Details

padding

Type:
int
Value:
5                                                                     

Generated by Epydoc 2.1 on Sun Apr 22 21:30:27 2007 http://epydoc.sf.net