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:
rmottola 2015-08-23 21:44:40 +00:00
parent 144ebe2179
commit 0e5a4b7386
3 changed files with 47 additions and 1 deletions

View file

@ -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;