00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024
00025 #include "cinder/Color.h"
00026 #include "cinder/Quaternion.h"
00027
00028 #include <string>
00029
00030 typedef struct CTwBar TwBar;
00031
00032 namespace cinder { namespace params {
00033
00034 class InterfaceGl {
00035 public:
00036 InterfaceGl() {}
00037 InterfaceGl( const std::string &title, const Vec2i &size, const ColorA = ColorA( 0.3f, 0.3f, 0.3f, 0.4f ) );
00038
00039 static void draw();
00040
00041 void addParam( const std::string &name, bool *boolParam, const std::string &optionsStr = "", bool readOnly = false );
00042 void addParam( const std::string &name, float *floatParam, const std::string &optionsStr = "", bool readOnly = false );
00043 void addParam( const std::string &name, int32_t *intParam, const std::string &optionsStr = "", bool readOnly = false );
00044 void addParam( const std::string &name, Vec3f *vectorParam, const std::string &optionsStr = "", bool readOnly = false );
00045 void addParam( const std::string &name, Quatf *quatParam, const std::string &optionsStr = "", bool readOnly = false );
00046 void addParam( const std::string &name, Color *quatParam, const std::string &optionsStr = "", bool readOnly = false );
00047 void addParam( const std::string &name, ColorA *quatParam, const std::string &optionsStr = "", bool readOnly = false );
00048 void addParam( const std::string &name, std::string *strParam, const std::string &optionsStr = "", bool readOnly = false );
00049 void addSeparator( const std::string &name = "", const std::string &optionsStr = "" );
00050
00051 protected:
00052 void implAddParam( const std::string &name, void *param, int type, const std::string &optionsStr, bool readOnly );
00053
00054 shared_ptr<TwBar> mBar;
00055 };
00056
00057 } }