X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d5375d25c71a2159792567f358a1f494d0bcbdc8..e88df737fbcc00e04903275de9492c84f170ebb5:/src/mac/carbon/stattext.cpp diff --git a/src/mac/carbon/stattext.cpp b/src/mac/carbon/stattext.cpp index 16e9aca2fb..3c67c64a9a 100644 --- a/src/mac/carbon/stattext.cpp +++ b/src/mac/carbon/stattext.cpp @@ -9,9 +9,9 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "stattext.h" -#endif +#include "wx/wxprec.h" + +#if wxUSE_STATTEXT #include "wx/app.h" #include "wx/stattext.h" @@ -24,9 +24,7 @@ #include -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl) -#endif #include "wx/mac/uma.h" @@ -49,7 +47,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id, Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ; wxMacCFStringHolder str(m_label,m_font.GetEncoding() ) ; - m_peer = new wxMacControl() ; + m_peer = new wxMacControl(this) ; verify_noerr(CreateStaticTextControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, str , NULL , m_peer->GetControlRefAddr() ) ) ; @@ -99,7 +97,8 @@ void wxStaticText::SetLabel(const wxString& st ) SetSize( GetBestSize() ) ; } Refresh() ; - Update() ; + // we shouldn't need forced updates + // Update() ; } bool wxStaticText::SetFont(const wxFont& font) @@ -117,3 +116,6 @@ bool wxStaticText::SetFont(const wxFont& font) return ret; } + +#endif //if wxUSE_STATTEXT +