home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / kwclass.zip / KDIRLST.HPP < prev    next >
C/C++ Source or Header  |  1994-04-18  |  1KB  |  47 lines

  1. #ifndef _KDIRLST_
  2.   #define _KDIRLST_
  3.  
  4. #ifndef _ILISTBOX_
  5.   #include <ilistbox.hpp>
  6. #endif
  7.  
  8. #ifndef _KLSTHDR_
  9.   #include <klsthdr.hpp>
  10. #endif
  11.  
  12. #ifndef _ISTRING_
  13.   #include <istring.hpp>
  14. #endif
  15.  
  16. class _Export KDirListBox : public IListBox
  17.                           , public KListHandler
  18. {
  19.   public:
  20.     KDirListBox(unsigned long windowId, 
  21.                  IWindow *parentWin, 
  22.                  IWindow *ownerWin, 
  23.                  const IRectangle &rect=IRectangle(),
  24.                  const char *files = "*.*",
  25.                  ITextControl *targetWin=0,
  26.                  const IListBox::Style &style=defaultStyle())
  27.       : IListBox(windowId, parentWin, ownerWin, rect, style)
  28.       , KListHandler(targetWin)
  29.       , spec(files)
  30.     {
  31.       KListHandler::handleEventsFor(this);
  32.     }
  33.  
  34.     Boolean fill();
  35.     const char *fileSpec() const { return spec; }
  36.     KDirListBox &setFileSpec(const char *fileSpec) { spec = fileSpec; return *this; }
  37.  
  38.   protected:
  39.     virtual Boolean enter(IControlEvent &event);
  40.  
  41.   private:
  42.     IString                        spec;
  43. };
  44.  
  45. #endif
  46.  
  47.