The DocApp class serves as the base class for pydocview applications and offers functionality such as services, creation of SDI and MDI frames, show tips, and a splash screen.
wx.core.App
Closes the child windows of a Document. |
|
Closes the splash window. |
|
Creates a child window of a document that edits an object. The child window |
|
Called by the DocManager to create and return a new Frame for a Document. |
|
Creates and returns an MDI Document Frame. |
|
Creates and returns an SDI Document Frame. |
|
Creates and returns an MDI Document Frame for a Tabbed MDI view |
|
Open any files specified in the given command line argument passed in via shared memory |
|
Returns |
|
Returns the default flags to use when creating the DocManager. |
|
Returns the application’s default icon. |
|
Returns the document manager associated to the DocApp. |
|
Utility method that finds the Edit menu within the menubar of a frame. |
|
Returns the instance of a particular type of service that has been installed |
|
Returns the DocService instances that have been installed into the DocApp. |
|
Returns |
|
Returns |
|
Installs an instance of a DocService into the DocApp. |
|
Returns |
|
Returns |
|
MacOpenFile(fileName) |
|
Called when an MDI Child Frame is closed. Calls SaveMDIDocumentFrameMaximizedState to |
|
Called when the MDI Parent Frame is closed. Remembers whether the MDI Parent Frame is |
|
Called when the DocApp is exited, enables the installed DocServices to exit |
|
Initializes the DocApp. |
|
Called to open files that have been passed to the application from the |
|
Processes an event, searching event tables and calling zero or more |
|
Enables services to process an event before the main window has a chance to |
|
Processes a UI event, searching event tables and calling zero or more |
|
Enables services to process a UI event before the main window has a chance |
|
Remember in the config whether the MDI Frame is maximized so that it can be restored |
|
Sets the application’s debug mode. |
|
Sets the application’s default icon. |
|
Sets the document manager associated with the DocApp and loads the |
|
Sets application’s single instance mode. |
|
Set to |
|
Shows a splash window with the given image. Input parameter ‘image’ can either be a wx.Bitmap or a filename. |
|
Shows the tip window, generally this is called when an application starts. |
DocApp
(wx.App)¶The DocApp class serves as the base class for pydocview applications and offers functionality such as services, creation of SDI and MDI frames, show tips, and a splash screen.
CloseChildDocuments
(self, parentDocument)¶Closes the child windows of a Document.
CloseSplash
(self)¶Closes the splash window.
CreateChildDocument
(self, parentDocument, documentType, objectToEdit, path='')¶Creates a child window of a document that edits an object. The child window is managed by the parent document frame, so it will be prompted to close if its parent is closed, etc. Child Documents are useful when there are complicated Views of a Document and users will need to tunnel into the View.
CreateDocumentFrame
(self, view, doc, flags, id = -1, title = "", pos = wx.DefaultPosition, size = wx.DefaultSize, style = wx.DEFAULT_FRAME_STYLE)¶Called by the DocManager to create and return a new Frame for a Document. Chooses whether to create an MDIChildFrame or SDI Frame based on the DocManager’s flags.
CreateMDIDocumentFrame
(self, doc, view, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE)¶Creates and returns an MDI Document Frame.
CreateSDIDocumentFrame
(self, doc, view, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE)¶Creates and returns an SDI Document Frame.
CreateTabbedDocumentFrame
(self, doc, view, id=-1, title="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=wx.DEFAULT_FRAME_STYLE)¶Creates and returns an MDI Document Frame for a Tabbed MDI view
DoBackgroundListenAndLoad
(self)¶Open any files specified in the given command line argument passed in via shared memory
GetDebug
(self)¶Returns True
if the application is in debug mode.
GetDefaultDocManagerFlags
(self)¶Returns the default flags to use when creating the DocManager.
GetDefaultIcon
(self)¶Returns the application’s default icon.
GetDocumentManager
(self)¶Returns the document manager associated to the DocApp.
GetEditMenu
(self, frame)¶Utility method that finds the Edit menu within the menubar of a frame.
GetService
(self, type)¶Returns the instance of a particular type of service that has been installed into the DocApp. For example, “wx.GetApp().GetService(pydocview.OptionsService)” returns the instance of the OptionsService that is running within the DocApp.
GetServices
(self)¶Returns the DocService instances that have been installed into the DocApp.
GetSingleInstance
(self)¶Returns True
if the application is in single instance mode. Used to determine if multiple instances of the application is allowed to launch.
GetUseTabbedMDI
(self)¶Returns True
if Windows MDI should use folder tabs instead of child windows.
InstallService
(self, service)¶Installs an instance of a DocService into the DocApp.
IsMDI
(self)¶Returns True
if the application is in MDI mode.
IsSDI
(self)¶Returns True
if the application is in SDI mode.
MacOpenFile
(self, filename)¶MacOpenFile(fileName)
Called in response of an “open-document” Apple event.
OnCloseChildWindow
(self, event)¶Called when an MDI Child Frame is closed. Calls SaveMDIDocumentFrameMaximizedState to remember whether the MDI Frame is maximized so that it can be restored on open.
OnCloseMainWindow
(self, event)¶Called when the MDI Parent Frame is closed. Remembers whether the MDI Parent Frame is maximized.
OnExit
(self)¶Called when the DocApp is exited, enables the installed DocServices to exit and saves the DocManager’s file history.
OnInit
(self)¶Initializes the DocApp.
OpenCommandLineArgs
(self)¶Called to open files that have been passed to the application from the command line.
OpenMainFrame
(self)¶ProcessEvent
(self, event)¶Processes an event, searching event tables and calling zero or more suitable event handler function(s). Note that the ProcessEvent method is called from the wxPython docview framework directly since wxPython does not have a virtual ProcessEvent function.
ProcessEventBeforeWindows
(self, event)¶Enables services to process an event before the main window has a chance to process the window.
ProcessUpdateUIEvent
(self, event)¶Processes a UI event, searching event tables and calling zero or more suitable event handler function(s). Note that the ProcessEvent method is called from the wxPython docview framework directly since wxPython does not have a virtual ProcessEvent function.
ProcessUpdateUIEventBeforeWindows
(self, event)¶Enables services to process a UI event before the main window has a chance to process the window.
SaveMDIDocumentFrameMaximizedState
(self, maximized)¶Remember in the config whether the MDI Frame is maximized so that it can be restored on open.
SetDebug
(self, debug)¶Sets the application’s debug mode.
SetDefaultIcon
(self, icon)¶Sets the application’s default icon.
SetDocumentManager
(self, docManager)¶Sets the document manager associated with the DocApp and loads the DocApp’s file history into the document manager.
SetSingleInstance
(self, singleInstance)¶Sets application’s single instance mode.
SetUseTabbedMDI
(self, useTabbedMDI)¶Set to True
if Windows MDI should use folder tabs instead of child windows.
ShowSplash
(self, image)¶Shows a splash window with the given image. Input parameter ‘image’ can either be a wx.Bitmap or a filename.
ShowTip
(self, frame, tipProvider)¶Shows the tip window, generally this is called when an application starts. A wx.TipProvider must be passed.