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

FXDirDialog.h
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,2024 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (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 *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXDIRDIALOG_H
22 #define FXDIRDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXFileAssociations;
32 class FXDirSelector;
33 
34 
41 class FXAPI FXDirDialog : public FXDialogBox {
42  FXDECLARE(FXDirDialog)
43 protected:
44  FXDirSelector *dirbox; // Directory selection widget
45 protected:
46  static const FXchar sectionName[];
47 protected:
48  FXDirDialog(){}
49  void initdialog();
50 private:
51  FXDirDialog(const FXDirDialog&);
52  FXDirDialog &operator=(const FXDirDialog&);
53 public:
54 
56  FXDirDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=400,FXint h=300);
57 
59  FXDirDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=400,FXint h=300);
60 
62  virtual void hide();
63 
65  void setDirectory(const FXString& path);
66 
68  FXString getDirectory() const;
69 
71  void setPattern(const FXString& ptrn);
72 
74  FXString getPattern() const;
75 
77  FXuint getMatchMode() const;
78 
80  void setMatchMode(FXuint mode);
81 
83  FXbool showFiles() const;
84 
86  void showFiles(FXbool showing);
87 
89  FXbool showHiddenFiles() const;
90 
92  void showHiddenFiles(FXbool showing);
93 
95  void setDirBoxStyle(FXuint style);
96 
98  FXuint getDirBoxStyle() const;
99 
101  void setAssociations(FXFileAssociations* assoc,FXbool owned=false);
102 
104  FXFileAssociations* getAssociations() const;
105 
107  static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
108 
110  virtual void save(FXStream& store) const;
111 
113  virtual void load(FXStream& store);
114 
116  virtual ~FXDirDialog();
117  };
118 
119 }
120 
121 #endif
DialogBox window.
Definition: FXDialogBox.h:37
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
The Directory Selector widget is the reusable mega-widget component which is the core of the Director...
Definition: FXDirSelector.h:44
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Definition: FX4Splitter.h:28
The FileAssociations object manages file associations between a file extension and a FileAssoc record...
Definition: FXFileAssociations.h:101
A Directory Dialog provides a way to select a directory.
Definition: FXDirDialog.h:41
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp