.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.pydocview .. highlight:: python .. _wx.lib.pydocview.DocApp: ========================================================================================================================================== |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 ================================= .. raw:: html
Inheritance diagram for class DocApp:
| |super_classes| Known Superclasses ================================== :class:`wx.core.App` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.pydocview.DocApp.CloseChildDocuments` Closes the child windows of a Document. :meth:`~wx.lib.pydocview.DocApp.CloseSplash` Closes the splash window. :meth:`~wx.lib.pydocview.DocApp.CreateChildDocument` Creates a child window of a document that edits an object. The child window :meth:`~wx.lib.pydocview.DocApp.CreateDocumentFrame` Called by the DocManager to create and return a new Frame for a Document. :meth:`~wx.lib.pydocview.DocApp.CreateMDIDocumentFrame` Creates and returns an MDI Document Frame. :meth:`~wx.lib.pydocview.DocApp.CreateSDIDocumentFrame` Creates and returns an SDI Document Frame. :meth:`~wx.lib.pydocview.DocApp.CreateTabbedDocumentFrame` Creates and returns an MDI Document Frame for a Tabbed MDI view :meth:`~wx.lib.pydocview.DocApp.DoBackgroundListenAndLoad` Open any files specified in the given command line argument passed in via shared memory :meth:`~wx.lib.pydocview.DocApp.GetDebug` Returns ``True`` if the application is in debug mode. :meth:`~wx.lib.pydocview.DocApp.GetDefaultDocManagerFlags` Returns the default flags to use when creating the DocManager. :meth:`~wx.lib.pydocview.DocApp.GetDefaultIcon` Returns the application's default icon. :meth:`~wx.lib.pydocview.DocApp.GetDocumentManager` Returns the document manager associated to the DocApp. :meth:`~wx.lib.pydocview.DocApp.GetEditMenu` Utility method that finds the Edit menu within the menubar of a frame. :meth:`~wx.lib.pydocview.DocApp.GetService` Returns the instance of a particular type of service that has been installed :meth:`~wx.lib.pydocview.DocApp.GetServices` Returns the DocService instances that have been installed into the DocApp. :meth:`~wx.lib.pydocview.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. :meth:`~wx.lib.pydocview.DocApp.GetUseTabbedMDI` Returns ``True`` if Windows MDI should use folder tabs instead of child windows. :meth:`~wx.lib.pydocview.DocApp.InstallService` Installs an instance of a DocService into the DocApp. :meth:`~wx.lib.pydocview.DocApp.IsMDI` Returns ``True`` if the application is in MDI mode. :meth:`~wx.lib.pydocview.DocApp.IsSDI` Returns ``True`` if the application is in SDI mode. :meth:`~wx.lib.pydocview.DocApp.MacOpenFile` MacOpenFile(fileName) :meth:`~wx.lib.pydocview.DocApp.OnCloseChildWindow` Called when an MDI Child Frame is closed. Calls SaveMDIDocumentFrameMaximizedState to :meth:`~wx.lib.pydocview.DocApp.OnCloseMainWindow` Called when the MDI Parent Frame is closed. Remembers whether the MDI Parent Frame is :meth:`~wx.lib.pydocview.DocApp.OnExit` Called when the DocApp is exited, enables the installed DocServices to exit :meth:`~wx.lib.pydocview.DocApp.OnInit` Initializes the DocApp. :meth:`~wx.lib.pydocview.DocApp.OpenCommandLineArgs` Called to open files that have been passed to the application from the :meth:`~wx.lib.pydocview.DocApp.OpenMainFrame` :meth:`~wx.lib.pydocview.DocApp.ProcessEvent` Processes an event, searching event tables and calling zero or more :meth:`~wx.lib.pydocview.DocApp.ProcessEventBeforeWindows` Enables services to process an event before the main window has a chance to :meth:`~wx.lib.pydocview.DocApp.ProcessUpdateUIEvent` Processes a UI event, searching event tables and calling zero or more :meth:`~wx.lib.pydocview.DocApp.ProcessUpdateUIEventBeforeWindows` Enables services to process a UI event before the main window has a chance :meth:`~wx.lib.pydocview.DocApp.SaveMDIDocumentFrameMaximizedState` Remember in the config whether the MDI Frame is maximized so that it can be restored :meth:`~wx.lib.pydocview.DocApp.SetDebug` Sets the application's debug mode. :meth:`~wx.lib.pydocview.DocApp.SetDefaultIcon` Sets the application's default icon. :meth:`~wx.lib.pydocview.DocApp.SetDocumentManager` Sets the document manager associated with the DocApp and loads the :meth:`~wx.lib.pydocview.DocApp.SetSingleInstance` Sets application's single instance mode. :meth:`~wx.lib.pydocview.DocApp.SetUseTabbedMDI` Set to ``True`` if Windows MDI should use folder tabs instead of child windows. :meth:`~wx.lib.pydocview.DocApp.ShowSplash` Shows a splash window with the given image. Input parameter 'image' can either be a wx.Bitmap or a filename. :meth:`~wx.lib.pydocview.DocApp.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. .. method:: CloseChildDocuments(self, parentDocument) Closes the child windows of a Document. .. method:: CloseSplash(self) Closes the splash window. .. method:: 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. .. method:: 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. .. method:: 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. .. method:: 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. .. method:: 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 .. method:: DoBackgroundListenAndLoad(self) Open any files specified in the given command line argument passed in via shared memory .. method:: GetDebug(self) Returns ``True`` if the application is in debug mode. .. method:: GetDefaultDocManagerFlags(self) Returns the default flags to use when creating the DocManager. .. method:: GetDefaultIcon(self) Returns the application's default icon. .. method:: GetDocumentManager(self) Returns the document manager associated to the DocApp. .. method:: GetEditMenu(self, frame) Utility method that finds the Edit menu within the menubar of a frame. .. method:: 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. .. method:: GetServices(self) Returns the DocService instances that have been installed into the DocApp. .. method:: 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. .. method:: GetUseTabbedMDI(self) Returns ``True`` if Windows MDI should use folder tabs instead of child windows. .. method:: InstallService(self, service) Installs an instance of a DocService into the DocApp. .. method:: IsMDI(self) Returns ``True`` if the application is in MDI mode. .. method:: IsSDI(self) Returns ``True`` if the application is in SDI mode. .. method:: MacOpenFile(self, filename) MacOpenFile(fileName) Called in response of an "open-document" Apple event. .. method:: 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. .. method:: OnCloseMainWindow(self, event) Called when the MDI Parent Frame is closed. Remembers whether the MDI Parent Frame is maximized. .. method:: OnExit(self) Called when the DocApp is exited, enables the installed DocServices to exit and saves the DocManager's file history. .. method:: OnInit(self) Initializes the DocApp. .. method:: OpenCommandLineArgs(self) Called to open files that have been passed to the application from the command line. .. method:: OpenMainFrame(self) .. method:: 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. .. method:: ProcessEventBeforeWindows(self, event) Enables services to process an event before the main window has a chance to process the window. .. method:: 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. .. method:: ProcessUpdateUIEventBeforeWindows(self, event) Enables services to process a UI event before the main window has a chance to process the window. .. method:: SaveMDIDocumentFrameMaximizedState(self, maximized) Remember in the config whether the MDI Frame is maximized so that it can be restored on open. .. method:: SetDebug(self, debug) Sets the application's debug mode. .. method:: SetDefaultIcon(self, icon) Sets the application's default icon. .. method:: SetDocumentManager(self, docManager) Sets the document manager associated with the DocApp and loads the DocApp's file history into the document manager. .. method:: SetSingleInstance(self, singleInstance) Sets application's single instance mode. .. method:: SetUseTabbedMDI(self, useTabbedMDI) Set to ``True`` if Windows MDI should use folder tabs instead of child windows. .. method:: ShowSplash(self, image) Shows a splash window with the given image. Input parameter 'image' can either be a wx.Bitmap or a filename. .. method:: ShowTip(self, frame, tipProvider) Shows the tip window, generally this is called when an application starts. A wx.TipProvider must be passed.