Package gui :: Module wizard :: Class Wiz_window
[hide private]
[frames] | no frames]

Class Wiz_window

source code


The wizard.

Instance Methods [hide private]
EvtHandler
__init__(self, parent=None, size_x=400, size_y=400, title='', border=10, style=536877056)
Set up the window.
source code
 
_build_buttons(self)
Construct the buttons for all pages of the wizard.
source code
 
_cancel(self, event)
Cancel the operation.
source code
 
_display_page(self, i)
Display the given page.
source code
 
_go_back(self, event)
Return to the previous page.
source code
 
_go_next(self, event)
Move to the next page.
source code
int
_next_fn(self)
Standard function for setting the next page to the one directly next in the sequence.
source code
 
_ok(self, event)
Accept the operation.
source code
 
_seq_loop(self)
Loop over the sequence in the forwards direction.
source code
 
_skip(self, event)
Skip the page.
source code
int
add_page(self, panel, apply_button=True, skip_button=False, exec_on_next=True, proceed_on_error=True, uf_flush=False)
Add a new page to the wizard.
source code
 
block_next(self, block=True)
Prevent moving forwards (or unblock).
source code
Wiz_page instance.
get_page(self, index)
Get a page from the wizard.
source code
bool or None
run(self, modal=False)
Execute the wizard.
source code
 
set_seq_next_fn(self, index, fn)
A user specified function for non-linear page changing.
source code

Inherited from wx._windows.Dialog: Create, CreateButtonSizer, CreateSeparatedButtonSizer, CreateStdDialogButtonSizer, CreateTextSizer, EndModal, GetAffirmativeId, GetEscapeId, GetReturnCode, IsModal, SetAffirmativeId, SetEscapeId, SetReturnCode, ShowModal, __enter__, __exit__

Inherited from wx._windows.Dialog (private): _CreateButtonSizer

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, 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, SendSizeEvent, 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.Dialog: GetClassDefaultAttributes

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

Class Variables [hide private]
  _size_button = (100, 33)
  ICON_APPLY = '/data/relax/tags/1.3.16/graphics/oxygen_icons/22...
  ICON_BACK = '/data/relax/tags/1.3.16/graphics/oxygen_icons/22x...
  ICON_CANCEL = '/data/relax/tags/1.3.16/graphics/oxygen_icons/2...
  ICON_FINISH = '/data/relax/tags/1.3.16/graphics/oxygen_icons/2...
  ICON_NEXT = '/data/relax/tags/1.3.16/graphics/oxygen_icons/22x...
  ICON_OK = '/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22...
  ICON_SKIP = '/data/relax/tags/1.3.16/graphics/oxygen_icons/22x...
  TEXT_APPLY = ' Apply'
  TEXT_BACK = ' Back'
  TEXT_CANCEL = ' Cancel'
  TEXT_FINISH = ' Finish'
  TEXT_NEXT = ' Next'
  TEXT_OK = ' OK'
  TEXT_SKIP = ' Skip'

Inherited from wx._windows.Dialog: ButtonSizerFlags

Properties [hide private]

Inherited from wx._windows.Dialog: AffirmativeId, EscapeId, ReturnCode, 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, 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, size_x=400, size_y=400, title='', border=10, style=536877056)
(Constructor)

source code 

Set up the window.

Parameters:
  • parent (wx.Window instance) - The parent window.
  • size_x (int) - The width of the wizard.
  • size_y (int) - The height of the wizard.
  • title (str) - The title of the wizard dialog.
  • border (int) - The size of the border inside the wizard.
  • style (wx style) - The dialog style.
Returns: EvtHandler
Overrides: object.__init__

_cancel(self, event)

source code 

Cancel the operation.

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

_display_page(self, i)

source code 

Display the given page.

Parameters:
  • i (int) - The index of the page to display.

_go_back(self, event)

source code 

Return to the previous page.

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

_go_next(self, event)

source code 

Move to the next page.

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

_next_fn(self)

source code 

Standard function for setting the next page to the one directly next in the sequence.

Returns: int
The index of the next page, which is the current page index plus one.

_ok(self, event)

source code 

Accept the operation.

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

_skip(self, event)

source code 

Skip the page.

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

add_page(self, panel, apply_button=True, skip_button=False, exec_on_next=True, proceed_on_error=True, uf_flush=False)

source code 

Add a new page to the wizard.

Parameters:
  • panel (wx.Panel instance) - The page to add to the wizard.
  • apply_button (bool) - A flag which if true will show the apply button for that page.
  • skip_button (bool) - A flag which if true will show the skip button for that page.
  • exec_on_next (bool) - A flag which if true will run the on_execute() method when clicking on the next button.
  • proceed_on_error (bool) - A flag which if True will proceed to the next page (or quit if there are no more pages) despite the occurrence of an error in execution. If False, the page will remain open (the GUI interpreter thread will be flushed first to synchronise).
  • uf_flush (bool) - A flag which if True will cause the GUI interpreter thread to be flushed to clear out all user function call prior to proceeding.
Returns: int
The index of the page in the wizard.

block_next(self, block=True)

source code 

Prevent moving forwards (or unblock).

Parameters:
  • block (bool) - A flag which if True will block forwards movement and if False will unblock.

get_page(self, index)

source code 

Get a page from the wizard.

Parameters:
  • index (int) - The index of the page.
Returns: Wiz_page instance.
The page object.

run(self, modal=False)

source code 

Execute the wizard.

Parameters:
  • modal (bool) - A flag which if True will cause the wizard to be run as a modal dialog.
Returns: bool or None
The status from the modal operation, i.e. True if the wizard is run, False if cancelled or other error occur. For modeless operation, this returns nothing.

set_seq_next_fn(self, index, fn)

source code 

A user specified function for non-linear page changing.

Parameters:
  • index (int) - The index of the page the function should be associated with.
  • fn (func or method.) - The function for determining the page after the current. This function should return the index of the next page.

Class Variable Details [hide private]

ICON_APPLY

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/dialog-ok\
-apply.png'

ICON_BACK

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/go-previo\
us-view.png'

ICON_CANCEL

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/dialog-ca\
ncel.png'

ICON_FINISH

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/dialog-ok\
.png'

ICON_NEXT

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/go-next-v\
iew.png'

ICON_OK

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/dialog-ok\
.png'

ICON_SKIP

Value:
'/data/relax/tags/1.3.16/graphics/oxygen_icons/22x22/actions/arrow-rig\
ht-double-relax-blue.png'