OWLNext 6.32
Public Member Functions
owl::TListBoxData Class Reference

Used to transfer the contents of a list box. More...

#include <listbox.h>

List of all members.

Public Member Functions

 TListBoxData ()
 ~TListBoxData ()
TStringArrayGetStrings ()
TLParamArrayGetItemDatas ()
TIntArrayGetSelIndices ()
void AddString (LPCTSTR str, bool isSelected=false)
void AddString (const tstring &str, bool isSelected=false)
void AddStringItem (LPCTSTR str, LPARAM itemData, bool isSelected=false)
void AddStringItem (const tstring &str, LPARAM itemData, bool isSelected=false)
void Clear ()
void Select (int index)
void SelectString (LPCTSTR str)
void SelectString (const tstring &str)
int GetSelCount () const
void ResetSelections ()
int GetSelStringLength (int index=0) const
void GetSelString (TCHAR *buffer, int bufferSize, int index=0) const
void GetSelString (tstring &str, int index=0) const
tstring GetSelString (int index=0) const

Detailed Description

Used to transfer the contents of a list box.


Constructor & Destructor Documentation

owl::TListBoxData::TListBoxData ( )

Constructs Strings and SelStrings. Initializes SelCount to 0.

owl::TListBoxData::~TListBoxData ( )

Deletes the space allocated for Strings and SelStrings.


Member Function Documentation

void owl::TListBoxData::AddString ( LPCTSTR  str,
bool  isSelected = false 
)

Adds the specified string to Strings. If IsSelected is true, the string is selected.

void owl::TListBoxData::AddStringItem ( LPCTSTR  str,
LPARAM  itemData,
bool  isSelected = false 
)

Adds a string to the Strings array, optionally selects it, and adds itemData to the ItemDatas array.

void owl::TListBoxData::Clear ( )

Resets the list box by flushing the ItemDatas and Strings arrays and calling ResetSelections.

TLParamArray & owl::TListBoxData::GetItemDatas ( ) [inline]

Returns a reference to the ItemDatas array.

int owl::TListBoxData::GetSelCount ( ) const

Returns the number of items in SelIndices.

TIntArray & owl::TListBoxData::GetSelIndices ( ) [inline]

Returns a reference to the SelIndices array.

void owl::TListBoxData::GetSelString ( tstring &  str,
int  index = 0 
) const

Locates the string at the specified index in SelIndices and copies it into str.

void owl::TListBoxData::GetSelString ( TCHAR *  buffer,
int  bufferSize,
int  index = 0 
) const

Locates the string at the specified index in SelIndices and copies it into buffer. bufferSize includes the terminating NULL.

int owl::TListBoxData::GetSelStringLength ( int  index = 0) const

Returns the length (excluding the terminating NULL) of the string at the specified index in SelIndices.

TStringArray & owl::TListBoxData::GetStrings ( ) [inline]

Returns a reference to a TStringArray object containing the strings.

void owl::TListBoxData::ResetSelections ( )

Flushes SelIndices.

void owl::TListBoxData::Select ( int  index)

Selects the string at the given index.

void owl::TListBoxData::SelectString ( LPCTSTR  str)

Adds the index of the string matching str to SelIndices.


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