aboutsummaryrefslogtreecommitdiffhomepage
path: root/cocoa/ScintillaCocoa.h
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-03-15 23:34:46 +1100
committernyamatongwe <devnull@localhost>2013-03-15 23:34:46 +1100
commit9d124ce8cc3b212187f8b9637bf6c4685377fa87 (patch)
tree01d292cf11e925824a8f907316527ef7255388f4 /cocoa/ScintillaCocoa.h
parent23d76d437f1089cdd2cc7c01cf011ec21f7f7a63 (diff)
downloadscintilla-mirror-9d124ce8cc3b212187f8b9637bf6c4685377fa87.tar.gz
Use an NSScrollView on Cocoa for kinetic scrolling and hiding scrollbars unless wanted.
Also affects platform-independent code.
Diffstat (limited to 'cocoa/ScintillaCocoa.h')
-rw-r--r--cocoa/ScintillaCocoa.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h
index 302e39d97..0c0448118 100644
--- a/cocoa/ScintillaCocoa.h
+++ b/cocoa/ScintillaCocoa.h
@@ -55,6 +55,7 @@
extern "C" NSString* ScintillaRecPboardType;
@class InnerView;
+@class MarginView;
@class ScintillaView;
@class FindHighlightLayer;
@@ -109,6 +110,8 @@ private:
bool capturedMouse;
+ bool enteredSetScrollingSize;
+
// Private so ScintillaCocoa objects can not be copied
ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}
ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }
@@ -125,6 +128,7 @@ private:
FindHighlightLayer *layerFindIndicator;
protected:
+ Point GetVisibleOriginInMain();
PRectangle GetClientRectangle();
Point ConvertPoint(NSPoint point);
@@ -135,17 +139,19 @@ protected:
virtual void CancelModes();
public:
- ScintillaCocoa(InnerView* view);
+ ScintillaCocoa(InnerView* view, MarginView* viewMargin);
virtual ~ScintillaCocoa();
void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
ScintillaView* TopContainer();
+ NSScrollView* ScrollContainer();
InnerView* ContentView();
bool SyncPaint(void* gc, PRectangle rc);
bool Draw(NSRect rect, CGContextRef gc);
+ void PaintMargin(NSRect aRect);
virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void SetTicking(bool on);
@@ -156,9 +162,10 @@ public:
void SetVerticalScrollPos();
void SetHorizontalScrollPos();
bool ModifyScrollBars(int nMax, int nPage);
+ bool SetScrollingSize(void);
void Resize();
- void DoScroll(float position, NSScrollerPart part, bool horizontal);
-
+ void UpdateForScroll();
+
// Notifications for the owner.
void NotifyChange();
void NotifyFocus(bool focus);