|
OWLNext 7.0
Borland's Object Windows Library for the modern age
|
An interface object that represents a transfer buffer for a TComboBox. More...
#include <owl/combobox.h>
Public Member Functions | |
| TComboBoxData () | |
| Constructs a TComboBoxData object, initializes Strings and ItemDatas to empty arrays, and initializes Selection and SelIndex to 0. | |
| ~TComboBoxData () | |
| Destructor for TComboBoxData. Deletes Strings, ItemDatas, and Selection. | |
| TComboBoxData (const TComboBoxData &tCBD) | |
| 30.05.2007 - Submitted by Frank Rast: TComboBoxData needs a copy constructor because the default copy constructor does not deep copy the protected data of this class. | |
| TComboBoxData & | operator= (const TComboBoxData &tCBD) |
| TStringArray & | GetStrings () |
| Returns the array of strings (the Strings data member) to transfer to or from a combo box's associated list box. | |
| TLParamArray & | GetItemDatas () |
| Returns the array of DWORDs to transfer to or from a combo box's associated list box. | |
| int | GetSelIndex () |
| Returns the index (the SelIndex data member) of the selected item in the strings array. | |
| tstring & | GetSelection () |
| Returns the currently selected string (the Selection data member) to transfer to or from a combo box. | |
| void | AddString (LPCTSTR str, bool isSelected=false) |
| Adds the specified string to the array of Strings. | |
| void | AddString (const tstring &str, bool isSelected=false) |
| void | AddStringItem (LPCTSTR str, LPARAM itemData, bool isSelected=false) |
| Adds a given string and uint32 item to the "Strings" and "ItemDatas" array and copies the string into "Selection" if "isSelected" is true. | |
| void | AddStringItem (const tstring &str, LPARAM itemData, bool isSelected=false) |
| void | Clear () |
| Flushes the Strings and ItemDatas members. | |
| void | Select (int index) |
| Selects an item at a given index. | |
| void | SelectString (LPCTSTR str) |
| Selects "str", marking the matching String entry (if any) as selected. | |
| void | SelectString (const tstring &str) |
| int | GetSelCount () const |
| Returns the number of items selected, either 0 or 1. | |
| void | ResetSelections () |
| Resets the index of the selected item and the currently selected string. | |
| int | GetSelStringLength () const |
| Returns the length of the selection string excluding the terminating 0. | |
| void | GetSelString (TCHAR *buffer, int bufferSize) const |
| Copies the selected string into Buffer. BufferSize includes the terminating 0. | |
| const tstring & | GetSelString () const |
An interface object that represents a transfer buffer for a TComboBox.
Definition at line 182 of file combobox.h.
| owl::TComboBoxData::TComboBoxData | ( | ) |
Constructs a TComboBoxData object, initializes Strings and ItemDatas to empty arrays, and initializes Selection and SelIndex to 0.
Definition at line 25 of file combobox.cpp.
| owl::TComboBoxData::~TComboBoxData | ( | ) |
Destructor for TComboBoxData. Deletes Strings, ItemDatas, and Selection.
Definition at line 35 of file combobox.cpp.
| owl::TComboBoxData::TComboBoxData | ( | const TComboBoxData & | tCBD | ) |
30.05.2007 - Submitted by Frank Rast: TComboBoxData needs a copy constructor because the default copy constructor does not deep copy the protected data of this class.
For the same reason a assignment operator is needed.
Definition at line 46 of file combobox.cpp.
References TComboBoxData().
|
inline |
Definition at line 202 of file combobox.h.
References AddString().
| void owl::TComboBoxData::AddString | ( | LPCTSTR | str, |
| bool | isSelected = false ) |
Adds the specified string to the array of Strings.
If IsSelected is true, AddString deletes Selection and copies str into Selection.
Definition at line 82 of file combobox.cpp.
References Select().
|
inline |
Definition at line 204 of file combobox.h.
References AddStringItem().
| void owl::TComboBoxData::AddStringItem | ( | LPCTSTR | str, |
| LPARAM | itemData, | ||
| bool | isSelected = false ) |
Adds a given string and uint32 item to the "Strings" and "ItemDatas" array and copies the string into "Selection" if "isSelected" is true.
Definition at line 95 of file combobox.cpp.
References AddString().
| void owl::TComboBoxData::Clear | ( | ) |
Flushes the Strings and ItemDatas members.
Resets the index and selected string values.
Definition at line 69 of file combobox.cpp.
References ResetSelections().
|
inline |
Returns the array of DWORDs to transfer to or from a combo box's associated list box.
Definition at line 664 of file combobox.h.
|
inline |
Returns the number of items selected, either 0 or 1.
Definition at line 687 of file combobox.h.
|
inline |
Returns the currently selected string (the Selection data member) to transfer to or from a combo box.
Definition at line 680 of file combobox.h.
|
inline |
Returns the index (the SelIndex data member) of the selected item in the strings array.
Definition at line 672 of file combobox.h.
|
inline |
Definition at line 214 of file combobox.h.
| void owl::TComboBoxData::GetSelString | ( | TCHAR * | buffer, |
| int | bufferSize ) const |
Copies the selected string into Buffer. BufferSize includes the terminating 0.
Definition at line 147 of file combobox.cpp.
References _tcsncpy.
| int owl::TComboBoxData::GetSelStringLength | ( | ) | const |
Returns the length of the selection string excluding the terminating 0.
Definition at line 137 of file combobox.cpp.
|
inline |
Returns the array of strings (the Strings data member) to transfer to or from a combo box's associated list box.
Definition at line 656 of file combobox.h.
| TComboBoxData & owl::TComboBoxData::operator= | ( | const TComboBoxData & | tCBD | ) |
Definition at line 54 of file combobox.cpp.
References TComboBoxData().
|
inline |
Resets the index of the selected item and the currently selected string.
Definition at line 694 of file combobox.h.
References _T.
| void owl::TComboBoxData::Select | ( | int | index | ) |
Selects an item at a given index.
Definition at line 106 of file combobox.cpp.
|
inline |
Definition at line 209 of file combobox.h.
References SelectString().
| void owl::TComboBoxData::SelectString | ( | LPCTSTR | str | ) |
Selects "str", marking the matching String entry (if any) as selected.
Definition at line 120 of file combobox.cpp.
References _tcscmp.