applied wxDirSelector() patch and regenerated the makefiles to include the new src/common/dseldlg.cpp

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2001-10-30 16:58:42 +00:00
parent 4f2570aaf1
commit 10eb1f1eac
24 changed files with 174 additions and 27 deletions

View File

@ -136,6 +136,7 @@ dndcmn.cpp Common
dobjcmn.cpp Common
docmdi.cpp Common
docview.cpp Common
dseldlg.cpp Common
dynarray.cpp Common Base
dynlib.cpp Common Base
effects.cpp Common

View File

@ -43,6 +43,7 @@ All (GUI):
- 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:

View File

@ -597,6 +597,32 @@ is remembered between the 2 program runs.}
<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 = ""},\\

View File

@ -12,23 +12,36 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxDirDialogDefaultFolderStr;
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

View File

@ -60,9 +60,12 @@
#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
//-----------------------------------------------------------------------------

62
src/common/dseldlg.cpp Normal file
View File

@ -0,0 +1,62 @@
///////////////////////////////////////////////////////////////////////////////
// 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

View File

@ -1,4 +1,4 @@
# 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 \

View File

@ -1,4 +1,4 @@
# 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 \
@ -72,6 +72,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -636,6 +637,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,4 +1,4 @@
# 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 \
@ -72,6 +72,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -636,6 +637,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,4 +1,4 @@
# 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 \
@ -67,6 +67,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -660,6 +661,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,4 +1,4 @@
# 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 \
@ -67,6 +67,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -660,6 +661,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,4 +1,4 @@
# 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 \
@ -70,6 +70,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -597,6 +598,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,4 +1,4 @@
# 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 \
@ -71,6 +71,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -623,6 +624,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,4 +1,4 @@
# 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 \
@ -54,6 +54,7 @@ ALL_SOURCES = \
common/dobjcmn.cpp \
common/docmdi.cpp \
common/docview.cpp \
common/dseldlg.cpp \
common/dynarray.cpp \
common/dynlib.cpp \
common/effects.cpp \
@ -692,6 +693,7 @@ COMMONOBJS = \
dobjcmn.o \
docmdi.o \
docview.o \
dseldlg.o \
dynarray.o \
dynlib.o \
effects.o \

View File

@ -1,6 +1,6 @@
# 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!
#
@ -138,6 +138,7 @@ COMMONOBJS = \
$(MSWDIR)\dobjcmn.obj \
$(MSWDIR)\docmdi.obj \
$(MSWDIR)\docview.obj \
$(MSWDIR)\dseldlg.obj \
$(MSWDIR)\dynarray.obj \
$(MSWDIR)\dynlib.obj \
$(MSWDIR)\effects.obj \
@ -680,6 +681,8 @@ $(MSWDIR)\docmdi.obj: $(COMMDIR)\docmdi.$(SRCSUFF)
$(MSWDIR)\docview.obj: $(COMMDIR)\docview.$(SRCSUFF)
$(MSWDIR)\dseldlg.obj: $(COMMDIR)\dseldlg.$(SRCSUFF)
$(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
$(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)

View File

@ -1,6 +1,6 @@
# 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!
#
@ -125,6 +125,7 @@ COMMONOBJS = \
$(MSWDIR)\dobjcmn.obj \
$(MSWDIR)\docmdi.obj \
$(MSWDIR)\docview.obj \
$(MSWDIR)\dseldlg.obj \
$(MSWDIR)\dynarray.obj \
$(MSWDIR)\dynlib.obj \
$(MSWDIR)\effects.obj \
@ -542,6 +543,8 @@ $(MSWDIR)\docmdi.obj: $(COMMDIR)\docmdi.$(SRCSUFF)
$(MSWDIR)\docview.obj: $(COMMDIR)\docview.$(SRCSUFF)
$(MSWDIR)\dseldlg.obj: $(COMMDIR)\dseldlg.$(SRCSUFF)
$(MSWDIR)\dynarray.obj: $(COMMDIR)\dynarray.$(SRCSUFF)
$(MSWDIR)\dynlib.obj: $(COMMDIR)\dynlib.$(SRCSUFF)

View File

@ -1,4 +1,4 @@
# 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!
#
@ -109,6 +109,7 @@ COMMONOBJS1 = \
$(COMMDIR)\dobjcmn.obj \
$(COMMDIR)\docmdi.obj \
$(COMMDIR)\docview.obj \
$(COMMDIR)\dseldlg.obj \
$(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \
$(COMMDIR)\effects.obj \
@ -882,6 +883,11 @@ $(COMMDIR)/docview.obj: $*.$(SRCSUFF)
$(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)

View File

@ -1,4 +1,4 @@
# 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!
#
@ -125,6 +125,7 @@ COMMONOBJS = \
$(COMMDIR)/dobjcmn.$(OBJSUFF) \
$(COMMDIR)/docmdi.$(OBJSUFF) \
$(COMMDIR)/docview.$(OBJSUFF) \
$(COMMDIR)/dseldlg.$(OBJSUFF) \
$(COMMDIR)/dynarray.$(OBJSUFF) \
$(COMMDIR)/dynlib.$(OBJSUFF) \
$(COMMDIR)/effects.$(OBJSUFF) \

View File

@ -1,6 +1,6 @@
# 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
@ -81,6 +81,7 @@ COMMONOBJS = \
$(COMMDIR)\dobjcmn.obj \
$(COMMDIR)\docmdi.obj \
$(COMMDIR)\docview.obj \
$(COMMDIR)\dseldlg.obj \
$(COMMDIR)\dynarray.obj \
$(COMMDIR)\dynlib.obj \
$(COMMDIR)\effects.obj \

View File

@ -1,4 +1,4 @@
# 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
@ -160,6 +160,7 @@ COMMONOBJS = \
$(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 \

View File

@ -1,6 +1,6 @@
#!/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!
#
@ -120,6 +120,7 @@ COMMONOBJS = &
dobjcmn.obj &
docmdi.obj &
docview.obj &
dseldlg.obj &
dynarray.obj &
dynlib.obj &
effects.obj &
@ -782,6 +783,9 @@ docmdi.obj: $(COMMDIR)\docmdi.cpp
docview.obj: $(COMMDIR)\docview.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
dseldlg.obj: $(COMMDIR)\dseldlg.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<
dynarray.obj: $(COMMDIR)\dynarray.cpp
*$(CCC) $(CPPFLAGS) $(IFLAGS) $<

View File

@ -1,4 +1,4 @@
# 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 \

View File

@ -181,6 +181,10 @@ SOURCE=.\common\docview.cpp
# 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

View File

@ -344,6 +344,10 @@ SOURCE=.\common\docview.cpp
# 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