1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335
|
.. 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
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>DocApp</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.pydocview.DocApp_inheritance.png" alt="Inheritance diagram of DocApp" usemap="#dummy" class="inheritance"/></center>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.pydocview.DocApp.html" title="wx.lib.pydocview.DocApp" alt="" coords="84,392,272,421"/> <area shape="rect" id="node3" href="wx.PyApp.html" title="wx.PyApp" alt="" coords="135,237,221,267"/> <area shape="rect" id="node4" href="wx.AppConsole.html" title="wx.AppConsole" alt="" coords="117,160,239,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="50,83,167,112"/> <area shape="rect" id="node6" href="wx.EventFilter.html" title="wx.EventFilter" alt="" coords="191,83,306,112"/> <area shape="rect" id="node7" href="wx.Object.html" title="wx.Object" alt="" coords="5,5,92,35"/> <area shape="rect" id="node8" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="117,5,223,35"/> </map>
</p>
</div>
|
|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.
|