utils

sans.guiframe.utils

Contains common classes and functions

class sans.guiframe.utils.PanelMenu(*args, **kwargs)

Bases: wx._core.Menu

AddPendingEvent(*args, **kwargs)
AddPendingEvent(self, Event event)
Append(*args, **kwargs)
Append(self, int id, String text=EmptyString, String help=EmptyString,
int kind=ITEM_NORMAL) -> MenuItem
AppendCheckItem(*args, **kwargs)
AppendCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem
AppendItem(*args, **kwargs)
AppendItem(self, MenuItem item) -> MenuItem
AppendMenu(*args, **kwargs)
AppendMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem
AppendRadioItem(*args, **kwargs)
AppendRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem
AppendSeparator(*args, **kwargs)
AppendSeparator(self) -> MenuItem
AppendSubMenu(*args, **kwargs)
AppendSubMenu(self, Menu submenu, String text, String help=EmptyString) -> MenuItem
Attach(*args, **kwargs)
Attach(self, wxMenuBarBase menubar)
Bind(event, handler, source=None, id=-1, id2=-1)

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(*args, **kwargs)
Break(self)
Check(*args, **kwargs)
Check(self, int id, bool check)
ClassName
See GetClassName
Connect(*args, **kwargs)
Connect(self, int id, int lastId, int eventType, PyObject func)
Delete(*args, **kwargs)
Delete(self, int id) -> bool
DeleteItem(*args, **kwargs)
DeleteItem(self, MenuItem item) -> bool
Destroy(*args, **kwargs)

Destroy(self)

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

DestroyId(*args, **kwargs)
DestroyId(self, int id) -> bool
DestroyItem(*args, **kwargs)
DestroyItem(self, MenuItem item) -> bool
Detach(*args, **kwargs)
Detach(self)
Disconnect(*args, **kwargs)
Disconnect(self, int id, int lastId=-1, EventType eventType=wxEVT_NULL,
PyObject func=None) -> bool
Enable(*args, **kwargs)
Enable(self, int id, bool enable)
EventHandler
See GetEventHandler and SetEventHandler
EvtHandlerEnabled
See GetEvtHandlerEnabled and SetEvtHandlerEnabled
FindItem(*args, **kwargs)
FindItem(self, String item) -> int
FindItemById(*args, **kwargs)
FindItemById(self, int id) -> MenuItem
FindItemByPosition(*args, **kwargs)
FindItemByPosition(self, size_t position) -> MenuItem
GetClassName(*args, **kwargs)

GetClassName(self) -> String

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

GetEventHandler(*args, **kwargs)
GetEventHandler(self) -> EvtHandler
GetEvtHandlerEnabled(*args, **kwargs)
GetEvtHandlerEnabled(self) -> bool
GetHelpString(*args, **kwargs)
GetHelpString(self, int id) -> String
GetInvokingWindow(*args, **kwargs)
GetInvokingWindow(self) -> Window
GetLabel(*args, **kwargs)
GetLabel(self, int id) -> String
GetLabelText(*args, **kwargs)
GetLabelText(self, int itemid) -> String
GetMenuBar(*args, **kwargs)
GetMenuBar(self) -> MenuBar
GetMenuItemCount(*args, **kwargs)
GetMenuItemCount(self) -> size_t
GetMenuItems(*args, **kwargs)
GetMenuItems(self) -> MenuItemList
GetNextHandler(*args, **kwargs)
GetNextHandler(self) -> EvtHandler
GetParent(*args, **kwargs)
GetParent(self) -> Menu
GetPreviousHandler(*args, **kwargs)
GetPreviousHandler(self) -> EvtHandler
GetStyle(*args, **kwargs)
GetStyle(self) -> long
GetTitle(*args, **kwargs)
GetTitle(self) -> String
HelpString
See GetHelpString and SetHelpString
Insert(*args, **kwargs)
Insert(self, size_t pos, int id, String text=EmptyString, String help=EmptyString,
int kind=ITEM_NORMAL) -> MenuItem
InsertCheckItem(*args, **kwargs)
InsertCheckItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem
InsertItem(*args, **kwargs)
InsertItem(self, size_t pos, MenuItem item) -> MenuItem
InsertMenu(*args, **kwargs)
InsertMenu(self, size_t pos, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem
InsertRadioItem(*args, **kwargs)
InsertRadioItem(self, size_t pos, int id, String text, String help=EmptyString) -> MenuItem
InsertSeparator(*args, **kwargs)
InsertSeparator(self, size_t pos) -> MenuItem
InvokingWindow
See GetInvokingWindow and SetInvokingWindow
IsAttached(*args, **kwargs)
IsAttached(self) -> bool
IsChecked(*args, **kwargs)
IsChecked(self, int id) -> bool
IsEnabled(*args, **kwargs)
IsEnabled(self, int id) -> bool
IsSameAs(*args, **kwargs)

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(*args, **kwargs)
Prepend(self, int id, String text=EmptyString, String help=EmptyString,
int kind=ITEM_NORMAL) -> MenuItem
PrependCheckItem(*args, **kwargs)
PrependCheckItem(self, int id, String text, String help=EmptyString) -> MenuItem
PrependItem(*args, **kwargs)
PrependItem(self, MenuItem item) -> MenuItem
PrependMenu(*args, **kwargs)
PrependMenu(self, int id, String text, Menu submenu, String help=EmptyString) -> MenuItem
PrependRadioItem(*args, **kwargs)
PrependRadioItem(self, int id, String text, String help=EmptyString) -> MenuItem
PrependSeparator(*args, **kwargs)
PrependSeparator(self) -> MenuItem
PreviousHandler
See GetPreviousHandler and SetPreviousHandler
ProcessEvent(*args, **kwargs)
ProcessEvent(self, Event event) -> bool
ProcessPendingEvents(*args, **kwargs)
ProcessPendingEvents(self)
Remove(*args, **kwargs)
Remove(self, int id) -> MenuItem
RemoveItem(item)
RemoveItem(self, MenuItem item) -> MenuItem
SetEventHandler(*args, **kwargs)
SetEventHandler(self, EvtHandler handler)
SetEvtHandlerEnabled(*args, **kwargs)
SetEvtHandlerEnabled(self, bool enabled)
SetHelpString(*args, **kwargs)
SetHelpString(self, int id, String helpString)
SetInvokingWindow(*args, **kwargs)
SetInvokingWindow(self, Window win)
SetLabel(*args, **kwargs)
SetLabel(self, int id, String label)
SetNextHandler(*args, **kwargs)
SetNextHandler(self, EvtHandler handler)
SetParent(*args, **kwargs)
SetParent(self, Menu parent)
SetPreviousHandler(*args, **kwargs)
SetPreviousHandler(self, EvtHandler handler)
SetTitle(*args, **kwargs)
SetTitle(self, String title)
Style
See GetStyle
Title
See GetTitle and SetTitle
Unbind(event, source=None, id=-1, id2=-1, handler=None)
Disconnects the event handler binding for event from self. Returns True if successful.
UpdateUI(*args, **kwargs)
UpdateUI(self, EvtHandler source=None)
set_graph(graph)
set_plots(plots)
thisown
The membership flag
sans.guiframe.utils.check_float(item)
Parameters:
  • item – txtcrtl containing a value
sans.guiframe.utils.format_number(value, high=False)
Return a float in a standardized, human-readable formatted string
sans.guiframe.utils.look_for_tag(string1, begin, end=None)

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.split_list(separator, mylist, n=0)

returns a list of string without white space of separator

Parameters:
  • separator – the string to remove
sans.guiframe.utils.split_text(separator, string1, n=0)

return a list of string without white space of separator

Parameters:
  • separator – the string to remove

Table Of Contents

Previous topic

statusbar

Next topic

version

This Page