CComponents: replace clear() with clearFbData(), remove cleanCCForm()

clear() replaces now clearCCItems() and cleanCCForm() is superfluous.


Origin commit data
------------------
Branch: ni/coolstream
Commit: ed7a2fd625
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-01-07 (Tue, 07 Jan 2014)



------------------
This commit was generated by Migit
This commit is contained in:
2014-01-07 09:41:06 +01:00
parent aa65694193
commit 36e40e2a67
8 changed files with 14 additions and 24 deletions

View File

@@ -44,7 +44,7 @@ CComponents::~CComponents()
{
hide();
clearSavedScreen();
clear();
clearFbData();
}
void CComponents::clearSavedScreen()
@@ -196,7 +196,7 @@ inline void CComponents::hide()
}
}
clear();
clearFbData();
is_painted = false;
}
@@ -205,13 +205,13 @@ void CComponents::kill()
{
for(size_t i =0; i< v_fbdata.size() ;i++)
frameBuffer->paintBackgroundBoxRel(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy);
clear();
clearFbData();
firstPaint = true;
is_painted = false;
}
//clean old screen buffer
inline void CComponents::clear()
inline void CComponents::clearFbData()
{
for(size_t i =0; i< v_fbdata.size() ;i++)
if (v_fbdata[i].pixbuf)

View File

@@ -105,7 +105,7 @@ class CComponents
void paintFbItems(bool do_save_bg = true);
///clean up old screen buffer saved in v_fbdata
virtual void clear();
virtual void clearFbData();
///container: contains saved pixel buffer with position and dimensions
comp_screen_data_t saved_screen;

View File

@@ -85,7 +85,7 @@ CComponentsDetailLine::~CComponentsDetailLine()
//paint details line with current parameters
void CComponentsDetailLine::paint(bool do_save_bg)
{
clear();
clearFbData();
int y_mark_top = y-h_mark_top/2+thickness/2;
int y_mark_down = y_down-h_mark_down/2+thickness/2;

View File

@@ -64,21 +64,11 @@ CComponentsForm::CComponentsForm(const int x_pos, const int y_pos, const int w,
CComponentsForm::~CComponentsForm()
{
cleanCCForm();
}
void CComponentsForm::cleanCCForm()
{
#ifdef DEBUG_CC
printf("[CComponentsForm] [%s - %d] clean up...\n", __func__, __LINE__);
#endif
clearCCItems();
clear();
}
void CComponentsForm::clearCCItems()
void CComponentsForm::clear()
{
if (v_cc_items.empty())
return;

View File

@@ -62,8 +62,8 @@ class CComponentsForm : public CComponentsItem
virtual int getCCItemId(CComponentsItem* cc_Item);
virtual CComponentsItem* getCCItem(const uint& cc_item_id);
virtual void paintCCItems();
virtual void clearCCItems();
virtual void cleanCCForm();
///clean up and deallocate existant items from v_cc_items at once
virtual void clear();
virtual void setAppendOffset(const int &h_offset, const int& v_offset){append_h_offset = h_offset; append_v_offset = v_offset;};
};

View File

@@ -135,7 +135,7 @@ void CComponentsFrmClock::initCCLockItems()
if (v_cc_items.size() != s_time.size()){
//clean up possible old items before add new items
clearCCItems();
clear();
//create new empty label objects, set some general properties and add to container
for (size_t i = 0; i < s_time.size(); i++){

View File

@@ -108,7 +108,7 @@ int CComponentsIconForm::getIconId(const std::string& icon_name)
//to remove old items before add new icons, otherwise icons will be appended.
void CComponentsIconForm::removeAllIcons()
{
clearCCItems();
clear();
v_icons.clear();
}

View File

@@ -63,7 +63,7 @@ void CComponentsItem::initVarItem()
// If backround is not required, it's possible to override this with variable paint_bg=false, use doPaintBg(true/false) to set this!
void CComponentsItem::paintInit(bool do_save_bg)
{
clear();
clearFbData();
int th = fr_thickness;
fb_pixel_t col_frame_cur = col_frame;