Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PG_PropertyEditor Class Reference

Inheritance diagram for PG_PropertyEditor:

Inheritance graph
[legend]
Collaboration diagram for PG_PropertyEditor:

Collaboration graph
[legend]
List of all members.

Detailed Description

Widget for editing properties.

Author:
Martin Bickel
This is a property editor as popular with VisualBasic and other RAD tools It is a container for other a number of PropertyFields


Public Member Functions

 PG_PropertyEditor (PG_Widget *parent, const PG_Rect &rect, const std::string &style="PropertyEditor", int labelWidthPercentage=70)
 Creates a PG_PropertyEditor widget.
virtual std::string GetStyleName (const std::string &widgetName)
 Returns the style name that the PropertyFields shall use.
void Reload ()
 Reloads all PropertyFields from their original values and updates the widget.
bool Valid (bool focus=false)
 Checks if all PropertyFields contain valid values.
bool Apply ()
 Writes the PropertyFields' values to their original variables, provided they are valid.
PG_Rect RegisterProperty (const std::string &name, PG_PropertyEditorField *propertyEditorField, int height=-1)
 Adds a PropertyField to the widget.
 ~PG_PropertyEditor ()

Classes

class  PG_PropertyEditorField
 Interface for all the different PropertyFields. More...


Constructor & Destructor Documentation

PG_PropertyEditor::PG_PropertyEditor PG_Widget parent,
const PG_Rect rect,
const std::string &  style = "PropertyEditor",
int  labelWidthPercentage = 70
 

Creates a PG_PropertyEditor widget.

Parameters:
parent the parentobject for the new widget or NULL if it is a toplevel widget
rect initial position for the widget
style Widgetstyle to load. This style should be defined at your theme file (default = "PropertyEditor")
labelWidthPercentage The PropertyEditor consists of two columns: label and editable field. This sets the width of the label column

PG_PropertyEditor::~PG_PropertyEditor  ) 
 


Member Function Documentation

bool PG_PropertyEditor::Apply  ) 
 

Writes the PropertyFields' values to their original variables, provided they are valid.

virtual std::string PG_PropertyEditor::GetStyleName const std::string &  widgetName  )  [virtual]
 

Returns the style name that the PropertyFields shall use.

PG_Rect PG_PropertyEditor::RegisterProperty const std::string &  name,
PG_PropertyEditorField propertyEditorField,
int  height = -1
 

Adds a PropertyField to the widget.

The PropertyEditor will take ownership of the PropertyEditorFields and delete them on its own destruction.

void PG_PropertyEditor::Reload  ) 
 

Reloads all PropertyFields from their original values and updates the widget.

bool PG_PropertyEditor::Valid bool  focus = false  ) 
 

Checks if all PropertyFields contain valid values.


Generated on Tue Jun 24 02:26:20 2008 for ParaGUI by  doxygen 1.4.2