WINDEX
Public Member Functions | List of all members
wex::property Class Reference

A name value pair. More...

#include <propertygrid.h>

Public Member Functions

 property (gui *parent, const std::string &name, const std::string &value)
 
 property (gui *parent, const std::string &name, bool value)
 
 property (gui *parent, const std::string &name, const std::vector< std::string > &value)
 
 property (gui *parent, const std::string &name)
 construct a category
 
 ~property ()
 destructor
 
void move (const std::vector< int > &r)
 
void labelWidth (int w)
 
void bgcolor (int color)
 
bool labelClicked () const
 
void labelClicked (bool f)
 
std::string labeltext () const
 
void tabList (bool f=true)
 
propertytooltip (const std::string &tip, int width=0)
 Add pop help message when mouse hovers over property label. More...
 
propertyreadonly (bool f=true)
 Set property to be readonly. More...
 
void show (bool f=true)
 
void update ()
 Update ( redraw ) property child widgets. More...
 
const std::string & name () const
 
const std::string value () const
 
bool isChecked ()
 
propertyvalue (const std::string v)
 set property value
 
void value_bool (bool v)
 
void saveValue ()
 copy value from gui into myValue attribute
 
const std::string savedValue () const
 
bool isCategory () const
 
bool isExpanded () const
 
void expand (bool f)
 
void change (std::function< void()> f)
 register function to call when property value changes
 

Detailed Description

A name value pair.

Member Function Documentation

◆ readonly()

property& wex::property::readonly ( bool  f = true)
inline

Set property to be readonly.

Parameters
[in]ftrue if property should be readonly, default true
Returns
property reference

A property defaults to editable when constructed.

◆ tooltip()

property& wex::property::tooltip ( const std::string &  tip,
int  width = 0 
)
inline

Add pop help message when mouse hovers over property label.

Parameters
[in]tipthe help message
[in]widthof multiline tooltip, default single line
Returns
property reference

◆ update()

void wex::property::update ( )
inline

Update ( redraw ) property child widgets.

Some widgets update nicely when the window containing the property grid resizes Others, most significantly labels, do not. So application code should handle containing window resizes by calling propertyGrid::update() which will call this method on all properties.


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