Author: mlytwyn
Date: Wed Apr 6 19:57:36 2016
New Revision: 39629
URL: http://svn.gna.org/viewcvs/gnustep?rev=39629&view=rev
Log:
Merge with revision 39619 of GUI main branch
Modified:
libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSScrollView.h
libs/gui/branches/gnustep_testplant_branch/Source/NSScrollView.m
libs/gui/branches/gnustep_testplant_branch/Source/NSScroller.m
Modified:
libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSScrollView.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSScrollView.h?rev=39629&r1=39628&r2=39629&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSScrollView.h
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Headers/AppKit/NSScrollView.h
Wed Apr 6 19:57:36 2016
@@ -4,7 +4,7 @@
A view that allows you to scroll a document view that's too big to display
entirely on a window.
- Copyright (C) 1996 Free Software Foundation, Inc.
+ Copyright (C) 1996-2015 Free Software Foundation, Inc.
Author: Ovidiu Predescu <[email protected]>
Date: July 1997
@@ -33,6 +33,15 @@
#import <GNUstepBase/GSVersionMacros.h>
#import <AppKit/NSView.h>
+
+enum
+{
+ NSScrollElasticityAutomatic = 0,
+ NSScrollElasticityNone = 1,
+ NSScrollElasticityAllowed = 2
+};
+typedef NSInteger NSScrollElasticity;
+
@class NSClipView;
@class NSRulerView;
@@ -66,6 +75,8 @@
BOOL _autohidesScrollers;
NSUInteger _reflectScrolledClipView_HRecursionCnt;
NSUInteger _reflectScrolledClipView_VRecursionCnt;
+ NSScrollElasticity _horizScrollElasticity;
+ NSScrollElasticity _vertScrollElasticity;
}
/* Calculating layout */
@@ -144,6 +155,16 @@
- (BOOL)autohidesScrollers;
- (void)setAutohidesScrollers:(BOOL)flag;
#endif
+#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
+- (NSScrollElasticity)horizontalScrollElasticity;
+- (void)setHorizontalScrollElasticity:(NSScrollElasticity)value;
+- (NSScrollElasticity)verticalScrollElasticity;
+- (void)setVerticalScrollElasticity:(NSScrollElasticity)value;
+#endif
+#if OS_API_VERSION(MAC_OS_X_VERSION_10_8, GS_API_LATEST)
+- (BOOL)allowsMagnification;
+- (void)setAllowsMagnification:(BOOL)m;
+#endif
/* Updating display after scrolling */
- (void)reflectScrolledClipView:(NSClipView*)aClipView;
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSScrollView.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSScrollView.m?rev=39629&r1=39628&r2=39629&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSScrollView.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSScrollView.m Wed Apr
6 19:57:36 2016
@@ -224,6 +224,8 @@
// For compatibility the ruler should be present but not visible.
[self setHasHorizontalRuler: YES];
[self tile];
+ _horizScrollElasticity = NSScrollElasticityAutomatic;
+ _vertScrollElasticity = NSScrollElasticityAutomatic;
[[NSNotificationCenter defaultCenter]
addObserver: self
@@ -396,6 +398,27 @@
- (void) setAutohidesScrollers: (BOOL)flag
{
_autohidesScrollers = flag;
+}
+
+- (NSScrollElasticity)horizontalScrollElasticity
+{
+ return _horizScrollElasticity;
+}
+
+- (void)setHorizontalScrollElasticity:(NSScrollElasticity)value
+{
+ _horizScrollElasticity = value;
+}
+
+- (NSScrollElasticity)verticalScrollElasticity
+{
+ return _vertScrollElasticity;
+}
+
+
+- (void)setVerticalScrollElasticity:(NSScrollElasticity)value
+{
+ _vertScrollElasticity = value;
}
- (void) scrollWheel: (NSEvent *)theEvent
@@ -913,7 +936,7 @@
// Testplant-MAL-2015-07-08: keeping testplant branch code...
_reflectScrolledClipView_HRecursionCnt--;
}
-
+
if (_hasHeaderView)
{
NSPoint headerClipViewOrigin;
@@ -1366,17 +1389,12 @@
- (BOOL) isOpaque
{
-#if 0
// FIXME: Only needs to be NO in a corner case,
// when [[GSTheme theme] scrollViewUseBottomCorner] is NO
// and the theme tile for the bottom corner is transparent.
// So maybe cache the value of
// [[GSTheme theme] scrollViewUseBottomCorner] and check it here.
return NO;
-#else
- // Testplant-MAL-2015-07-08: keeping testplant branch code...
- return [_contentView isOpaque];
-#endif
}
- (NSBorderType) borderType
@@ -1530,6 +1548,17 @@
- (NSScroller*) verticalScroller
{
return _vertScroller;
+}
+
+- (BOOL)allowsMagnification
+{
+ //we need an ivar for this
+ return NO;
+}
+
+- (void)setAllowsMagnification:(BOOL)m
+{
+ //we need an ivar for this
}
/*
Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSScroller.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSScroller.m?rev=39629&r1=39628&r2=39629&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSScroller.m
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSScroller.m Wed Apr
6 19:57:36 2016
@@ -1060,11 +1060,11 @@
}
else
{
- [[GSTheme theme] drawScrollerRect: rect
- inView: self
- hitPart: _hitPart
- isHorizontal: _scFlags.isHorizontal];
-}
+ [[GSTheme theme] drawScrollerRect: rect
+ inView: self
+ hitPart: _hitPart
+ isHorizontal: _scFlags.isHorizontal];
+ }
}
/**<p>(Un)Highlight the button specified by <var>whichButton</var>.
@@ -1127,7 +1127,7 @@
- (void) drawKnobSlot
{
[self drawKnobSlotInRect: [self rectForPart: NSScrollerKnobSlot]
- highlight: NO];
+ highlight: NO];
}
- (void) drawKnobSlotInRect: (NSRect)slotRect highlight: (BOOL)flag
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs