utils

sans.guiframe.utils

Contains common classes and functions

class sans.guiframe.utils.PanelMenu

Bases: wx._core.Menu

AddPendingEvent(self, Event event)
Append()

Append(self, int id, String text=EmptyString, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem

AppendCheckItem(self, int id, String text, String help=EmptyString) → MenuItem
AppendItem(self, MenuItem item) → MenuItem
AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) → MenuItem
AppendRadioItem(self, int id, String text, String help=EmptyString) → MenuItem
AppendSeparator(self) → MenuItem
AppendSubMenu(self, Menu submenu, String text, String help=EmptyString) → MenuItem
Attach(self, wxMenuBarBase menubar)
Bind()

Bind an event to an event handler.

Parameters:
  • event – One of the EVT_* objects that specifies the type of event to bind,
  • handler – A callable object to be invoked when the event is delivered to self. Pass None to disconnect an event handler.
  • source – Sometimes the event originates from a different window than self, but you still want to catch it in self. (For example, a button event delivered to a frame.) By passing the source of the event, the event handling system is able to differentiate between the same event type from different controls.
  • id – Used to spcify the event source by ID instead of instance.
  • id2 – Used when it is desirable to bind a handler to a range of IDs, such as with EVT_MENU_RANGE.
Break(self)
Check(self, int id, bool check)
ClassName

See GetClassName

Connect(self, int id, int lastId, int eventType, PyObject func)
Delete(self, int id) → bool
DeleteItem(self, MenuItem item) → bool
Destroy(self)

Deletes the C++ object this Python object is a proxy for.

DestroyId(self, int id) → bool
DestroyItem(self, MenuItem item) → bool
Detach(self)
Disconnect()

Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL, PyObject func=None) -> bool

Enable(self, int id, bool enable)
EventHandler

See GetEventHandler and SetEventHandler

EvtHandlerEnabled

See GetEvtHandlerEnabled and SetEvtHandlerEnabled

FindItem(self, String item) → int
FindItemById(self, int id) → MenuItem
FindItemByPosition(self, size_t position) → MenuItem
GetClassName(self) → String

Returns the class name of the C++ class using wxRTTI.

GetEventHandler(self) → EvtHandler
GetEvtHandlerEnabled(self) → bool
GetHelpString(self, int id) → String
GetInvokingWindow(self) → Window
GetLabel(self, int id) → String
GetLabelText(self, int itemid) → String
GetMenuBar(self) → MenuBar
GetMenuItemCount(self) → size_t
GetMenuItems(self) → MenuItemList
GetNextHandler(self) → EvtHandler
GetParent(self) → Menu
GetPreviousHandler(self) → EvtHandler
GetStyle(self) → long
GetTitle(self) → String
HelpString

See GetHelpString and SetHelpString

Insert()

Insert(self, size_t pos, int id, String text=EmptyString, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem

InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) → MenuItem
InsertItem(self, size_t pos, MenuItem item) → MenuItem
InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) → MenuItem
InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) → MenuItem
InsertSeparator(self, size_t pos) → MenuItem
InvokingWindow

See GetInvokingWindow and SetInvokingWindow

IsAttached(self) → bool
IsChecked(self, int id) → bool
IsEnabled(self, int id) → bool
IsSameAs(self, Object p) → bool

For wx.Objects that use C++ reference counting internally, this method can be used to determine if two objects are referencing the same data object.

MenuBar

See GetMenuBar

MenuItemCount

See GetMenuItemCount

MenuItems

See GetMenuItems

NextHandler

See GetNextHandler and SetNextHandler

Parent

See GetParent and SetParent

Prepend()

Prepend(self, int id, String text=EmptyString, String help=EmptyString, int kind=ITEM_NORMAL) -> MenuItem

PrependCheckItem(self, int id, String text, String help=EmptyString) → MenuItem
PrependItem(self, MenuItem item) → MenuItem
PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) → MenuItem
PrependRadioItem(self, int id, String text, String help=EmptyString) → MenuItem
PrependSeparator(self) → MenuItem
PreviousHandler

See GetPreviousHandler and SetPreviousHandler

ProcessEvent(self, Event event) → bool
ProcessPendingEvents(self)
Remove(self, int id) → MenuItem
RemoveItem(self, MenuItem item) → MenuItem
SetEventHandler(self, EvtHandler handler)
SetEvtHandlerEnabled(self, bool enabled)
SetHelpString(self, int id, String helpString)
SetInvokingWindow(self, Window win)
SetLabel(self, int id, String label)
SetNextHandler(self, EvtHandler handler)
SetParent(self, Menu parent)
SetPreviousHandler(self, EvtHandler handler)
SetTitle(self, String title)
Style

See GetStyle

Title

See GetTitle and SetTitle

Unbind()

Disconnects the event handler binding for event from self. Returns True if successful.

UpdateUI(self, EvtHandler source=None)
__class__

alias of type

__delattr__

x.__delattr__(‘name’) <==> del x.name

__dict__ = <dictproxy object at 0x05EA0D50>
__getattribute__

x.__getattribute__(‘name’) <==> x.name

__hash__

x.__hash__() <==> hash(x)

__init__(self, String title=EmptyString, long style=0) → Menu
__module__ = 'sans.guiframe.utils'
static __new__(S, ...) → a new object with type S, a subtype of T
__reduce__()

helper for pickle

__reduce_ex__()

helper for pickle

__repr__()
__setattr__

x.__setattr__(‘name’, value) <==> x.name = value

__str__

x.__str__() <==> str(x)

__weakref__

list of weak references to the object (if defined)

_setOORInfo(self, PyObject _self, bool incref=True)
graph = None
plots = None
set_graph()
set_plots()
thisown

The membership flag

sans.guiframe.utils.check_float()
Parameters:item – txtcrtl containing a value
sans.guiframe.utils.format_number()

Return a float in a standardized, human-readable formatted string

sans.guiframe.utils.look_for_tag()

this method remove the begin and end tags given by the user from the string .

Parameters:
  • begin – the initial tag
  • end – the final tag
  • string – the string to check
Returns:

begin_flag==True if begin was found, end_flag==if end was found else return false, false

sans.guiframe.utils.parse_name()

remove “_” in front of a name

sans.guiframe.utils.split_list()

returns a list of string without white space of separator

Parameters:separator – the string to remove
sans.guiframe.utils.split_text()

return a list of string without white space of separator

Parameters:separator – the string to remove

Table Of Contents

Previous topic

state_reader

Next topic

version

This Page