X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..4221a0e54c8076ff88010e9f5a888e48aa8caea6:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 7a545eb7fc..560a55b514 100644 --- a/src/mgl/window.cpp +++ b/src/mgl/window.cpp @@ -534,7 +534,7 @@ END_EVENT_TABLE() // constructors and such // ---------------------------------------------------------------------------- -extern wxDisplayModeInfo wxGetDefaultDisplayMode(); +extern wxVideoMode wxGetDefaultDisplayMode(); void wxWindowMGL::Init() { @@ -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; } @@ -753,7 +742,7 @@ void wxWindowMGL::KillFocus() // this wxWindowBase function is implemented here (in platform-specific file) // because it is static and so couldn't be made virtual // ---------------------------------------------------------------------------- -wxWindow *wxWindowBase::FindFocus() +wxWindow *wxWindowBase::DoFindFocus() { return (wxWindow*)gs_focusedWindow; } @@ -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