]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/srchctrl.mm
fix wxGTK1 compilation after wxTextEntry DoGetValue() change
[wxWidgets.git] / src / osx / cocoa / srchctrl.mm
index c1abb250ffce51000f9272e86c4295ba9c9dc435..0ed85e50f37c82a9fa5c8b81f993942cfcf19b0e 100644 (file)
 
 @interface wxNSSearchField : NSSearchField
 {
 
 @interface wxNSSearchField : NSSearchField
 {
-    WXCOCOAIMPL_COMMON_MEMBERS
 }
 
 }
 
-WXCOCOAIMPL_COMMON_INTERFACE
-
 @end
 
 @implementation wxNSSearchField
 
 @end
 
 @implementation wxNSSearchField
 
++ (void)initialize
+{
+    static BOOL initialized = NO;
+    if (!initialized) 
+    {
+        initialized = YES;
+        wxOSXCocoaClassAddWXMethods( self );
+    }
+}
+
 - (id)initWithFrame:(NSRect)frame
 {
     [super initWithFrame:frame];
 - (id)initWithFrame:(NSRect)frame
 {
     [super initWithFrame:frame];
-    impl = NULL;
     [self setTarget: self];
     [self setAction: @selector(searchAction:)];
     return self;
 }
 
     [self setTarget: self];
     [self setAction: @selector(searchAction:)];
     return self;
 }
 
-WXCOCOAIMPL_COMMON_IMPLEMENTATION
-
-// use our common calls
-- (void) setTitle:(NSString *) title
-{
-    [self setStringValue: title];
-}
-
 - (void) searchAction: (id) sender
 {
 - (void) searchAction: (id) sender
 {
+    wxWidgetCocoaImpl* impl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( self );
     if ( impl )
     {
         wxSearchCtrl* wxpeer = dynamic_cast<wxSearchCtrl*>( impl->GetWXPeer() );
     if ( impl )
     {
         wxSearchCtrl* wxpeer = dynamic_cast<wxSearchCtrl*>( impl->GetWXPeer() );
@@ -166,9 +165,11 @@ wxWidgetImplType* wxWidgetImpl::CreateSearchControl( wxTextCtrl* wxpeer,
     // per wx default cancel is not shown
     [[v cell] setCancelButtonCell:nil];
 
     // per wx default cancel is not shown
     [[v cell] setCancelButtonCell:nil];
 
+    [v setBezeled:NO];
+    [v setBordered:NO];
+
     wxNSSearchFieldControl* c = new wxNSSearchFieldControl( wxpeer, v );
     c->SetStringValue( str );
     wxNSSearchFieldControl* c = new wxNSSearchFieldControl( wxpeer, v );
     c->SetStringValue( str );
-    [v setImplementation:c];
     return c;
 }
 
     return c;
 }