dobjcmn.cpp Common
docmdi.cpp Common
docview.cpp Common
+dseldlg.cpp Common
dynarray.cpp Common Base
dynlib.cpp Common Base
effects.cpp Common
- polygon support in wxRegion (Klaas Holwerda)
- wxStreamToTextRedirector to allow easily redirect cout to wxTextCtrl added
- fixed bug with using wxExecute() to capture huge amounts of output
+- wxDirSelector() added (Paul A. Thiessen)
wxHTML:
<wx/tipdlg.h>
+\membersection{::wxDirSelector}\label{wxdirselector}
+
+\func{wxString}{wxDirSelector}{\param{const wxString\& }{message = wxDirSelectorPromptStr},\\
+ \param{const wxString\& }{default\_path = ""},\\
+ \param{long }{style = 0}, \param{const wxPoint\& }{pos = wxDefaultPosition},\\
+ \param{wxWindow *}{parent = NULL}}
+
+Pops up a directory selector dialog. The arguments have the same meaning as
+those of wxDirDialog::wxDirDialog(). The message is displayed at the top,
+and the default_path, if specified, is set as the initial selection.
+
+The application must check for an empty return value (if the user pressed
+Cancel). For example:
+
+\begin{verbatim}
+const wxString& dir = wxDirSelector("Choose a folder");
+if ( !dir.empty() )
+{
+ ...
+}
+\end{verbatim}
+
+\wxheading{Include files}
+
+<wx/dirdlg.h>
+
\membersection{::wxFileSelector}\label{wxfileselector}
\func{wxString}{wxFileSelector}{\param{const wxString\& }{message}, \param{const wxString\& }{default\_path = ""},\\
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
#if defined(__WXMSW__)
-#if defined(__WIN16__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) || defined(__SALFORDC__)
-#include "wx/generic/dirdlgg.h"
-#else
-#include "wx/msw/dirdlg.h"
-#endif
+ #if defined(__WIN16__) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS) || defined(__SALFORDC__)
+ #include "wx/generic/dirdlgg.h"
+ #else
+ #include "wx/msw/dirdlg.h"
+ #endif
#elif defined(__WXMOTIF__)
-#include "wx/generic/dirdlgg.h"
+ #include "wx/generic/dirdlgg.h"
#elif defined(__WXGTK__)
-#include "wx/generic/dirdlgg.h"
+ #include "wx/generic/dirdlgg.h"
#elif defined(__WXMAC__)
-#include "wx/mac/dirdlg.h"
+ #include "wx/mac/dirdlg.h"
#elif defined(__WXPM__)
-#include "wx/os2/dirdlg.h"
+ #include "wx/os2/dirdlg.h"
#elif defined(__WXSTUBS__)
-#include "wx/stubs/dirdlg.h"
+ #include "wx/stubs/dirdlg.h"
#endif
+// ----------------------------------------------------------------------------
+// common ::wxDirSelector() function
+// ----------------------------------------------------------------------------
+
+WXDLLEXPORT_DATA(extern const wxChar*) wxDirSelectorPromptStr;
+
+WXDLLEXPORT wxString
+wxDirSelector(const wxString& message = wxDirSelectorPromptStr,
+ const wxString& defaultPath = wxEmptyString,
+ long style = 0,
+ const wxPoint& pos = wxDefaultPosition,
+ wxWindow *parent = NULL);
+
#endif // wxUSE_DIRDLG
#endif
#if wxUSE_DIRDLG
#include "wx/dialog.h"
-#include "wx/checkbox.h"
#include "wx/treectrl.h"
+class WXDLLEXPORT wxButton;
+class WXDLLEXPORT wxCheckBox;
+class WXDLLEXPORT wxTextCtrl;
+
//-----------------------------------------------------------------------------
// data
//-----------------------------------------------------------------------------
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: src/common/dseldlg.cpp
+// Purpose: implementation of ::wxDirSelector()
+// Author: Paul Thiessen
+// Modified by:
+// Created: 20.02.01
+// RCS-ID: $Id$
+// Copyright: (c) 2001 wxWindows team
+// License: wxWindows license
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+#ifdef __GNUG__
+ #pragma implementation "dseldlg.h"
+#endif
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#endif //WX_PRECOMP
+
+#include "wx/dirdlg.h"
+
+#if wxUSE_DIRDLG
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+const wxChar *wxDirSelectorPromptStr = wxT("Select a directory");
+
+wxString wxDirSelector(const wxString& message,
+ const wxString& defaultPath,
+ long style,
+ const wxPoint& pos,
+ wxWindow *parent)
+{
+ wxString path;
+
+ wxDirDialog dirDialog(parent, message, defaultPath, style, pos);
+ if ( dirDialog.ShowModal() == wxID_OK )
+ {
+ path = dirDialog.GetPath();
+ }
+
+ return path;
+}
+
+#endif // wxUSE_DIRDLG
+
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
ALL_SOURCES = \
common/init.cpp \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \
generic/accel.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \
generic/accel.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
ALL_SOURCES = \
generic/accel.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T!
ALL_SOURCES = \
generic/busyinfo.cpp \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
+ common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
dobjcmn.o \
docmdi.o \
docview.o \
+ dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
#
$(MSWDIR)\dobjcmn.obj \
$(MSWDIR)\docmdi.obj \
$(MSWDIR)\docview.obj \
+ $(MSWDIR)\dseldlg.obj \
$(MSWDIR)\dynarray.obj \
$(MSWDIR)\dynlib.obj \
$(MSWDIR)\effects.obj \
$(MSWDIR)\docview.obj: $(COMMDIR)\docview.$(SRCSUFF)
+$(MSWDIR)\dseldlg.obj: $(COMMDIR)\dseldlg.$(SRCSUFF)
+
$(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
$(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
#
$(MSWDIR)\dobjcmn.obj \
$(MSWDIR)\docmdi.obj \
$(MSWDIR)\docview.obj \
+ $(MSWDIR)\dseldlg.obj \
$(MSWDIR)\dynarray.obj \
$(MSWDIR)\dynlib.obj \
$(MSWDIR)\effects.obj \
$(MSWDIR)\docview.obj: $(COMMDIR)\docview.$(SRCSUFF)
+$(MSWDIR)\dseldlg.obj: $(COMMDIR)\dseldlg.$(SRCSUFF)
+
$(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
$(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
#
$(COMMDIR)\dobjcmn.obj \
$(COMMDIR)\docmdi.obj \
$(COMMDIR)\docview.obj \
+ $(COMMDIR)\dseldlg.obj \
$(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \
$(COMMDIR)\effects.obj \
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
+$(COMMDIR)/dseldlg.obj: $*.$(SRCSUFF)
+ cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
$(COMMDIR)/dynarray.obj: $*.$(SRCSUFF)
cl @<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
#
$(COMMDIR)/dobjcmn.$(OBJSUFF) \
$(COMMDIR)/docmdi.$(OBJSUFF) \
$(COMMDIR)/docview.$(OBJSUFF) \
+ $(COMMDIR)/dseldlg.$(OBJSUFF) \
$(COMMDIR)/dynarray.$(OBJSUFF) \
$(COMMDIR)/dynlib.$(OBJSUFF) \
$(COMMDIR)/effects.$(OBJSUFF) \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
# Symantec C++ makefile for the msw objects
$(COMMDIR)\dobjcmn.obj \
$(COMMDIR)\docmdi.obj \
$(COMMDIR)\docview.obj \
+ $(COMMDIR)\dseldlg.obj \
$(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \
$(COMMDIR)\effects.obj \
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
# File: makefile.vc
$(COMMDIR)\$D\dobjcmn.obj \
$(COMMDIR)\$D\docmdi.obj \
$(COMMDIR)\$D\docview.obj \
+ $(COMMDIR)\$D\dseldlg.obj \
$(COMMDIR)\$D\dynarray.obj \
$(COMMDIR)\$D\dynlib.obj \
$(COMMDIR)\$D\effects.obj \
#!/binb/wmake.exe
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
#
dobjcmn.obj &
docmdi.obj &
docview.obj &
+ dseldlg.obj &
dynarray.obj &
dynlib.obj &
effects.obj &
docview.obj: $(COMMDIR)\docview.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+dseldlg.obj: $(COMMDIR)\dseldlg.cpp
+ *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
+
dynarray.obj: $(COMMDIR)\dynarray.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-# This file was automatically generated by tmake at 12:46, 2001/10/30
+# This file was automatically generated by tmake at 17:52, 2001/10/30
# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNIV.T!
UNIVOBJS = \
bmpbuttn.o \
# End Source File
# Begin Source File
+SOURCE=.\common\dseldlg.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\common\dynarray.cpp
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=.\common\dseldlg.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\common\dynarray.cpp
# End Source File
# Begin Source File