Package wx :: Package lib :: Module pydocview :: Class ChildDocument
[frames | no frames]

Type ChildDocument

object --+            
         |            
    Object --+        
             |        
    EvtHandler --+    
                 |    
          Document --+
                     |
                    ChildDocument


A ChildDocument is a document that represents a portion of a Document. The child document is managed by the parent document, 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 Summary
  GetData(self)
Returns the data that the ChildDocument contains.
  GetParentDocument(self)
Returns the parent Document of the ChildDocument.
  OnOpenDocument(self, filename)
Called when the ChildDocument is opened and does the minimum such that the ChildDocument looks like a real Document to the framework.
  OnSaveDocument(self, filename)
Called when the ChildDocument is saved and does the minimum such that the ChildDocument looks like a real Document to the framework.
  Save(self)
Called when the ChildDocument is saved and does the minimum such that the ChildDocument looks like a real Document to the framework.
  SaveAs(self)
Called when the ChildDocument is saved and does the minimum such that the ChildDocument looks like a real Document to the framework.
  SetData(self, data)
Sets the data that the ChildDocument contains.
  SetParentDocument(self, parentDocument)
Sets the parent Document of the ChildDocument.
    Inherited from Document
  __init__(self, parent)
Constructor.
  AddView(self, view)
If the view is not already in the list of views, adds the view and calls OnChangedViewList.
  Close(self)
Closes the document, by calling OnSaveModified and then (if this true) OnCloseDocument.
  DeleteAllViews(self)
Calls wxView.Close and deletes each view.
  DeleteContents(self)
Deletes the contents of the document.
  Destroy(self)
Destructor.
  Draw(context)
Called by printing framework to draw the view.
  GetCommandProcessor(self)
Returns the command processor associated with this document.
  GetDocumentManager(self)
Returns the associated document manager.
  GetDocumentModificationDate(self)
Returns the file's modification date when it was loaded from disk.
  GetDocumentName(self)
The document type name given to the wxDocTemplate constructor, copied to this document when the document is created.
  GetDocumentSaved(self)
Returns True if the document has been saved.
  GetDocumentTemplate(self)
Returns the template that created the document.
  GetDocumentWindow(self)
Intended to return a suitable window for using as a parent for document-related dialog boxes.
  GetFilename(self)
Gets the filename associated with this document, or "" if none is associated.
  GetFirstView(self)
A convenience function to get the first view for a document, because in many cases a document will only have a single view.
  GetPrintableName(self)
Copies a suitable document name into the supplied name buffer.
  GetTitle(self)
Gets the title for this document.
  GetViews(self)
Returns the list whose elements are the views on the document.
  GetWriteable(self)
Returns true if the document can be written to its accociated file path.
  IsDocumentModificationDateCorrect(self)
Returns False if the file has been modified outside of the application.
  IsModified(self)
Returns true if the document has been modified since the last save, false otherwise.
  LoadObject(self, file)
Override this function and call it from your own LoadObject before loading your own data.
  Modify(self, modify)
Call with true to mark the document as modified since the last save, false otherwise.
  NotifyClosing(self)
Notifies the views that the document is going to close.
  OnChangedViewList(self)
Called when a view is added to or deleted from this document.
  OnCloseDocument(self)
The default implementation calls DeleteContents (an empty implementation) sets the modified flag to false.
  OnCreate(self, path, flags)
The default implementation calls DeleteContents (an empty implementation) sets the modified flag to false.
  OnCreateCommandProcessor(self)
Override this function if you want a different (or no) command processor to be created when the document is created.
  OnNewDocument(self)
The default implementation calls OnSaveModified and DeleteContents, makes a default title for the document, and notifies the views that the filename (in fact, the title) has changed.
  OnSaveModified(self)
If the document has been modified, prompts the user to ask if the changes should be changed.
  ProcessEvent(self, event)
Processes an event, searching event tables and calling zero or more suitable event handler function(s).
  RemoveView(self, view)
Removes the view from the document's list of views, and calls OnChangedViewList.
  Revert(self)
Override this function to revert the document to its last saved state.
  SaveObject(self, file)
Override this function and call it from your own SaveObject before saving your own data.
  SetCommandProcessor(self, processor)
Sets the command processor to be used for this document.
  SetDocumentModificationDate(self)
Saves the file's last modification date.
  SetDocumentName(self, name)
Sets he document type name given to the wxDocTemplate constructor, copied to this document when the document is created.
  SetDocumentSaved(self, saved)
Sets whether the document has been saved.
  SetDocumentTemplate(self, template)
Sets the template that created the document.
  SetFilename(self, filename, notifyViews)
Sets the filename for this document.
  SetTitle(self, title)
Sets the title for this document.
  SetWriteable(self, writeable)
Set to False if the document can not be saved.
  UpdateAllViews(self, sender, hint)
Updates all views.
    Inherited from EvtHandler
  __repr__(self)
  AddPendingEvent(self, event)
  Bind(self, event, handler, source, id, id2)
Bind an event to an event handler.
  Connect(self, id, lastId, eventType, func)
bool Disconnect(self, id, lastId, eventType)
bool GetEvtHandlerEnabled(self)
EvtHandler GetNextHandler(self)
EvtHandler GetPreviousHandler(self)
  ProcessPendingEvents(self)
  SetEvtHandlerEnabled(self, enabled)
  SetNextHandler(self, handler)
  SetPreviousHandler(self, handler)
  Unbind(self, event, source, id, id2)
Disconencts the event handler binding for event from self.
    Inherited from Object
String GetClassName(self)
Returns the class name of the C++ class using wxRTTI.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Method Details

GetData(self)

Returns the data that the ChildDocument contains.

GetParentDocument(self)

Returns the parent Document of the ChildDocument.

OnOpenDocument(self, filename)

Called when the ChildDocument is opened and does the minimum such that the ChildDocument looks like a real Document to the framework.

Overrides:
wx.lib.docview.Document.OnOpenDocument

OnSaveDocument(self, filename)

Called when the ChildDocument is saved and does the minimum such that the ChildDocument looks like a real Document to the framework.

Overrides:
wx.lib.docview.Document.OnSaveDocument

Save(self)

Called when the ChildDocument is saved and does the minimum such that the ChildDocument looks like a real Document to the framework.

Overrides:
wx.lib.docview.Document.Save

SaveAs(self)

Called when the ChildDocument is saved and does the minimum such that the ChildDocument looks like a real Document to the framework.

Overrides:
wx.lib.docview.Document.SaveAs

SetData(self, data)

Sets the data that the ChildDocument contains.

SetParentDocument(self, parentDocument)

Sets the parent Document of the ChildDocument.


Generated by Epydoc 2.1.20050511.rpd on Sat Jun 16 16:41:57 2007 http://epydoc.sf.net