Added wxGenericDirCtrl, wxGenericDirDialog and associated icons.

Altered dialog sample to show generic dir dialog.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2000-07-23 19:10:27 +00:00
parent 4567f2b2c6
commit 51a58d8b4b
17 changed files with 1501 additions and 6 deletions
+2
View File
@@ -65,6 +65,7 @@ caret.cpp G U
choicdgg.cpp G
colrdlgg.cpp G G
dcpsg.cpp G U
dirctrlg.cpp G
dirdlgg.cpp G 16,P
dragimgg.cpp G P
fontdlgg.cpp G G,R,P
@@ -1084,6 +1085,7 @@ caret.h N
choicdgg.h N
colrdlgg.h N
dcpsg.h N
dirctrlg.h N
dirdlgg.h N 16
dragimgg.h N 16
fontdlgg.h N
+7
View File
@@ -0,0 +1,7 @@
#ifndef _WX_DIRCTRL_H_BASE_
#define _WX_DIRCTRL_H_BASE_
#include "wx/generic/dirctrlg.h"
#endif
// _WX_DIRCTRL_H_BASE_
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

+16 -6
View File
@@ -115,12 +115,22 @@ WXCURSOR_BLANK CURSOR DISCARDABLE "wx/msw/blank.cur"
//wxDEFAULT_MDIPARENTFRAME ICON "wx/msw/mdi.ico"
//wxDEFAULT_MDICHILDFRAME ICON "wx/msw/child.ico"
// Standard icons
wxICON_QUESTION ICON "wx/msw/question.ico"
wxICON_WARNING ICON "wx/msw/warning.ico"
wxICON_ERROR ICON "wx/msw/error.ico"
wxICON_INFO ICON "wx/msw/info.ico"
wxICON_TIP ICON "wx/msw/tip.ico"
// Standard large icons
wxICON_QUESTION ICON "wx/msw/question.ico"
wxICON_WARNING ICON "wx/msw/warning.ico"
wxICON_ERROR ICON "wx/msw/error.ico"
wxICON_INFO ICON "wx/msw/info.ico"
wxICON_TIP ICON "wx/msw/tip.ico"
// Standard small icons
wxICON_SMALL_CLOSED_FOLDER ICON "wx/msw/folder1.ico"
wxICON_SMALL_OPEN_FOLDER ICON "wx/msw/folder2.ico"
wxICON_SMALL_FILE ICON "wx/msw/file1.ico"
wxICON_SMALL_COMPUTER ICON "wx/msw/computer.ico"
wxICON_SMALL_DRIVE ICON "wx/msw/drive.ico"
wxICON_SMALL_CDROM ICON "wx/msw/cdrom.ico"
wxICON_SMALL_FLOPPY ICON "wx/msw/floppy.ico"
wxICON_SMALL_REMOVEABLE ICON "wx/msw/removble.ico"
//////////////////////////////////////////////////////////////////////////////
//
+20
View File
@@ -33,6 +33,9 @@
#include "wx/tipdlg.h"
#include "wx/progdlg.h"
// New wxGenericDirCtrl
#include "wx/dirctrl.h"
#define wxTEST_GENERIC_DIALOGS_IN_MSW 0
#if defined(__WXMSW__) && wxTEST_GENERIC_DIALOGS_IN_MSW
@@ -61,6 +64,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(DIALOGS_FILES_OPEN, MyFrame::FilesOpen)
EVT_MENU(DIALOGS_FILE_SAVE, MyFrame::FileSave)
EVT_MENU(DIALOGS_DIR_CHOOSE, MyFrame::DirChoose)
EVT_MENU(DIALOGS_GENERIC_DIR_CHOOSE, MyFrame::GenericDirChoose)
EVT_MENU(DIALOGS_MODAL, MyFrame::ModalDlg)
EVT_MENU(DIALOGS_MODELESS, MyFrame::ModelessDlg)
EVT_MENU(DIALOGS_TIP, MyFrame::ShowTip)
@@ -129,6 +133,7 @@ bool MyApp::OnInit()
file_menu->Append(DIALOGS_FILES_OPEN, "Open &files\tCtrl-Q");
file_menu->Append(DIALOGS_FILE_SAVE, "Sa&ve file\tCtrl-S");
file_menu->Append(DIALOGS_DIR_CHOOSE, "&Choose a directory\tCtrl-D");
file_menu->Append(DIALOGS_GENERIC_DIR_CHOOSE, "&Choose a directory (generic implementation)");
#if wxUSE_PROGRESSDLG
file_menu->Append(DIALOGS_PROGRESS, "Pro&gress dialog\tCtrl-G");
#endif // wxUSE_PROGRESSDLG
@@ -418,6 +423,21 @@ void MyFrame::DirChoose(wxCommandEvent& WXUNUSED(event) )
}
}
void MyFrame::GenericDirChoose(wxCommandEvent& WXUNUSED(event) )
{
// pass some initial dir to wxDirDialog
wxString dirHome;
wxGetHomeDir(&dirHome);
wxGenericDirDialog dialog(this, "Testing generic directory picker", dirHome);
if (dialog.ShowModal() == wxID_OK)
{
wxMessageDialog dialog2(this, dialog.GetPath(), "Selected path");
dialog2.ShowModal();
}
}
void MyFrame::ModalDlg(wxCommandEvent& WXUNUSED(event))
{
MyModalDialog dlg(this);
+2
View File
@@ -68,6 +68,7 @@ public:
void FilesOpen(wxCommandEvent& event);
void FileSave(wxCommandEvent& event);
void DirChoose(wxCommandEvent& event);
void GenericDirChoose(wxCommandEvent& event);
void ShowTip(wxCommandEvent& event);
void ModalDlg(wxCommandEvent& event);
void ModelessDlg(wxCommandEvent& event);
@@ -114,6 +115,7 @@ enum
DIALOGS_FILES_OPEN,
DIALOGS_FILE_SAVE,
DIALOGS_DIR_CHOOSE,
DIALOGS_GENERIC_DIR_CHOOSE,
DIALOGS_TIP,
DIALOGS_NUM_ENTRY,
DIALOGS_LOG_DIALOG,
File diff suppressed because it is too large Load Diff
+1
View File
@@ -86,6 +86,7 @@ $(CPPFLAGS) /Fo$@ /c /Tp $<
GENERICOBJS= ..\generic\$D\busyinfo.obj \
..\generic\$D\calctrl.obj \
..\generic\$D\choicdgg.obj \
..\generic\$D\dirctrlg.obj \
..\generic\$D\dragimgg.obj \
..\generic\$D\grid.obj \
..\generic\$D\gridsel.obj \
+4
View File
@@ -512,6 +512,10 @@ SOURCE=.\generic\choicdgg.cpp
# End Source File
# Begin Source File
SOURCE=.\generic\dirctrlg.cpp
# End Source File
# Begin Source File
SOURCE=.\generic\dragimgg.cpp
# End Source File
# Begin Source File