home *** CD-ROM | disk | FTP | other *** search
- //
- // $Id: List.h,v 1.3 2000/06/08 21:14:56 sergey Exp $
- //
-
- #ifndef _List_h_
- #define _List_h_
-
- #include "ConcreteFormObject.h"
- #include "ListChoices.h"
-
-
- namespace UI
- {
- //
- // List control class
- //
- class List: public ConcreteFormObject<ListPtr, frmListObj>
- {
- public:
- List(Form& parent, Word listID);
- ~List();
-
- private:
- List(const List& other);
- List& operator =(const List& other);
-
- // operations
- public:
-
- void setSelection(int index);
- int getSelection() const { return LstGetSelection(objectPtr()); }
-
- int numberOfItems() const { return LstGetNumberOfItems(objectPtr()); }
-
- // attributes
-
- void setChoices(const ListChoices& choices);
- const ListChoices& choices() const { return _choices; }
-
- // event handling
-
- // Process page up/down keys. Must be called by parent form directly.
- bool handleKeyDownEvent(EventType* event);
-
- // implementation
-
- bool processPageKeys();
-
- // data members
- private:
- ListChoices _choices;
- };
- }
- // namespace UI
-
- #endif // _List_h_
-