wxMac supports a "form" of popup window that will work with CodeBlocks.
It's called "miniframe". You can pick it out of the following patch.
As used in Codeblocks, the "MiniFrame" class works just like wxPopupWindow on all platforms (MS, Unix, OSX)
Index: src/sdk/infowindow.cpp
===================================================================
--- src/sdk/infowindow.cpp (revision 2750)
+++ src/sdk/infowindow.cpp (working copy)
@@ -8,7 +8,14 @@
#include "manager.h"
#endif
+// --------------------------------------------------------------------------
+// wxMAC has no support for wxPopupWindow, use wxMiniFrame instead
+// --------------------------------------------------------------------------
+#if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+BEGIN_EVENT_TABLE(InfoWindow, wxMiniFrame)
+#else
BEGIN_EVENT_TABLE(InfoWindow, wxPopupWindow)
+#endif
EVT_TIMER(-1, InfoWindow::OnTimer)
EVT_MOTION(InfoWindow::OnMove)
EVT_LEFT_DOWN(InfoWindow::OnClick)
@@ -116,7 +123,13 @@
InfoWindow::InfoWindow(const wxString& title, const wxString& message, unsigned int delay, unsigned int hysteresis)
+ #if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+ #warning "Testing wxMac wxMiniFrame substitution for wxPopupWindow"\
+ " because the _TEST_MINIFRAME_ option was specified"
+ : wxMiniFrame(Manager::Get()->GetAppWindow(), -1, _T(""), wxDefaultPosition, wxDefaultSize, 0),
+ #else
: wxPopupWindow(Manager::Get()->GetAppWindow(), wxSIMPLE_BORDER | wxWS_EX_TRANSIENT | wxCLIP_CHILDREN),
+ #endif
m_timer(new wxTimer(this, 0)), status(0), m_delay(delay), ks(2)
{
wxBoxSizer *bs = new wxBoxSizer(wxVERTICAL);
@@ -225,4 +238,3 @@
status = 3;
m_timer->Start(scroll_millis, false);
}
-
Index: src/sdk/infowindow.h
===================================================================
--- src/sdk/infowindow.h (revision 2750)
+++ src/sdk/infowindow.h (working copy)
@@ -16,8 +16,16 @@
#include <wx/event.h>
#include <wx/timer.h>
#include <wx/string.h>
-#include <wx/popupwin.h>
+//-----------------------------------------------------------------------------
+// There is no wxPopupWindows for wxMac, use wxMiniFrame instead
+//-----------------------------------------------------------------------------
+#if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+ #include <wx/minifram.h>
+#else
+ #include <wx/popupwin.h>
+#endif
+
#undef new
#include <list>
#include <algorithm>
@@ -48,7 +56,11 @@
};
};
+#if (defined(__WXMAC__) || defined(_TEST_MINIFRAME_))
+class InfoWindow : public wxMiniFrame
+#else
class InfoWindow : public wxPopupWindow
+#endif
{
wxTimer *m_timer;
int left;
@@ -71,7 +83,8 @@
public:
- static void Display(const wxString& title, const wxString& message, unsigned int delay = 5000, unsigned int hysteresis = 1){new InfoWindow(title, message, delay, hysteresis);};
+ static void Display(const wxString& title, const wxString& message, unsigned int delay = 5000, unsigned int hysteresis = 1)
+ {new InfoWindow(title, message, delay, hysteresis);};
};
#endif
Index: src/sdk/pluginmanager.cpp
===================================================================
--- src/sdk/pluginmanager.cpp (revision 2750)
+++ src/sdk/pluginmanager.cpp (working copy)
@@ -106,6 +106,14 @@
ok = dir.GetNext(&filename);
}
Manager::Get()->GetMessageManager()->Log(_("Found %d plugins"), count);
+ #if defined(_TEST_MINIFRAME_)
+ {
+ InfoWindow::Display(_("Testing"),
+ _("This is a test of wxMiniFrame.\n"
+ "Used on the Mac to substitute for wxPopupWindow:\n"),
+ 15000, 3000);
+ }
+ #endif
if (!failed.IsEmpty())
{
InfoWindow::Display(_("Warning"),