- wxGridCellAttrProvider class API changed, you will need to update your code
if you derived any classes from it
-- wxImage::ComputeHistogram()'s signature changed to
+- wxImage::ComputeHistogram()'s signature changed to
unsigned long ComputeHistogram(wxImageHistogram&) const
- wxEvtHandler cannot be copied/assigned any longer - this never worked but
where <toolkit> is of the form (msw|univ)[dll][u][d]. You'll need to update
the include path in your make/project files appropriately. Furthermore,
xpm.lib is no longer used by wxMSW, it was superseded by the wxXPMDecoder
- class. You'll need to remove all references to xpm.lib from your
- make/project files.
+ class. You'll need to remove all references to xpm.lib from your
+ make/project files. Finally, the library names have changed as well and now
+ use the following consistent naming convention: wxmsw[u][d][ver].(lib|dll)
+ where 'u' appears for Unicode version, 'd' -- for the debug one and version
+ is only present for the DLLs builds.
- child frames appear in the taskbar by default now, use wxFRAME_NO_TASKBAR
style to avoid it
- Added wxMouseCaptureChangedEvent
- Added custom character filtering to wxTextValidator
- wxTreeCtrl now supports incremental keyboard search
+- wxMessageOutput class added
- wxHelpProvider::RemoveHelp added and called from ~wxWindowBase
so that erroneous help strings are no longer found as the hash
table fills up
- updated libpng from 1.0.3 to 1.2.4
-- Added wxView::OnClosingDocument so the application can do
- cleanup.
+- Added wxView::OnClosingDocument so the application can do cleanup.
- generic wxListCtrl renamed to wxGenericListCtrl, wxImageList
renamed to wxGenericImageList, so they can be used on wxMSW
(Rene Rivera).
- wxButton now honours wxBU_EXACTFIT
- wxStaticBox now honours wxALIGN_XXX styles
- added support for non alphanumeric simple character accelerators ('-', '=')
-- new behaviour for wxWindow::Refresh() as it now produces a delayed refresh.
+- new behaviour for wxWindow::Refresh() as it now produces a delayed refresh.
Call the new wxWindow::Update() to force an immediate update
- support for more SGI hardware (12-bit mode among others)
- fixed wxDC::Blit() to honour source DC's logical coordinates
#include "wx/window.h" // for wxTopLevelWindows
#endif // wxUSE_GUI
-#if wxUSE_LOG
- #include "wx/log.h"
-#endif
-
#if WXWIN_COMPATIBILITY_2_2
#include "wx/icon.h"
#endif
#include "wx/build.h"
+class WXDLLEXPORT wxLog;
+class WXDLLEXPORT wxMessageOutput;
+
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
{
public:
wxDisplayModeInfo() : m_ok(FALSE) {}
- wxDisplayModeInfo(unsigned width, unsigned height, unsigned depth)
+ wxDisplayModeInfo(unsigned width, unsigned height, unsigned depth)
: m_width(width), m_height(height), m_depth(depth), m_ok(TRUE) {}
-
+
unsigned GetWidth() const { return m_width; }
unsigned GetHeight() const { return m_height; }
unsigned GetDepth() const { return m_depth; }
class WXDLLEXPORT wxAppBase : public wxEvtHandler
{
DECLARE_NO_COPY_CLASS(wxAppBase)
-
+
public:
wxAppBase();
virtual ~wxAppBase();
// Override: always in GUI application, rarely in console ones.
virtual bool OnInit();
- // initializes wxMessageOutput; other responsibilities
- // may be added later
- virtual void DoInit();
-
#if wxUSE_GUI
// a platform-dependent version of OnInit(): the code here is likely to
// depend on the toolkit. default version does nothing.
// user-defined class (default implementation creates a wxLogGui
// object) - this log object is used by default by all wxLogXXX()
// functions.
- virtual wxLog *CreateLogTarget()
- #if wxUSE_GUI && wxUSE_LOGGUI && !defined(__WXMICROWIN__)
- { return new wxLogGui; }
- #else // !GUI
- { return new wxLogStderr; }
- #endif // wxUSE_GUI
+ virtual wxLog *CreateLogTarget();
#endif // wxUSE_LOG
+ // similar to CreateLogTarget() but for the global wxMessageOutput
+ // object
+ virtual wxMessageOutput *CreateMessageOutput();
+
#if wxUSE_GUI
- #if WXWIN_COMPATIBILITY_2_2
+#if WXWIN_COMPATIBILITY_2_2
// get the standard icon used by wxWin dialogs - this allows the user
// to customize the standard dialogs. The 'which' parameter is one of
// wxICON_XXX values
virtual wxIcon GetStdIcon(int WXUNUSED(which)) const { return wxNullIcon; }
- #endif
+#endif
// Get display mode that is used use. This is only used in framebuffer wxWin ports
// (such as wxMGL).
wxString m_vendorName, // vendor name (ACME Inc)
m_appName, // app name
m_className; // class name
-
+
#if wxUSE_GUI
// the main top level window - may be NULL
wxWindow *m_topWindow;
#include "wx/app.h"
#include "wx/intl.h"
#include "wx/list.h"
+ #if wxUSE_LOG
+ #include "wx/log.h"
+ #endif // wxUSE_LOG
#if wxUSE_GUI
#include "wx/msgdlg.h"
#endif // wxUSE_GUI
delete wxTheme::Set(NULL);
#endif // __WXUNIVERSAL__
+ // use Set(NULL) and not Get() to avoid creating a message output object on
+ // demand when we just want to delete it
+ delete wxMessageOutput::Set(NULL);
+
return 0;
}
+// ----------------------------------------------------------------------------
+// customization hooks
+// ----------------------------------------------------------------------------
+
+#if wxUSE_LOG
+
+wxLog *wxAppBase::CreateLogTarget()
+{
+#if wxUSE_GUI && wxUSE_LOGGUI && !defined(__WXMICROWIN__)
+ return new wxLogGui;
+#else // !GUI
+ return new wxLogStderr;
+#endif // wxUSE_GUI
+}
+
+#endif // wxUSE_LOG
+
+wxMessageOutput *wxAppBase::CreateMessageOutput()
+{
+ // The standard way of printing help on command line arguments (app --help)
+ // is (according to common practice):
+ // - console apps: to stderr (on any platform)
+ // - GUI apps: stderr on Unix platforms (!)
+ // message box under Windows and others
+#if wxUSE_GUI && !defined(__UNIX__)
+ // wxMessageOutputMessageBox doesn't work under Motif
+ #ifdef __WXMOTIF__
+ return new wxMessageOutputLog;
+ #else
+ return new wxMessageOutputMessageBox;
+ #endif
+#else // !wxUSE_GUI || __UNIX__
+ return new wxMessageOutputStderr;
+#endif
+}
+
// ---------------------------------------------------------------------------
// wxAppBase
// ----------------------------------------------------------------------------
return -1;
}
-void wxAppBase::DoInit()
-{
- if (wxMessageOutput::Get())
- return;
-
- // NB: The standard way of printing help on command line arguments (app --help)
- // is (according to common practice):
- // - console apps: to stderr (on any platform)
- // - GUI apps: stderr on Unix platforms (!)
- // message box under Windows and others
-#if wxUSE_GUI && !defined(__UNIX__)
- #ifdef __WXMOTIF__
- wxMessageOutput::Set(new wxMessageOutputLog);
- #else
- wxMessageOutput::Set(new wxMessageOutputMessageBox);
- #endif
-#else
- wxMessageOutput::Set(new wxMessageOutputStderr);
-#endif
-}
-
// ----------------------------------------------------------------------------
// cmd line parsing
// ----------------------------------------------------------------------------
bool wxAppBase::OnInit()
{
- DoInit();
#if wxUSE_CMDLINE_PARSER
wxCmdLineParser parser(argc, argv);
wxMessageOutput* wxMessageOutput::Get()
{
- // FIXME this is an hack
- static bool inGet = FALSE;
-
- if(!ms_msgOut && wxTheApp && !inGet)
+ if ( !ms_msgOut && wxTheApp )
{
- inGet = TRUE;
- wxTheApp->DoInit();
+ ms_msgOut = wxTheApp->CreateMessageOutput();
}
- inGet = FALSE;
return ms_msgOut;
}
void wxMessageOutputLog::Printf(const wxChar* format, ...)
{
+ wxString out;
+
va_list args;
va_start(args, format);
- wxString out;
out.PrintfV(format, args);
va_end(args);
out.Replace(wxT("\t"),wxT(" "));
- // under Motif, wxMessageDialog needs a parent window, so we use
- // wxLog, which is better than nothing
+
::wxLogMessage(wxT("%s"), out.c_str());
}