home *** CD-ROM | disk | FTP | other *** search
/ Amiga Times / AmigaTimes.iso / demos / programme / StormC / Mui-Class-Lib / Include / Classes / TWiMUI / Dirlist.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-10-06  |  2.8 KB  |  88 lines

  1. //
  2. //  $VER: Dirlist.h     1.0 (16 Jun 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21.  
  22. #ifndef CPP_TWIMUI_DIRLIST_H
  23. #define CPP_TWIMUI_DIRLIST_H
  24.  
  25. #ifndef CPP_TWIMUI_LIST_H
  26. #include <classes/twimui/list.h>
  27. #endif
  28.  
  29. class MUIDirlistFilterHook
  30.     {
  31.     private:
  32.         struct Hook filterhook;
  33.         static BOOL FilterHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 struct ExAllData *);
  34.         virtual BOOL FilterHookFunc(struct Hook *, Object *, struct ExAllData *);
  35.     protected:
  36.         MUIDirlistFilterHook();
  37.         MUIDirlistFilterHook(const MUIDirlistFilterHook &p);
  38.         ~MUIDirlistFilterHook();
  39.         MUIDirlistFilterHook &operator= (const MUIDirlistFilterHook &);
  40.     public:
  41.         struct Hook *filter() { return(&filterhook); };
  42.     };
  43.  
  44. class MUIDirlist
  45.     :   public MUIList,
  46.         public MUIDirlistFilterHook
  47.     {
  48.     public:
  49.         MUIDirlist(const struct TagItem *t)
  50.             :   MUIList(MUIC_Dirlist),
  51.                 MUIDirlistFilterHook()
  52.             {
  53.             init(t);
  54.             };
  55.         MUIDirlist(const Tag, ...);
  56.         MUIDirlist()
  57.             :   MUIList(MUIC_Dirlist),
  58.                 MUIDirlistFilterHook()
  59.             { };
  60.         MUIDirlist(MUIDirlist &p)
  61.             :   MUIList(p),
  62.                 MUIDirlistFilterHook(p)
  63.             { };
  64.         virtual ~MUIDirlist();
  65.         MUIDirlist &operator= (MUIDirlist &);
  66.         void AcceptPattern(const STRPTR p) { set(MUIA_Dirlist_AcceptPattern,(ULONG)p); };
  67.         void Directory(const STRPTR p) { set(MUIA_Dirlist_Directory,(ULONG)p); };
  68.         STRPTR Directory() const { return((STRPTR)get(MUIA_Dirlist_Directory,NULL)); };
  69.         void DrawersOnly(const BOOL p) { set(MUIA_Dirlist_DrawersOnly,(ULONG)p); };
  70.         void FilesOnly(const BOOL p) { set(MUIA_Dirlist_FilesOnly,(ULONG)p); };
  71.         void FilterDrawers(const BOOL p) { set(MUIA_Dirlist_FilterDrawers,(ULONG)p); };
  72.         void FilterHook(const struct Hook *p) { set(MUIA_Dirlist_FilterHook,(ULONG)p); };
  73.         void MultiSelDirs(const BOOL p) { set(MUIA_Dirlist_MultiSelDirs,(ULONG)p); };
  74.         LONG NumBytes() const { return((LONG)get(MUIA_Dirlist_NumBytes,0L)); };
  75.         LONG NumDrawers() const { return((LONG)get(MUIA_Dirlist_NumDrawers,0L)); };
  76.         LONG NumFiles() const { return((LONG)get(MUIA_Dirlist_NumFiles,0L)); };
  77.         STRPTR Path() const { return((STRPTR)get(MUIA_Dirlist_Path,NULL)); };
  78.         void RejectIcons(const BOOL p) { set(MUIA_Dirlist_RejectIcons,(ULONG)p); };
  79.         void RejectPattern(const STRPTR p) { set(MUIA_Dirlist_RejectPattern,(ULONG)p); };
  80.         void SortDirs(const LONG p) { set(MUIA_Dirlist_SortDirs,(ULONG)p); };
  81.         void SortHighLow(const BOOL p) { set(MUIA_Dirlist_SortHighLow,(ULONG)p); };
  82.         void SortType(const LONG p) { set(MUIA_Dirlist_SortType,(ULONG)p); };
  83.         LONG Status() const { return((LONG)get(MUIA_Dirlist_Status,0L)); };
  84.         void ReRead() { dom(MUIM_Dirlist_ReRead); };
  85.     };
  86.  
  87. #endif
  88.