Author: rmottola
Date: Sun Aug 23 23:44:40 2015
New Revision: 38920
URL: http://svn.gna.org/viewcvs/gnustep?rev=38920&view=rev
Log:
Add horiz and vert elastiticty properties and constants
Modified:
libs/gui/trunk/ChangeLog
libs/gui/trunk/Headers/AppKit/NSScrollView.h
libs/gui/trunk/Source/NSScrollView.m
Modified: libs/gui/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/ChangeLog?rev=38920&r1=38919&r2=38920&view=diff
==============================================================================
--- libs/gui/trunk/ChangeLog (original)
+++ libs/gui/trunk/ChangeLog Sun Aug 23 23:44:40 2015
@@ -1,3 +1,9 @@
+2015-08-23 Riccardo Mottola <[email protected]>
+
+ * Headers/AppKit/NSScrollView.h
+ * Source/NSScrollView.m
+ Add horiz and vert elastiticty properties and constants.
+
2015-08-23 Fred Kiefer <[email protected]>
* Source/NSBundleAdditions.m,
Modified: libs/gui/trunk/Headers/AppKit/NSScrollView.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Headers/AppKit/NSScrollView.h?rev=38920&r1=38919&r2=38920&view=diff
==============================================================================
--- libs/gui/trunk/Headers/AppKit/NSScrollView.h (original)
+++ libs/gui/trunk/Headers/AppKit/NSScrollView.h Sun Aug 23 23:44:40 2015
@@ -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;
@@ -64,6 +73,8 @@
BOOL _hasHeaderView;
BOOL _hasCornerView;
BOOL _autohidesScrollers;
+ NSScrollElasticity _horizScrollElasticity;
+ NSScrollElasticity _vertScrollElasticity;
}
/* Calculating layout */
@@ -142,6 +153,12 @@
- (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
/* Updating display after scrolling */
- (void)reflectScrolledClipView:(NSClipView*)aClipView;
Modified: libs/gui/trunk/Source/NSScrollView.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/gui/trunk/Source/NSScrollView.m?rev=38920&r1=38919&r2=38920&view=diff
==============================================================================
--- libs/gui/trunk/Source/NSScrollView.m (original)
+++ libs/gui/trunk/Source/NSScrollView.m Sun Aug 23 23:44:40 2015
@@ -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
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs