ContRap-Core
Public Types | Public Member Functions | Protected Attributes

crp::XMLRule Class Reference

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.

Detailed Description

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.


Member Enumeration Documentation

Layout of the rule.

Vertical elements

Enumerator:
VERTICAL 
HORIZONTAL 
GRID 

Constructor & Destructor Documentation

crp::XMLRule::XMLRule ( )

Creates an empty rule.


Member Function Documentation

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.

Parameters:
boxLayout box
void crp::XMLRule::set_rule ( const std::string &  key,
XMLDataPool glyphs 
)

Populates the XMLRule with the contents of an abstract description.

Parameters:
keyKey to the glyphs description
glyphsPool with description of glyphs

Field Documentation

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.


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