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

Class Renderer
source code

gtk.TextView --+
               |
              Renderer

Specialized TextView to render formatted texts.

This class emits "follow-link" when user clicks somewhere.

It implements Writer interface as specified in standard library "formatter" module.

Instance Methods [hide private]
  __init__(self, link_color="#0000ff", foreground=None, background=None, resource_provider=None)
RichText.Renderer constructor.
  __create_bullets__(self)
  __setup_connections__(self)
  __setup_render__(self)
  send_paragraph(self, blankline)
  send_line_break(self)
  send_flowing_data(self, data)
  send_literal_data(self, data)
  send_hor_rule(self)
  new_margin(self, margin, level)
  send_label_data(self, data)
  add_image(self, filename, width, height)
  start_link(self, url, name=None)
  end_link(self)
  new_font(self, font)
  goto(self, anchor)
  reset(self)

Class Variables [hide private]
bullet  
margin  
signal_created  

Method Details [hide private]

__init__(self, link_color="#0000ff", foreground=None, background=None, resource_provider=None)
(Constructor)

source code 
RichText.Renderer constructor.
Parameters:
  • link_color - color to use with links. String with color name or in internet format (3 pairs of RGB, in hexa, prefixed by #).
  • foreground - default foreground color. Same spec as link_color.
  • background - default background color. Same spec as link_color.
  • resource_provider - function to provide unresolved resources. If some image could not be handled as a file, this function will be called and it should return an gtk.gdk.Pixbuf. Since http://url.com/file will always be unresolved, you may use this to provide remote file access to this class.

__create_bullets__(self)

source code 

__setup_connections__(self)

source code 

__setup_render__(self)

source code 

send_paragraph(self, blankline)

source code 

send_line_break(self)

source code 

send_flowing_data(self, data)

source code 

send_literal_data(self, data)

source code 

send_hor_rule(self)

source code 

new_margin(self, margin, level)

source code 

send_label_data(self, data)

source code 

add_image(self, filename, width, height)

source code 

start_link(self, url, name=None)

source code 

end_link(self)

source code 

new_font(self, font)

source code 

goto(self, anchor)

source code 

reset(self)

source code 

Class Variable Details [hide private]

bullet

Value:
None                                                                  
      

margin

Value:
2                                                                      
      

signal_created

Value:
False