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