X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e39af974ef7846e26686ae39d74e4696c1fef0c3..700c96d420c7413ff2220e16e848962bdd2e45eb:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 60b95bff99..0b3e3eaf3b 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -16,7 +16,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "window.h" #endif @@ -546,14 +546,9 @@ void wxWindowMGL::Init() wxLogFatalError(_("Cannot initialize display.")); } - // generic: - InitBase(); - // mgl specific: m_wnd = NULL; m_isShown = TRUE; - m_isBeingDeleted = FALSE; - m_isEnabled = TRUE; m_frozen = FALSE; m_paintMGLDC = NULL; m_eraseBackground = -1; @@ -591,14 +586,8 @@ wxWindowMGL::~wxWindowMGL() if ( gs_windowUnderMouse == this ) gs_windowUnderMouse = NULL; - // VS: destroy children first and _then_ detach *this from its parent. - // If we'd do it the other way around, children wouldn't be able - // find their parent frame (see above). DestroyChildren(); - if ( m_parent ) - m_parent->RemoveChild(this); - if ( m_wnd ) MGL_wmDestroyWindow(m_wnd); } @@ -630,7 +619,7 @@ bool wxWindowMGL::Create(wxWindow *parent, long mgl_style = 0; window_t *wnd_parent = parent ? parent->GetHandle() : NULL; - if ( !(style & wxNO_FULL_REPAINT_ON_RESIZE) ) + if ( style & wxFULL_REPAINT_ON_RESIZE ) { mgl_style |= MGL_WM_FULL_REPAINT_ON_RESIZE; } @@ -855,37 +844,6 @@ void wxWindowMGL::WarpPointer(int x, int y) EVT_setMousePos(x, y); } -#if WXWIN_COMPATIBILITY -// If nothing defined for this, try the parent. -// E.g. we may be a button loaded from a resource, with no callback function -// defined. -void wxWindowMGL::OnCommand(wxWindow& win, wxCommandEvent& event) -{ - if ( GetEventHandler()->ProcessEvent(event) ) - return; - if ( m_parent ) - m_parent->GetEventHandler()->OnCommand(win, event); -} -#endif // WXWIN_COMPATIBILITY_2 - -#if WXWIN_COMPATIBILITY -wxObject* wxWindowMGL::GetChild(int number) const -{ - // Return a pointer to the Nth object in the Panel - wxNode *node = GetChildren().First(); - int n = number; - while (node && n--) - node = node->Next(); - if ( node ) - { - wxObject *obj = (wxObject *)node->Data(); - return(obj); - } - else - return NULL; -} -#endif // WXWIN_COMPATIBILITY - // Set this window to be the child of 'parent'. bool wxWindowMGL::Reparent(wxWindowBase *parent) { @@ -1103,48 +1061,6 @@ void wxWindowMGL::GetTextExtent(const wxString& string, dc.GetTextExtent(string, x, y, descent, externalLeading, (wxFont*)theFont); } -#if wxUSE_CARET && WXWIN_COMPATIBILITY -// --------------------------------------------------------------------------- -// Caret manipulation -// --------------------------------------------------------------------------- - -void wxWindowMGL::CreateCaret(int w, int h) -{ - SetCaret(new wxCaret(this, w, h)); -} - -void wxWindowMGL::CreateCaret(const wxBitmap *WXUNUSED(bitmap)) -{ - wxFAIL_MSG("not implemented"); -} - -void wxWindowMGL::ShowCaret(bool show) -{ - wxCHECK_RET( m_caret, "no caret to show" ); - - m_caret->Show(show); -} - -void wxWindowMGL::DestroyCaret() -{ - SetCaret(NULL); -} - -void wxWindowMGL::SetCaretPos(int x, int y) -{ - wxCHECK_RET( m_caret, "no caret to move" ); - - m_caret->Move(x, y); -} - -void wxWindowMGL::GetCaretPos(int *x, int *y) const -{ - wxCHECK_RET( m_caret, "no caret to get position of" ); - - m_caret->GetPosition(x, y); -} -#endif // wxUSE_CARET - // --------------------------------------------------------------------------- // painting