Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

Fl_Directory_DS.h

00001 /*
00002 * $Id: Fl_Directory_DS.h,v 1.13 2003/07/03 20:36:35 laza2000 Exp $
00003 *
00004 * Extended Fast Light Toolkit (EFLTK)
00005 * Copyright (C) 2002-2003 by EDE-Team
00006 * WWW: http://www.sourceforge.net/projects/ede
00007 *
00008 * Fast Light Toolkit (FLTK)
00009 * Copyright (C) 1998-2003 by Bill Spitzak and others.
00010 * WWW: http://www.fltk.org
00011 *
00012 * This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00013 * version 2. See COPYING for details.
00014 *
00015 * Author : Alexey Parshin
00016 * Email  : alexey@fltk.net
00017 *
00018 * Please report all bugs and problems to "efltk-bugs@fltk.net"
00019 *
00020 */
00021 
00022 #ifndef _FL_DIRECTORY_DS_H_
00023 #define _FL_DIRECTORY_DS_H_
00024 
00025 #include "Fl_Memory_DS.h"
00026 
00028 class FL_API Fl_Directory_DS : public Fl_Memory_DS  {
00029 public:
00030     // ctor, dtor 
00031     Fl_Directory_DS() : Fl_Memory_DS(), m_showpolicy(0) { }
00032     virtual ~Fl_Directory_DS() { close(); }
00033 
00034     enum {
00035         SHOW_ALL = 0,
00036         HIDE_FILES = 1,
00037         HIDE_DOT_FILES = 2,
00038         HIDE_DIRECTORIES = 4,
00039         NO_SORT = 8
00040     };
00041 
00042     char showpolicy() const { return m_showpolicy; }
00043     void showpolicy(char type) { m_showpolicy = type; }
00044 
00045     void directory(const char *d) { m_directory = d; }
00046     void directory(const Fl_String &d) { m_directory = d; }
00047     const Fl_String &directory() const { return m_directory; }
00048 
00049     void pattern(const char *pattern) { m_pattern = pattern; }
00050     void pattern(const Fl_String &pattern) { m_pattern = pattern; }
00051     const Fl_String &pattern() const { return m_pattern; }
00052 
00053     // dataset navigation
00054     virtual bool              open();
00055 
00056 protected:
00057 
00058     Fl_String get_file_type(const struct stat &st, const Fl_Image *&image) const;
00059 
00060 private:
00061     Fl_String           m_directory;
00062     Fl_String           m_pattern;
00063     char                    m_showpolicy;
00064 };
00065 
00066 #endif

Generated on Thu Jul 31 15:33:43 2003 for eFLTK by doxygen1.2.15