From d391bedd5f68d2a8f3c64985639bba0fc50cc374 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Tue, 26 Mar 2013 19:15:21 +0100 Subject: [PATCH] CComponents: move item type enum to cc_types.h --- src/gui/components/cc.h | 17 ----------------- src/gui/components/cc_frm.cpp | 2 +- src/gui/components/cc_types.h | 19 +++++++++++++++++++ 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 644457254..f8eaa5e9f 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -103,23 +103,6 @@ class CComponentsItem : public CComponents void initVarItem(); public: - enum - { - CC_ITEMTYPE_BASE, - CC_ITEMTYPE_PICTURE, - CC_ITEMTYPE_TEXT, - CC_ITEMTYPE_TEXT_INFOBOX, - CC_ITEMTYPE_SHAPE_SQUARE, - CC_ITEMTYPE_SHAPE_CIRCLE, - CC_ITEMTYPE_PIP, - CC_ITEMTYPE_FRM, - CC_ITEMTYPE_FRM_HEADER, - CC_ITEMTYPE_FRM_ICONFORM, - CC_ITEMTYPE_FRM_WINDOW, - CC_ITEMTYPE_LABEL, - - CC_ITEMTYPES - }; CComponentsItem(); virtual void paint(bool do_save_bg = CC_SAVE_SCREEN_YES) = 0; diff --git a/src/gui/components/cc_frm.cpp b/src/gui/components/cc_frm.cpp index 34d38c361..443e04d63 100644 --- a/src/gui/components/cc_frm.cpp +++ b/src/gui/components/cc_frm.cpp @@ -285,7 +285,7 @@ void CComponentsForm::hide(bool no_restore) // because the handling of minitv items are different to other item types // and need an explizit call of hide() for(size_t i=0; igetItemType() == CComponentsItem::CC_ITEMTYPE_PIP){ + if (v_cc_items[i]->getItemType() == CC_ITEMTYPE_PIP){ v_cc_items[i]->hide(); break; } diff --git a/src/gui/components/cc_types.h b/src/gui/components/cc_types.h index 4dc39ef2d..85f09144e 100644 --- a/src/gui/components/cc_types.h +++ b/src/gui/components/cc_types.h @@ -29,6 +29,25 @@ #include #include +///cc item types +typedef enum +{ + CC_ITEMTYPE_BASE, + CC_ITEMTYPE_PICTURE, + CC_ITEMTYPE_TEXT, + CC_ITEMTYPE_TEXT_INFOBOX, + CC_ITEMTYPE_SHAPE_SQUARE, + CC_ITEMTYPE_SHAPE_CIRCLE, + CC_ITEMTYPE_PIP, + CC_ITEMTYPE_FRM, + CC_ITEMTYPE_FRM_HEADER, + CC_ITEMTYPE_FRM_ICONFORM, + CC_ITEMTYPE_FRM_WINDOW, + CC_ITEMTYPE_LABEL, + + CC_ITEMTYPES +}CC_ITEMTYPES_T; + //required typedefs typedef struct comp_fbdata_t {