#include "wx/log.h"
#endif
+#if WXWIN_COMPATIBILITY_2_2
+ #include "wx/icon.h"
+#endif
+
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
#endif // wxUSE_LOG
#if wxUSE_GUI
+
+ #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 which) const = 0;
+ virtual wxIcon GetStdIcon(int WXUNUSED(which)) const { return wxNullIcon; }
+ #endif
// Get display mode that is used use. This is only used in framebuffer wxWin ports
// (such as wxMGL).
// Art clients
// ----------------------------------------------------------------------------
-#define wxART_TOOLBAR _T("toolbar_C")
-#define wxART_MENU _T("menu_C")
-#define wxART_FRAME_ICON _T("frame_icon_C")
+#define wxART_TOOLBAR _T("toolbar_C")
+#define wxART_MENU _T("menu_C")
+#define wxART_FRAME_ICON _T("frame_icon_C")
-#define wxART_CMN_DIALOG _T("cmn_dialog_C")
-#define wxART_HELP_BROWSER _T("help_browser_C")
+#define wxART_CMN_DIALOG _T("cmn_dialog_C")
+#define wxART_HELP_BROWSER _T("help_browser_C")
+#define wxART_MESSAGE_BOX _T("message_box_C")
-#define wxART_OTHER _T("other_C")
+#define wxART_OTHER _T("other_C")
// ----------------------------------------------------------------------------
// Art IDs
#define wxART_NORMAL_FILE _T("normal_file")
#define wxART_TICK_MARK _T("tick")
#define wxART_CROSS_MARK _T("cross")
+#define wxART_ERROR _T("error")
+#define wxART_QUESTION _T("question")
+#define wxART_WARNING _T("warning")
+#define wxART_INFORMATION _T("information")
// ----------------------------------------------------------------------------
// wxArtProvider class
virtual void Dispatch();
virtual bool Yield(bool onlyIfNeeded = FALSE);
- virtual wxIcon GetStdIcon(int which) const;
-
// implementation only from now on
void OnIdle( wxIdleEvent &event );
bool SendIdleEvents();
virtual void Dispatch();
virtual bool Yield(bool onlyIfNeeded = FALSE);
- virtual wxIcon GetStdIcon(int which) const;
-
// implementation only from now on
void OnIdle( wxIdleEvent &event );
bool SendIdleEvents();
virtual void Dispatch() ;
virtual bool Yield(bool onlyIfNeeded = FALSE);
- virtual wxIcon GetStdIcon(int which) const;
virtual void SetPrintMode(int mode) { m_printMode = mode; }
virtual int GetPrintMode() const { return m_printMode; }
virtual bool Pending();
virtual void Dispatch();
- virtual wxIcon GetStdIcon(int which) const;
-
// implementation only from now on
void OnIdle(wxIdleEvent &event);
bool SendIdleEvents();
virtual bool OnInitGui();
- virtual wxIcon GetStdIcon(int which) const;
-
// implementation from now on
// --------------------------
virtual void Dispatch();
virtual bool Yield(bool onlyIfNeeded = FALSE);
- virtual wxIcon GetStdIcon(int which) const;
-
virtual void SetPrintMode(int mode) { m_printMode = mode; }
virtual int GetPrintMode() const { return m_printMode; }
virtual void Dispatch(void);
virtual bool Yield(bool onlyIfNeeded = FALSE);
- virtual wxIcon GetStdIcon(int which) const;
-
virtual void SetPrintMode(int mode) { m_nPrintMode = mode; }
virtual int GetPrintMode(void) const { return m_nPrintMode; }
virtual bool OnInitGui();
- virtual wxIcon GetStdIcon(int which) const;
-
// implementation from now on
// --------------------------
return retValue;
}
-#ifndef __WXUNIVERSAL__
-
-// XPM hack: make the arrays const
-#define static static const
-
-#include "wx/gtk/info.xpm"
-#include "wx/gtk/error.xpm"
-#include "wx/gtk/question.xpm"
-#include "wx/gtk/warning.xpm"
-
-#undef static
-
-wxIcon wxApp::GetStdIcon(int which) const
-{
- switch(which)
- {
- case wxICON_INFORMATION:
- return wxIcon(info_xpm);
-
- case wxICON_QUESTION:
- return wxIcon(question_xpm);
-
- case wxICON_EXCLAMATION:
- return wxIcon(warning_xpm);
-
- default:
- wxFAIL_MSG(wxT("requested non existent standard icon"));
- // still fall through
-
- case wxICON_HAND:
- return wxIcon(error_xpm);
- }
-}
-#else
-wxIcon wxApp::GetStdIcon(int which) const
-{
- return wxTheme::Get()->GetRenderer()->GetStdIcon(which);
-}
-#endif // !__WXUNIVERSAL__
-
-
#ifdef __WXDEBUG__
void wxApp::OnAssert(const wxChar *file, int line, const wxChar *msg)
return retValue;
}
-#ifndef __WXUNIVERSAL__
-
-// XPM hack: make the arrays const
-#define static static const
-
-#include "wx/gtk/info.xpm"
-#include "wx/gtk/error.xpm"
-#include "wx/gtk/question.xpm"
-#include "wx/gtk/warning.xpm"
-
-#undef static
-
-wxIcon wxApp::GetStdIcon(int which) const
-{
- switch(which)
- {
- case wxICON_INFORMATION:
- return wxIcon(info_xpm);
-
- case wxICON_QUESTION:
- return wxIcon(question_xpm);
-
- case wxICON_EXCLAMATION:
- return wxIcon(warning_xpm);
-
- default:
- wxFAIL_MSG(wxT("requested non existent standard icon"));
- // still fall through
-
- case wxICON_HAND:
- return wxIcon(error_xpm);
- }
-}
-#else
-wxIcon wxApp::GetStdIcon(int which) const
-{
- return wxTheme::Get()->GetRenderer()->GetStdIcon(which);
-}
-#endif // !__WXUNIVERSAL__
-
-
#ifdef __WXDEBUG__
void wxApp::OnAssert(const wxChar *file, int line, const wxChar *msg)
}
}
-wxIcon
-wxApp::GetStdIcon(int which) const
-{
- switch(which)
- {
- case wxICON_INFORMATION:
- return wxIcon("wxICON_INFO");
-
- case wxICON_QUESTION:
- return wxIcon("wxICON_QUESTION");
-
- case wxICON_EXCLAMATION:
- return wxIcon("wxICON_WARNING");
-
- default:
- wxFAIL_MSG(wxT("requested non existent standard icon"));
- // still fall through
-
- case wxICON_HAND:
- return wxIcon("wxICON_ERROR");
- }
-}
-
void wxExit()
{
wxLogError(_("Fatal error: exiting"));
}
}
-wxIcon
-wxApp::GetStdIcon(int which) const
-{
- switch(which)
- {
- case wxICON_INFORMATION:
- return wxIcon("wxICON_INFO");
-
- case wxICON_QUESTION:
- return wxIcon("wxICON_QUESTION");
-
- case wxICON_EXCLAMATION:
- return wxIcon("wxICON_WARNING");
-
- default:
- wxFAIL_MSG(wxT("requested non existent standard icon"));
- // still fall through
-
- case wxICON_HAND:
- return wxIcon("wxICON_ERROR");
- }
-}
-
void wxExit()
{
wxLogError(_("Fatal error: exiting"));
return TRUE;
}
-wxIcon wxApp::GetStdIcon(int which) const
-{
- return wxTheme::Get()->GetRenderer()->GetStdIcon(which);
-}
-
void wxApp::CleanUp()
{
#if wxUSE_LOG
return TRUE;
}
-// TODO use XmGetPixmap (?) to get the really standard icons!
-
-// XPM hack: make the arrays const
-#define static static const
-
-#include "wx/generic/info.xpm"
-#include "wx/generic/error.xpm"
-#include "wx/generic/question.xpm"
-#include "wx/generic/warning.xpm"
-
-#undef static
-
-wxIcon
-wxApp::GetStdIcon(int which) const
-{
- switch(which)
- {
- case wxICON_INFORMATION:
- return wxIcon(info_xpm);
-
- case wxICON_QUESTION:
- return wxIcon(question_xpm);
-
- case wxICON_EXCLAMATION:
- return wxIcon(warning_xpm);
-
- default:
- wxFAIL_MSG("requested non existent standard icon");
- // still fall through
-
- case wxICON_HAND:
- return wxIcon(error_xpm);
- }
-}
-
// ----------------------------------------------------------------------------
// accessors for C modules
// ----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-wxIcon
-wxApp::GetStdIcon(int which) const
-{
- switch(which)
- {
- case wxICON_INFORMATION:
- return wxIcon("wxICON_INFO");
-
- case wxICON_QUESTION:
- return wxIcon("wxICON_QUESTION");
-
- case wxICON_EXCLAMATION:
- return wxIcon("wxICON_WARNING");
-
- default:
- wxFAIL_MSG(wxT("requested non existent standard icon"));
- // still fall through
-
- case wxICON_HAND:
- return wxIcon("wxICON_ERROR");
- }
-}
-
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
// if in a separate file. So include it here to ensure it's linked.
#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__) && !defined(WXMAKINGDLL))
return TRUE;
} // end of wxYield
-wxIcon wxApp::GetStdIcon(
- int nWhich
-) const
-{
- switch(nWhich)
- {
- case wxICON_INFORMATION:
- return wxIcon("wxICON_INFO");
-
- case wxICON_QUESTION:
- return wxIcon("wxICON_QUESTION");
-
- case wxICON_EXCLAMATION:
- return wxIcon("wxICON_WARNING");
-
- default:
- wxFAIL_MSG(wxT("requested non existent standard icon"));
- // still fall through
-
- case wxICON_HAND:
- return wxIcon("wxICON_ERROR");
- }
- return wxIcon("wxICON_ERROR");
-} // end of wxApp::GetStdIcon
-
int wxApp::AddSocketHandler(int handle, int mask,
void (*callback)(void*), void * gsock)
{
return TRUE;
}
-wxIcon wxApp::GetStdIcon(int which) const
-{
- return wxTheme::Get()->GetRenderer()->GetStdIcon(which);
-}
-
void wxApp::OnAssert(const wxChar *file, int line, const wxChar *msg)
{
// While the GUI isn't working that well, just print out the