CComponentsItem: add setXPos/setYPos(), that consider real position

This commit is contained in:
2014-11-30 00:07:21 +01:00
parent 6fc8d1bb9f
commit 8ebb5f98ca
2 changed files with 21 additions and 3 deletions

View File

@@ -251,7 +251,7 @@ class CComponents : public CComponentsSignals, public COSDFader
///allow/disalows paint of item and its contents, but initialize of other properties are not touched
///this can be understood as a counterpart to isPainted(), but before paint and value of is_painted is modified temporarily till next paint of item //TODO: is this sufficiently?
virtual void allowPaint(bool allow){cc_allow_paint = allow; is_painted = cc_allow_paint ? false : true;};
void allowPaint(bool allow){cc_allow_paint = allow; is_painted = cc_allow_paint ? false : true;};
///returns visibility mode
virtual bool paintAllowed(){return cc_allow_paint;};
@@ -346,6 +346,10 @@ class CComponentsItem : public CComponents
///returns current number of page location of current item, see: cc_page_number
virtual u_int8_t getPageNumber(){return cc_page_number;};
///set screen x-position, parameter as int
virtual void setXPos(const int& xpos);
///set screen y-position, parameter as int
virtual void setYPos(const int& ypos);
///set screen x-position, parameter as uint8_t, percent x value related to current width of parent form or screen
virtual void setXPosP(const uint8_t& xpos_percent);
///set screen y-position, parameter as uint8_t, percent y value related to current height of parent form or screen