1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxStaticText
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "stattext.h"
17 #include "wx/stattext.h"
21 #if !USE_SHARED_LIBRARY
22 IMPLEMENT_DYNAMIC_CLASS(wxStaticText
, wxControl
)
25 #include <wx/mac/uma.h>
27 bool wxStaticText::Create(wxWindow
*parent
, wxWindowID id
,
28 const wxString
& label
,
37 MacPreControlCreate( parent
, id
, label
, pos
, size
,style
, *((wxValidator
*)NULL
) , name
, &bounds
, title
) ;
39 m_macControl
= UMANewControl( parent
->GetMacRootWindow() , &bounds
, "\p" , true , 0 , 0 , 1,
40 kControlStaticTextProc
, (long) this ) ;
41 ::UMASetControlData( m_macControl
, kControlLabelPart
, kControlStaticTextTextTag
, (long) title
[0] , (char*) &title
[1] ) ;
43 MacPostControlCreate() ;
48 void wxStaticText::SetLabel(const wxString
& st
, bool resize
)
53 if( wxApp::s_macDefaultEncodingIsPC
)
54 label
= wxMacMakeMacStringFromPC( st
) ;
58 ::UMASetControlData( m_macControl
, kControlLabelPart
, kControlStaticTextTextTag
, (long) label
.Length() , (char*)(const char*) label
) ;