X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f033830e257227dc73225809de2326db0093e5fe..739a839903d6017270e085b7308eda71934efa64:/src/osx/cocoa/stattext.mm diff --git a/src/osx/cocoa/stattext.mm b/src/osx/cocoa/stattext.mm index f35aebba81..973a7b2e9f 100644 --- a/src/osx/cocoa/stattext.mm +++ b/src/osx/cocoa/stattext.mm @@ -92,43 +92,6 @@ wxSize wxStaticText::DoGetBestSize() const to allow correct dynamic ellipsizing of the label */ -@interface wxNSTextField : NSTextField -{ - wxWidgetImpl* m_impl; -} - -- (void)setImplementation: (wxWidgetImpl *) theImplementation; -- (wxWidgetImpl*) implementation; -- (BOOL) isFlipped; - -@end - -@implementation wxNSTextField - -- (void)setImplementation: (wxWidgetImpl *) theImplementation -{ - m_impl = theImplementation; -} - -- (wxWidgetImpl*) implementation -{ - return m_impl; -} - -- (BOOL) isFlipped -{ - return YES; -} - -// use our common calls -- (void) setTitle:(NSString *) title -{ - [self setStringValue: title]; -} - -@end - - wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer, wxWindowMac* parent, wxWindowID id, @@ -138,12 +101,8 @@ wxWidgetImplType* wxWidgetImpl::CreateStaticText( wxWindowMac* wxpeer, long style, long extraStyle) { - NSView* sv = (wxpeer->GetParent()->GetHandle() ); - - NSRect r = wxToNSRect( sv, wxRect( pos, size) ); - // Rect bounds = wxMacGetBoundsForControl( wxpeer, pos , size ) ; + NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ; wxNSTextField* v = [[wxNSTextField alloc] initWithFrame:r]; - [sv addSubview:v]; [v setBezeled:NO]; [v setEditable:NO];