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

PG_PropertyField_IntDropDown< IntType, iterator > Class Template Reference

Inheritance diagram for PG_PropertyField_IntDropDown< IntType, iterator >:

Inheritance graph
[legend]
Collaboration diagram for PG_PropertyField_IntDropDown< IntType, iterator >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename IntType, typename iterator = char*>
class PG_PropertyField_IntDropDown< IntType, iterator >

DropDown selector for a PG_PropertyEditor.

Author:
Martin Bickel
Editor for numerical values where each value is associated by a name. The value is selected by chosing the name from the dropdown widget.
Examples:

paratest.cpp.


Public Types

typedef PG_Signal2< PG_PropertyField_IntDropDown *,
IntType > 
DropDownPropertySignal

Public Member Functions

 PG_PropertyField_IntDropDown (PG_PropertyEditor *propertyEditor, const std::string &name, IntType *var, const char **names)
 Creates a PG_PropertyField_IntDropDown.
 PG_PropertyField_IntDropDown (PG_PropertyEditor *propertyEditor, const std::string &name, IntType *var, iterator begin, iterator end)
 Creates a PG_PropertyField_IntDropDown.
 PG_PropertyField_IntDropDown (PG_PropertyEditor *propertyEditor, const std::string &name, const IntType &var, const char **names)
 Creates a PG_PropertyField_IntDropDown.
 PG_PropertyField_IntDropDown (PG_PropertyEditor *propertyEditor, const std::string &name, const IntType &var, iterator begin, iterator end)
 Creates a PG_PropertyField_IntDropDown.
bool Valid ()
 checks if the entered value is valid
bool Apply ()
 Write the entered value back into the referenced variable (if it exists), provided the value is valid.
void Reload ()
 Reloads the entry field with the current value of the referenced variable (if it exists).

Public Attributes

DropDownPropertySignal sigValueChanged
DropDownPropertySignal sigValueApplied


Member Typedef Documentation

template<typename IntType, typename iterator = char*>
typedef PG_Signal2<PG_PropertyField_IntDropDown*, IntType> PG_PropertyField_IntDropDown< IntType, iterator >::DropDownPropertySignal
 


Constructor & Destructor Documentation

template<typename IntType, typename iterator = char*>
PG_PropertyField_IntDropDown< IntType, iterator >::PG_PropertyField_IntDropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
IntType *  var,
const char **  names
[inline]
 

Creates a PG_PropertyField_IntDropDown.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
var The variable that is edited. Make sure the variable exists for the whole lifetime of the PG_PropertyEditor
names A NULL terminated array of names for the different values of var

template<typename IntType, typename iterator = char*>
PG_PropertyField_IntDropDown< IntType, iterator >::PG_PropertyField_IntDropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
IntType *  var,
iterator  begin,
iterator  end
[inline]
 

Creates a PG_PropertyField_IntDropDown.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
var The variable that is edited. Make sure the variable exists for the whole lifetime of the PG_PropertyEditor
begin the start iterator of a container carrying the names for the values of var
end the end iterator

template<typename IntType, typename iterator = char*>
PG_PropertyField_IntDropDown< IntType, iterator >::PG_PropertyField_IntDropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
const IntType &  var,
const char **  names
[inline]
 

Creates a PG_PropertyField_IntDropDown.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
var The initial value of the field
names A NULL terminated array of names for the different values of var

template<typename IntType, typename iterator = char*>
PG_PropertyField_IntDropDown< IntType, iterator >::PG_PropertyField_IntDropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
const IntType &  var,
iterator  begin,
iterator  end
[inline]
 

Creates a PG_PropertyField_IntDropDown.

Parameters:
propertyEditor The PG_PropertyEditor for which the PropertyField shall be registered for
name The label shown for the PropertyField
var The initial value of the field
begin the start iterator of a container carrying the names for the values of var
end the end iterator


Member Function Documentation

template<typename IntType, typename iterator = char*>
bool PG_PropertyField_IntDropDown< IntType, iterator >::Apply  )  [inline, virtual]
 

Write the entered value back into the referenced variable (if it exists), provided the value is valid.

Returns:
false if the value is not valid

Implements PG_PropertyEditor::PG_PropertyEditorField.

template<typename IntType, typename iterator = char*>
void PG_PropertyField_IntDropDown< IntType, iterator >::Reload  )  [inline, virtual]
 

Reloads the entry field with the current value of the referenced variable (if it exists).

Implements PG_PropertyEditor::PG_PropertyEditorField.

template<typename IntType, typename iterator = char*>
bool PG_PropertyField_IntDropDown< IntType, iterator >::Valid  )  [inline, virtual]
 

checks if the entered value is valid

Implements PG_PropertyEditor::PG_PropertyEditorField.


Member Data Documentation

template<typename IntType, typename iterator = char*>
DropDownPropertySignal PG_PropertyField_IntDropDown< IntType, iterator >::sigValueApplied
 

template<typename IntType, typename iterator = char*>
DropDownPropertySignal PG_PropertyField_IntDropDown< IntType, iterator >::sigValueChanged
 



The ParaGUI Project - Alexander Pipelka