diff options
author | nyamatongwe <unknown> | 2013-03-15 23:34:46 +1100 |
---|---|---|
committer | nyamatongwe <unknown> | 2013-03-15 23:34:46 +1100 |
commit | 93f47df6328a33e7d2044afbe135d1189157e63d (patch) | |
tree | feeba874832959d2fced7cd5836d46a732310785 /cocoa/ScintillaView.h | |
parent | 9b1adea4079a2384f93acb83bd4d1a7a7b709819 (diff) | |
download | scintilla-mirror-93f47df6328a33e7d2044afbe135d1189157e63d.tar.gz |
Use an NSScrollView on Cocoa for kinetic scrolling and hiding scrollbars unless wanted.
Also affects platform-independent code.
Diffstat (limited to 'cocoa/ScintillaView.h')
-rw-r--r-- | cocoa/ScintillaView.h | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/cocoa/ScintillaView.h b/cocoa/ScintillaView.h index f34ac7e08..87a443f73 100644 --- a/cocoa/ScintillaView.h +++ b/cocoa/ScintillaView.h @@ -27,6 +27,24 @@ extern NSString *SCIUpdateUINotification; @end /** + * MarginView draws line numbers and other margins next to the text view. + */ +@interface MarginView : NSRulerView +{ +@private + int marginWidth; + ScintillaView *owner; + NSMutableArray *currentCursors; +} + +@property (assign) int marginWidth; +@property (assign) ScintillaView *owner; + +- (id)initWithScrollView:(NSScrollView *)aScrollView; + +@end + +/** * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and * provides a canvas for painting the output. */ @@ -63,8 +81,8 @@ extern NSString *SCIUpdateUINotification; // This is the actual content to which the backend renders itself. InnerView* mContent; - NSScroller* mHorizontalScroller; - NSScroller* mVerticalScroller; + NSScrollView *scrollView; + MarginView *marginView; CGFloat zoomDelta; @@ -78,6 +96,7 @@ extern NSString *SCIUpdateUINotification; @property (nonatomic, readonly) Scintilla::ScintillaCocoa* backend; @property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate; +@property (nonatomic, readonly) NSScrollView *scrollView; - (void) dealloc; - (void) positionSubViews; @@ -90,11 +109,7 @@ extern NSString *SCIUpdateUINotification; - (void) suspendDrawing: (BOOL) suspend; // Scroller handling -- (BOOL) setVerticalScrollRange: (int) range page: (int) page; -- (void) setVerticalScrollPosition: (float) position; -- (BOOL) setHorizontalScrollRange: (int) range page: (int) page; -- (void) setHorizontalScrollPosition: (float) position; - +- (void) setMarginWidth: (int) width; - (void) scrollerAction: (id) sender; - (InnerView*) content; |