diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-29 22:49:47 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-29 22:49:47 +0200 |
commit | c2d7a375563b93ee7dac34b22ca78c09ca928f02 (patch) | |
tree | 020389e2693783b28a137015e28d3cf6577a55df /glcdskin/variable.h | |
parent | b560da0e0e08d791bbc404da19c394657af816ac (diff) | |
download | graphlcd-base-c2d7a375563b93ee7dac34b22ca78c09ca928f02.tar.gz graphlcd-base-c2d7a375563b93ee7dac34b22ca78c09ca928f02.tar.bz2 |
added additional parameter 'evaluate' for <variable/>; variables can now be evaluate: 'always': eval at every access, 'tick': eval. once per display update, 'switch': once per channel or menu update, 'once': eval. only once, interval: eval only after a certain amount of time. default = 'tick'; removed method ImageFile::SupportsScaling() (no longer required)
Diffstat (limited to 'glcdskin/variable.h')
-rw-r--r-- | glcdskin/variable.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/glcdskin/variable.h b/glcdskin/variable.h index fdeebbc..8c6ef6f 100644 --- a/glcdskin/variable.h +++ b/glcdskin/variable.h @@ -23,6 +23,16 @@ namespace GLCD { +enum eEvalMode +{ + tevmAlways, + tevmTick, + tevmSwitch, + tevmOnce, + tevmInterval +}; + + class cSkin; class cSkinVariable @@ -38,17 +48,21 @@ private: cSkinFunction * mFunction; cSkinDisplay mDummyDisplay; cSkinObject mDummyObject; + eEvalMode mEvalMode; + int mEvalInterval; + uint64_t mTimestamp; public: cSkinVariable(cSkin * Parent); + bool ParseEvalMode(const std::string & Text); bool ParseValue(const std::string & Text); bool ParseCondition(const std::string & Text); cSkin * Skin(void) const { return mSkin; } const std::string & Id(void) const { return mId; } // const cType & Value(void) const { return mValue; } - const cType & Value(void) { if (mFunction != NULL) { mValue = mFunction->Evaluate(); } return mValue; } ; + const cType & Value(void); cSkinFunction * Condition(void) const { return mCondition; } }; |