UIList.h ( 文件浏览 )
- keepall 发布于 2016-08-23 13:24
- 浏览次数:637
- 下载次数: 1
- 下载需 20 积分
-
- 侵权举报
#ifndef __UILIST_H__ #define __UILIST_H__ #pragma once namespace DuiLib { ///////////////////////////////////////////////////////////////////////////////////// // class CListHeaderUI; #define UILIST_MAX_COLUMNS 32 typedef struct tagTListInfoUI { int nColumns; RECT rcColumn[UILIST_MAX_COLUMNS]; int nFont; UINT uTextStyle; RECT rcTextPadding; DWORD dwTextColor; DWORD dwBkColor; CStdString sBkImage; bool bAlternateBk; DWORD dwSelectedTextColor; DWORD dwSelectedBkColor; CStdString sSelectedImage; DWORD dwHotTextColor; DWORD dwHotBkColor; CStdString sHotImage; DWORD dwDisabledTextColor; DWORD dwDisabledBkColor; CStdString sDisabledImage; DWORD dwLineColor; bool bShowHtml; bool bMultiExpandable; } TListInfoUI; ///////////////////////////////////////////////////////////////////////////////////// // class IListCallbackUI { public: virtual LPCTSTR GetItemText(CControlUI* pList, int iItem, int iSubItem) = 0; }; class IListOwnerUI { public: virtual TListInfoUI* GetListInfo() = 0; virtual int GetCurSel() const = 0; virtual bool SelectItem(int iIndex) = 0; virtual void DoEvent(TEventUI& event) = 0; }; class IListUI : public IListOwnerUI { public: virtual CListHeaderUI* GetHeader() const = 0; virtual CContainerUI* GetList() const = 0; virtual IListCallbackUI* GetTextCallback() const = 0; virtual void SetTextCallback(IListCallbackUI* pCallback) = 0; virtual bool ExpandItem(int iIndex, bool bExpand = true) = 0; virtual int GetExpandedItem() const = 0; }; class IListItemUI { public: virtual int GetIndex() const = 0; virtual void SetIndex(int iIndex) = 0; virtual IListOwnerUI* GetOwner() = 0; virtual void SetOwner(CControlUI* pOwner) = 0; virtual bool IsSelected() const = 0; virtual bool Select(bool bSelect = true) = 0; virtual bool IsExpanded() const = 0; virtual bool Expand(bool bExpand = true) = 0; virtual void DrawItemText(HDC hDC, const RECT& rcItem) = 0; }; ///////////////////////////////////////////////////////////////////////////////////// // class CListBodyUI; class CListHeaderUI; class UILIB_API CListUI : public CVerticalLayoutUI, public IListUI { public: CListUI(); LPCTSTR GetClass() const; UINT GetControlFlags() const; LPVOID GetInterface(LPCTSTR pstrName); bool GetScrollSelect(); void SetScrollSelect(bool bScrollSelect); int GetCurSel() const; bool SelectItem(int iIndex); CListHeaderUI* GetHeader() const; CContainerUI* GetList() const; TListInfoUI* GetListInfo(); CControlUI* GetItemAt(int iIndex) const; int GetItemIndex(CControlUI* pControl) const; bool SetItemIndex(CControlUI* pControl, int iIndex); int GetCount() const; bool Add(CControlUI* pControl); bool AddAt(CControlUI* pControl, int iIn[!==More==!]
...
展开> <收缩
Sponsored links
源码文件列表
温馨提示: 点击源码文件名可预览文件内容哦 ^_^ Sponsored links