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

PG_PropertyField_IntDropDown< IntType, iterator > Class Template Reference

DropDown selector for a PG_PropertyEditor. More...

#include <pgpropertyfield_intdropdown.h>

Inheritance diagram for PG_PropertyField_IntDropDown< IntType, iterator >:

Inheritance graph
[legend]
List of all members.

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

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.

Definition at line 44 of file pgpropertyfield_intdropdown.h.


Member Typedef Documentation

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

Definition at line 63 of file pgpropertyfield_intdropdown.h.


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

Definition at line 73 of file pgpropertyfield_intdropdown.h.

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

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

Definition at line 91 of file pgpropertyfield_intdropdown.h.

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

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

Definition at line 107 of file pgpropertyfield_intdropdown.h.

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

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

Definition at line 125 of file pgpropertyfield_intdropdown.h.

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


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.

Definition at line 140 of file pgpropertyfield_intdropdown.h.

References PG_DropDown::GetSelectedItemIndex(), and PG_PropertyField_IntDropDown< IntType, iterator >::sigValueApplied.

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.

Definition at line 149 of file pgpropertyfield_intdropdown.h.

References PG_DropDown::SelectItem().

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.

Definition at line 136 of file pgpropertyfield_intdropdown.h.


Member Data Documentation

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

Definition at line 65 of file pgpropertyfield_intdropdown.h.

Referenced by PG_PropertyField_IntDropDown< IntType, iterator >::Apply().

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

Definition at line 64 of file pgpropertyfield_intdropdown.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