OWLNext 7.0
Borland's Object Windows Library for the modern age
|
Used to transfer the contents of a list box. More...
#include <owl/listbox.h>
Public Member Functions | |
TListBoxData () | |
Constructs Strings and SelStrings. Initializes SelCount to 0. | |
~TListBoxData () | |
Deletes the space allocated for Strings and SelStrings. | |
TStringArray & | GetStrings () |
Returns a reference to a TStringArray object containing the strings. | |
TLParamArray & | GetItemDatas () |
Returns a reference to the ItemDatas array. | |
TIntArray & | GetSelIndices () |
Returns a reference to the SelIndices array. | |
void | AddString (LPCTSTR str, bool isSelected=false) |
Adds the specified string to Strings. | |
void | AddString (const tstring &str, bool isSelected=false) |
void | 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 | AddStringItem (const tstring &str, LPARAM itemData, bool isSelected=false) |
void | Clear () |
Resets the list box by flushing the ItemDatas and Strings arrays and calling ResetSelections. | |
void | Select (int index) |
Selects the string at the given index. | |
void | SelectString (LPCTSTR str) |
Adds the index of the string matching str to SelIndices. | |
void | SelectString (const tstring &str) |
int | GetSelCount () const |
Returns the number of items in SelIndices. | |
void | ResetSelections () |
Flushes SelIndices. | |
int | GetSelStringLength (int index=0) const |
Returns the length (excluding the terminating NULL) of the string at the specified index in SelIndices. | |
void | GetSelString (TCHAR *buffer, int bufferSize, int index=0) const |
Locates the string at the specified index in SelIndices and copies it into buffer. | |
void | GetSelString (tstring &str, int index=0) const |
Locates the string at the specified index in SelIndices and copies it into str. | |
tstring | GetSelString (int index=0) const |
owl::TListBoxData::TListBoxData | ( | ) |
Constructs Strings and SelStrings. Initializes SelCount to 0.
Definition at line 30 of file listbox.cpp.
owl::TListBoxData::~TListBoxData | ( | ) |
Deletes the space allocated for Strings and SelStrings.
Definition at line 41 of file listbox.cpp.
Definition at line 180 of file listbox.h.
References AddString().
Adds the specified string to Strings.
If IsSelected is true, the string is selected.
Definition at line 74 of file listbox.cpp.
|
inline |
Definition at line 182 of file listbox.h.
References AddStringItem().
Adds a string to the Strings array, optionally selects it, and adds itemData to the ItemDatas array.
Definition at line 86 of file listbox.cpp.
References AddString().
void owl::TListBoxData::Clear | ( | ) |
Resets the list box by flushing the ItemDatas and Strings arrays and calling ResetSelections.
Definition at line 50 of file listbox.cpp.
References owl::TMObjectArray< T, A >::Flush(), and ResetSelections().
|
inline |
int owl::TListBoxData::GetSelCount | ( | ) | const |
Returns the number of items in SelIndices.
Definition at line 58 of file listbox.cpp.
References owl::TArrayBase::Size().
|
inline |
Definition at line 706 of file listbox.cpp.
References GetSelString().
Locates the string at the specified index in SelIndices and copies it into buffer.
bufferSize includes the terminating NULL.
Definition at line 132 of file listbox.cpp.
References _tcsncpy, and GetSelCount().
Locates the string at the specified index in SelIndices and copies it into str.
Definition at line 149 of file listbox.cpp.
References _T, and GetSelCount().
Returns the length (excluding the terminating NULL) of the string at the specified index in SelIndices.
Definition at line 120 of file listbox.cpp.
References GetSelCount().
|
inline |
void owl::TListBoxData::ResetSelections | ( | ) |
Flushes SelIndices.
Definition at line 64 of file listbox.cpp.
References owl::TTypedArray< T, R, A >::Flush().
Selects the string at the given index.
Definition at line 96 of file listbox.cpp.
References owl::TTypedArray< T, R, A >::Add(), owl::TTypedArray< T, R, A >::Find(), and owl::TArrayBase::NPOS.
Definition at line 187 of file listbox.h.
References SelectString().
Adds the index of the string matching str to SelIndices.
Definition at line 106 of file listbox.cpp.