Fixed wxSlider95 bug; updated .dsp files; added Set/GetLastDirectory to wxDocManager

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-10-19 22:18:32 +00:00
parent 8e00741dbd
commit ac0ac8241f
9 changed files with 41 additions and 4 deletions

View File

@@ -58,6 +58,12 @@ A list of all documents.
Stores the flags passed to the constructor.
\membersection{wxDocManager::m\_lastDirectory}
The directory last selected by the user when opening a file.
\member{wxFileHistory*}{m\_fileHistory}
\membersection{wxDocManager::m\_templates}
\member{wxList}{mnTemplates}
@@ -222,6 +228,12 @@ Returns a reference to the list of documents.
Returns a pointer to file history.
\membersection{wxDocManager::GetLastDirectory}\label{wxdocmanagergetlastdirectory}
\constfunc{wxString}{GetLastDirectory}{\void}
Returns the directory last selected by the user when opening a file. Initially empty.
\membersection{wxDocManager::GetMaxDocsOpen}
\func{int}{GetMaxDocsOpen}{\void}
@@ -351,6 +363,12 @@ displaying a list of valid views. This function is used in wxDocManager::CreateV
The dialog normally won't appear because the array of templates only contains
those relevant to the document in question, and often there will only be one such.
\membersection{wxDocManager::SetLastDirectory}\label{wxdocmanagersetlastdirectory}
\func{void}{SetLastDirectory}{\param{const wxString\&}{ dir}}
Sets the directory to be displayed to the user when opening a file. Initially this is empty.
\membersection{wxDocManager::SetMaxDocsOpen}
\func{void}{SetMaxDocsOpen}{\param{int}{ n}}

View File

@@ -375,6 +375,9 @@ public:
virtual void FileHistoryAddFilesToMenu();
virtual void FileHistoryAddFilesToMenu(wxMenu* menu);
inline wxString GetLastDirectory() const { return m_lastDirectory; }
inline void SetLastDirectory(const wxString& dir) { m_lastDirectory = dir; }
protected:
long m_flags;
int m_defaultDocumentNameCounter;
@@ -383,6 +386,7 @@ protected:
wxList m_templates;
wxView* m_currentView;
wxFileHistory* m_fileHistory;
wxString m_lastDirectory;
DECLARE_EVENT_TABLE()
};

View File

@@ -53,7 +53,7 @@ class WXDLLEXPORT wxImage;
class WXDLLEXPORT wxImageHandler: public wxObject
{
DECLARE_DYNAMIC_CLASS(wxImageHandler)
DECLARE_CLASS(wxImageHandler)
public:
wxImageHandler() { m_name = ""; m_extension = ""; m_type = 0; }

View File

@@ -706,6 +706,7 @@ wxDocManager::wxDocManager(long flags, bool initialize)
m_currentView = (wxView *) NULL;
m_maxDocsOpen = 10000;
m_fileHistory = (wxFileHistory *) NULL;
m_lastDirectory = wxT("") ;
if (initialize)
Initialize();
}
@@ -1224,7 +1225,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
int FilterIndex = 0;
wxString pathTmp = wxFileSelectorEx(_("Select a file"),
wxT(""),
m_lastDirectory,
wxT(""),
&FilterIndex,
descrBuf,
@@ -1233,6 +1234,8 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
if (!pathTmp.IsEmpty())
{
m_lastDirectory = wxPathOnly(pathTmp);
path = pathTmp;
wxString theExt = FindExtension(path);
if (!theExt)

View File

@@ -140,7 +140,7 @@ D=$(D)DLL
WXLIB=$(WXDIR)\lib\$(WXLIBNAME).lib
INC=-I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/zlib -I$(WXDIR)/src/jpeg $(EXTRAINC)
LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib # $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\xpm.lib
LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(WXDIR)\lib\winpng.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\jpeg.lib $(WXDIR)\lib\xpm.lib
MAKEPRECOMP=/YcWX/WXPREC.H
OPTIONS=

View File

@@ -239,7 +239,7 @@ bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
nScrollInc = 0;
}
if ( nScrollInc == 0 )
if (scrollEvent == wxEVT_NULL)
{
// no event...
return FALSE;

View File

@@ -79,6 +79,10 @@ LIB32=link.exe -lib
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\common\appcmn.cpp
# End Source File
# Begin Source File
SOURCE=.\common\choiccmn.cpp
# End Source File
# Begin Source File

View File

@@ -85,6 +85,10 @@ LIB32=link.exe -lib
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\common\appcmn.cpp
# End Source File
# Begin Source File
SOURCE=.\common\choiccmn.cpp
# End Source File
# Begin Source File

View File

@@ -92,6 +92,10 @@ LINK32=link.exe
# PROP Default_Filter ""
# Begin Source File
SOURCE=.\common\appcmn.cpp
# End Source File
# Begin Source File
SOURCE=.\common\choiccmn.cpp
# End Source File
# Begin Source File