#include <dialogs.h>
Inheritance diagram for TListBox::
Public Methods | |
TListBox (const TRect &bounds, ushort aNumCols, TScrollBar *aScrollBar) | |
~TListBox () | |
virtual ushort | dataSize () |
virtual void | getData (void *rec) |
virtual void | getText (char *dest, short item, short maxLen) |
virtual void | newList (TCollection *aList) |
virtual void | setData (void *rec) |
TCollection* | list () |
Static Public Methods | |
TStreamable* | build () |
Static Public Attributes | |
const char* const | name |
Protected Methods | |
TListBox (StreamableInit) | |
virtual void | write (opstream &os) |
virtual void* | read (ipstream &is) |
Protected Attributes | |
TCollection* | items |
TListBox objects represent displayed lists of such items in one or more columns with an optional vertical scroll bar.
Definition at line 1643 of file dialogs.h.
|
Creates a list box control with the given size, number of columns, and a vertical scroll bar referenced by the `aScrollBar' pointer. This constructor calls TListViewer::TListViewer(bounds, aNumCols, 0, aScrollBar), thereby supressing the horizontal scroll bar.
Your application must provide a suitable TCollection holding the strings (or other objects) to be listed. The items data member must be set to point to this collection using newList(). |
|
Undocumented. |
|
Each streamable class needs a "builder" to allocate the correct memory for its objects together with the initialized virtual table pointers. This is achieved by calling this constructor with an argument of type StreamableInit. |
|
Called to create an object in certain stream-reading situations. Reimplemented from TListViewer. Reimplemented in TSortedListBox, TFileList, and TDirListBox. |
|
Returns the size of the data read and written to the records passed to getData() and setData(). These three member functions are useful for initializing groups. By default, dataSize() returns the size of TCollection plus the size of ushort (for items and the selected item). You may need to override this member function for your own applications.
Reimplemented from TView. Reimplemented in TFileList. |
|
Writes TListBox object data to the target record. By default, getData() writes the current items and focused data members to `rec'. You may need to override this member function for your own applications.
Reimplemented from TView. Reimplemented in TFileList. |
|
Sets a string in `dest' from the calling TListBox object. By default, the returned string is obtained from the item'th item in the TCollection using (char *) ((list())->at(item)).
Reimplemented from TListViewer. Reimplemented in TFileList, and TDirListBox. |
|
Returns the private items pointer. Reimplemented in TSortedListBox, TFileList, and TDirListBox. Definition at line 1775 of file dialogs.h. Referenced by TDirListBox::list(), TFileList::list(), and TSortedListBox::list().
|
|
Creates a new list by deleting the current one and replacing it with the given `aList'. Referenced by TFileList::newList().
|
|
Reads from the input stream `is'. Reimplemented from TListViewer. Reimplemented in TSortedListBox. |
|
Replaces the current list with items and focused values read from the given `rec' array. setData() calls newList() so that the new list is displayed with the correct focused item. As with getData() and dataSize(), you may need to override this member function for your own applications. Reimplemented from TView. Reimplemented in TFileList. |
|
Writes to the output stream `os'. Reimplemented from TListViewer. |
|
Points at the collection of items to scroll through. Typically, this might be a collection of strings representing the item texts. User can access this private member only by calling the function list(). |
|
Undocumented. Reimplemented from TListViewer. Reimplemented in TSortedListBox, TFileList, and TDirListBox. |