ETScrollableAreaItem
ETScrollableAreaItem : ETDecoratorItemOverview
A decorator which can be used to make content scrollable.
With the AppKit widget backend, the underlying view is an NSScrollView object.
You must not alter the underlying NSScrollView object with -setContentView: .
Non-flipped coordinates are untested with ETScrollableAreaItem i.e. when the decorated item returns NO to -isFlipped .
Default
- + (ETScrollableAreaItem *) itemWithScrollView: (NSScrollView *)scrollView objectGraphContext: (COObjectGraphContext *)aContext
Returns a new scrollable area item to which the given concrete scroll view gets bound.
The returned item can be used as a decorator to wrap an existing layout item into a scrollable area.
- - (id) initWithScrollView: (NSScrollView *)aScrollView objectGraphContext: (COObjectGraphContext *)aContext
- Description forthcoming.
- - (NSRect) visibleRect
Returns the rect that corresponds to the visible part of the content and expressed in the receiver content coordinate space (relative to the content rect).
- - (NSRect) visibleContentRect
Returns the rect that corresponds to the visible part of the content and expressed in the receiver coordinate space (relative to the decoration rect).
For now, this area corresponds to the scrollable area or clip rect and can extend beyond the content rect when the whole content is visible (in other words when scrollers are disabled). This is subject to change though.
- - (BOOL) hasVerticalScroller
Returns YES when the vertical scroller of the current scrollable area is visible, otherwise returns NO.
- - (void) setHasVerticalScroller: (BOOL)scroll
Sets the vertical scroller visibility of the current scrollable area.
Even if both vertical and horizontal scroller are made invisible, this method won't remove the receiver from the decorator chain it currently belongs to.
- - (BOOL) hasHorizontalScroller
Returns YES when the horizontal scroller of the current scrollable area view is visible, otherwise returns NO.
- - (void) setHasHorizontalScroller: (BOOL)scroll
Sets the horizontal scroller visibility of the current scrollable area.
For additional notes, see also -setHasVerticalScroller: .
- - (BOOL) ensuresContentFillsVisibleArea
Returns whether the decorated item size should be always be kept equal or superior to the visible content size.
Returns YES by default.
- - (void) setEnsuresContentFillsVisibleArea: (BOOL)flag
Sets whether the decorated item size should be always be kept equal or superior to the visible content size.
You might want to disable this behavior when you decorate a layout item whose size must remain fixed. A layout item that presents an image must probably never be resized when the scrollable area item is resized.
