+ void ActivateParent()
+ {
+ // Although we're a frame, we always want the parent to be active, so
+ // raise it whenever we get shown, focused, etc.
+ wxTopLevelWindow *frame = wxDynamicCast(
+ wxGetTopLevelParent(GetParent()), wxTopLevelWindow);
+ if (frame)
+ frame->Raise();
+ }
+
+
+ virtual void DoSetSize(int x, int y,
+ int width, int height,
+ int sizeFlags = wxSIZE_AUTO)
+ {
+ // convert coords to screen coords since we're a top-level window
+ if (x != wxDefaultCoord) {
+ GetParent()->ClientToScreen(&x, NULL);
+ }
+ if (y != wxDefaultCoord) {
+ GetParent()->ClientToScreen(NULL, &y);
+ }
+ wxFrame::DoSetSize(x, y, width, height, sizeFlags);
+ }
+
+ virtual bool Show(bool show = true)
+ {
+ bool rv = wxFrame::Show(show);
+ if (rv && show)
+ ActivateParent();