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

ComboBox Control with ListView. More...

#include <SComboView.h>

Public Member Functions

 SComboView (void)
 Constructor.
 
 ~SComboView (void)
 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 view.
 
BOOL GetItemText (int iItem, BOOL bRawText, IStringT *str) SCONST OVERRIDE
 Get the text of a list view item.
 
BOOL GetItemTextA (int iItem, BOOL bRawText, IStringA *str) SCONST OVERRIDE
 Get the text of a list view item (ANSI version)
 
IListView * GetIListView () OVERRIDE
 Get the list view interface.
 
SListView * GetListView ()
 Get the list view pointer.
 

Protected Member Functions

BOOL FireEvent (IEvtArgs *evt) OVERRIDE
 Notify event.
 
virtual void OnScaleChanged (int nScale)
 Handle scale change event.
 
virtual HRESULT OnLanguageChanged () override
 Handle language change event.
 
virtual BOOL CreateListBox (SXmlNode xmlNode)
 Create the list view.
 
virtual int GetListBoxHeight ()
 Get the height of the list view.
 
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

SListView * m_pListBox
 

Detailed Description

ComboBox Control with ListView.

A ComboBox control that uses a ListView for its dropdown content.

Definition at line 14 of file SComboView.h.

Constructor & Destructor Documentation

◆ SComboView()

SNSBEGIN SComboView::SComboView ( void )

Constructor.

Definition at line 5 of file SComboView.cpp.

◆ ~SComboView()

SComboView::~SComboView ( void )

Destructor.

Definition at line 10 of file SComboView.cpp.

Member Function Documentation

◆ CreateListBox()

BOOL SComboView::CreateListBox ( SXmlNode xmlNode)
protectedvirtual

Create the list view.

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

Definition at line 20 of file SComboView.cpp.

◆ FireEvent()

BOOL SComboView::FireEvent ( IEvtArgs * evt)
protected

Notify event.

Parameters
evtEvent object
Returns
TRUE if successful, FALSE otherwise

This function is a message handler.

Definition at line 89 of file SComboView.cpp.

◆ GetCount()

int SComboView::GetCount ( )

Get the number of items in the list view.

Returns
Number of items

Definition at line 133 of file SComboView.cpp.

◆ GetCurSel()

int SComboView::GetCurSel ( )

Get the current selection index.

Returns
Current selection index

Definition at line 141 of file SComboView.cpp.

◆ GetIListView()

IListView * SComboView::GetIListView ( )

Get the list view interface.

Returns
Pointer to the list view interface

Definition at line 163 of file SComboView.cpp.

◆ GetItemText()

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

Get the text of a list view item.

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

Definition at line 119 of file SComboView.cpp.

◆ GetItemTextA()

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

Get the text of a list view 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 64 of file SComboView.h.

◆ GetListBoxHeight()

int SComboView::GetListBoxHeight ( )
protectedvirtual

Get the height of the list view.

Returns
Height of the list view

Definition at line 43 of file SComboView.cpp.

◆ GetListView()

SListView * SComboView::GetListView ( )

Get the list view pointer.

Returns
Pointer to the list view

Definition at line 114 of file SComboView.cpp.

◆ OnCreateDropDown()

void SComboView::OnCreateDropDown ( SDropDownWnd * pDropDown)
protectedvirtual

Handle creation of the dropdown window.

Parameters
pDropDownDropdown window pointer

Implements ISDropDownOwner.

Definition at line 56 of file SComboView.cpp.

◆ OnDestroyDropDown()

void SComboView::OnDestroyDropDown ( SDropDownWnd * pDropDown)
protectedvirtual

Handle destruction of the dropdown window.

Parameters
pDropDownDropdown window pointer

Implements ISDropDownOwner.

Definition at line 67 of file SComboView.cpp.

◆ OnLanguageChanged()

HRESULT SComboView::OnLanguageChanged ( )
overrideprotectedvirtual

Handle language change event.

Returns
HRESULT

Reimplemented from SWindow.

Definition at line 155 of file SComboView.cpp.

◆ OnScaleChanged()

void SComboView::OnScaleChanged ( int nScale)
protectedvirtual

Handle scale change event.

Parameters
nScaleScale factor

Reimplemented from SWindow.

Definition at line 107 of file SComboView.cpp.

◆ OnSelChanged()

void SComboView::OnSelChanged ( )
protectedvirtual

Handle selection change in the dropdown window.

Definition at line 75 of file SComboView.cpp.

◆ SetCurSel()

BOOL SComboView::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 146 of file SComboView.cpp.

Member Data Documentation

◆ m_pListBox

SListView* SComboView::m_pListBox
protected

Pointer to the list view

Definition at line 138 of file SComboView.h.


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