Role Playing Database (API Documentation)  3.1.3
Public Member Functions | Static Public Member Functions | List of all members
RolePlayingDB3::XMLContentEditor Class Reference

Public Member Functions

 getElementWidgetById (id)
 
 getpageno ()
 
 getlineno ()
 
 bcmdmethod (id="")
 
 XMLContentEditor (...)
 
 ~XMLContentEditor ()
 
 recreateXML (file)
 
 outputXMLToPDF (pdfobj, heading="Sheet", curpage=0, curline=1000)
 

Static Public Member Functions

static ExtractTagValue (xmlstring, name, default)
 

Detailed Description

Widget to for editing XML Content. Takes a XML string and builds a widget to edit it.

Constructor & Destructor Documentation

◆ XMLContentEditor()

RolePlayingDB3::XMLContentEditor::XMLContentEditor (   ...)

Constructor

Parameters
widgetpathThe widget path.
...Options:
  • -xml The XML string (Required).
  • -templatevariable The template variable.
  • -dirtyvariable The dirty variable.
  • -basedirectory The base directory.
  • -filewidgethandler The file widget handler.
  • -xmlfile The file to save the XML to.
  • -buttoncommand The button callback.
  • -isnewobject Flag to indicate that this is a new entity.
  • -rootcontainer The root container's tag.

◆ ~XMLContentEditor()

RolePlayingDB3::XMLContentEditor::~XMLContentEditor ( )

Destory the XML tree (free up memory).

Member Function Documentation

◆ bcmdmethod()

RolePlayingDB3::XMLContentEditor::bcmdmethod ( id  = "")

Button command method

Parameters
idButton id

◆ ExtractTagValue()

static RolePlayingDB3::XMLContentEditor::ExtractTagValue ( xmlstring  ,
name  ,
default   
)
static

Fetch the value (character data) of a given Field by name in a XML String.

Parameters
xmlstringThe XML string.
nameThe name.
defaultThe value to return if the named field is not found.

◆ getElementWidgetById()

RolePlayingDB3::XMLContentEditor::getElementWidgetById ( id  )

Get an element's widget, given the element's id.

Parameters
idthe element id.
Returns
a widget or {}.

◆ getlineno()

RolePlayingDB3::XMLContentEditor::getlineno ( )

Return the line number.

Returns
the line number.

◆ getpageno()

RolePlayingDB3::XMLContentEditor::getpageno ( )

Return page number

Returns
the page number.

◆ outputXMLToPDF()

RolePlayingDB3::XMLContentEditor::outputXMLToPDF ( pdfobj  ,
heading  = "Sheet",
curpage  = 0,
curline  = 1000 
)

Output the XML tree as PDF to a pdfobject.

Parameters
pdfobjThe pdfobject to write to.
headingThe main heading.
curpageThe current page number.
curlineThe current line number.

◆ recreateXML()

RolePlayingDB3::XMLContentEditor::recreateXML ( file  )

Regenerate the XML string and save it to a file.

Parameters
fileThe name of the file to write to.

The documentation for this class was generated from the following file: