1#ifndef __SCOMBOBOX__H__
2#define __SCOMBOBOX__H__
4#include <control/SComboBase.h>
5#include <control/SListbox.h>
15class SOUI_EXP
SComboBox :
public TComboBaseProxy<IComboBox> {
16 DEF_SOBJECT(SComboBase, L
"combobox")
35 STDMETHOD_(BOOL,
SetCurSel)(THIS_
int iSel) OVERRIDE;
41 STDMETHOD_(
int,
GetCurSel)(THIS) SCONST OVERRIDE;
47 STDMETHOD_(
int,
GetCount)(THIS) SCONST OVERRIDE;
54 STDMETHOD_(LPARAM,
GetItemData)(THIS_ UINT iItem) SCONST OVERRIDE;
62 STDMETHOD_(BOOL,
SetItemData)(THIS_ UINT iItem, LPARAM lParam) OVERRIDE;
72 STDMETHOD_(
int,
InsertItem)(THIS_
int iPos, LPCTSTR pszText,
int iIcon, LPARAM lParam) OVERRIDE;
82 STDMETHOD_(
int,
InsertItemA)(THIS_
int iPos, LPCSTR pszText,
int iIcon, LPARAM lParam) OVERRIDE
84 SStringT str = S_CA2T(pszText, CP_UTF8);
93 STDMETHOD_(BOOL, DeleteString)(THIS_
int iPos) OVERRIDE;
98 STDMETHOD_(
void, ResetContent)(THIS) OVERRIDE;
107 STDMETHOD_(BOOL, GetItemText)(
int iItem, BOOL bRawText, IStringT *str) SCONST OVERRIDE;
116 STDMETHOD_(BOOL,
GetItemTextA)(
int iItem, BOOL bRawText, IStringA *str) SCONST OVERRIDE
120 SStringA strBufA = S_CT2A(strBuf, CP_UTF8);
129 STDMETHOD_(IListBox *, GetIListBox)(THIS) OVERRIDE;
148 STDMETHOD_(BOOL, FireEvent)(THIS_ IEvtArgs *evt) OVERRIDE;
154 virtual void OnScaleChanged(
int nScale);
160 virtual HRESULT OnLanguageChanged();
167 virtual BOOL CreateListBox(
SXmlNode xmlNode);
173 virtual int GetListBoxHeight();
185 virtual void OnDestroyDropDown(
SDropDownWnd *pDropDown);
190 virtual void OnSelChanged();
int GetCurSel() SCONST OVERRIDE
Get the current selection index.
BOOL GetItemTextA(int iItem, BOOL bRawText, IStringA *str) SCONST OVERRIDE
Get the text of a list box item (ANSI version)
LPARAM GetItemData(UINT iItem) SCONST OVERRIDE
Get the data associated with a list box item.
int InsertItem(int iPos, LPCTSTR pszText, int iIcon, LPARAM lParam) OVERRIDE
Insert an item into the list box.
SListBox * GetListBox()
Get the list box pointer.
BOOL GetItemText(int iItem, BOOL bRawText, IStringT *str) SCONST OVERRIDE
Get the text of a list box item.
int InsertItemA(int iPos, LPCSTR pszText, int iIcon, LPARAM lParam) OVERRIDE
Insert an item into the list box (ANSI version)
BOOL SetItemData(UINT iItem, LPARAM lParam) OVERRIDE
Set the data associated with a list box item.
BOOL SetCurSel(int iSel) OVERRIDE
Set the current selection index.
int GetCount() SCONST OVERRIDE
Get the number of items in the list box.
A class representing an ASCII string.
Class representing an XML node.