Package gui :: Module about :: Class About_base
[hide private]
[frames] | no frames]

Class About_base

source code


The about dialog base class.

Instance Methods [hide private]
 
__init__(self, parent=None, id=-1, title='', html_text=None)
Build the dialog.
source code
 
add_html(self, text)
Add the given HTML text to the DC.
source code
 
build_widget(self)
Dummy widget building method.
source code
 
create_buffered_dc(self)
Build the buffered dc containing the window contents.
source code
 
cursor_style(self, event)
Change the mouse cursor when over the url.
source code
 
draw_url(self, url_text=None, pos_x=0, carriage_ret=False, centre=False)
Draw a URL as a hyperlink.
source code
 
draw_title(self, text, alt_font=None)
Draw the title.
source code
 
draw_wrapped_text(self, text, spacer=10)
Generic method for drawing wrapped text in the relax about widget.
source code
 
generate(self, event)
Build the device context, add the background, and build the dialog.
source code
int
offset(self, val=0)
Shift the y-offset by the given value and return the new offset.
source code
 
process_click(self, event)
Determine what to do with the mouse click.
source code
 
set_background(self)
Build a background for the dialog.
source code
list of str, list of bool
split_refs(self, text)
Split up text based on the location of URLs.
source code
 
virtual_size(self)
Determine the virtual size of the window.
source code
Class Variables [hide private]
  colour1 = None
hash(x)
  colour2 = None
hash(x)
  dim_x = 400
  dim_y = 600
  max_x = None
hash(x)
  max_y = None
hash(x)
  border = 0
  style = wx.BORDER_NONE | wx.STAY_ON_TOP
  DESTROY_ON_CLICK = True
  SCROLL_RATE = 20
Method Details [hide private]

add_html(self, text)

source code 

Add the given HTML text to the DC.

Parameters:
  • text (str) - The HTML text.

draw_url(self, url_text=None, pos_x=0, carriage_ret=False, centre=False)

source code 

Draw a URL as a hyperlink.

Parameters:
  • url_text (str) - The text of the url.
  • pos_x (int) - The starting x position for the text.
  • carriage_ret (bool) - A flag which if True will cause a carriage return, by shifting the offset by y.
  • centre (bool) - A flag which if True will cause the URL to be centred in the window.

draw_title(self, text, alt_font=None)

source code 

Draw the title.

Parameters:
  • text (str) - The text of the title.
  • alt_font (wx.Font instance) - An alternative font.

draw_wrapped_text(self, text, spacer=10)

source code 

Generic method for drawing wrapped text in the relax about widget.

Parameters:
  • text (str) - The text to wrap and draw.
  • spacer (int) - The pixel width of the spacer to place above the text block.

generate(self, event)

source code 

Build the device context, add the background, and build the dialog.

Parameters:
  • event (wx event) - The wx event.

offset(self, val=0)

source code 

Shift the y-offset by the given value and return the new offset.

Parameters:
  • val (int) - The value to add to the offset (can be negative).
Returns: int
The new offset.

process_click(self, event)

source code 

Determine what to do with the mouse click.

Parameters:
  • event (wx event) - The wx event.

split_refs(self, text)

source code 

Split up text based on the location of URLs.

Parameters:
  • text (str) - The text to parse and split up.
Returns: list of str, list of bool
The list of text elements, and a list of flags which if True indicates a corresponding URL in the text list.