Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
include
FXDirSelector.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 W i d g e t *
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: FXDirSelector.h,v 1.21 2006/01/22 17:58:00 fox Exp $ *
23
********************************************************************************/
24
#ifndef FXDIRSELECTOR_H
25
#define FXDIRSELECTOR_H
26
27
#ifndef FXPACKER_H
28
#include "
FXPacker.h
"
29
#endif
30
31
namespace
FX
{
32
33
34
class
FXDirList;
35
class
FXTextField;
36
class
FXButton;
37
38
39
/**
40
* The Directory Selector widget is the reusable mega-widget component which
41
* is the core of the Directory Dialog. The function of the directory selector widget
42
* is very similar to the file selector widget, except that the directory selector widget
43
* displays a tree-structured view of the file system, and thereby makes up and down
44
* navigation through the file system significantly easier.
45
*/
46
class
FXAPI
FXDirSelector
:
public
FXPacker
{
47
FXDECLARE
(
FXDirSelector
)
48
protected
:
49
FXDirList
*dirbox;
// Directory list widget
50
FXTextField
*dirname;
// Directory name entry field
51
FXButton
*accept;
// Accept button
52
FXButton
*cancel;
// Cancel button
53
FXIcon
*updiricon;
// Up directory icon
54
FXIcon
*homeicon;
// Go home icon
55
FXIcon
*workicon;
// Go home icon
56
FXIcon
*markicon;
// Book mark icon
57
FXIcon
*clearicon;
// Book clear icon
58
FXIcon
*newicon;
// New directory icon
59
FXIcon
*deleteicon;
// Delete file icon
60
FXIcon
*moveicon;
// Rename file icon
61
FXIcon
*copyicon;
// Copy file icon
62
FXIcon
*linkicon;
// Link file icon
63
FXRecentFiles
mrufiles;
// Recently visited places
64
protected
:
65
FXDirSelector
(){}
66
private
:
67
FXDirSelector
(
const
FXDirSelector
&);
68
FXDirSelector
&operator=(
const
FXDirSelector
&);
69
public
:
70
long
onCmdName(
FXObject
*,
FXSelector
,
void
*);
71
long
onCmdOpened(
FXObject
*,
FXSelector
,
void
*);
72
long
onCmdHome(
FXObject
*,
FXSelector
,
void
*);
73
long
onCmdWork(
FXObject
*,
FXSelector
,
void
*);
74
long
onCmdDirectoryUp(
FXObject
*,
FXSelector
,
void
*);
75
long
onPopupMenu(
FXObject
*,
FXSelector
,
void
*);
76
long
onCmdBookmark(
FXObject
*,
FXSelector
,
void
*);
77
long
onCmdVisit(
FXObject
*,
FXSelector
,
void
*);
78
long
onCmdNew(
FXObject
*,
FXSelector
,
void
*);
79
long
onUpdNew(
FXObject
*,
FXSelector
,
void
*);
80
long
onCmdMove(
FXObject
*,
FXSelector
,
void
*);
81
long
onCmdCopy(
FXObject
*,
FXSelector
,
void
*);
82
long
onCmdLink(
FXObject
*,
FXSelector
,
void
*);
83
long
onCmdDelete(
FXObject
*,
FXSelector
,
void
*);
84
long
onUpdSelected(
FXObject
*,
FXSelector
,
void
*);
85
public
:
86
enum
{
87
ID_DIRNAME=
FXPacker::ID_LAST
,
88
ID_DIRLIST,
89
ID_HOME,
90
ID_WORK,
91
ID_DIRECTORY_UP,
92
ID_BOOKMARK,
93
ID_VISIT,
94
ID_NEW,
95
ID_DELETE,
96
ID_MOVE,
97
ID_COPY,
98
ID_LINK,
99
ID_LAST
100
};
101
public
:
102
103
/// Constructor
104
FXDirSelector
(
FXComposite
*p,
FXObject
* tgt=
NULL
,
FXSelector
sel=0,
FXuint
opts=0,
FXint
x=0,
FXint
y=0,
FXint
w=0,
FXint
h=0);
105
106
/// Return a pointer to the "Accept" button
107
FXButton
*acceptButton()
const
{
return
accept; }
108
109
/// Return a pointer to the "Cancel" button
110
FXButton *cancelButton()
const
{
return
cancel; }
111
112
/// Change directory
113
void
setDirectory(
const
FXString& path);
114
115
/// Return directory
116
FXString getDirectory()
const
;
117
118
/// Return TRUE if showing files as well as directories
119
FXbool
showFiles()
const
;
120
121
/// Show or hide normal files
122
void
showFiles(
FXbool
showing);
123
124
/// Return TRUE if showing hidden directories
125
FXbool
showHiddenFiles()
const
;
126
127
/// Show or hide hidden directories
128
void
showHiddenFiles(
FXbool
showing);
129
130
/// Return wildcard matching mode
131
FXuint
getMatchMode()
const
;
132
133
/// Change wildcard matching mode
134
void
setMatchMode(
FXuint
mode);
135
136
/// Change Directory List style
137
void
setDirBoxStyle(
FXuint
style);
138
139
/// Return Directory List style
140
FXuint
getDirBoxStyle()
const
;
141
142
/// Save to stream
143
virtual
void
save(FXStream& store)
const
;
144
145
/// Load from stream
146
virtual
void
load(FXStream& store);
147
148
/// Destructor
149
virtual
~FXDirSelector();
150
};
151
152
}
153
154
#endif
FX::FXDirSelector
The Directory Selector widget is the reusable mega-widget component which is the core of the Director...
Definition:
FXDirSelector.h:46
FX::FXWindow::ID_LAST
Definition:
FXWindow.h:241
FX::FXuint
unsigned int FXuint
Definition:
fxdefs.h:396
FX::FXSelector
FXuint FXSelector
Association key.
Definition:
FXObject.h:53
FX::FXButton
A button provides a push button, with optional icon and/or text label.
Definition:
FXButton.h:85
FXAPI
#define FXAPI
Definition:
fxdefs.h:122
FX::FXbool
FXuchar FXbool
Definition:
fxdefs.h:393
FX::FXComposite
Base composite.
Definition:
FXComposite.h:35
NULL
#define NULL
Definition:
fxdefs.h:41
FX
Definition:
FX4Splitter.h:31
FX::FXint
int FXint
Definition:
fxdefs.h:397
FXPacker.h
FX::FXIcon
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition:
FXIcon.h:45
FX::FXPacker
Packer is a layout manager which automatically places child windows inside its area against the left...
Definition:
FXPacker.h:58
FX::FXTextField
A text field is a single-line text entry widget.
Definition:
FXTextField.h:73
FX::FXObject
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition:
FXObject.h:166
FX::FXRecentFiles
The recent files object manages a most recently used (MRU) file list by means of the standard system ...
Definition:
FXRecentFiles.h:48
FX::FXDirList
A Directory List widget provides a tree-structured view of the file system.
Definition:
FXDirList.h:122
FXDECLARE
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition:
FXObject.h:92
Copyright © 1997-2005 Jeroen van der Zijp