mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 00:41:17 +02:00
CComponents: add member isPainted()
Useful for monitoring and evaluation of the state of components, is also inherited to all subclasses
This commit is contained in:
@@ -131,7 +131,7 @@ class CComponents
|
|||||||
CFrameBuffer * frameBuffer;
|
CFrameBuffer * frameBuffer;
|
||||||
std::vector<comp_fbdata_t> v_fbdata;
|
std::vector<comp_fbdata_t> v_fbdata;
|
||||||
fb_pixel_t col_body, col_shadow, col_frame;
|
fb_pixel_t col_body, col_shadow, col_frame;
|
||||||
bool firstPaint, shadow;
|
bool firstPaint, shadow, is_painted;
|
||||||
BGMODE_TYPES bgMode;
|
BGMODE_TYPES bgMode;
|
||||||
|
|
||||||
void initVarBasic();
|
void initVarBasic();
|
||||||
@@ -165,6 +165,7 @@ class CComponents
|
|||||||
inline virtual void setBgMode(BGMODE_TYPES mode) {bgMode = mode;};
|
inline virtual void setBgMode(BGMODE_TYPES mode) {bgMode = mode;};
|
||||||
|
|
||||||
virtual void hide();
|
virtual void hide();
|
||||||
|
virtual bool isPainted(){return is_painted;};
|
||||||
};
|
};
|
||||||
|
|
||||||
class CComponentsContainer : public CComponents
|
class CComponentsContainer : public CComponents
|
||||||
@@ -218,7 +219,7 @@ class CComponentsPicture : public CComponentsContainer
|
|||||||
inline void setPicture(const std::string& picture_name);
|
inline void setPicture(const std::string& picture_name);
|
||||||
void setPictureAlign(const int alignment);
|
void setPictureAlign(const int alignment);
|
||||||
|
|
||||||
inline bool isPainted(){return pic_painted;};
|
inline bool isPicPainted(){return pic_painted;};
|
||||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||||
inline void getPictureSize(int *pwidth, int *pheight){*pwidth=pic_width; *pheight=pic_height;};
|
inline void getPictureSize(int *pwidth, int *pheight){*pwidth=pic_width; *pheight=pic_height;};
|
||||||
|
|
||||||
|
@@ -74,6 +74,7 @@ void CComponents::initVarBasic()
|
|||||||
shadow_w = SHADOW_OFFSET;
|
shadow_w = SHADOW_OFFSET;
|
||||||
|
|
||||||
firstPaint = true;
|
firstPaint = true;
|
||||||
|
is_painted = false;
|
||||||
frameBuffer = CFrameBuffer::getInstance();
|
frameBuffer = CFrameBuffer::getInstance();
|
||||||
v_fbdata.clear();
|
v_fbdata.clear();
|
||||||
bgMode = CC_BGMODE_STANDARD;
|
bgMode = CC_BGMODE_STANDARD;
|
||||||
@@ -128,6 +129,8 @@ void CComponents::paintFbItems(struct comp_fbdata_t * fbdata, const int items_co
|
|||||||
frameBuffer->paintBoxRel(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy, fbdata[i].color, fbdata[i].r, corner_type);
|
frameBuffer->paintBoxRel(fbdata[i].x, fbdata[i].y, fbdata[i].dx, fbdata[i].dy, fbdata[i].color, fbdata[i].r, corner_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_painted = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//screen area save
|
//screen area save
|
||||||
@@ -149,6 +152,7 @@ inline void CComponents::hide()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
v_fbdata.clear();
|
v_fbdata.clear();
|
||||||
|
is_painted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//clean old screen buffer
|
//clean old screen buffer
|
||||||
@@ -238,6 +242,7 @@ void CComponentsContainer::hideContainer(bool no_restore)
|
|||||||
v_fbdata.clear();
|
v_fbdata.clear();
|
||||||
firstPaint = true;
|
firstPaint = true;
|
||||||
}
|
}
|
||||||
|
is_painted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComponentsContainer::hide(bool no_restore)
|
void CComponentsContainer::hide(bool no_restore)
|
||||||
@@ -264,6 +269,7 @@ void CComponentsContainer::kill()
|
|||||||
col_shadow = c_tmp2;
|
col_shadow = c_tmp2;
|
||||||
col_frame = c_tmp3;
|
col_frame = c_tmp3;
|
||||||
firstPaint = true;
|
firstPaint = true;
|
||||||
|
is_painted = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//synchronize colors for forms
|
//synchronize colors for forms
|
||||||
|
Reference in New Issue
Block a user