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]
EvtHandler
__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_title(self, text, alt_font=None)
Draw the title.
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_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

Inherited from wx._windows.Frame: Command, Create, CreateStatusBar, CreateToolBar, DoGiveHelp, DoMenuUpdates, GetMenuBar, GetStatusBar, GetStatusBarPane, GetToolBar, PopStatusText, ProcessCommand, PushStatusText, SendSizeEvent, SetMenuBar, SetStatusBar, SetStatusBarPane, SetStatusText, SetStatusWidths, SetToolBar

Inherited from wx._windows.TopLevelWindow: CenterOnScreen, CentreOnScreen, EnableCloseButton, GetDefaultItem, GetIcon, GetTitle, GetTmpDefaultItem, Iconize, IsActive, IsAlwaysMaximized, IsFullScreen, IsIconized, IsMaximized, MacGetMetalAppearance, MacGetTopLevelWindowRef, MacGetUnifiedAppearance, MacSetMetalAppearance, Maximize, RequestUserAttention, Restore, SetDefaultItem, SetIcon, SetIcons, SetShape, SetTitle, SetTmpDefaultItem, ShowFullScreen, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AssociateHandle, CacheBestSize, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetParent, GetPosition, GetPositionTuple, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetToolTipString, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HasCapture, HasFlag, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HitTest, HitTestXY, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsShown, IsShownOnScreen, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PrepareDC, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, ProcessPendingEvents, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from wx._windows.Frame: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, NextControlId, PrevControlId

Class Variables [hide private]
  DESTROY_ON_CLICK = True
  SCROLL_RATE = 20
  border = 0
  colour1 = None
hash(x)
  colour2 = None
hash(x)
  dim_x = 400
  dim_y = 600
  max_x = None
hash(x)
  max_y = None
hash(x)
  style = 2129920
Properties [hide private]

Inherited from wx._windows.Frame: MenuBar, StatusBar, StatusBarPane, ToolBar, thisown

Inherited from wx._windows.TopLevelWindow: DefaultItem, Icon, Title, TmpDefaultItem

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxHeight, MaxSize, MaxWidth, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, ToolTipString, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None, id=-1, title='', html_text=None)
(Constructor)

source code 

Build the dialog.

Returns: EvtHandler
Overrides: object.__init__

add_html(self, text)

source code 

Add the given HTML text to the DC.

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

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_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_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.