mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CComponentsForm: add virtual members to manipulate ccitems
This commit is contained in:
@@ -442,6 +442,10 @@ class CComponentsForm : public CComponentsItem
|
||||
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
|
||||
void hide(bool no_restore = false);
|
||||
virtual void addCCItem(CComponentsItem* cc_Item);
|
||||
virtual void insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item);
|
||||
virtual void removeCCItem(const uint& cc_item_id);
|
||||
virtual int getCCItemId(CComponentsItem* cc_Item);
|
||||
virtual CComponentsItem* getCCItem(const uint& cc_item_id);
|
||||
virtual void paintCCItems();
|
||||
};
|
||||
|
||||
|
@@ -1570,6 +1570,36 @@ void CComponentsForm::addCCItem(CComponentsItem* cc_Item)
|
||||
v_cc_items.push_back(cc_Item);
|
||||
}
|
||||
|
||||
void CComponentsForm::insertCCItem(const uint& cc_item_id, CComponentsItem* cc_Item)
|
||||
{
|
||||
v_cc_items.insert(v_cc_items.begin()+cc_item_id, cc_Item);
|
||||
}
|
||||
|
||||
int CComponentsForm::getCCItemId(CComponentsItem* cc_Item)
|
||||
{
|
||||
for (size_t i= 0; i< v_cc_items.size(); i++)
|
||||
if (v_cc_items[i] == cc_Item)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
CComponentsItem* CComponentsForm::getCCItem(const uint& cc_item_id)
|
||||
{
|
||||
if (v_cc_items[cc_item_id])
|
||||
return v_cc_items[cc_item_id];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void CComponentsForm::removeCCItem(const uint& cc_item_id)
|
||||
{
|
||||
if (v_cc_items[cc_item_id]) {
|
||||
delete v_cc_items[cc_item_id];
|
||||
v_cc_items[cc_item_id] = NULL;
|
||||
v_cc_items.erase(v_cc_items.begin()+cc_item_id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void CComponentsForm::paint(bool do_save_bg)
|
||||
{
|
||||
//paint body
|
||||
|
Reference in New Issue
Block a user