#import <CPSplitView.h>
Class Methods | |
(CPString) | + defaultThemeClass |
(CPDictionary) | + themeAttributes |
Class Methods inherited from CPView | |
(Class) | + animatorClass |
(CAAnimation) | + defaultAnimationForKey: |
(CPMenu) | + defaultMenu |
(void) | + initialize |
(BOOL) | + isHighDPIDrawingEnabled |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
(void) | + setHighDPIDrawingEnabled: |
CPSplitView is a view that allows you to stack several subviews vertically or horizontally. The user is given divider to resize the subviews. The divider indices are zero-based. So the divider on the top (or left for vertical dividers) will be index 0.
CPSplitView can be supplied a delegate to provide control over the resizing of the splitview and subviews. Those methods are documented in setDelegate:
CPSplitView will add dividers for each subview you add. So just like adding subviews to a CPView you should call addSubview: to add new resizable subviews in your splitview.
Definition at line 2 of file CPSplitView.h.
|
implementation |
Definition at line 794 of file CPSplitView.j.
|
implementation |
Get the name under which the split view divider position is automatically saved to CPUserDefaults.
Definition at line 1075 of file CPSplitView.j.
|
implementation |
Definition at line 424 of file CPSplitView.j.
|
implementation |
Provided by category CPSplitView(CPTrackingArea).
Definition at line 1228 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 127 of file CPSplitView.j.
|
implementation |
Called when the receiver has added aSubview
to it's child views.
aSubview | the view that was added |
Reimplemented from CPView.
Definition at line 263 of file CPSplitView.j.
|
implementation |
Returns the thickness of the divider.
Definition at line 167 of file CPSplitView.j.
|
implementation |
Draws the divider at a given rect.
aRect | - the rect of the divider to draw. |
Definition at line 353 of file CPSplitView.j.
|
implementation |
Draws the receiver into aRect
. This method should be overridden by subclasses.
aRect | the area that should be drawn into |
Reimplemented from CPView.
Definition at line 313 of file CPSplitView.j.
|
implementation |
Returns the rect of the divider which the user is able to drag to resize.
int | - The index of the divider. |
Definition at line 302 of file CPSplitView.j.
|
implementation |
Archives the view to a coder.
aCoder | the object into which the view's data will be archived. |
Reimplemented from CPView.
Provided by category CPSplitView(CPCoding).
Definition at line 1492 of file CPSplitView.j.
|
implementation |
Tests whether a point is contained within this view, or one of its subviews.
aPoint | the point to test |
Reimplemented from CPView.
Definition at line 447 of file CPSplitView.j.
|
implementation |
Initializes the view from an archive.
aCoder | the coder from which to initialize |
Reimplemented from CPView.
Provided by category CPSplitView(CPCoding).
Definition at line 1426 of file CPSplitView.j.
|
implementation |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPView.
Definition at line 143 of file CPSplitView.j.
|
implementation |
Use to find if the divider is a larger pane splitter.
Definition at line 237 of file CPSplitView.j.
|
implementation |
Returns YES if the supplied subview is collapsed, otherwise NO.
aSubview | - the subview you are interested in. |
Definition at line 273 of file CPSplitView.j.
|
implementation |
Returns YES if the dividers are vertical, otherwise NO.
Definition at line 176 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 344 of file CPSplitView.j.
|
implementation |
Returns the maximum possible position of a divider at a given index.
the | index of the divider. |
Definition at line 640 of file CPSplitView.j.
|
implementation |
Returns the minimum possible position of a divider at a given index.
the | index of the divider. |
Definition at line 655 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 558 of file CPSplitView.j.
|
implementation |
Returns the CGRect of the divider at a given index.
int | - The index of a divider. |
Definition at line 284 of file CPSplitView.j.
|
implementation |
Initiates -superviewSizeChanged
: messages to subviews.
aSize | the size for the subviews |
Reimplemented from CPView.
Definition at line 783 of file CPSplitView.j.
|
implementation |
Set the name under which the split view divider positions is automatically saved to CPUserDefaults.
autosaveName | the name to save under or nil to not save |
Definition at line 1062 of file CPSplitView.j.
|
implementation |
Set the button bar who's resize control should act as a control for this splitview. Each divider can have at most one button bar assigned to it, and that button bar must be a subview of one of the split view's subviews.
Calling this method with nil as the button bar will remove any currently assigned button bar for the divider at that index. Indexes will not be adjusted as new subviews are added, so you should usually call this method after adding all the desired subviews to the split view.
This method will automatically configure the hasResizeControl and resizeControlIsLeftAligned parameters of the button bar, and will override any currently set values.
CPButtonBar | - The supplied button bar. |
unsigned | int - The divider index the button bar will be assigned to. |
Definition at line 1014 of file CPSplitView.j.
|
implementation |
Sets the delegate of the receiver. Possible delegate methods to implement are listed below.
Notifies the delegate when the subviews have resized.
Notifies the delegate when the subviews will be resized.
Allows the delegate to specify which of the CPSplitView's subviews should adjust if the window is resized.
Lets the delegate specify a different rect for which the user can drag the splitView divider.
Lets the delegate specify an additional rect for which the user can drag the splitview divider.
Notifies the delegate that the splitview is about to be collapsed. This usually happens when the user Double clicks on the divider. Return YES if the subview can be collapsed, otherwise NO.
Notifies the delegate that the subview at indexOfDivider is about to be collapsed. This usually happens when the user Double clicks on the divider. Return YES if the subview should be collapsed, otherwise NO.
Allows the delegate to constrain the subview beings resized. This method is called continuously as the user resizes the divider. For example if the subview needs to have a width which is a multiple of a certain number you could return that multiple with this method.
Allows the delegate to constrain the minimum position of a subview.
Allows the delegate to constrain the maximum position of a subview.
Allows the splitview to specify a custom resizing behavior. This is called when the splitview is resized. The sum of the views and the sum of the dividers should be equal to the size of the splitview.
delegate | - The delegate of the splitview. |
Definition at line 955 of file CPSplitView.j.
|
implementation |
Sets the receiver's frame size. If aSize
is the same as the frame's current dimensions, this method simply returns. The method posts a CPViewFrameDidChangeNotification to the default notification center if the receiver is configured to do so.
aSize | the new size for the frame |
Reimplemented from CPView.
Definition at line 768 of file CPSplitView.j.
|
implementation |
Used to set if the split view dividers should be the larger pane splitter.
shouldBePaneSplitter | - YES if the dividers should be the thicker pane splitter, otherwise NO. |
Definition at line 247 of file CPSplitView.j.
|
implementation |
Sets the position of a divider at a given index.
position | - The float value of the position to place the divider. |
dividerIndex | - The index of the divider to position. |
Definition at line 711 of file CPSplitView.j.
|
implementation |
Sets if the splitview dividers are vertical.
shouldBeVertical | - YES if the splitview dividers should be vertical, otherwise NO. |
Definition at line 185 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 132 of file CPSplitView.j.
|
implementation |
Definition at line 477 of file CPSplitView.j.
|
implementation |
Invoked automatically when the view’s geometry changes such that its tracking areas need to be recalculated.
You should override this method to remove out of date tracking areas, add recomputed tracking areas and then call super;
Cocoa calls this on every view, whereas they have tracking area(s) or not. Cappuccino behaves differently :
Please note that it is the owner of a tracking area who is called for updateTrackingAreas. But, if a view without any tracking area is inserted in the view hierarchy (that is, in a window), the view is called for updateTrackingAreas. This enables you to use updateTrackingArea to initially attach your tracking areas to the view.
Reimplemented from CPView.
Provided by category CPSplitView(CPTrackingArea).
Definition at line 1201 of file CPSplitView.j.
|
implementation |
Called when the receiver has been moved to a new CPWindow.
Reimplemented from CPView.
Definition at line 567 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 386 of file CPSplitView.j.
|
implementation |
Because we're use drawRect: to draw the dividers, but use DOM elements instead of CoreGraphics We must remove those DOM elements (the splitters) when the subview is removed.
Reimplemented from CPView.
Definition at line 329 of file CPSplitView.j.