From d2a67139ab3f45aff3d321a5d56a622af87081df Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 26 Jun 2009 06:38:11 +0000 Subject: From scintilla-cocoa bzr. --- cocoa/InfoBar.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 cocoa/InfoBar.h (limited to 'cocoa/InfoBar.h') diff --git a/cocoa/InfoBar.h b/cocoa/InfoBar.h new file mode 100644 index 000000000..a83a92c9b --- /dev/null +++ b/cocoa/InfoBar.h @@ -0,0 +1,55 @@ + +/** + * Scintilla source code edit control + * InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with + * ScintillaView. + * + * Mike Lischke + * + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt). + */ + +#import +#import "InfoBarCommunicator.h" + +/** + * Extended text cell for vertically aligned text. + */ +@interface VerticallyCenteredTextFieldCell : NSTextFieldCell +{ + BOOL mIsEditingOrSelecting; +} + +@end + +@interface InfoBar : NSView +{ +@private + NSImage* mBackground; + IBDisplay mDisplayMask; + + float mScaleFactor; + NSPopUpButton* mZoomPopup; + + int mCurrentCaretX; + int mCurrentCaretY; + NSTextField* mCaretPositionLabel; + NSTextField* mStatusTextLabel; + + id mCallback; +} + +- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location + value: (float) value; +- (void) setCallback: (id ) callback; + +- (void) createItems; +- (void) layout; +- (void) setDisplay: (IBDisplay) display; +- (void) zoomItemAction: (id) sender; +- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag; +- (void) setCaretPosition: (NSPoint) position; +- (void) sizeToFit; + +@end -- cgit v1.2.3