soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SComboBox Class Reference

Editable ComboBox Control. More...

#include <SComboBox.h>

Public Member Functions

 SComboBox ()
 Constructor.
 
virtual ~SComboBox ()
 Destructor.
 
BOOL SetCurSel (int iSel) OVERRIDE
 Set the current selection index.
 
int GetCurSel () SCONST OVERRIDE
 Get the current selection index.
 
int GetCount () SCONST OVERRIDE
 Get the number of items in the list box.
 
LPARAM GetItemData (UINT iItem) SCONST OVERRIDE
 Get the data associated with a list box item.
 
BOOL SetItemData (UINT iItem, LPARAM lParam) OVERRIDE
 Set 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.
 
int InsertItemA (int iPos, LPCSTR pszText, int iIcon, LPARAM lParam) OVERRIDE
 Insert an item into the list box (ANSI version)
 
BOOL DeleteString (int iPos) OVERRIDE
 Delete a string from the list box.
 
void ResetContent () OVERRIDE
 Reset the content of the list box.
 
BOOL GetItemText (int iItem, BOOL bRawText, IStringT *str) SCONST OVERRIDE
 Get the text of a list box item.
 
BOOL GetItemTextA (int iItem, BOOL bRawText, IStringA *str) SCONST OVERRIDE
 Get the text of a list box item (ANSI version)
 
IListBox * GetIListBox () OVERRIDE
 Get the list box interface.
 
SListBoxGetListBox ()
 Get the list box pointer.
 

Protected Member Functions

BOOL FireEvent (IEvtArgs *evt) OVERRIDE
 Notify event.
 
virtual void OnScaleChanged (int nScale)
 Handle scale change event.
 
virtual HRESULT OnLanguageChanged ()
 Handle language change event.
 
virtual BOOL CreateListBox (SXmlNode xmlNode)
 Create the list box.
 
virtual int GetListBoxHeight ()
 Get the height of the list box.
 
virtual void OnCreateDropDown (SDropDownWnd *pDropDown)
 Handle creation of the dropdown window.
 
virtual void OnDestroyDropDown (SDropDownWnd *pDropDown)
 Handle destruction of the dropdown window.
 
virtual void OnSelChanged ()
 Handle selection change in the dropdown window.
 

Protected Attributes

SListBoxm_pListBox
 

Detailed Description

Editable ComboBox Control.

A ComboBox control that can be editable and includes a dropdown list.

Definition at line 15 of file SComboBox.h.

Constructor & Destructor Documentation

◆ SComboBox()

SNSBEGIN SComboBox::SComboBox ( )

Constructor.

Definition at line 7 of file SComboBox.cpp.

◆ ~SComboBox()

SComboBox::~SComboBox ( )
virtual

Destructor.

Definition at line 12 of file SComboBox.cpp.

Member Function Documentation

◆ CreateListBox()

BOOL SComboBox::CreateListBox ( SXmlNode xmlNode)
protectedvirtual

Create the list box.

Parameters
xmlNodeXML node for the list box
Returns
TRUE if successful, FALSE otherwise

Definition at line 22 of file SComboBox.cpp.

◆ DeleteString()

BOOL SComboBox::DeleteString ( int iPos)

Delete a string from the list box.

Parameters
iPosIndex of the item to delete
Returns
TRUE if successful, FALSE otherwise

Definition at line 187 of file SComboBox.cpp.

◆ FireEvent()

BOOL SComboBox::FireEvent ( IEvtArgs * evt)
protected

Notify event.

Parameters
evtEvent object
Returns
TRUE if successful, FALSE otherwise

This function is a message handler.

Definition at line 115 of file SComboBox.cpp.

◆ GetCount()

int SComboBox::GetCount ( )

Get the number of items in the list box.

Returns
Number of items

Definition at line 167 of file SComboBox.cpp.

◆ GetCurSel()

int SComboBox::GetCurSel ( )

Get the current selection index.

Returns
Current selection index

Definition at line 162 of file SComboBox.cpp.

◆ GetIListBox()

IListBox * SComboBox::GetIListBox ( )

Get the list box interface.

Returns
Pointer to the list box interface

Definition at line 208 of file SComboBox.cpp.

◆ GetItemData()

LPARAM SComboBox::GetItemData ( UINT iItem)

Get the data associated with a list box item.

Parameters
iItemItem index
Returns
Data associated with the item

Definition at line 172 of file SComboBox.cpp.

◆ GetItemText()

BOOL SComboBox::GetItemText ( int iItem,
BOOL bRawText,
IStringT * str )

Get the text of a list box item.

Parameters
iItemItem index
bRawTextWhether to get raw text
strOutput string for the item text
Returns
TRUE if successful, FALSE otherwise

Definition at line 198 of file SComboBox.cpp.

◆ GetItemTextA()

BOOL SComboBox::GetItemTextA ( int iItem,
BOOL bRawText,
IStringA * str )
inline

Get the text of a list box item (ANSI version)

Parameters
iItemItem index
bRawTextWhether to get raw text
strOutput string for the item text
Returns
TRUE if successful, FALSE otherwise

Definition at line 116 of file SComboBox.h.

◆ GetListBox()

SListBox * SComboBox::GetListBox ( )
inline

Get the list box pointer.

Returns
Pointer to the list box

Definition at line 136 of file SComboBox.h.

◆ GetListBoxHeight()

int SComboBox::GetListBoxHeight ( )
protectedvirtual

Get the height of the list box.

Returns
Height of the list box

Definition at line 68 of file SComboBox.cpp.

◆ InsertItem()

int SComboBox::InsertItem ( int iPos,
LPCTSTR pszText,
int iIcon,
LPARAM lParam )

Insert an item into the list box.

Parameters
iPosPosition to insert the item
pszTextText of the item
iIconIcon index for the item
lParamData to associate with the item
Returns
Index of the inserted item or -1 if failed

Definition at line 182 of file SComboBox.cpp.

◆ InsertItemA()

int SComboBox::InsertItemA ( int iPos,
LPCSTR pszText,
int iIcon,
LPARAM lParam )
inline

Insert an item into the list box (ANSI version)

Parameters
iPosPosition to insert the item
pszTextText of the item
iIconIcon index for the item
lParamData to associate with the item
Returns
Index of the inserted item or -1 if failed

Definition at line 82 of file SComboBox.h.

◆ OnCreateDropDown()

void SComboBox::OnCreateDropDown ( SDropDownWnd * pDropDown)
protectedvirtual

Handle creation of the dropdown window.

Parameters
pDropDownDropdown window pointer

Implements ISDropDownOwner.

Definition at line 80 of file SComboBox.cpp.

◆ OnDestroyDropDown()

void SComboBox::OnDestroyDropDown ( SDropDownWnd * pDropDown)
protectedvirtual

Handle destruction of the dropdown window.

Parameters
pDropDownDropdown window pointer

Implements ISDropDownOwner.

Definition at line 93 of file SComboBox.cpp.

◆ OnLanguageChanged()

HRESULT SComboBox::OnLanguageChanged ( )
protectedvirtual

Handle language change event.

Returns
HRESULT

Reimplemented from SWindow.

Definition at line 140 of file SComboBox.cpp.

◆ OnScaleChanged()

void SComboBox::OnScaleChanged ( int nScale)
protectedvirtual

Handle scale change event.

Parameters
nScaleScale factor

Reimplemented from SWindow.

Definition at line 133 of file SComboBox.cpp.

◆ OnSelChanged()

void SComboBox::OnSelChanged ( )
protectedvirtual

Handle selection change in the dropdown window.

Definition at line 101 of file SComboBox.cpp.

◆ ResetContent()

void SComboBox::ResetContent ( )

Reset the content of the list box.

Definition at line 192 of file SComboBox.cpp.

◆ SetCurSel()

BOOL SComboBox::SetCurSel ( int iSel)

Set the current selection index.

Parameters
iSelIndex to set as the current selection
Returns
TRUE if successful, FALSE otherwise

Definition at line 148 of file SComboBox.cpp.

◆ SetItemData()

BOOL SComboBox::SetItemData ( UINT iItem,
LPARAM lParam )

Set the data associated with a list box item.

Parameters
iItemItem index
lParamData to associate with the item
Returns
TRUE if successful, FALSE otherwise

Definition at line 177 of file SComboBox.cpp.

Member Data Documentation

◆ m_pListBox

SListBox* SComboBox::m_pListBox
protected

Pointer to the list box

Definition at line 193 of file SComboBox.h.


The documentation for this class was generated from the following files: