Package gui :: Module uf_objects :: Class Uf_page
[hide private]
[frames] | no frames]

Class Uf_page

source code


User function specific pages for the wizards.

Instance Methods [hide private]
EvtHandler
__init__(self, name, parent=None, height_desc=220, sync=False, execute=True)
Set up the window.
source code
str
_format_text(self, text)
Format the text by stripping whitespace.
source code
str
_intro_text(self, keys, values, prompt=True)
Build and return the user function intro text.
source code
 
Clear(self, key)
Special wizard method for clearing the value of the GUI element corresponding to the key.
source code
unknown
GetValue(self, key)
Special wizard method for getting the value of the GUI element corresponding to the key.
source code
 
SetValue(self, key, value)
Special wizard method for setting the value of the GUI element corresponding to the key.
source code
 
UpdateChoices(self, key, combo_choices=None, combo_data=None, combo_default=None)
Special user function page method for updating the list of choices in a ComboBox type element.
source code
 
add_contents(self, sizer)
Add the specific GUI elements.
source code
 
add_desc(self, sizer, max_y=220)
Add the description to the dialog.
source code
 
execute(self, uf, *args, **kwds)
Execute the user function, either asynchronously or synchronously.
source code
 
on_back(self)
Remove this page from the observers.
source code
 
on_display(self)
Clear and update the data if needed.
source code
 
on_execute(self, force_exec=False)
Execute the user function.
source code
 
on_next(self)
Remove this page from the observers.
source code
bool
update_args(self)
Update all the argument ComboBox choices.
source code

Inherited from wizards.wiz_objects.Wiz_page: add_artwork, on_apply, on_completion, on_display_post, on_init

Inherited from wx._windows.Panel: Create, SetFocusIgnoringChildren, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AlwaysShowScrollbars, AssociateHandle, CacheBestSize, CanAcceptFocus, CanAcceptFocusFromKeyboard, CanApplyThemeBorder, CanBeOutsideClientArea, CanScroll, 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, GetMainWindowOfCompositeControl, GetMaxClientSize, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinClientSize, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetNextSibling, GetParent, GetPopupMenuSelectionFromUser, GetPosition, GetPositionTuple, GetPrevSibling, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetToolTipString, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HandleAsNavigationKey, HandleWindowEvent, HasCapture, HasExtraStyle, HasFlag, HasFocus, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HideWithEffect, HitTest, HitTestXY, InformFirstDirection, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsScrollbarAlwaysShown, IsShown, IsShownOnScreen, IsThisEnabled, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, NavigateIn, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PostSizeEvent, PostSizeEventToParent, ProcessWindowEvent, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendIdleEvents, SendSizeEvent, SendSizeEventToParent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCanFocus, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxClientSize, SetMaxSize, SetMinClientSize, 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, ShowWithEffect, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, UnsetToolTip, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, DeletePendingEvents, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, IsUnlinked, ProcessEvent, ProcessEventLocally, ProcessPendingEvents, QueueEvent, SafelyProcessEvent, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind, Unlink

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.Panel: GetClassDefaultAttributes

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, ReleaseControlId, UnreserveControlId

Class Variables [hide private]

Inherited from wizards.wiz_objects.Wiz_page: art_spacing, divider, height_element, image_path, main_text, setup_fail, size_button, size_square_button, title

Properties [hide private]

Inherited from wx._windows.Panel: thisown

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, MaxClientSize, MaxHeight, MaxSize, MaxWidth, MinClientSize, 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, name, parent=None, height_desc=220, sync=False, execute=True)
(Constructor)

source code 

Set up the window.

Parameters:
  • name (str) - The name of the user function.
  • parent (class instance) - The parent class containing the GUI.
  • height_desc (int or None) - The height in pixels of the description part of the wizard.
  • sync (bool) - A flag which if True will call user functions via interpreter.apply and if False via interpreter.queue.
  • execute (bool) - A flag which if True will prevent the user function from being executed when clicking on 'Next', 'Ok', or 'Apply'. This can be useful for delaying the execution of the user function.
Returns: EvtHandler
Overrides: object.__init__

_format_text(self, text)

source code 

Format the text by stripping whitespace.

Parameters:
  • text (str) - The text to strip.
Returns: str
The stripped text.

_intro_text(self, keys, values, prompt=True)

source code 

Build and return the user function intro text.

Parameters:
  • keys (list of str) - The user function keys.
  • values (list) - The values corresponding to the keys.
  • prompt (bool) - A flag which if True will cause the prompt text to be included.
Returns: str
The user function intro text.

Clear(self, key)

source code 

Special wizard method for clearing the value of the GUI element corresponding to the key.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.

GetValue(self, key)

source code 

Special wizard method for getting the value of the GUI element corresponding to the key.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.
Returns: unknown
The value that the specific GUI element's GetValue() method returns.

SetValue(self, key, value)

source code 

Special wizard method for setting the value of the GUI element corresponding to the key.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.
  • value (unknown) - The value that the specific GUI element's SetValue() method expects.

UpdateChoices(self, key, combo_choices=None, combo_data=None, combo_default=None)

source code 

Special user function page method for updating the list of choices in a ComboBox type element.

Parameters:
  • key (str) - The key corresponding to the desired GUI element.
  • combo_choices (list of str) - The list of choices to present to the user. This is only used if the element_type is set to 'combo'.
  • combo_data (list) - The data returned by a call to GetValue(). This is only used if the element_type is set to 'combo'. If supplied, it should be the same length at the combo_choices list. If not supplied, the combo_choices list will be used for the returned data.
  • combo_default (str or None) - The default value of the ComboBox. This is only used if the element_type is set to 'combo'.

add_contents(self, sizer)

source code 

Add the specific GUI elements.

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.
Overrides: wizards.wiz_objects.Wiz_page.add_contents

add_desc(self, sizer, max_y=220)

source code 

Add the description to the dialog.

Parameters:
  • sizer (wx.Sizer instance) - A sizer object.
  • max_y (int) - The maximum height, in number of pixels, for the description.
Overrides: wizards.wiz_objects.Wiz_page.add_desc

execute(self, uf, *args, **kwds)

source code 

Execute the user function, either asynchronously or synchronously.

Parameters:
  • uf (str) - The user function as a string.
  • args (any arguments) - The user function arguments.
  • kwds (any keyword arguments) - The user function keyword arguments.

on_back(self)

source code 

Remove this page from the observers.

Overrides: wizards.wiz_objects.Wiz_page.on_back

on_display(self)

source code 

Clear and update the data if needed.

Overrides: wizards.wiz_objects.Wiz_page.on_display

on_execute(self, force_exec=False)

source code 

Execute the user function.

Parameters:
  • force_exec (bool) - A flag which if True will cause the execution flag to be ignored and the user function to be executed.
Overrides: wizards.wiz_objects.Wiz_page.on_execute

on_next(self)

source code 

Remove this page from the observers.

Overrides: wizards.wiz_objects.Wiz_page.on_next

update_args(self)

source code 

Update all the argument ComboBox choices.

Returns: bool
The status of the update - False if a RelaxError occurs, True otherwise.