ContRap-Core
|
Class XMLRule is a descriptor of complex drawing objects like tables, lists, etc. More...
#include <xmllayout.h>
Public Types | |
enum | Layout { VERTICAL, HORIZONTAL, GRID } |
Layout of the rule. More... | |
Public Member Functions | |
XMLRule () | |
Creates an empty rule. | |
void | set_rule (const std::string &key, XMLDataPool *glyphs) |
Populates the XMLRule with the contents of an abstract description. | |
void | apply_rule (XMLLayoutBox &box) |
Creates a layout box according to the contents of the rule. | |
Protected Attributes | |
Layout | layout |
Layout of the rule. | |
bool | wrap |
Determines if the layout must be wrapped at maximum width. |
Class XMLRule is a descriptor of complex drawing objects like tables, lists, etc.
An XMLRule instance is initialized with an XML formatted text of the rule and creates an algorithm to speedup the creation of XMLLayoutBoxes.
enum crp::XMLRule::Layout |
crp::XMLRule::XMLRule | ( | ) |
Creates an empty rule.
void crp::XMLRule::apply_rule | ( | XMLLayoutBox & | box | ) |
Creates a layout box according to the contents of the rule.
This method can change the appearance of the children boxes.
box | Layout box |
void crp::XMLRule::set_rule | ( | const std::string & | key, |
XMLDataPool * | glyphs | ||
) |
Populates the XMLRule with the contents of an abstract description.
key | Key to the glyphs description |
glyphs | Pool with description of glyphs |
Layout crp::XMLRule::layout [protected] |
Layout of the rule.
bool crp::XMLRule::wrap [protected] |
Determines if the layout must be wrapped at maximum width.
This option is only relevant when the widget is a horizontal layout.