Skip to content

Commit

Permalink
Merge pull request cocos2d#12901 from Mazyod/mac-editbox-cleanup
Browse files Browse the repository at this point in the history
Mac EditBox cleanup:
  • Loading branch information
zilongshanren committed Jul 18, 2015
2 parents 45cd7cf + fa284bc commit c4fa3ac
Show file tree
Hide file tree
Showing 2 changed files with 120 additions and 147 deletions.
31 changes: 1 addition & 30 deletions cocos/ui/UIEditBox/UIEditBoxImpl-mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,9 @@

#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)

#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>

#include "UIEditBoxImpl.h"


@interface UIEditBoxImplMac : NSObject <NSTextFieldDelegate>
{
NSTextField* textField_;
NSSecureTextField* secureTextField_;
void* editBox_;
BOOL editState_;
NSMutableDictionary* placeholderAttributes_;
}

@property(nonatomic, retain) NSTextField* textField;
@property(nonatomic, retain) NSSecureTextField* secureTextField;
@property(nonatomic, retain) NSMutableDictionary* placeholderAttributes;
@property(nonatomic, readonly, getter = isEditState) BOOL editState;
@property(nonatomic, assign) void* editBox;
@property(nonatomic, assign, getter = isSecure) BOOL secure;

-(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox;
-(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance;
-(void) setPosition:(NSPoint) pos;
-(void) setContentSize:(NSSize) size;
-(void) visit;
-(void) openKeyboard;
-(void) closeKeyboard;

@end

@class UIEditBoxImplMac;

NS_CC_BEGIN

Expand Down
Loading

0 comments on commit c4fa3ac

Please sign in to comment.