From 0bc9b25e9a0218d5ddc1d12c40dd96216bb275e7 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 19 Feb 1999 21:54:37 +0000 Subject: [PATCH] Added George Tasker's forward slash fix to file dialog; added some consts to prntbase.h; removed redundant IMPLEMENT_WXWIN_MAINs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- distrib/msw/generic.rsp | 3 +++ docs/html/faqmot.htm | 14 ++++---------- docs/html/faqmsw.htm | 14 +++++++------- docs/readme.txt | 15 +++++++++++++++ include/wx/prntbase.h | 18 +++++++++--------- samples/dialogs/dialogs.cpp | 4 ---- samples/proplist/test.cpp | 4 ---- samples/treectrl/treetest.cpp | 1 - samples/wxpoem/wxpoem.cpp | 4 ---- src/msw/filedlg.cpp | 11 +++++++++-- 10 files changed, 47 insertions(+), 41 deletions(-) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 6c9e2ab699..8c108c03d6 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -3,6 +3,9 @@ distrib/msw/*.bat distrib/msw/tardist distrib/gtk/* +locale/*.po +locale/*.mo + docs/readme.txt docs/install.txt docs/release.txt diff --git a/docs/html/faqmot.htm b/docs/html/faqmot.htm index ed76c94145..6250821885 100644 --- a/docs/html/faqmot.htm +++ b/docs/html/faqmot.htm @@ -27,7 +27,7 @@ See also top-level FAQ page. You will need version 1.2 or above. Version 2 should also be fine. Some people have had a positive experience with Lesstif, -a free Motif clone. (Note from Julian Smart - I use the Linux version of MetroLink Motif). +a free Motif clone. (Note from Julian Smart - I use the Linux version of MetroLink Motif 1.2.4).

@@ -39,22 +39,16 @@ wxGLCanvas.

The following classes are not likely to be implemented because there is no sensible equivalent on Motif: wxMiniFrame, wxTaskBar.

-wxNotebook works for smaller dialogs (see notebook sample) but has some problems -with a more complex situation (see the controls sample: initial resizing is very apparent). -

- These features are not yet implemented:

diff --git a/docs/html/faqmsw.htm b/docs/html/faqmsw.htm index 2f600a7cf6..b373e725de 100644 --- a/docs/html/faqmsw.htm +++ b/docs/html/faqmsw.htm @@ -25,13 +25,13 @@ See also top-level FAQ page.

Which Windows platforms are supported?

-wxWindows can be used to develop and deliver applications on Windows 3.1, Win32s, +wxWindows 2 can be used to develop and deliver applications on Windows 3.1, Win32s, Windows 95, Windows 98, and Windows NT. A Windows CE version is being looked into (see below).

wxWindows 2 is designed to make use of WIN32 features and controls. However, unlike Microsoft, we have not forgotten users of 16-bit Windows. Most features work under Windows 3.1, including wxTreeCtrl and wxListCtrl using the generic implementation. -However, don't expect very Windows-specific classes to work, such as wxTaskBarIcon. The wxRegConfig +However, don't expect very Windows-95-specific classes to work, such as wxTaskBarIcon. The wxRegConfig class doesn't work either because the Windows 3.1 registry is very simplistic. Check out the 16-bit makefiles to see what other files have been left out.

@@ -101,13 +101,13 @@ Watcom C++ is a little slow and the debugger is not really up to today's standar

Is Unicode supported?

-No, although there are other internationalisation features.

+Not yet, although there are other internationalisation features.

However, the issues surrounding Unicode support have been looked into so we know what we need to do, and have some header files ready to use containing appropriate type definitions. Just about every file in wxWindows will need changes, due to the pervasive nature of characters and character arrays. Unicode support is needed -for the port to Windows CE (see above).

+for the port to Windows CE (see above), and will probably be added in time for version 2.1.

Can you compile wxWindows 2 as a DLL?

@@ -125,7 +125,8 @@ wxWindows!

How can I reduce executable size?

You can compile wxWindows as a DLL (see above, VC++/BC++ only at present). You should also -compile your programs for release using non-debugging and space-optimisation options.

+compile your programs for release using non-debugging and space-optimisation options, but +take with VC++ 5/6 space optimisation: it can sometimes cause problems.

Statically-linked wxWindows 2 programs are smaller than wxWindows 1.xx programs, because of the way wxWindows 2 has been designed to reduce dependencies between classes, and other @@ -139,8 +140,7 @@ by Ian Luck. This nifty utility compresses Windows executables by around 50%, so will shrink to a mere 250KB. With this sort of size, there is reduced incentive to use DLLs.

- -

Will wxWindows be compatible with MFC?

+

Is wxWindows compatible with MFC?

There is a sample which demonstrates MFC and wxWindows code co-existing in the same application. However, don't expect to be able to enable wxWindows windows with OLE-2 diff --git a/docs/readme.txt b/docs/readme.txt index 81a846c40b..bcc6c8447f 100644 --- a/docs/readme.txt +++ b/docs/readme.txt @@ -42,6 +42,8 @@ wx200gen.zip Generic source code and samples (required) wx200msw.zip Windows-specific source code wx200mot.zip Motif-specific source code wx200gtk.zip GTK-specific source code +wx200stubs.zip Stubs ('empty port') source. Needs + wx200gen.zip/wxgen.tgz. wx200doc.zip Documentation source code (not required) wx200hlp.zip WinHelp documentation wx200pdf.zip Acrobat PDF documentation @@ -50,6 +52,19 @@ wx200vc.zip MS VC++ 5/6 project files wx200bc.zip Borland C++ 5 project files wx200cw.zip Metrowerks CodeWarrior 4.1 project files +The tarred, gzip archive comprises the following (or similar +names). Not all of these files are available in all distributions, due +to space restrictions. + +wxgtk.tgz All wxGTK source and samples +wxmotif.tgz All wxMotif source and samples +wxstubs.tgz Stubs ('empty port') source. Needs + wx200gen.zip/wxgen.tgz. +wxgen.tgz Generic code and samples (common to all ports) +wxpdf.tgz Acrobat PDF documentation +wxhtml.tgz HTML documentation +wxdocsrc.tgz Documentation source + Installation ------------ diff --git a/include/wx/prntbase.h b/include/wx/prntbase.h index 73a1b410a7..c147a65497 100644 --- a/include/wx/prntbase.h +++ b/include/wx/prntbase.h @@ -49,8 +49,8 @@ public: virtual wxWindow *CreateAbortWindow(wxWindow *parent, wxPrintout *printout); virtual void ReportError(wxWindow *parent, wxPrintout *printout, char *message); - inline wxPrintData& GetPrintData() { return m_printData; }; - inline bool GetAbort() { return sm_abortIt; } + inline wxPrintData& GetPrintData() const { return (wxPrintData&) m_printData; }; + inline bool GetAbort() const { return sm_abortIt; } /////////////////////////////////////////////////////////////////////////// // OVERRIDES @@ -96,21 +96,21 @@ public: virtual bool OnPrintPage(int page) = 0; virtual void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo); - inline virtual wxString GetTitle() { return m_printoutTitle; } + inline virtual wxString GetTitle() const { return m_printoutTitle; } - inline wxDC *GetDC() { return m_printoutDC; } + inline wxDC *GetDC() const { return m_printoutDC; } inline void SetDC(wxDC *dc) { m_printoutDC = dc; } inline void SetPageSizePixels(int w, int h) { m_pageWidthPixels = w; m_pageHeightPixels = h; } - inline void GetPageSizePixels(int *w, int *h) { *w = m_pageWidthPixels; *h = m_pageHeightPixels; } + inline void GetPageSizePixels(int *w, int *h) const { *w = m_pageWidthPixels; *h = m_pageHeightPixels; } inline void SetPageSizeMM(int w, int h) { m_pageWidthMM = w; m_pageHeightMM = h; } - inline void GetPageSizeMM(int *w, int *h) { *w = m_pageWidthMM; *h = m_pageHeightMM; } + inline void GetPageSizeMM(int *w, int *h) const { *w = m_pageWidthMM; *h = m_pageHeightMM; } inline void SetPPIScreen(int x, int y) { m_PPIScreenX = x; m_PPIScreenY = y; } - inline void GetPPIScreen(int *x, int *y) { *x = m_PPIScreenX; *y = m_PPIScreenY; } + inline void GetPPIScreen(int *x, int *y) const { *x = m_PPIScreenX; *y = m_PPIScreenY; } inline void SetPPIPrinter(int x, int y) { m_PPIPrinterX = x; m_PPIPrinterY = y; } - inline void GetPPIPrinter(int *x, int *y) { *x = m_PPIPrinterX; *y = m_PPIPrinterY; } + inline void GetPPIPrinter(int *x, int *y) const { *x = m_PPIPrinterX; *y = m_PPIPrinterY; } - inline virtual bool IsPreview() { return m_isPreview; } + inline virtual bool IsPreview() const { return m_isPreview; } inline virtual void SetIsPreview(bool p) { m_isPreview = p; } diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index a555d86d66..257720dc07 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -44,10 +44,6 @@ IMPLEMENT_APP(MyApp) MyCanvas *myCanvas = (MyCanvas *) NULL; -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_WXWIN_MAIN - // `Main program' equivalent, creating windows and returning main app frame bool MyApp::OnInit(void) { diff --git a/samples/proplist/test.cpp b/samples/proplist/test.cpp index 484b59e22e..91f753fbae 100644 --- a/samples/proplist/test.cpp +++ b/samples/proplist/test.cpp @@ -26,10 +26,6 @@ #include "test.h" -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_WXWIN_MAIN - IMPLEMENT_APP(MyApp) wxPropertyValidatorRegistry myListValidatorRegistry; diff --git a/samples/treectrl/treetest.cpp b/samples/treectrl/treetest.cpp index 3868180f3d..36bb41f431 100644 --- a/samples/treectrl/treetest.cpp +++ b/samples/treectrl/treetest.cpp @@ -135,7 +135,6 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h) menu_bar->Append(tree_menu, "&Tree"); SetMenuBar(menu_bar); - // Make a panel with a message m_treeCtrl = new MyTreeCtrl(this, TreeTest_Ctrl, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxSUNKEN_BORDER); diff --git a/samples/wxpoem/wxpoem.cpp b/samples/wxpoem/wxpoem.cpp index de5a8fc21d..2482790364 100644 --- a/samples/wxpoem/wxpoem.cpp +++ b/samples/wxpoem/wxpoem.cpp @@ -137,10 +137,6 @@ void PopupFunction(wxMenu& menu, wxCommandEvent& event); wxHelpController *HelpController = NULL; -// A macro needed for some compilers (AIX) that need 'main' to be defined -// in the application itself. -IMPLEMENT_WXWIN_MAIN - IMPLEMENT_APP(MyApp) MainWindow *TheMainWindow = NULL; diff --git a/src/msw/filedlg.cpp b/src/msw/filedlg.cpp index eaed27850c..cf53ed8159 100644 --- a/src/msw/filedlg.cpp +++ b/src/msw/filedlg.cpp @@ -222,12 +222,19 @@ int wxFileDialog::ShowModal(void) of.lpstrFileTitle = titleBuffer; of.nMaxFileTitle = MAXFILE + 1 + MAXEXT; // Windows 3.0 and 3.1 + // Convert forward slashes to backslashes (file selector doesn't like + // forward slashes) + size_t i = 0; + size_t len = m_dir.Length(); + for (i = 0; i < len; i++) + if (m_dir[i] == '/') + m_dir[i] = '\\'; + of.lpstrInitialDir = (const char *) m_dir; of.Flags = msw_flags; - //=== Like Alejandro Sierra's wildcard modification >>=================== /* In wxFileSelector you can put, instead of a single wild_card, @@ -259,7 +266,7 @@ int wxFileDialog::ShowModal(void) filterBuffer += "|"; // Replace | with \0 - for ( unsigned int i = 0; i < filterBuffer.Len(); i++ ) { + for (i = 0; i < filterBuffer.Len(); i++ ) { if ( filterBuffer.GetChar(i) == '|' ) { filterBuffer[i] = '\0'; }