From 809fbda03c5014ba9cd361f5113d1d717cd41ea6 Mon Sep 17 00:00:00 2001 From: louis Date: Tue, 26 Jan 2016 18:32:38 +0100 Subject: Version 0.8.0 beta --- coreengine/viewelement.h | 93 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 coreengine/viewelement.h (limited to 'coreengine/viewelement.h') diff --git a/coreengine/viewelement.h b/coreengine/viewelement.h new file mode 100644 index 0000000..af12a6c --- /dev/null +++ b/coreengine/viewelement.h @@ -0,0 +1,93 @@ +#ifndef __VIEWELEMENT_H +#define __VIEWELEMENT_H + +#include +#include +#include +#include +#include +#include "osdwrapper.h" +#include "globals.h" +#include "../libskindesignerapi/tokencontainer.h" +#include "area.h" +#include "animation.h" + +/****************************************************************** +* cViewElement +******************************************************************/ +class cViewElement : public cDetachable, public cFadable, public cShiftable { +protected: + cSdOsd *sdOsd; + int id; + bool init; + bool drawn; + bool dirty; + bool blocked; + bool detached; + bool waitOnWakeup; + bool scrollingStarted; + bool startAnimation; + cGlobals *globals; + cRect container; + cViewElementAttribs *attribs; + cList areaNodes; + skindesignerapi::cTokenContainer *tokenContainer; + cList scrollers; + cAnimation *detacher; + cAnimation *fader; + cAnimation *shifter; + void InheritTokenContainer(void); + void InheritTokenContainerDeep(void); + virtual bool DoScroll(void) { return true; }; + cPoint ShiftStart(cRect &shiftbox); +public: + cViewElement(void); + cViewElement(const cViewElement &other); + virtual ~cViewElement(void); + void SetOsd(cSdOsd *osd) { sdOsd = osd; }; + static cViewElement *CreateViewElement(const char *name, const char *viewname); + void SetId(int id) { this->id = id; }; + void SetGlobals(cGlobals *globals); + virtual void SetTokenContainer(void); + void SetDetached(void) { detached = true; }; + void UnsetWaitOnWakeup(void) { waitOnWakeup = false; }; + bool Detached(void); + void SetContainer(int x, int y, int width, int height); + void SetAttributes(vector &attributes); + void AddArea(cAreaNode *area); + void SetAreaX(int x); + void SetAreaY(int y); + void SetAreaWidth(int width); + void SetAreaHeight(int height); + void Cache(void); + virtual void Close(void); + virtual void Clear(void); + void Hide(void); + void Show(void); + void WakeUp(void); + bool Execute(void); + void SetDirty(void) { dirty = true; }; + bool Dirty(void) { return dirty; }; + void SetPosition(int newX, int newY, int newWidth, int newHeight); + virtual void Render(void); + void StopScrolling(bool deletePixmaps = true); + eOrientation Orientation(void) { return attribs->Orientation(); }; + virtual int Delay(void) { return attribs->Delay(); }; + void ParseDetached(void); + void RenderDetached(void); + bool Shifting(void); + bool Fading(void); + int FadeTime(void); + int ShiftTime(void); + int ShiftMode(void); + void StartAnimation(void); + virtual void SetTransparency(int transparency, bool force = false); + virtual void SetPosition(cPoint &position, cPoint &reference, bool force = false); + cRect CoveredArea(void); + void Flush(void); + virtual bool Parse(bool forced = false); + cFunction *GetFunction(const char *name); + virtual void Debug(bool full = false); +}; + +#endif //__VIEWELEMENT_H \ No newline at end of file -- cgit v1.2.3