]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed wxSlider95 bug; updated .dsp files; added Set/GetLastDirectory to wxDocManager
authorJulian Smart <julian@anthemion.co.uk>
Tue, 19 Oct 1999 22:18:32 +0000 (22:18 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 19 Oct 1999 22:18:32 +0000 (22:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4073 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/docmanag.tex
include/wx/docview.h
include/wx/image.h
src/common/docview.cpp
src/makevc.env
src/msw/slider95.cpp
src/wxvc.dsp
src/wxvc6.dsp
src/wxvc_dll.dsp

index f49e35368962cd7126aec09b006f51dbf6cb0da0..b2eecb5e3917fde5ab4257f4984356aa9f1ab27e 100644 (file)
@@ -58,6 +58,12 @@ A list of all documents.
 
 Stores the flags passed to the constructor.
 
 
 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}
 \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.
 
 
 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}
 \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.
 
 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}}
 \membersection{wxDocManager::SetMaxDocsOpen}
 
 \func{void}{SetMaxDocsOpen}{\param{int}{ n}}
index 3a11b7b5c50b2f8e6164047873e404b36448b8cb..39854b9847d52270ba4e8a9bf76b2617ffb3a623 100644 (file)
@@ -375,6 +375,9 @@ public:
     virtual void FileHistoryAddFilesToMenu();
     virtual void FileHistoryAddFilesToMenu(wxMenu* menu);
 
     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;
 protected:
     long              m_flags;
     int               m_defaultDocumentNameCounter;
@@ -383,6 +386,7 @@ protected:
     wxList            m_templates;
     wxView*           m_currentView;
     wxFileHistory*    m_fileHistory;
     wxList            m_templates;
     wxView*           m_currentView;
     wxFileHistory*    m_fileHistory;
+    wxString          m_lastDirectory;
 
     DECLARE_EVENT_TABLE()
 };
 
     DECLARE_EVENT_TABLE()
 };
index 18ac41ad0f1361ba01157c555b082e4c8a1e02f2..f72667091b7c1f33fc2a3504485f9c231af60260 100644 (file)
@@ -53,7 +53,7 @@ class WXDLLEXPORT wxImage;
 
 class WXDLLEXPORT wxImageHandler: public wxObject
 {
 
 class WXDLLEXPORT wxImageHandler: public wxObject
 {
-  DECLARE_DYNAMIC_CLASS(wxImageHandler)
+  DECLARE_CLASS(wxImageHandler)
 
 public:
   wxImageHandler() { m_name = ""; m_extension = ""; m_type = 0; }
 
 public:
   wxImageHandler() { m_name = ""; m_extension = ""; m_type = 0; }
index 2c827b697ad35a3728f48a984c3cbf603c6c6144..95b489ee7d3c1744b8e2944555d023ff3d051836 100644 (file)
@@ -706,6 +706,7 @@ wxDocManager::wxDocManager(long flags, bool initialize)
     m_currentView = (wxView *) NULL;
     m_maxDocsOpen = 10000;
     m_fileHistory = (wxFileHistory *) NULL;
     m_currentView = (wxView *) NULL;
     m_maxDocsOpen = 10000;
     m_fileHistory = (wxFileHistory *) NULL;
+    m_lastDirectory = wxT("") ;
     if (initialize)
         Initialize();
 }
     if (initialize)
         Initialize();
 }
@@ -1224,7 +1225,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
 
     int FilterIndex = 0;
     wxString pathTmp = wxFileSelectorEx(_("Select a file"),
 
     int FilterIndex = 0;
     wxString pathTmp = wxFileSelectorEx(_("Select a file"),
-                                        wxT(""),
+                                        m_lastDirectory,
                                         wxT(""),
                                         &FilterIndex,
                                         descrBuf,
                                         wxT(""),
                                         &FilterIndex,
                                         descrBuf,
@@ -1233,6 +1234,8 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
 
     if (!pathTmp.IsEmpty())
     {
 
     if (!pathTmp.IsEmpty())
     {
+        m_lastDirectory = wxPathOnly(pathTmp);
+
         path = pathTmp;
         wxString theExt = FindExtension(path);
         if (!theExt)
         path = pathTmp;
         wxString theExt = FindExtension(path);
         if (!theExt)
index 2cae086a8c298a4325968670f3d3fba794bb465d..3ec3459411e3465713cda4ebfbd98bd0a1749e3e 100644 (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)
 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=
 
 MAKEPRECOMP=/YcWX/WXPREC.H
 OPTIONS=
index bc9805ff4d7f1b3be2034ab2e56ae5ea870fa2be..bd75e7fd854a0a00c87cca4bdd93c20e75a16411 100644 (file)
@@ -239,7 +239,7 @@ bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
             nScrollInc = 0;
     }
 
             nScrollInc = 0;
     }
 
-    if ( nScrollInc == 0 )
+    if (scrollEvent == wxEVT_NULL)
     {
         // no event...
         return FALSE;
     {
         // no event...
         return FALSE;
index 2641b3336f6d16dac0a00492d789f71dc00c049f..beaba79fbd868aec372022a263f9faaca6c48c30 100644 (file)
@@ -79,6 +79,10 @@ LIB32=link.exe -lib
 # PROP Default_Filter ""
 # Begin Source File
 
 # 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
 SOURCE=.\common\choiccmn.cpp
 # End Source File
 # Begin Source File
index 9ec20280e6006ee8ee4a58b156b2f47c842e8e6a..e32664b1ee0a30a611444dcef09aabb1c044b04a 100644 (file)
@@ -85,6 +85,10 @@ LIB32=link.exe -lib
 # PROP Default_Filter ""
 # Begin Source File
 
 # 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
 SOURCE=.\common\choiccmn.cpp
 # End Source File
 # Begin Source File
index bc5ee9cbdfd1509a478ba6cb46719400cdb5add4..301e4cd19105de2585fa82515737323f7173f284 100644 (file)
@@ -92,6 +92,10 @@ LINK32=link.exe
 # PROP Default_Filter ""
 # Begin Source File
 
 # 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
 SOURCE=.\common\choiccmn.cpp
 # End Source File
 # Begin Source File