home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 Mobile / Chip_Mobile_2001.iso / palm / business / printcar / printcar.exe / src / UI / List.h < prev    next >
C/C++ Source or Header  |  2000-06-09  |  1KB  |  57 lines

  1. //
  2. //  $Id: List.h,v 1.3 2000/06/08 21:14:56 sergey Exp $
  3. //
  4.  
  5. #ifndef _List_h_
  6. #define _List_h_
  7.  
  8. #include "ConcreteFormObject.h"
  9. #include "ListChoices.h"
  10.  
  11.  
  12. namespace UI
  13. {
  14.     //
  15.     //  List control class
  16.     //
  17.     class List: public ConcreteFormObject<ListPtr, frmListObj>
  18.     {
  19.     public:
  20.         List(Form& parent, Word listID);
  21.         ~List();
  22.  
  23.     private:
  24.         List(const List& other);
  25.         List& operator =(const List& other);
  26.  
  27.     // operations
  28.     public:
  29.  
  30.         void setSelection(int index);
  31.         int getSelection() const        { return LstGetSelection(objectPtr()); }
  32.  
  33.         int numberOfItems() const       { return LstGetNumberOfItems(objectPtr()); }
  34.  
  35.     // attributes
  36.  
  37.         void setChoices(const ListChoices& choices);
  38.         const ListChoices& choices() const { return _choices; }
  39.  
  40.     // event handling
  41.  
  42.         // Process page up/down keys. Must be called by parent form directly.
  43.         bool handleKeyDownEvent(EventType* event);
  44.  
  45.     // implementation
  46.  
  47.         bool processPageKeys();
  48.  
  49.     // data members
  50.     private:
  51.         ListChoices     _choices;
  52.     };
  53. }
  54. // namespace UI
  55.  
  56. #endif // _List_h_
  57.