diff options
| -rw-r--r-- | cocoa/PlatCocoa.mm | 4 | ||||
| -rw-r--r-- | cocoa/ScintillaCocoa.h | 8 | ||||
| -rw-r--r-- | cocoa/ScintillaCocoa.mm | 12 | ||||
| -rw-r--r-- | cocoa/ScintillaView.h | 16 | ||||
| -rw-r--r-- | cocoa/ScintillaView.mm | 16 | ||||
| -rw-r--r-- | doc/ScintillaHistory.html | 10 | 
6 files changed, 34 insertions, 32 deletions
diff --git a/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm index 1a4e591bf..6bd5d676d 100644 --- a/cocoa/PlatCocoa.mm +++ b/cocoa/PlatCocoa.mm @@ -1344,9 +1344,9 @@ void Window::SetCursor(Cursor curs)    if (wid)    {      id idWin = reinterpret_cast<id>(wid); -    if ([idWin isMemberOfClass: [InnerView class]]) +    if ([idWin isMemberOfClass: [SCIContentView class]])      { -      InnerView* container = reinterpret_cast<InnerView*>(idWin); +      SCIContentView* container = reinterpret_cast<SCIContentView*>(idWin);        [container setCursor: curs];      }    } diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h index c9f8fde8a..8d182e866 100644 --- a/cocoa/ScintillaCocoa.h +++ b/cocoa/ScintillaCocoa.h @@ -55,8 +55,8 @@  extern "C" NSString* ScintillaRecPboardType; -@class InnerView; -@class MarginView; +@class SCIContentView; +@class SCIMarginView;  @class ScintillaView;  @class FindHighlightLayer; @@ -122,7 +122,7 @@ protected:    virtual void CancelModes();  public: -  ScintillaCocoa(InnerView* view, MarginView* viewMargin); +  ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin);    virtual ~ScintillaCocoa();    void SetDelegate(id<ScintillaNotificationProtocol> delegate_); @@ -131,7 +131,7 @@ public:    ScintillaView* TopContainer();    NSScrollView* ScrollContainer(); -  InnerView* ContentView(); +  SCIContentView* ContentView();    bool SyncPaint(void* gc, PRectangle rc);    bool Draw(NSRect rect, CGContextRef gc); diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm index ecd9cc048..8cd6be2a8 100644 --- a/cocoa/ScintillaCocoa.mm +++ b/cocoa/ScintillaCocoa.mm @@ -377,7 +377,7 @@ const CGFloat paddingHighlightY = 2;  //----------------- ScintillaCocoa ----------------------------------------------------------------- -ScintillaCocoa::ScintillaCocoa(InnerView* view, MarginView* viewMargin) +ScintillaCocoa::ScintillaCocoa(SCIContentView* view, SCIMarginView* viewMargin)  {    vs.marginInside = false;    wMain = view; // Don't retain since we're owned by view, which would cause a cycle @@ -679,9 +679,9 @@ NSScrollView* ScintillaCocoa::ScrollContainer() {  /**   * Helper function to get the inner container which represents the actual "canvas" we work with.   */ -InnerView* ScintillaCocoa::ContentView() +SCIContentView* ScintillaCocoa::ContentView()  { -  return static_cast<InnerView*>(wMain.GetID()); +  return static_cast<SCIContentView*>(wMain.GetID());  }  //-------------------------------------------------------------------------------------------------- @@ -1510,7 +1510,7 @@ bool ScintillaCocoa::SyncPaint(void* gc, PRectangle rc)  //--------------------------------------------------------------------------------------------------  /** - * Paint the margin into the MarginView space. + * Paint the margin into the SCIMarginView space.   */  void ScintillaCocoa::PaintMargin(NSRect aRect)  { @@ -1595,7 +1595,7 @@ bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage)  bool ScintillaCocoa::SetScrollingSize(void) {  	bool changes = false; -	InnerView *inner = ContentView(); +	SCIContentView *inner = ContentView();  	if (!enteredSetScrollingSize) {  		enteredSetScrollingSize = true;  		NSScrollView *scrollView = ScrollContainer(); @@ -1927,7 +1927,7 @@ void ScintillaCocoa::SetDocPointer(Document *document)    // Drop input composition.    NSTextInputContext *inctxt = [NSTextInputContext currentInputContext];    [inctxt discardMarkedText]; -  InnerView *inner = ContentView(); +  SCIContentView *inner = ContentView();    [inner unmarkText];    Editor::SetDocPointer(document);  } diff --git a/cocoa/ScintillaView.h b/cocoa/ScintillaView.h index f6a0e0dea..41be9fa51 100644 --- a/cocoa/ScintillaView.h +++ b/cocoa/ScintillaView.h @@ -49,9 +49,9 @@ extern NSString *const SCIUpdateUINotification;  @end  /** - * MarginView draws line numbers and other margins next to the text view. + * SCIMarginView draws line numbers and other margins next to the text view.   */ -@interface MarginView : NSRulerView +@interface SCIMarginView : NSRulerView  {  @private    int marginWidth; @@ -67,10 +67,10 @@ extern NSString *const SCIUpdateUINotification;  @end  /** - * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and + * SCIContentView is the Cocoa interface to the Scintilla backend. It handles text input and   * provides a canvas for painting the output.   */ -@interface InnerView : NSView <NSTextInputClient, NSUserInterfaceValidations> +@interface SCIContentView : NSView <NSTextInputClient, NSUserInterfaceValidations>  {  @private    ScintillaView* mOwner; @@ -100,10 +100,10 @@ extern NSString *const SCIUpdateUINotification;    Scintilla::ScintillaCocoa* mBackend;    // This is the actual content to which the backend renders itself. -  InnerView* mContent; +  SCIContentView* mContent;    NSScrollView *scrollView; -  MarginView *marginView; +  SCIMarginView *marginView;    CGFloat zoomDelta; @@ -118,7 +118,7 @@ extern NSString *const SCIUpdateUINotification;  @property (nonatomic, assign) id<ScintillaNotificationProtocol> delegate;  @property (nonatomic, readonly) NSScrollView *scrollView; -+ (Class) innerViewClass; ++ (Class) contentViewClass;  - (void) positionSubViews; @@ -133,7 +133,7 @@ extern NSString *const SCIUpdateUINotification;  // Scroller handling  - (void) setMarginWidth: (int) width;  - (void) scrollerAction: (id) sender; -- (InnerView*) content; +- (SCIContentView*) content;  // NSTextView compatibility layer.  - (NSString*) string; diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 100da27a8..7b471f786 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -50,7 +50,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)  } -@implementation MarginView +@implementation SCIMarginView  @synthesize marginWidth, owner; @@ -149,7 +149,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)  @end -@implementation InnerView +@implementation SCIContentView  @synthesize owner = mOwner; @@ -873,12 +873,12 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)  //--------------------------------------------------------------------------------------------------  /** - * Specify the InnerView class. Can be overridden in a subclass to provide an InnerView subclass. + * Specify the SCIContentView class. Can be overridden in a subclass to provide an SCIContentView subclass.   */ -+ (Class) innerViewClass ++ (Class) contentViewClass  { -  return [InnerView class]; +  return [SCIContentView class];  }  //-------------------------------------------------------------------------------------------------- @@ -1043,7 +1043,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)    self = [super initWithFrame:frame];    if (self)    { -    mContent = [[[[[self class] innerViewClass] alloc] initWithFrame:NSZeroRect] autorelease]; +    mContent = [[[[[self class] contentViewClass] alloc] initWithFrame:NSZeroRect] autorelease];      mContent.owner = self;      // Initialize the scrollers but don't show them yet. @@ -1060,7 +1060,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)      //[scrollView setHorizontalScrollElasticity:NSScrollElasticityNone];      [self addSubview: scrollView]; -    marginView = [[MarginView alloc] initWithScrollView:scrollView]; +    marginView = [[SCIMarginView alloc] initWithScrollView:scrollView];      marginView.owner = self;      [marginView setRuleThickness:[marginView requiredThickness]];      [scrollView setVerticalRulerView:marginView]; @@ -1306,7 +1306,7 @@ static NSCursor *cursorFromEnum(Window::Cursor cursor)  //-------------------------------------------------------------------------------------------------- -- (InnerView*) content +- (SCIContentView*) content  {    return mContent;  } diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index bba105c0c..4fb3a1194 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -493,14 +493,16 @@  	to registerNotifyCallback: which will be deprecated in the future.  	</li>  	<li> -	On Cocoa, clients may customize InnerView by subclassing both InnerView and ScintillaView and implementing the -	innerViewClass class method on the ScintillaView subclass to return the class of the InnerView subclass. -	</li> -	<li>  	On Cocoa, the ScintillaView.h header hides internal implementation details from Platform.h and ScintillaCocoa.h. +	InnerView was renamed to SCIContentView and MarginView was renamed to SCIMarginView.  	dealloc removed from @interface.  	</li>  	<li> +	On Cocoa, clients may customize SCIContentView by subclassing both SCIContentView and ScintillaView +	and implementing the contentViewClass class method on the ScintillaView subclass to return the class of  +	the SCIContentView subclass. +	</li> +	<li>  	On Cocoa, fixed appearance of alpha rectangles to use specified alpha and colour for outline as well as corner size.  	This makes INDIC_STRAIGHTBOX and INDIC_ROUNDBOX look correct.  	</li>  | 
