X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3a1e3e0e5864c13f26dd886f46adde80eb2b79b..c6441a0d747d983ab4851249011c093b78d1633b:/src/mgl/window.cpp diff --git a/src/mgl/window.cpp b/src/mgl/window.cpp index 35040259e3..24d5ec98a8 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 @@ -524,7 +524,6 @@ static ibool MGLAPI wxWindowKeybHandler(window_t *wnd, event_t *e) IMPLEMENT_ABSTRACT_CLASS(wxWindowMGL, wxWindowBase) BEGIN_EVENT_TABLE(wxWindowMGL, wxWindowBase) - EVT_IDLE(wxWindowMGL::OnIdle) END_EVENT_TABLE() // =========================================================================== @@ -856,37 +855,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) { @@ -1104,48 +1072,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 @@ -1276,7 +1202,8 @@ wxWindow* wxFindWindowAtPoint(const wxPoint& pt) // idle events processing // --------------------------------------------------------------------------- -void wxWindowMGL::OnIdle(wxIdleEvent& WXUNUSED(event)) +void wxWindowMGL::OnInternalIdle() { - UpdateWindowUI(); + if (wxUpdateUIEvent::CanUpdate(this)) + UpdateWindowUI(wxUPDATE_UI_FROMIDLE); }