mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 05:32:11 +00:00
Add horiz and vert elastiticty properties and constants
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38920 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cc73eeacdc
commit
c919c925f9
3 changed files with 47 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-08-23 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Headers/AppKit/NSScrollView.h
|
||||
* Source/NSScrollView.m
|
||||
Add horiz and vert elastiticty properties and constants.
|
||||
|
||||
2015-08-23 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBundleAdditions.m,
|
||||
|
|
|
@ -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 <ovidiu@net-community.com>
|
||||
Date: July 1997
|
||||
|
@ -34,6 +34,15 @@
|
|||
|
||||
#import <AppKit/NSView.h>
|
||||
|
||||
enum
|
||||
{
|
||||
NSScrollElasticityAutomatic = 0,
|
||||
NSScrollElasticityNone = 1,
|
||||
NSScrollElasticityAllowed = 2
|
||||
};
|
||||
typedef NSInteger NSScrollElasticity;
|
||||
|
||||
|
||||
@class NSClipView;
|
||||
@class NSRulerView;
|
||||
@class NSColor;
|
||||
|
@ -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;
|
||||
|
|
|
@ -224,6 +224,8 @@ static CGFloat scrollerWidth;
|
|||
// For compatibility the ruler should be present but not visible.
|
||||
[self setHasHorizontalRuler: YES];
|
||||
[self tile];
|
||||
_horizScrollElasticity = NSScrollElasticityAutomatic;
|
||||
_vertScrollElasticity = NSScrollElasticityAutomatic;
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
|
@ -398,6 +400,27 @@ static CGFloat scrollerWidth;
|
|||
_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
|
||||
{
|
||||
NSRect clipViewBounds;
|
||||
|
|
Loading…
Reference in a new issue