home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / BK-SC1_4.DMS / in.adf / MUIClass.Lha / Demo / Demo3 / Class.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  1.4 KB  |  70 lines

  1. #ifndef CPP_TWIMUI_APPLICATION_H
  2. #include <classes/twimui/application.h>
  3. #endif
  4.  
  5. #ifndef CPP_TWIMUI_BUTTON_H
  6. #include <classes/twimui/button.h>
  7. #endif
  8.  
  9. #ifndef CPP_TWIMUI_LIST_H
  10. #include <classes/twimui/list.h>
  11. #endif
  12.  
  13. #ifndef CPP_TWIMUI_LISTVIEW_H
  14. #include <classes/twimui/listview.h>
  15. #endif
  16.  
  17. #ifndef CPP_TWIMUI_REQUEST_H
  18. #include <classes/twimui/request.h>
  19. #endif
  20.  
  21. #ifndef CPP_TWIMUI_WINDOW_H
  22. #include <classes/twimui/window.h>
  23. #endif
  24.  
  25. const ULONG MUIM_Demo_Save   = (TAGBASE_WILLI | 0x0001);
  26. const ULONG MUIM_Demo_Use    = (TAGBASE_WILLI | 0x0002);
  27. const ULONG MUIM_Demo_Cancel = (TAGBASE_WILLI | 0x0003);
  28.  
  29. class ListCont
  30.     {
  31.     private:
  32.         TWiStr str;
  33.     public:
  34.         ListCont(const STRPTR p) : str(p) { };
  35.         ~ListCont() { };
  36.         const TWiStr &getStr() const { return(str); };
  37.     };
  38.  
  39. class TWiList : public MUIList
  40.     {
  41.     private:
  42.         virtual LONG CompareHookFunc(struct Hook *, APTR, APTR);
  43.         virtual APTR ConstructHookFunc(struct Hook *, APTR, APTR);
  44.         virtual void DestructHookFunc(struct Hook *, APTR, APTR);
  45.         virtual void DisplayHookFunc(struct Hook *, STRPTR *, APTR);
  46.     public:
  47.         TWiList();
  48.         ~TWiList() { };
  49.     };
  50.  
  51. class TWiWin : public MUIWindow
  52.     {
  53.     private:
  54.         TWiList Liste;
  55.         MUIListview lv;
  56.         MUILabButton BSave;
  57.         MUILabButton BUse;
  58.         MUILabButton BCancel;
  59.         MUIRequest MsgSave;
  60.         MUIRequest MsgUse;
  61.         MUIRequest MsgCan;
  62.         virtual ULONG UserDispatch(struct IClass *, Object *, Msg);
  63.         void save();
  64.         void use();
  65.         void cancel();
  66.     public:
  67.         TWiWin();
  68.         ~TWiWin();
  69.     };
  70.