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

FXDirDialog.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * D i r e c t o r y S e l e c t i o n D i a l o g *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2000,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXDirDialog.h,v 1.17 2006/01/22 17:58:00 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXDIRDIALOG_H
25 #define FXDIRDIALOG_H
26 
27 #ifndef FXDIALOGBOX_H
28 #include "FXDialogBox.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 class FXDirSelector;
35 
36 
37 /**
38 * A Directory Dialog provides a way to select a directory. In function,
39 * the directory selection dialog is very similar to the file dialog, except that
40 * the Directory Dialog displays a tree-structured view of the file system, and
41 * thereby makes up and down navigation through the file system significantly easier.
42 */
43 class FXAPI FXDirDialog : public FXDialogBox {
45 protected:
46  FXDirSelector *dirbox; // Directory selection widget
47 protected:
48  FXDirDialog(){}
49  void initdialog();
50 private:
51  FXDirDialog(const FXDirDialog&);
52  FXDirDialog &operator=(const FXDirDialog&);
53 public:
54 
55  /// Construct Directory Dialog box
56  FXDirDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=400,FXint h=300);
57 
58  /// Construct free-floating Directory Dialog box
59  FXDirDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=400,FXint h=300);
60 
61  /// Hide this window
62  virtual void hide();
63 
64  /// Change directory
65  void setDirectory(const FXString& path);
66 
67  /// Return directory
68  FXString getDirectory() const;
69 
70  /// Return TRUE if showing files as well as directories
71  FXbool showFiles() const;
72 
73  /// Show or hide normal files
74  void showFiles(FXbool showing);
75 
76  /// Return TRUE if showing hidden files
77  FXbool showHiddenFiles() const;
78 
79  /// Show or hide hidden files
80  void showHiddenFiles(FXbool showing);
81 
82  /// Return wildcard matching mode
83  FXuint getMatchMode() const;
84 
85  /// Change wildcard matching mode
86  void setMatchMode(FXuint mode);
87 
88  /// Change directory list style
89  void setDirBoxStyle(FXuint style);
90 
91  /// Return directory list style
92  FXuint getDirBoxStyle() const;
93 
94  /// Open directory name
95  static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
96 
97  /// Save to stream
98  virtual void save(FXStream& store) const;
99 
100  /// Load from stream
101  virtual void load(FXStream& store);
102 
103  /// Destructor
104  virtual ~FXDirDialog();
105  };
106 
107 }
108 
109 #endif
DialogBox window.
Definition: FXDialogBox.h:40
Base class for all windows.
Definition: FXWindow.h:115
The Directory Selector widget is the reusable mega-widget component which is the core of the Director...
Definition: FXDirSelector.h:46
unsigned int FXuint
Definition: fxdefs.h:396
#define FXAPI
Definition: fxdefs.h:122
FXuchar FXbool
Definition: fxdefs.h:393
Application Object.
Definition: FXApp.h:158
FXString name(const FXString &file)
Return name and extension part of the path name.
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:99
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:397
A Directory Dialog provides a way to select a directory.
Definition: FXDirDialog.h:43
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92
FXString provides essential string manipulation capabilities.
Definition: FXString.h:33

Copyright © 1997-2005 Jeroen van der Zijp