![]() |
API
0.9.6
|
#import <CPSplitView.h>
Class Methods | |
(CPString) | + defaultThemeClass |
(void) | + initialize |
(id) | + themeAttributes |
![]() | |
(CPMenu) | + defaultMenu |
(CPSet) | + keyPathsForValuesAffectingBounds |
(CPSet) | + keyPathsForValuesAffectingFrame |
![]() | |
(BOOL) | + accessInstanceVariablesDirectly |
(id) | + alloc |
(id) | + allocWithCoder: |
(BOOL) | + automaticallyNotifiesObserversForKey: |
(Class) | + class |
(void) | + exposeBinding: |
(IMP) | + instanceMethodForSelector: |
(BOOL) | + instancesRespondToSelector: |
(BOOL) | + isSubclassOfClass: |
(CPSet) | + keyPathsForValuesAffectingValueForKey: |
(void) | + load |
(id) | + new |
(void) | + setVersion: |
(Class) | + superclass |
(int) | + version |
Additional Inherited Members | |
![]() | |
Class | isa |
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 804 of file CPSplitView.j.
|
implementation |
Get the name under which the split view divider position is automatically saved to CPUserDefaults.
Definition at line 1079 of file CPSplitView.j.
|
implementation |
Definition at line 399 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 97 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 238 of file CPSplitView.j.
|
implementation |
Returns the thickness of the divider.
Definition at line 145 of file CPSplitView.j.
|
implementation |
Draws the divider at a given rect.
aRect | - the rect of the divider to draw. |
Definition at line 328 of file CPSplitView.j.
|
implementation |
Definition at line 288 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 277 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 1270 of file CPSplitView.j.
|
implementation |
Definition at line 425 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 111 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 1205 of file CPSplitView.j.
|
implementation |
Initializes the receiver for usage with the specified bounding rectangle
Reimplemented from CPView.
Definition at line 122 of file CPSplitView.j.
|
implementation |
Use to find if the divider is a larger pane splitter.
Definition at line 212 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 248 of file CPSplitView.j.
|
implementation |
Returns YES if the dividers are vertical, otherwise NO.
Definition at line 154 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 319 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 635 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 650 of file CPSplitView.j.
|
implementation |
Notifies the receiver that the user has clicked the mouse down in its area.
anEvent | contains information about the click |
Reimplemented from CPView.
Definition at line 530 of file CPSplitView.j.
|
implementation |
Reimplemented from CPResponder.
Definition at line 542 of file CPSplitView.j.
|
implementation |
Notifies the receiver that the mouse exited the receiver's area.
anEvent | contains information about the exit |
Reimplemented from CPResponder.
Definition at line 555 of file CPSplitView.j.
|
implementation |
Notifies the receiver that the user has moved the mouse (with no buttons down).
anEvent | contains information about the movement |
Reimplemented from CPResponder.
Definition at line 549 of file CPSplitView.j.
|
implementation |
Returns the CGRect of the divider at a given index.
int | - The index of a divider. |
Definition at line 259 of file CPSplitView.j.
|
implementation |
Definition at line 793 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 1066 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 1003 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.
@param delegate - The delegate of the splitview.
Definition at line 966 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 778 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 222 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 721 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 163 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 102 of file CPSplitView.j.
|
implementation |
Definition at line 446 of file CPSplitView.j.
|
implementation |
Called when the receiver has been moved to a new CPWindow.
Reimplemented from CPView.
Definition at line 536 of file CPSplitView.j.
|
implementation |
Reimplemented from CPView.
Definition at line 361 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 304 of file CPSplitView.j.