Adding properties
This commit is contained in:
@@ -616,6 +616,14 @@
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Properties"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\source\Properties\Property.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
@@ -633,6 +641,10 @@
|
||||
RelativePath=".\src\include\ax.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\Properties\BoolProperty.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\include\BrowserCallHandler.h"
|
||||
>
|
||||
@@ -821,6 +833,14 @@
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Properties"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\include\Properties\Property.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
|
||||
0
BoolProperty.h
Normal file
0
BoolProperty.h
Normal file
@@ -2,6 +2,7 @@
|
||||
#include <G3DAll.h>
|
||||
#include "propertyGrid.h"
|
||||
#include "map"
|
||||
#include "Properties/BoolProperty.h"
|
||||
|
||||
class Instance
|
||||
{
|
||||
|
||||
13
src/include/Properties/BoolProperty.h
Normal file
13
src/include/Properties/BoolProperty.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include "Property.h"
|
||||
#pragma once
|
||||
class BoolProperty : public Property<bool>
|
||||
{
|
||||
public:
|
||||
template <typename T>
|
||||
BoolProperty(std::string name, bool& value)
|
||||
{
|
||||
Property(name, (T)value);
|
||||
}
|
||||
~BoolProperty(void);
|
||||
};
|
||||
19
src/include/Properties/Property.h
Normal file
19
src/include/Properties/Property.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include "propertyGrid.h"
|
||||
template <typename T>
|
||||
class Property
|
||||
{
|
||||
public:
|
||||
Property(std::string name, T& value)
|
||||
{
|
||||
value = t;
|
||||
}
|
||||
~Property(void);
|
||||
T getValue();
|
||||
void setValue(T);
|
||||
PROPGRIDITEM getPropGridItem();
|
||||
void setProperty(LPPROPGRIDITEM item);
|
||||
protected:
|
||||
std::string name;
|
||||
T* value;
|
||||
};
|
||||
0
src/source/Properties/Property.cpp
Normal file
0
src/source/Properties/Property.cpp
Normal file
Reference in New Issue
Block a user