Name

SernaDoc — Document components.

Synopsis

class SernaDoc (UiDocumentSernaApi::UiDocument) :
  

  enum MessageBoxSeverity { MB_INFO, MB_WARNING, MB_CRITICAL, CHECKED_WARNING };
  # construct/copy/destruct
  __init__(SernaApiBase * = 0, DocumentPlugin * = 0)
  __init__(const SernaDoc &)
  SernaDoc& operator=(const SernaDoc &)
  __del__()

  # public member functions

  int showMessageBox(MessageBoxSeverity, const SString &, const SString &, 
                     const SString &, const SString & = SString(), 
                     const SString & = SString()) const
  PropertyNode getDsi() const
  StructEditor structEditor() const
  MessageView messageView() const
  UiItem buildUiItem(const PropertyNode &, const SString & = SString()) const
  None showHelp(const SString &, const SString & = SString()) const
  None setActive() 
  MimeHandler mimeHandler() const
  Grove groveFromTemplate(const PropertyNode &, const SString &, 
                          const SString & = SString()) const
  None setRep(SernaApiBase *) 
  DocumentPlugin * plugin() const

  # public static functions

  SernaDoc activeDocument() 

Description

Provides access to the StructEditor and the DSI tree of a document opened in Serna.

SernaDoc construct/copy/destruct

  1. __init__(SernaApiBase * = 0, DocumentPlugin * = 0)


  2. __init__(const SernaDoc & )


  3. SernaDoc& operator=(const SernaDoc & )


  4. __del__()


SernaDoc public member functions

  1. int showMessageBox(MessageBoxSeverity severity, const SString & caption,                    const SString & message, const SString & button0,                    const SString & button1 = SString(),                    const SString & button2 = SString()) const

    Shows message window with caption, message and buttons defined. The severity is an enumerated value.In python use as SernaDoc class member, e.g: self.MB_INFO .


  2. PropertyNode getDsi() const

    Obtain Document Source Information property node. DSI is a property tree which contain various information about opened document (current document path, stylesheet paths, settings, etc).


  3. StructEditor structEditor() const

    Returns reference to the StructEditor instance.


  4. MessageView messageView() const

    Returns reference to the Serna messages window.


  5. UiItem buildUiItem(const PropertyNode & uiTree,                    const SString & childName = SString()) const

    Builds UI item from an XML representation. uiTree is a property tree which represents UI item(s), and and childName is an optional name of the (child) UI item which can be specified if we want to build only particular subtree.


  6. None showHelp(const SString & ref, const SString & adp = SString()) const


  7. None setActive()

    Makes this document active (active tab in the active window)


  8. MimeHandler mimeHandler() const

    Returns MIME callback registry for current document.


  9. Grove groveFromTemplate(const PropertyNode & docTemplate, const SString & url,                         const SString & skel = SString()) const

    Build new grove as specified in document template.


  10. None setRep(SernaApiBase * )


  11. DocumentPlugin * plugin() const

    Returns associated DocumentPlugin instance.


SernaDoc public static functions

  1. SernaDoc activeDocument()

    Returns currently active document (active tab in the active window)