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

PG_PropertyField_DropDown< StringType, iterator > Class Template Reference

DropDown selector for a PG_PropertyEditor. More...

#include <pgpropertyfield_dropdown.h>

Inheritance diagram for PG_PropertyField_DropDown< StringType, iterator >:

Inheritance graph
[legend]
List of all members.

Public Types

typedef PG_Signal2< PG_PropertyField_DropDown *,
StringType > 
DropDownPropertySignal

Public Member Functions

 PG_PropertyField_DropDown (PG_PropertyEditor *propertyEditor, const std::string &name, StringType *var, const char **names)
 Creates a PG_PropertyField_IntDropDown.
 PG_PropertyField_DropDown (PG_PropertyEditor *propertyEditor, const std::string &name, StringType *var, iterator begin, iterator end)
 Creates a PG_PropertyField_IntDropDown.
 PG_PropertyField_DropDown (PG_PropertyEditor *propertyEditor, const std::string &name, const StringType &var, const char **names)
 Creates a PG_PropertyField_IntDropDown.
 PG_PropertyField_DropDown (PG_PropertyEditor *propertyEditor, const std::string &name, const StringType &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

Detailed Description

template<typename StringType, typename iterator = char*>
class PG_PropertyField_DropDown< StringType, 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.

Definition at line 44 of file pgpropertyfield_dropdown.h.


Member Typedef Documentation

template<typename StringType, typename iterator = char*>
typedef PG_Signal2<PG_PropertyField_DropDown*, StringType> PG_PropertyField_DropDown< StringType, iterator >::DropDownPropertySignal
 

Definition at line 63 of file pgpropertyfield_dropdown.h.


Constructor & Destructor Documentation

template<typename StringType, typename iterator = char*>
PG_PropertyField_DropDown< StringType, iterator >::PG_PropertyField_DropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
StringType *  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

Definition at line 73 of file pgpropertyfield_dropdown.h.

References PG_DropDown::AddItem(), and PG_DropDown::SelectItem().

template<typename StringType, typename iterator = char*>
PG_PropertyField_DropDown< StringType, iterator >::PG_PropertyField_DropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
StringType *  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

Definition at line 93 of file pgpropertyfield_dropdown.h.

References PG_DropDown::AddItem(), and PG_DropDown::SelectItem().

template<typename StringType, typename iterator = char*>
PG_PropertyField_DropDown< StringType, iterator >::PG_PropertyField_DropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
const StringType &  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

Definition at line 113 of file pgpropertyfield_dropdown.h.

References PG_DropDown::AddItem(), and PG_DropDown::SelectItem().

template<typename StringType, typename iterator = char*>
PG_PropertyField_DropDown< StringType, iterator >::PG_PropertyField_DropDown PG_PropertyEditor propertyEditor,
const std::string &  name,
const StringType &  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

Definition at line 133 of file pgpropertyfield_dropdown.h.

References PG_DropDown::AddItem(), and PG_DropDown::SelectItem().


Member Function Documentation

template<typename StringType, typename iterator = char*>
bool PG_PropertyField_DropDown< StringType, 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.

Definition at line 151 of file pgpropertyfield_dropdown.h.

References PG_DropDown::GetText(), and PG_PropertyField_DropDown< StringType, iterator >::sigValueApplied.

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

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

Implements PG_PropertyEditor::PG_PropertyEditorField.

Definition at line 160 of file pgpropertyfield_dropdown.h.

References PG_DropDown::SetText().

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

checks if the entered value is valid

Implements PG_PropertyEditor::PG_PropertyEditorField.

Definition at line 147 of file pgpropertyfield_dropdown.h.


Member Data Documentation

template<typename StringType, typename iterator = char*>
DropDownPropertySignal PG_PropertyField_DropDown< StringType, iterator >::sigValueApplied
 

Definition at line 65 of file pgpropertyfield_dropdown.h.

Referenced by PG_PropertyField_DropDown< StringType, iterator >::Apply().

template<typename StringType, typename iterator = char*>
DropDownPropertySignal PG_PropertyField_DropDown< StringType, iterator >::sigValueChanged
 

Definition at line 64 of file pgpropertyfield_dropdown.h.


The documentation for this class was generated from the following file:
Generated on Tue Jun 24 02:19:18 2008 for Advanced Strategic Command by  doxygen 1.4.2