aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/ScintillaView.h2
-rw-r--r--cocoa/ScintillaView.mm13
2 files changed, 14 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.h b/cocoa/ScintillaView.h
index 63b5cf4e9..f6a0e0dea 100644
--- a/cocoa/ScintillaView.h
+++ b/cocoa/ScintillaView.h
@@ -118,6 +118,8 @@ extern NSString *const SCIUpdateUINotification;
@property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;
@property (nonatomic, readonly) NSScrollView *scrollView;
++ (Class) innerViewClass;
+
- (void) positionSubViews;
- (void) sendNotification: (NSString*) notificationName;
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm
index 3bdc9646a..100da27a8 100644
--- a/cocoa/ScintillaView.mm
+++ b/cocoa/ScintillaView.mm
@@ -873,6 +873,17 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
//--------------------------------------------------------------------------------------------------
/**
+ * Specify the InnerView class. Can be overridden in a subclass to provide an InnerView subclass.
+ */
+
++ (Class) innerViewClass
+{
+ return [InnerView class];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
* Receives zoom messages, for example when a "pinch zoom" is performed on the trackpad.
*/
- (void) magnifyWithEvent: (NSEvent *) event
@@ -1032,7 +1043,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)
self = [super initWithFrame:frame];
if (self)
{
- mContent = [[[InnerView alloc] init] autorelease];
+ mContent = [[[[[self class] innerViewClass] alloc] initWithFrame:NSZeroRect] autorelease];
mContent.owner = self;
// Initialize the scrollers but don't show them yet.