SernaDoc — Document components.
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()
Provides access to the StructEditor and the DSI tree of a document opened in Serna.
SernaDoc
public member functionsShows 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 .
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).
StructEditor structEditor() const
Returns reference to the StructEditor instance.
MessageView messageView() const
Returns reference to the Serna messages window.
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.
Makes this document active (active tab in the active window)
MimeHandler mimeHandler() const
Returns MIME callback registry for current document.
Grove groveFromTemplate(const PropertyNode & docTemplate, const SString & url, const SString & skel = SString()) const
Build new grove as specified in document template.
DocumentPlugin * plugin() const
Returns associated DocumentPlugin instance.
SernaDoc
public static functionsSernaDoc activeDocument()
Returns currently active document (active tab in the active window)