Phoenix Logo

phoenix_title wx.lib.pydocview.DocApp

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.


class_hierarchy Class Hierarchy

Inheritance diagram for class DocApp:


super_classes Known Superclasses

wx.core.App


method_summary Methods Summary

CloseChildDocuments Closes the child windows of a Document.
CloseSplash Closes the splash window.
CreateChildDocument Creates a child window of a document that edits an object. The child window
CreateDocumentFrame Called by the DocManager to create and return a new Frame for a Document.
CreateMDIDocumentFrame Creates and returns an MDI Document Frame.
CreateSDIDocumentFrame Creates and returns an SDI Document Frame.
CreateTabbedDocumentFrame Creates and returns an MDI Document Frame for a Tabbed MDI view
DoBackgroundListenAndLoad Open any files specified in the given command line argument passed in via shared memory
GetDebug Returns True if the application is in debug mode.
GetDefaultDocManagerFlags Returns the default flags to use when creating the DocManager.
GetDefaultIcon Returns the application’s default icon.
GetDocumentManager Returns the document manager associated to the DocApp.
GetEditMenu Utility method that finds the Edit menu within the menubar of a frame.
GetService Returns the instance of a particular type of service that has been installed
GetServices Returns the DocService instances that have been installed into the DocApp.
GetSingleInstance Returns True if the application is in single instance mode. Used to determine if multiple instances of the application is allowed to launch.
GetUseTabbedMDI Returns True if Windows MDI should use folder tabs instead of child windows.
InstallService Installs an instance of a DocService into the DocApp.
IsMDI Returns True if the application is in MDI mode.
IsSDI Returns True if the application is in SDI mode.
MacOpenFile  
OnCloseChildWindow Called when an MDI Child Frame is closed. Calls SaveMDIDocumentFrameMaximizedState to
OnCloseMainWindow Called when the MDI Parent Frame is closed. Remembers whether the MDI Parent Frame is
OnExit Called when the DocApp is exited, enables the installed DocServices to exit
OnInit Initializes the DocApp.
OpenCommandLineArgs Called to open files that have been passed to the application from the
OpenMainFrame  
ProcessEvent Processes an event, searching event tables and calling zero or more
ProcessEventBeforeWindows Enables services to process an event before the main window has a chance to
ProcessUpdateUIEvent Processes a UI event, searching event tables and calling zero or more
ProcessUpdateUIEventBeforeWindows Enables services to process a UI event before the main window has a chance
SaveMDIDocumentFrameMaximizedState Remember in the config whether the MDI Frame is maximized so that it can be restored
SetDebug Sets the application’s debug mode.
SetDefaultIcon Sets the application’s default icon.
SetDocumentManager Sets the document manager associated with the DocApp and loads the
SetSingleInstance Sets application’s single instance mode.
SetUseTabbedMDI Set to True if Windows MDI should use folder tabs instead of child windows.
ShowSplash Shows a splash window with the given image. Input parameter ‘image’ can either be a wx.Bitmap or a filename.
ShowTip Shows the tip window, generally this is called when an application starts.

api Class API



class 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.


Methods



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 isntance 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)


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.