Package application :: Module Application :: Class wxApplication
[hide private]
[frames] | no frames]

Class wxApplication

source code

     object --+                
              |                
wx._core.Object --+            
                  |            
wx._core.EvtHandler --+        
                      |        
         wx._core.PyApp --+    
                          |    
               wx._core.App --+
                              |
                             wxApplication

Instance Methods [hide private]
 
FilterEvent(self, event)
FilterEvent(self, Event event) -> int
source code
 
OnInit(self)
Main application initialization.
source code
 
reload(self, parentWin) source code
 
localeChanged(self)
See if the locale changed since the last time we ran Chandler.
source code
 
saveLocale(self)
Save our locale, if it changed or we hadn't saved it yet
source code
 
RenderMainView(self, splash=<Locale: en_US>) source code
 
UnRenderMainView(self) source code
 
PrintTree(self, widget, indent) source code
 
GetRawImage(self, name, copy=True)
Return None if image isn't found, otherwise return the raw image.
source code
 
GetImage(self, name)
Return None if image isn't found, otherwise loads a bitmap.
source code
 
OnCommand(self, event)
Catch commands and pass them along to the blocks.
source code
 
OnContextMenu(self, event) source code
 
OnDestroyWindow(self, event) source code
 
OnShow(self, event) source code
 
propagateAsynchronousNotifications(self) source code
 
scheduleSave(self) source code
 
unscheduleSave(self) source code
 
commitSoon(self) source code
 
OnIdle(self, event) source code
 
OnKeyDown(self, event) source code
 
OnExit(self)
Main application termination.
source code
 
restart(self, *args, **kwds)
Restart the application.
source code
 
OnMainThreadCallbackEvent(self, event)
Fire off a custom event handler
source code
 
PostAsyncEvent(self, callback, *args, **kwds)
Post an asynchronous event that will call 'callback' with 'data'
source code
 
_DispatchItemMethod(self, transportItem, methodName, transportArgs, keyArgs)
Private dispatcher for a method call on an item done between threads.
source code
 
CallItemMethodAsync(self, item, methodName, *args, **keyArgs)
Post an asynchronous event that will call a method by name in an item.
source code
 
ShowPlatformMismatchWindow(self, origName, currentName) source code

Inherited from wx._core.App: Destroy, MainLoop, OnPreInit, RedirectStdio, RestoreStdio, SetOutputWindowAttributes, SetTopWindow, __del__, __init__

Inherited from wx._core.PyApp: Dispatch, Exit, ExitMainLoop, GetAppName, GetAssertMode, GetCallFilterEvent, GetClassName, GetExitOnFrameDelete, GetLayoutDirection, GetPrintMode, GetTopWindow, GetTraits, GetUseBestVisual, GetVendorName, IsActive, Pending, PlaybackEventPending, ProcessIdle, ProcessPendingEvents, ProcessPlaybackEvent, SendIdleEvents, SetAppName, SetAssertMode, SetCallFilterEvent, SetClassName, SetExitOnFrameDelete, SetPlaybackEventPending, SetPrintMode, SetUseBestVisual, SetVendorName, WakeUpIdle, Yield, __swig_destroy__

Inherited from wx._core.PyApp (private): _BootstrapApp, _setCallbackInfo

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, ProcessEvent, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind, __repr__

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: IsSameAs

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods [hide private]

Inherited from wx._core.PyApp: GetComCtl32Version, GetMacAboutMenuItemId, GetMacExitMenuItemId, GetMacHelpMenuTitleName, GetMacPreferencesMenuItemId, GetMacSupportPCMenuShortcuts, IsDisplayAvailable, IsMainLoopRunning, SetMacAboutMenuItemId, SetMacExitMenuItemId, SetMacHelpMenuTitleName, SetMacPreferencesMenuItemId, SetMacSupportPCMenuShortcuts

Class Variables [hide private]
  outputWindowClass = <application.feedback.FeedbackWindow insta...
A class that can be used for redirecting Python's stdout and stderr streams.
  filterEventCallables = set([])
  imageCache = {}
  StartupScriptDone = True
Properties [hide private]

Inherited from wx._core.PyApp: Active, AppName, AssertMode, ClassName, ExitOnFrameDelete, LayoutDirection, PrintMode, TopWindow, Traits, UseBestVisual, VendorName, thisown

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from object: __class__

Method Details [hide private]

FilterEvent(self, event)

source code 

FilterEvent(self, Event event) -> int

Filters all events. SetCallFilterEvent controls whether or not your override is called.
Overrides: wx._core.PyApp.FilterEvent
(inherited documentation)

localeChanged(self)

source code 
See if the locale changed since the last time we ran Chandler. (Called at startup to see if we need to blow away any locale-sensitive repository indexes. Only checks once, then caches the result in a non- persistent attribute)

GetRawImage(self, name, copy=True)

source code 
Return None if image isn't found, otherwise return the raw image. Also look first for platform specific images.

GetImage(self, name)

source code 
Return None if image isn't found, otherwise loads a bitmap. Looks first for platform specific bitmaps.

OnCommand(self, event)

source code 
Catch commands and pass them along to the blocks. Our events have ids greater than wx.ID_HIGHEST Delay imports to avoid circular references.

OnExit(self)

source code 
Main application termination. Called after the window is torn down.

restart(self, *args, **kwds)

source code 

Restart the application.

The application is restarted using the same command it was started
with.

Optional arguments passed in via C{args} are appended to the command 
first.

Optional named arguments passed in via C{kwds} are appended to the 
command next - in no particular order - by pre-pending '--' to their
name which must be a valid command line argument for the application. 

Argument values may be of any type that can be represented as a
string. Unicode values are encoded using the system's file system
encoding. On Windows, values containing space characters are wrapped
with C{"} if there are not already. If a keyword argument's value is
C{True}, only its name is appended to the command.

For example: app.restart('--backup', restore=path, mvcc=True) would
             produce a command line containing:
             C{'--backup --restore=path --mvcc'}

_DispatchItemMethod(self, transportItem, methodName, transportArgs, keyArgs)

source code 

Private dispatcher for a method call on an item done between threads.

See CallItemMethodAsync() below for calling details.

Do a repository refresh to get the changes across from the other thread.

CallItemMethodAsync(self, item, methodName, *args, **keyArgs)

source code 

Post an asynchronous event that will call a method by name in an item. If item is a string then the block of that name will be used as the item.

Communication between threads is tricky. This method will convert all parameters into UUIDs for transport during the event posting, and they will be converted back to items when the event is received. However you will have to do a commits in the non-UI thread for the data to pass across smoothly. The UI thread will do a commit to get the changes on its side.

Also, items that are not simple arguments or keyword arguments will not be converted to/from UUID.

All other args are passed across to the other thread.
Parameters:
  • item (Item or String) - an Item whose method we wish to call
  • methodName (String) - the name of the method to call

Class Variable Details [hide private]

outputWindowClass

A class that can be used for redirecting Python's stdout and stderr streams. It will do nothing until something is wrriten to the stream at which point it will create a Frame with a text area and write the text there.
Value:
FeedbackWindow()