Generic file dialog presentation. Regenerated makefiles.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -79,10 +79,12 @@ COND_PLATFORM_OS2_1___dialogs___os2_emxbindcmd = $(NM) dialogs$(EXEEXT) | if \
 | 
				
			|||||||
@COND_TOOLKIT_MAC@	dialogs.app/Contents/PkgInfo
 | 
					@COND_TOOLKIT_MAC@	dialogs.app/Contents/PkgInfo
 | 
				
			||||||
@COND_TOOLKIT_MSW_WXUNIV_0@__GENERIC_FILES_OBJECTS \
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@__GENERIC_FILES_OBJECTS \
 | 
				
			||||||
@COND_TOOLKIT_MSW_WXUNIV_0@	= dialogs_colrdlgg.o dialogs_dirdlgg.o \
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@	= dialogs_colrdlgg.o dialogs_dirdlgg.o \
 | 
				
			||||||
@COND_TOOLKIT_MSW_WXUNIV_0@	dialogs_fontdlgg.o
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@	dialogs_filedlgg.o dialogs_fontdlgg.o
 | 
				
			||||||
@COND_TOOLKIT_MAC_WXUNIV_0@__GENERIC_FILES_OBJECTS \
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@__GENERIC_FILES_OBJECTS \
 | 
				
			||||||
@COND_TOOLKIT_MAC_WXUNIV_0@	= dialogs_colrdlgg.o dialogs_dirdlgg.o
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@	= dialogs_colrdlgg.o dialogs_dirdlgg.o \
 | 
				
			||||||
@COND_TOOLKIT_PM_WXUNIV_0@__GENERIC_FILES_OBJECTS = dialogs_fontdlgg.o
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@	dialogs_filedlgg.o
 | 
				
			||||||
 | 
					@COND_TOOLKIT_PM_WXUNIV_0@__GENERIC_FILES_OBJECTS \
 | 
				
			||||||
 | 
					@COND_TOOLKIT_PM_WXUNIV_0@	= dialogs_fontdlgg.o dialogs_filedlgg.o
 | 
				
			||||||
COND_MONOLITHIC_0___WXLIB_ADV_p = \
 | 
					COND_MONOLITHIC_0___WXLIB_ADV_p = \
 | 
				
			||||||
	-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_adv-2.5$(HOST_SUFFIX)
 | 
						-lwx_$(PORTNAME)$(WXUNIVNAME)$(WXUNICODEFLAG)$(WXDEBUGFLAG)_adv-2.5$(HOST_SUFFIX)
 | 
				
			||||||
@COND_MONOLITHIC_0@__WXLIB_ADV_p = $(COND_MONOLITHIC_0___WXLIB_ADV_p)
 | 
					@COND_MONOLITHIC_0@__WXLIB_ADV_p = $(COND_MONOLITHIC_0___WXLIB_ADV_p)
 | 
				
			||||||
@@ -190,6 +192,15 @@ dialogs_dialogs.o: $(srcdir)/dialogs.cpp
 | 
				
			|||||||
@COND_TOOLKIT_MAC_WXUNIV_0@dialogs_dirdlgg.o: $(srcdir)/../../src/generic/dirdlgg.cpp
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@dialogs_dirdlgg.o: $(srcdir)/../../src/generic/dirdlgg.cpp
 | 
				
			||||||
@COND_TOOLKIT_MAC_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@dialogs_filedlgg.o: $(srcdir)/../../src/generic/filedlgg.cpp
 | 
				
			||||||
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@dialogs_filedlgg.o: $(srcdir)/../../src/generic/filedlgg.cpp
 | 
				
			||||||
 | 
					@COND_TOOLKIT_MAC_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@COND_TOOLKIT_PM_WXUNIV_0@dialogs_filedlgg.o: $(srcdir)/../../src/generic/filedlgg.cpp
 | 
				
			||||||
 | 
					@COND_TOOLKIT_PM_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@COND_TOOLKIT_MSW_WXUNIV_0@dialogs_fontdlgg.o: $(srcdir)/../../src/generic/fontdlgg.cpp
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@dialogs_fontdlgg.o: $(srcdir)/../../src/generic/fontdlgg.cpp
 | 
				
			||||||
@COND_TOOLKIT_MSW_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
					@COND_TOOLKIT_MSW_WXUNIV_0@	$(CXXC) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,14 +7,17 @@
 | 
				
			|||||||
        <if cond="TOOLKIT=='MSW' and WXUNIV=='0'">
 | 
					        <if cond="TOOLKIT=='MSW' and WXUNIV=='0'">
 | 
				
			||||||
            ../../src/generic/colrdlgg.cpp
 | 
					            ../../src/generic/colrdlgg.cpp
 | 
				
			||||||
            ../../src/generic/dirdlgg.cpp
 | 
					            ../../src/generic/dirdlgg.cpp
 | 
				
			||||||
 | 
					            ../../src/generic/filedlgg.cpp
 | 
				
			||||||
            ../../src/generic/fontdlgg.cpp
 | 
					            ../../src/generic/fontdlgg.cpp
 | 
				
			||||||
        </if>
 | 
					        </if>
 | 
				
			||||||
        <if cond="TOOLKIT=='MAC' and WXUNIV=='0'">
 | 
					        <if cond="TOOLKIT=='MAC' and WXUNIV=='0'">
 | 
				
			||||||
            ../../src/generic/colrdlgg.cpp
 | 
					            ../../src/generic/colrdlgg.cpp
 | 
				
			||||||
            ../../src/generic/dirdlgg.cpp
 | 
					            ../../src/generic/dirdlgg.cpp
 | 
				
			||||||
 | 
					            ../../src/generic/filedlgg.cpp
 | 
				
			||||||
        </if>
 | 
					        </if>
 | 
				
			||||||
        <if cond="TOOLKIT=='PM' and WXUNIV=='0'">
 | 
					        <if cond="TOOLKIT=='PM' and WXUNIV=='0'">
 | 
				
			||||||
            ../../src/generic/fontdlgg.cpp
 | 
					            ../../src/generic/fontdlgg.cpp
 | 
				
			||||||
 | 
					            ../../src/generic/filedlgg.cpp
 | 
				
			||||||
        </if>
 | 
					        </if>
 | 
				
			||||||
    </set>
 | 
					    </set>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
// Name:        dialogs.cpp
 | 
					// Name:        dialogs.cpp
 | 
				
			||||||
// Purpose:     Common dialogs demo
 | 
					// Purpose:     Common dialogs demo
 | 
				
			||||||
// Author:      Julian Smart
 | 
					// Author:      Julian Smart
 | 
				
			||||||
// Modified by: ABX (2004) - adjustementd for conditional building
 | 
					// Modified by: ABX (2004) - adjustements for conditional building + new menu
 | 
				
			||||||
// Created:     04/01/98
 | 
					// Created:     04/01/98
 | 
				
			||||||
// RCS-ID:      $Id$
 | 
					// RCS-ID:      $Id$
 | 
				
			||||||
// Copyright:   (c) Julian Smart
 | 
					// Copyright:   (c) Julian Smart
 | 
				
			||||||
@@ -74,14 +74,18 @@
 | 
				
			|||||||
    #include "wx/generic/colrdlgg.h"
 | 
					    #include "wx/generic/colrdlgg.h"
 | 
				
			||||||
#endif // USE_COLOURDLG_GENERIC
 | 
					#endif // USE_COLOURDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if USE_FONTDLG_GENERIC
 | 
					 | 
				
			||||||
    #include "wx/generic/fontdlgg.h"
 | 
					 | 
				
			||||||
#endif // USE_FONTDLG_GENERIC
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#if USE_DIRDLG_GENERIC
 | 
					#if USE_DIRDLG_GENERIC
 | 
				
			||||||
    #include "wx/generic/dirdlgg.h"
 | 
					    #include "wx/generic/dirdlgg.h"
 | 
				
			||||||
#endif // USE_DIRDLG_GENERIC
 | 
					#endif // USE_DIRDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					    #include "wx/generic/filedlgg.h"
 | 
				
			||||||
 | 
					#endif // USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_FONTDLG_GENERIC
 | 
				
			||||||
 | 
					    #include "wx/generic/fontdlgg.h"
 | 
				
			||||||
 | 
					#endif // USE_FONTDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
IMPLEMENT_APP(MyApp)
 | 
					IMPLEMENT_APP(MyApp)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
 | 
					BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
 | 
				
			||||||
@@ -126,6 +130,12 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
 | 
				
			|||||||
    EVT_MENU(DIALOGS_FILE_SAVE,                     MyFrame::FileSave)
 | 
					    EVT_MENU(DIALOGS_FILE_SAVE,                     MyFrame::FileSave)
 | 
				
			||||||
#endif // wxUSE_FILEDLG
 | 
					#endif // wxUSE_FILEDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					    EVT_MENU(DIALOGS_FILE_OPEN_GENERIC,             MyFrame::FileOpenGeneric)
 | 
				
			||||||
 | 
					    EVT_MENU(DIALOGS_FILES_OPEN_GENERIC,            MyFrame::FilesOpenGeneric)
 | 
				
			||||||
 | 
					    EVT_MENU(DIALOGS_FILE_SAVE_GENERIC,             MyFrame::FileSaveGeneric)
 | 
				
			||||||
 | 
					#endif // USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_DIRDLG
 | 
					#if wxUSE_DIRDLG
 | 
				
			||||||
    EVT_MENU(DIALOGS_DIR_CHOOSE,                    MyFrame::DirChoose)
 | 
					    EVT_MENU(DIALOGS_DIR_CHOOSE,                    MyFrame::DirChoose)
 | 
				
			||||||
    EVT_MENU(DIALOGS_DIRNEW_CHOOSE,                 MyFrame::DirChooseNew)
 | 
					    EVT_MENU(DIALOGS_DIRNEW_CHOOSE,                 MyFrame::DirChooseNew)
 | 
				
			||||||
@@ -220,23 +230,27 @@ bool MyApp::OnInit()
 | 
				
			|||||||
            choices_menu->Append(DIALOGS_CHOOSE_COLOUR, _T("&Choose colour"));
 | 
					            choices_menu->Append(DIALOGS_CHOOSE_COLOUR, _T("&Choose colour"));
 | 
				
			||||||
        #endif // wxUSE_COLOURDLG
 | 
					        #endif // wxUSE_COLOURDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #if USE_COLOURDLG_GENERIC
 | 
					 | 
				
			||||||
            choices_menu->Append(DIALOGS_CHOOSE_COLOUR_GENERIC, _T("&Choose colour (generic)"));
 | 
					 | 
				
			||||||
        #endif // USE_COLOURDLG_GENERIC
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #if wxUSE_FONTDLG
 | 
					        #if wxUSE_FONTDLG
 | 
				
			||||||
            choices_menu->Append(DIALOGS_CHOOSE_FONT, _T("Choose &font"));
 | 
					            choices_menu->Append(DIALOGS_CHOOSE_FONT, _T("Choose &font"));
 | 
				
			||||||
        #endif // wxUSE_FONTDLG
 | 
					        #endif // wxUSE_FONTDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #if USE_FONTDLG_GENERIC
 | 
					 | 
				
			||||||
            choices_menu->Append(DIALOGS_CHOOSE_FONT_GENERIC, _T("Choose &font (generic)"));
 | 
					 | 
				
			||||||
        #endif // USE_FONTDLG_GENERIC
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        #if wxUSE_CHOICEDLG
 | 
					        #if wxUSE_CHOICEDLG
 | 
				
			||||||
            choices_menu->Append(DIALOGS_SINGLE_CHOICE,  _T("&Single choice\tCtrl-C"));
 | 
					            choices_menu->Append(DIALOGS_SINGLE_CHOICE,  _T("&Single choice\tCtrl-C"));
 | 
				
			||||||
            choices_menu->Append(DIALOGS_MULTI_CHOICE,  _T("M&ultiple choice\tCtrl-U"));
 | 
					            choices_menu->Append(DIALOGS_MULTI_CHOICE,  _T("M&ultiple choice\tCtrl-U"));
 | 
				
			||||||
        #endif // wxUSE_CHOICEDLG
 | 
					        #endif // wxUSE_CHOICEDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #if USE_COLOURDLG_GENERIC || USE_FONTDLG_GENERIC
 | 
				
			||||||
 | 
					            choices_menu->AppendSeparator();
 | 
				
			||||||
 | 
					        #endif // USE_COLOURDLG_GENERIC || USE_FONTDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #if USE_COLOURDLG_GENERIC
 | 
				
			||||||
 | 
					            choices_menu->Append(DIALOGS_CHOOSE_COLOUR_GENERIC, _T("&Choose colour (generic)"));
 | 
				
			||||||
 | 
					        #endif // USE_COLOURDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #if USE_FONTDLG_GENERIC
 | 
				
			||||||
 | 
					            choices_menu->Append(DIALOGS_CHOOSE_FONT_GENERIC, _T("Choose &font (generic)"));
 | 
				
			||||||
 | 
					        #endif // USE_FONTDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        file_menu->Append(wxID_ANY,_T("Choices and selectors"),choices_menu);
 | 
					        file_menu->Append(wxID_ANY,_T("Choices and selectors"),choices_menu);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #endif // wxUSE_COLOURDLG || wxUSE_FONTDLG || wxUSE_CHOICEDLG
 | 
					    #endif // wxUSE_COLOURDLG || wxUSE_FONTDLG || wxUSE_CHOICEDLG
 | 
				
			||||||
@@ -267,6 +281,14 @@ bool MyApp::OnInit()
 | 
				
			|||||||
        filedlg_menu->Append(DIALOGS_FILE_OPEN2,  _T("&Second open file\tCtrl-2"));
 | 
					        filedlg_menu->Append(DIALOGS_FILE_OPEN2,  _T("&Second open file\tCtrl-2"));
 | 
				
			||||||
        filedlg_menu->Append(DIALOGS_FILES_OPEN,  _T("Open &files\tCtrl-Q"));
 | 
					        filedlg_menu->Append(DIALOGS_FILES_OPEN,  _T("Open &files\tCtrl-Q"));
 | 
				
			||||||
        filedlg_menu->Append(DIALOGS_FILE_SAVE,  _T("Sa&ve file\tCtrl-S"));
 | 
					        filedlg_menu->Append(DIALOGS_FILE_SAVE,  _T("Sa&ve file\tCtrl-S"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #if USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					            filedlg_menu->AppendSeparator();
 | 
				
			||||||
 | 
					            filedlg_menu->Append(DIALOGS_FILE_OPEN_GENERIC,  _T("&Open file (generic)"));
 | 
				
			||||||
 | 
					            filedlg_menu->Append(DIALOGS_FILES_OPEN_GENERIC,  _T("Open &files (generic)"));
 | 
				
			||||||
 | 
					            filedlg_menu->Append(DIALOGS_FILE_SAVE_GENERIC,  _T("Sa&ve file (generic)"));
 | 
				
			||||||
 | 
					        #endif // USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        file_menu->Append(wxID_ANY,_T("File operations"),filedlg_menu);
 | 
					        file_menu->Append(wxID_ANY,_T("File operations"),filedlg_menu);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #endif // wxUSE_FILEDLG
 | 
					    #endif // wxUSE_FILEDLG
 | 
				
			||||||
@@ -275,14 +297,14 @@ bool MyApp::OnInit()
 | 
				
			|||||||
        wxMenu *dir_menu = new wxMenu;
 | 
					        wxMenu *dir_menu = new wxMenu;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        dir_menu->Append(DIALOGS_DIR_CHOOSE,  _T("&Choose a directory\tCtrl-D"));
 | 
					        dir_menu->Append(DIALOGS_DIR_CHOOSE,  _T("&Choose a directory\tCtrl-D"));
 | 
				
			||||||
 | 
					 | 
				
			||||||
        #if USE_DIRDLG_GENERIC
 | 
					 | 
				
			||||||
            dir_menu->Append(DIALOGS_GENERIC_DIR_CHOOSE,  _T("&Choose a directory (generic)"));
 | 
					 | 
				
			||||||
        #endif // USE_DIRDLG_GENERIC
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        dir_menu->Append(DIALOGS_DIRNEW_CHOOSE,  _T("Choose a directory (with \"Ne&w\" button)\tShift-Ctrl-D"));
 | 
					        dir_menu->Append(DIALOGS_DIRNEW_CHOOSE,  _T("Choose a directory (with \"Ne&w\" button)\tShift-Ctrl-D"));
 | 
				
			||||||
        file_menu->Append(wxID_ANY,_T("Directory operations"),dir_menu);
 | 
					        file_menu->Append(wxID_ANY,_T("Directory operations"),dir_menu);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        #if USE_DIRDLG_GENERIC
 | 
				
			||||||
 | 
					            dir_menu->AppendSeparator();
 | 
				
			||||||
 | 
					            dir_menu->Append(DIALOGS_GENERIC_DIR_CHOOSE,  _T("&Choose a directory (generic)"));
 | 
				
			||||||
 | 
					        #endif // USE_DIRDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    #endif // wxUSE_DIRDLG
 | 
					    #endif // wxUSE_DIRDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -728,6 +750,84 @@ void MyFrame::FileSave(wxCommandEvent& WXUNUSED(event) )
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
#endif // wxUSE_FILEDLG
 | 
					#endif // wxUSE_FILEDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					void MyFrame::FileOpenGeneric(wxCommandEvent& WXUNUSED(event) )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    wxGenericFileDialog dialog
 | 
				
			||||||
 | 
					                 (
 | 
				
			||||||
 | 
					                    this,
 | 
				
			||||||
 | 
					                    _T("Testing open file dialog"),
 | 
				
			||||||
 | 
					                    wxEmptyString,
 | 
				
			||||||
 | 
					                    wxEmptyString,
 | 
				
			||||||
 | 
					                    _T("C++ files (*.h;*.cpp)|*.h;*.cpp")
 | 
				
			||||||
 | 
					                 );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dialog.SetDirectory(wxGetHomeDir());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (dialog.ShowModal() == wxID_OK)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        wxString info;
 | 
				
			||||||
 | 
					        info.Printf(_T("Full file name: %s\n")
 | 
				
			||||||
 | 
					                    _T("Path: %s\n")
 | 
				
			||||||
 | 
					                    _T("Name: %s"),
 | 
				
			||||||
 | 
					                    dialog.GetPath().c_str(),
 | 
				
			||||||
 | 
					                    dialog.GetDirectory().c_str(),
 | 
				
			||||||
 | 
					                    dialog.GetFilename().c_str());
 | 
				
			||||||
 | 
					        wxMessageDialog dialog2(this, info, _T("Selected file"));
 | 
				
			||||||
 | 
					        dialog2.ShowModal();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MyFrame::FilesOpenGeneric(wxCommandEvent& WXUNUSED(event) )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    wxString wildcards = _T("All files (*.*)|*.*|C++ files (*.h;*.cpp)|*.h;*.cpp");
 | 
				
			||||||
 | 
					    wxGenericFileDialog dialog(this, _T("Testing open multiple file dialog"),
 | 
				
			||||||
 | 
					                        wxEmptyString, wxEmptyString, wildcards,
 | 
				
			||||||
 | 
					                        wxMULTIPLE);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (dialog.ShowModal() == wxID_OK)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        wxArrayString paths, filenames;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        dialog.GetPaths(paths);
 | 
				
			||||||
 | 
					        dialog.GetFilenames(filenames);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        wxString msg, s;
 | 
				
			||||||
 | 
					        size_t count = paths.GetCount();
 | 
				
			||||||
 | 
					        for ( size_t n = 0; n < count; n++ )
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            s.Printf(_T("File %d: %s (%s)\n"),
 | 
				
			||||||
 | 
					                     (int)n, paths[n].c_str(), filenames[n].c_str());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            msg += s;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        s.Printf(_T("Filter index: %d"), dialog.GetFilterIndex());
 | 
				
			||||||
 | 
					        msg += s;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        wxMessageDialog dialog2(this, msg, _T("Selected files"));
 | 
				
			||||||
 | 
					        dialog2.ShowModal();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void MyFrame::FileSaveGeneric(wxCommandEvent& WXUNUSED(event) )
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    wxGenericFileDialog dialog(this,
 | 
				
			||||||
 | 
					                        _T("Testing save file dialog"),
 | 
				
			||||||
 | 
					                        wxEmptyString,
 | 
				
			||||||
 | 
					                        _T("myletter.doc"),
 | 
				
			||||||
 | 
					                        _T("Text files (*.txt)|*.txt|Document files (*.doc)|*.doc"),
 | 
				
			||||||
 | 
					                        wxSAVE|wxOVERWRITE_PROMPT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    dialog.SetFilterIndex(1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (dialog.ShowModal() == wxID_OK)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        wxLogMessage(_T("%s, filter %d"),
 | 
				
			||||||
 | 
					                     dialog.GetPath().c_str(), dialog.GetFilterIndex());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif // USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_DIRDLG
 | 
					#if wxUSE_DIRDLG
 | 
				
			||||||
void MyFrame::DoDirChoose(int style)
 | 
					void MyFrame::DoDirChoose(int style)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -597,6 +597,69 @@ SOURCE=.\..\..\src\generic\dirdlgg.cpp
 | 
				
			|||||||
!ELSEIF  "$(CFG)" == "dialogs - Win32 Debug"
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ENDIF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# End Source File
 | 
				
			||||||
 | 
					# Begin Source File
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SOURCE=.\..\..\src\generic\filedlgg.cpp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!IF  "$(CFG)" == "dialogs - Win32 DLL Universal Unicode Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Universal Unicode Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Universal Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Universal Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Unicode Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Unicode Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 DLL Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Universal Unicode Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Universal Unicode Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Universal Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Universal Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# PROP Exclude_From_Build 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Unicode Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Unicode Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Release"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!ELSEIF  "$(CFG)" == "dialogs - Win32 Debug"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
!ENDIF
 | 
					!ENDIF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# End Source File
 | 
					# End Source File
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,13 +20,6 @@
 | 
				
			|||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define USE_FONTDLG_GENERIC                                                       \
 | 
					 | 
				
			||||||
    (                                                                             \
 | 
					 | 
				
			||||||
        wxUSE_FONTDLG &&                                                          \
 | 
					 | 
				
			||||||
        ( defined(__WXMSW__) || defined(__WXPM__) ) &&                            \
 | 
					 | 
				
			||||||
        !defined(__WXUNIVERSAL__)                                                 \
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#define USE_DIRDLG_GENERIC                                                        \
 | 
					#define USE_DIRDLG_GENERIC                                                        \
 | 
				
			||||||
    (                                                                             \
 | 
					    (                                                                             \
 | 
				
			||||||
        wxUSE_DIRDLG &&                                                           \
 | 
					        wxUSE_DIRDLG &&                                                           \
 | 
				
			||||||
@@ -34,6 +27,20 @@
 | 
				
			|||||||
        !defined(__WXUNIVERSAL__)                                                 \
 | 
					        !defined(__WXUNIVERSAL__)                                                 \
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define USE_FILEDLG_GENERIC                                                       \
 | 
				
			||||||
 | 
					    (                                                                             \
 | 
				
			||||||
 | 
					        wxUSE_FILEDLG &&                                                          \
 | 
				
			||||||
 | 
					        ( defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXPM__) ) &&      \
 | 
				
			||||||
 | 
					        !defined(__WXUNIVERSAL__)                                                 \
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define USE_FONTDLG_GENERIC                                                       \
 | 
				
			||||||
 | 
					    (                                                                             \
 | 
				
			||||||
 | 
					        wxUSE_FONTDLG &&                                                          \
 | 
				
			||||||
 | 
					        ( defined(__WXMSW__) || defined(__WXPM__) ) &&                            \
 | 
				
			||||||
 | 
					        !defined(__WXUNIVERSAL__)                                                 \
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define USE_MODAL_PRESENTATION   1
 | 
					#define USE_MODAL_PRESENTATION   1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -117,6 +124,12 @@ public:
 | 
				
			|||||||
    void FileSave(wxCommandEvent& event);
 | 
					    void FileSave(wxCommandEvent& event);
 | 
				
			||||||
#endif // wxUSE_FILEDLG
 | 
					#endif // wxUSE_FILEDLG
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#if USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					    void FileOpenGeneric(wxCommandEvent& event);
 | 
				
			||||||
 | 
					    void FilesOpenGeneric(wxCommandEvent& event);
 | 
				
			||||||
 | 
					    void FileSaveGeneric(wxCommandEvent& event);
 | 
				
			||||||
 | 
					#endif // USE_FILEDLG_GENERIC
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if wxUSE_DIRDLG
 | 
					#if wxUSE_DIRDLG
 | 
				
			||||||
    void DirChoose(wxCommandEvent& event);
 | 
					    void DirChoose(wxCommandEvent& event);
 | 
				
			||||||
    void DirChooseNew(wxCommandEvent& event);
 | 
					    void DirChooseNew(wxCommandEvent& event);
 | 
				
			||||||
@@ -208,6 +221,9 @@ enum
 | 
				
			|||||||
    DIALOGS_FILE_OPEN2,
 | 
					    DIALOGS_FILE_OPEN2,
 | 
				
			||||||
    DIALOGS_FILES_OPEN,
 | 
					    DIALOGS_FILES_OPEN,
 | 
				
			||||||
    DIALOGS_FILE_SAVE,
 | 
					    DIALOGS_FILE_SAVE,
 | 
				
			||||||
 | 
					    DIALOGS_FILE_OPEN_GENERIC,
 | 
				
			||||||
 | 
					    DIALOGS_FILES_OPEN_GENERIC,
 | 
				
			||||||
 | 
					    DIALOGS_FILE_SAVE_GENERIC,
 | 
				
			||||||
    DIALOGS_DIR_CHOOSE,
 | 
					    DIALOGS_DIR_CHOOSE,
 | 
				
			||||||
    DIALOGS_DIRNEW_CHOOSE,
 | 
					    DIALOGS_DIRNEW_CHOOSE,
 | 
				
			||||||
    DIALOGS_GENERIC_DIR_CHOOSE,
 | 
					    DIALOGS_GENERIC_DIR_CHOOSE,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -108,6 +108,7 @@ __DLLFLAG_p_1 = -dWXUSINGDLL
 | 
				
			|||||||
____GENERIC_FILES_FILENAMES_OBJECTS =  \
 | 
					____GENERIC_FILES_FILENAMES_OBJECTS =  \
 | 
				
			||||||
	$(OBJS)\dialogs_colrdlgg.obj \
 | 
						$(OBJS)\dialogs_colrdlgg.obj \
 | 
				
			||||||
	$(OBJS)\dialogs_dirdlgg.obj \
 | 
						$(OBJS)\dialogs_dirdlgg.obj \
 | 
				
			||||||
 | 
						$(OBJS)\dialogs_filedlgg.obj \
 | 
				
			||||||
	$(OBJS)\dialogs_fontdlgg.obj
 | 
						$(OBJS)\dialogs_fontdlgg.obj
 | 
				
			||||||
!endif
 | 
					!endif
 | 
				
			||||||
!if "$(MONOLITHIC)" == "0"
 | 
					!if "$(MONOLITHIC)" == "0"
 | 
				
			||||||
@@ -193,6 +194,9 @@ $(OBJS)\dialogs_colrdlgg.obj: .\..\..\src\generic\colrdlgg.cpp
 | 
				
			|||||||
$(OBJS)\dialogs_dirdlgg.obj: .\..\..\src\generic\dirdlgg.cpp
 | 
					$(OBJS)\dialogs_dirdlgg.obj: .\..\..\src\generic\dirdlgg.cpp
 | 
				
			||||||
	$(CXX) -q -c -P -o$@ $(DIALOGS_CXXFLAGS) $**
 | 
						$(CXX) -q -c -P -o$@ $(DIALOGS_CXXFLAGS) $**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(OBJS)\dialogs_filedlgg.obj: .\..\..\src\generic\filedlgg.cpp
 | 
				
			||||||
 | 
						$(CXX) -q -c -P -o$@ $(DIALOGS_CXXFLAGS) $**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(OBJS)\dialogs_fontdlgg.obj: .\..\..\src\generic\fontdlgg.cpp
 | 
					$(OBJS)\dialogs_fontdlgg.obj: .\..\..\src\generic\fontdlgg.cpp
 | 
				
			||||||
	$(CXX) -q -c -P -o$@ $(DIALOGS_CXXFLAGS) $**
 | 
						$(CXX) -q -c -P -o$@ $(DIALOGS_CXXFLAGS) $**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -110,6 +110,7 @@ ifeq ($(WXUNIV),0)
 | 
				
			|||||||
____GENERIC_FILES_FILENAMES_OBJECTS =  \
 | 
					____GENERIC_FILES_FILENAMES_OBJECTS =  \
 | 
				
			||||||
	$(OBJS)\dialogs_colrdlgg.o \
 | 
						$(OBJS)\dialogs_colrdlgg.o \
 | 
				
			||||||
	$(OBJS)\dialogs_dirdlgg.o \
 | 
						$(OBJS)\dialogs_dirdlgg.o \
 | 
				
			||||||
 | 
						$(OBJS)\dialogs_filedlgg.o \
 | 
				
			||||||
	$(OBJS)\dialogs_fontdlgg.o
 | 
						$(OBJS)\dialogs_fontdlgg.o
 | 
				
			||||||
endif
 | 
					endif
 | 
				
			||||||
ifeq ($(MONOLITHIC),0)
 | 
					ifeq ($(MONOLITHIC),0)
 | 
				
			||||||
@@ -191,6 +192,9 @@ $(OBJS)\dialogs_colrdlgg.o: ./../../src/generic/colrdlgg.cpp
 | 
				
			|||||||
$(OBJS)\dialogs_dirdlgg.o: ./../../src/generic/dirdlgg.cpp
 | 
					$(OBJS)\dialogs_dirdlgg.o: ./../../src/generic/dirdlgg.cpp
 | 
				
			||||||
	$(CXX) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
						$(CXX) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(OBJS)\dialogs_filedlgg.o: ./../../src/generic/filedlgg.cpp
 | 
				
			||||||
 | 
						$(CXX) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(OBJS)\dialogs_fontdlgg.o: ./../../src/generic/fontdlgg.cpp
 | 
					$(OBJS)\dialogs_fontdlgg.o: ./../../src/generic/fontdlgg.cpp
 | 
				
			||||||
	$(CXX) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
						$(CXX) -c -o $@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -207,6 +207,7 @@ __DLLFLAG_p_1 = /d WXUSINGDLL
 | 
				
			|||||||
____GENERIC_FILES_FILENAMES_OBJECTS =  \
 | 
					____GENERIC_FILES_FILENAMES_OBJECTS =  \
 | 
				
			||||||
	$(OBJS)\dialogs_colrdlgg.obj \
 | 
						$(OBJS)\dialogs_colrdlgg.obj \
 | 
				
			||||||
	$(OBJS)\dialogs_dirdlgg.obj \
 | 
						$(OBJS)\dialogs_dirdlgg.obj \
 | 
				
			||||||
 | 
						$(OBJS)\dialogs_filedlgg.obj \
 | 
				
			||||||
	$(OBJS)\dialogs_fontdlgg.obj
 | 
						$(OBJS)\dialogs_fontdlgg.obj
 | 
				
			||||||
!endif
 | 
					!endif
 | 
				
			||||||
!if "$(MONOLITHIC)" == "0"
 | 
					!if "$(MONOLITHIC)" == "0"
 | 
				
			||||||
@@ -277,6 +278,9 @@ $(OBJS)\dialogs_colrdlgg.obj: .\..\..\src\generic\colrdlgg.cpp
 | 
				
			|||||||
$(OBJS)\dialogs_dirdlgg.obj: .\..\..\src\generic\dirdlgg.cpp
 | 
					$(OBJS)\dialogs_dirdlgg.obj: .\..\..\src\generic\dirdlgg.cpp
 | 
				
			||||||
	$(CXX) /c /nologo /TP /Fo$@ $(DIALOGS_CXXFLAGS) $**
 | 
						$(CXX) /c /nologo /TP /Fo$@ $(DIALOGS_CXXFLAGS) $**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(OBJS)\dialogs_filedlgg.obj: .\..\..\src\generic\filedlgg.cpp
 | 
				
			||||||
 | 
						$(CXX) /c /nologo /TP /Fo$@ $(DIALOGS_CXXFLAGS) $**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(OBJS)\dialogs_fontdlgg.obj: .\..\..\src\generic\fontdlgg.cpp
 | 
					$(OBJS)\dialogs_fontdlgg.obj: .\..\..\src\generic\fontdlgg.cpp
 | 
				
			||||||
	$(CXX) /c /nologo /TP /Fo$@ $(DIALOGS_CXXFLAGS) $**
 | 
						$(CXX) /c /nologo /TP /Fo$@ $(DIALOGS_CXXFLAGS) $**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -115,6 +115,7 @@ ____GENERIC_FILES_FILENAMES_OBJECTS =
 | 
				
			|||||||
____GENERIC_FILES_FILENAMES_OBJECTS =  &
 | 
					____GENERIC_FILES_FILENAMES_OBJECTS =  &
 | 
				
			||||||
	$(OBJS)\dialogs_colrdlgg.obj &
 | 
						$(OBJS)\dialogs_colrdlgg.obj &
 | 
				
			||||||
	$(OBJS)\dialogs_dirdlgg.obj &
 | 
						$(OBJS)\dialogs_dirdlgg.obj &
 | 
				
			||||||
 | 
						$(OBJS)\dialogs_filedlgg.obj &
 | 
				
			||||||
	$(OBJS)\dialogs_fontdlgg.obj
 | 
						$(OBJS)\dialogs_fontdlgg.obj
 | 
				
			||||||
!endif
 | 
					!endif
 | 
				
			||||||
__WXLIB_ADV_p =
 | 
					__WXLIB_ADV_p =
 | 
				
			||||||
@@ -231,6 +232,9 @@ $(OBJS)\dialogs_colrdlgg.obj :  .AUTODEPEND .\..\..\src\generic\colrdlgg.cpp
 | 
				
			|||||||
$(OBJS)\dialogs_dirdlgg.obj :  .AUTODEPEND .\..\..\src\generic\dirdlgg.cpp
 | 
					$(OBJS)\dialogs_dirdlgg.obj :  .AUTODEPEND .\..\..\src\generic\dirdlgg.cpp
 | 
				
			||||||
	$(CXX) -zq -fo=$^@ $(DIALOGS_CXXFLAGS) $<
 | 
						$(CXX) -zq -fo=$^@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$(OBJS)\dialogs_filedlgg.obj :  .AUTODEPEND .\..\..\src\generic\filedlgg.cpp
 | 
				
			||||||
 | 
						$(CXX) -zq -fo=$^@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
$(OBJS)\dialogs_fontdlgg.obj :  .AUTODEPEND .\..\..\src\generic\fontdlgg.cpp
 | 
					$(OBJS)\dialogs_fontdlgg.obj :  .AUTODEPEND .\..\..\src\generic\fontdlgg.cpp
 | 
				
			||||||
	$(CXX) -zq -fo=$^@ $(DIALOGS_CXXFLAGS) $<
 | 
						$(CXX) -zq -fo=$^@ $(DIALOGS_CXXFLAGS) $<
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user