2010-12-12 17:08:36 +00:00
|
|
|
#ifndef MEASURESCRIPT_H
|
|
|
|
#define MEASURESCRIPT_H
|
|
|
|
|
|
|
|
#include "Measure.h"
|
|
|
|
#include "lua/LuaScript.h"
|
|
|
|
#include "MeterWindow.h"
|
|
|
|
|
|
|
|
class CMeasureScript : public CMeasure
|
|
|
|
{
|
|
|
|
public:
|
2011-02-15 16:26:54 +00:00
|
|
|
CMeasureScript(CMeterWindow* meterWindow, const WCHAR* name);
|
2010-12-12 17:08:36 +00:00
|
|
|
virtual ~CMeasureScript();
|
|
|
|
|
2011-01-30 15:39:14 +00:00
|
|
|
virtual void ReadConfig(CConfigParser& parser, const WCHAR* section);
|
|
|
|
virtual void Initialize();
|
|
|
|
virtual bool Update();
|
|
|
|
virtual const WCHAR* GetStringValue(AUTOSCALE autoScale, double scale, int decimals, bool percentual);
|
2010-12-12 17:08:36 +00:00
|
|
|
|
|
|
|
double GetValue();
|
|
|
|
void SetValue(double d);
|
|
|
|
|
2011-01-30 15:39:14 +00:00
|
|
|
void DeleteLuaScript();
|
2010-12-12 17:08:36 +00:00
|
|
|
|
|
|
|
void MeterMouseEvent(CMeter* p_pMeter, MOUSE p_eMouse);
|
|
|
|
void RunFunctionWithMeter(const char* p_strFunction, CMeter* p_pMeter);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
LuaScript* m_pLuaScript;
|
|
|
|
|
|
|
|
bool m_bUpdateDefined;
|
|
|
|
bool m_bGetValueDefined;
|
2011-01-30 15:39:14 +00:00
|
|
|
bool m_bGetStringValueDefined;
|
2010-12-12 17:08:36 +00:00
|
|
|
bool m_bInitializeDefined;
|
|
|
|
|
|
|
|
std::wstring m_strValue;
|
2011-01-30 15:39:14 +00:00
|
|
|
|
|
|
|
std::string m_ScriptFile;
|
|
|
|
std::string m_TableName;
|
2010-12-12 17:08:36 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
Sqrat::Table* m_ScriptTable;
|
|
|
|
Sqrat::Function* m_UpdateFunc;
|
|
|
|
Sqrat::Function* m_GetValueFunc;
|
|
|
|
Sqrat::Function* m_GetStringValueFunc;
|
|
|
|
Sqrat::Function* m_InitFunc;
|
|
|
|
Sqrat::Function* m_UpdateTransitionFunc;
|
|
|
|
*/
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|