aswang
1.0
|
Combination of a listbox window and an edit window. More...
#include <ComboBox.h>
Public Member Functions | |
ComboBox (HWND h, window *p=NULL) | |
ComboBox (window *p, unsigned long NewStyle=WS_CHILD|CBS_DROPDOWN|CBS_AUTOHSCROLL) | |
virtual | ~ComboBox () |
virtual long | AddString (AswangStr s) const |
Add a string to the list. | |
virtual long | AddString (AswangStr s, long data) const |
Add a string to the list. If successful, associate data with it. | |
virtual long | AddUniqueString (AswangStr s) const |
Add a string to the list if it doesn't already exist. | |
virtual long | AddUniqueString (AswangStr s, long data) const |
Add a string to the list if it doesn't already exist. If added, associate data with it. | |
virtual long | FindPrefix (AswangStr s, long index=-1) const |
Starting at index, find the first string which begins with the first argument. | |
virtual long | FindString (AswangStr s, long index=-1) const |
Starting at index, find the first string which exactly matches the first argument. | |
virtual long | Count () const |
Get the number of strings in the list. | |
virtual AswangStr | GetSelectedString () const |
Get the currently selected string from the list. | |
virtual long | GetSelectedIndex () const |
Get the index of the currently selected string from the list. | |
virtual void | SetSelectedIndex (long index) const |
Set the index of the currently selected string from the list. | |
virtual AswangStr | GetString (long index) const |
Get the string from the list at the given index. | |
virtual void | DeleteString (long index) const |
Remove the string at the given index from the list. | |
virtual HWND | GetEditWindow () const |
Get the handle to the edit window of the combo box. | |
virtual void | SetItemData (long index, long data) const |
Set the data associated with the string at the given index. | |
virtual long | GetItemData (long index) const |
Get the data associated with the string at the given index. | |
virtual long | operator[] (long index) const |
Get the data associated with the string at the given index. | |
virtual const _TCHAR * | GetClassName () const |
Combination of a listbox window and an edit window.
Definition at line 25 of file ComboBox.h.
aswang::ComboBox::ComboBox | ( | HWND | h, |
window * | p = NULL |
||
) | [inline] |
Definition at line 27 of file ComboBox.h.
aswang::ComboBox::ComboBox | ( | window * | p, |
unsigned long | NewStyle = WS_CHILD|CBS_DROPDOWN|CBS_AUTOHSCROLL |
||
) | [inline] |
Definition at line 28 of file ComboBox.h.
virtual aswang::ComboBox::~ComboBox | ( | ) | [inline, virtual] |
Definition at line 29 of file ComboBox.h.
long ComboBox::AddString | ( | AswangStr | s | ) | const [virtual] |
Add a string to the list.
Definition at line 24 of file ComboBox.cpp.
long ComboBox::AddString | ( | AswangStr | s, |
long | data | ||
) | const [virtual] |
Add a string to the list. If successful, associate data with it.
Definition at line 31 of file ComboBox.cpp.
long ComboBox::AddUniqueString | ( | AswangStr | s | ) | const [virtual] |
Add a string to the list if it doesn't already exist.
Definition at line 41 of file ComboBox.cpp.
long ComboBox::AddUniqueString | ( | AswangStr | s, |
long | data | ||
) | const [virtual] |
Add a string to the list if it doesn't already exist. If added, associate data with it.
Definition at line 49 of file ComboBox.cpp.
long ComboBox::Count | ( | ) | const [virtual] |
Get the number of strings in the list.
Definition at line 79 of file ComboBox.cpp.
void ComboBox::DeleteString | ( | long | index | ) | const [virtual] |
Remove the string at the given index from the list.
Definition at line 125 of file ComboBox.cpp.
long ComboBox::FindPrefix | ( | AswangStr | s, |
long | index = -1 |
||
) | const [virtual] |
Starting at index, find the first string which begins with the first argument.
Definition at line 61 of file ComboBox.cpp.
long ComboBox::FindString | ( | AswangStr | s, |
long | index = -1 |
||
) | const [virtual] |
Starting at index, find the first string which exactly matches the first argument.
Definition at line 70 of file ComboBox.cpp.
virtual const _TCHAR* aswang::ComboBox::GetClassName | ( | ) | const [inline, virtual] |
Implements aswang::window.
Definition at line 64 of file ComboBox.h.
HWND ComboBox::GetEditWindow | ( | ) | const [virtual] |
Get the handle to the edit window of the combo box.
Definition at line 131 of file ComboBox.cpp.
long ComboBox::GetItemData | ( | long | index | ) | const [virtual] |
Get the data associated with the string at the given index.
Definition at line 148 of file ComboBox.cpp.
long ComboBox::GetSelectedIndex | ( | ) | const [virtual] |
Get the index of the currently selected string from the list.
Definition at line 96 of file ComboBox.cpp.
AswangStr ComboBox::GetSelectedString | ( | ) | const [virtual] |
Get the currently selected string from the list.
Definition at line 86 of file ComboBox.cpp.
AswangStr ComboBox::GetString | ( | long | index | ) | const [virtual] |
Get the string from the list at the given index.
Definition at line 109 of file ComboBox.cpp.
long ComboBox::operator[] | ( | long | index | ) | const [virtual] |
Get the data associated with the string at the given index.
Definition at line 155 of file ComboBox.cpp.
void ComboBox::SetItemData | ( | long | index, |
long | data | ||
) | const [virtual] |
Set the data associated with the string at the given index.
Definition at line 142 of file ComboBox.cpp.
void ComboBox::SetSelectedIndex | ( | long | index | ) | const [virtual] |
Set the index of the currently selected string from the list.
Definition at line 103 of file ComboBox.cpp.