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

Class Uf_object

source code


The object for auto-generating the GUI user functions.

Instance Methods [hide private]
bool
__call__(self, event=None, wx_parent=None, wx_wizard_sync=None, wx_wizard_run=True, wx_wizard_modal=False, **kwds)
Make the GUI user function executable.
source code
 
__init__(self, name, title=None, size=None, height_desc=None, apply_button=True, sync=False)
Set up the object.
source code
Uf_page instance
create_page(self, wizard=None, sync=None, execute=True)
Create the user function wizard page GUI object.
source code
bool
create_wizard(self, parent=None)
Create the user function wizard GUI object, with embedded wizard page.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__call__(self, event=None, wx_parent=None, wx_wizard_sync=None, wx_wizard_run=True, wx_wizard_modal=False, **kwds)
(Call operator)

source code 

Make the GUI user function executable.

All keyword args, apart from 'event', 'wx_parent' and 'wx_wizard_run' will be assumed to be user function arguments and the Uf_page.SetValue() method of the page will be used to set the GUI arg elements to the values supplied.

Parameters:
  • event (wx event or None) - The wx event.
  • wx_parent (wx object) - The parent wx object to associate the user function wizard to.
  • wx_wizard_sync (None or bool) - A flag which if given will switch between synchronous and asynchronous user function operation.
  • wx_wizard_run (bool) - A flag which if True will call the wizard run() method.
  • wx_wizard_modal (bool) - A flag which if True will cause the wizard run() method to have the modal flag set so that the wizard is modal.
Returns: bool
The status of the call. If the call failed, False will be returned.

__init__(self, name, title=None, size=None, height_desc=None, apply_button=True, sync=False)
(Constructor)

source code 

Set up the object.

Parameters:
  • name (str) - The name of the user function.
  • title (str) - The long title of the user function to set as the window title.
  • size (tuple of int) - The window size.
  • height_desc (int or None) - The height in pixels of the description part of the wizard.
  • apply_button (bool) - A flag specifying if the apply button should be shown or not. This defaults to True.
  • sync (bool) - A flag which if True will call user functions via interpreter.apply and if False via interpreter.queue.
Overrides: object.__init__

create_page(self, wizard=None, sync=None, execute=True)

source code 

Create the user function wizard page GUI object.

Parameters:
  • wizard (Wiz_window instance) - The parent wizard.
  • sync (None or 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: Uf_page instance
The user function page object.

create_wizard(self, parent=None)

source code 

Create the user function wizard GUI object, with embedded wizard page.

Parameters:
  • parent (wx.Window instance) - The parent wx window.
Returns: bool
True if the wizard was created, False if a problem was encountered.