⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 listbox.inl

📁 0S9.平台任务管理.内存监控示例.还sign后才可以安装
💻 INL
字号:
#include <eikclbd.h>    // CColumnListBoxData
#include <aknlists.h>

/*
 * Series 60 implementation: use template class given that they share a common
 * interface (but not a common base class)
 *
 */

template<class T>
class CListBox : public T, public MListBox
{
public:
    void ConstructL(CCoeControl* aParent, TInt /*aFlags*/)
    {
        T::ConstructL(aParent, EAknListBoxSelectionList);
    }

    TInt CurrentItemIndex() const
    {
        return T::CurrentItemIndex();
    }

    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
    {
        return T::OfferKeyEventL(aKeyEvent, aType);
    }

    void RefreshL()
    {
        T::HandleItemRemovalL();
        T::HandleItemAdditionL();
        T::SetCurrentItemIndexAndDraw(0);
    }

    void SetContainerWindowL(const CCoeControl& aContainer)
    {
        T::SetContainerWindowL(aContainer);
    }

    void SetItemList(MDesCArray* aTextArray, CArrayPtr<CGulIcon>* aIconArray)
    {
        T::Model()->SetItemTextArray(aTextArray);
        T::Model()->SetOwnershipType(ELbmDoesNotOwnItemArray);

        T::ItemDrawer()->ColumnData()->SetIconArray(aIconArray);
    }

    void SetListBoxObserver(MEikListBoxObserver* aObserver)
    {
        T::SetListBoxObserver(aObserver);
    }

    void SetMopParent(MObjectProvider* aParent)
    {
        T::SetMopParent(aParent);
    }

    void SetRect(const TRect& aRect)
    {
        T::SetRect(aRect);
    }

    void SetScrollBarL()
    {
        T::CreateScrollBarFrameL();
    }

    void ShowScrollBarL(TBool aShow)
    {
        if (T::ScrollBarFrame())
        {
            if (aShow)
                T::ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
            else
                T::ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff);

            T::UpdateScrollBarsL();
        }
    }

    CEikListBox* This()
    { return this; }

};


typedef CListBox<CAknSingleGraphicStyleListBox> CSingleListBox;
typedef CListBox<CAknDoubleLargeStyleListBox> CDoubleListBox;


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -