API  1.0.0
CPAccordionView Class Reference

#import <CPAccordionView.h>

+ Inheritance diagram for CPAccordionView:

Instance Methods

(void) - addItem:
 
(CPIndexSet- collapsedItemIndexes
 
(void) - collapseItemAtIndex:
 
(CPIndexSet- expandedItemIndexes
 
(void) - expandItemAtIndex:
 
(id) - initWithFrame:
 
(void) - insertItem:atIndex:
 
(CPView- itemHeaderPrototype
 
(CPArray) - items
 
(void) - layoutSubviews
 
(void) - removeAllItems
 
(void) - removeItem:
 
(void) - removeItemAtIndex:
 
(void) - setEnabled:forItemAtIndex:
 
(void) - setFrameSize:
 
(void) - setItemHeaderPrototype:
 
(void) - toggleItemAtIndex:
 
- Instance Methods inherited from CPView
(BOOL) - acceptsFirstMouse:
 
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(void) - addTrackingArea:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(CAAnimation- animationForKey:
 
(CPDictionary- animations
 
(id) - animator
 
(BOOL) - autoresizesSubviews
 
(unsigned) - autoresizingMask
 
(BOOL) - autoscroll:
 
(CPColor- backgroundColor
 
(BOOL) - becomeFirstResponder
 
(CGRect) - bounds
 
(CGPoint) - boundsOrigin
 
(CGSize) - boundsSize
 
(BOOL) - canBecomeKeyView
 
(CGPoint) - center
 
(BOOL) - clipsToBounds
 
(CGPoint) - convertPoint:fromView:
 
(CGPoint) - convertPoint:toView:
 
(CGPoint) - convertPointFromBase:
 
(CGPoint) - convertPointToBase:
 
(CGRect) - convertRect:fromView:
 
(CGRect) - convertRect:toView:
 
(CGRect) - convertRectFromBase:
 
(CGRect) - convertRectToBase:
 
(CGSize) - convertSize:fromView:
 
(CGSize) - convertSize:toView:
 
(CPView- createEphemeralSubviewNamed:
 
(CPString- debug_description
 
(void) - didAddSubview:
 
(void) - display
 
(void) - displayIfNeeded
 
(void) - displayIfNeededInRect:
 
(void) - displayRect:
 
(void) - displayRectIgnoringOpacity:inContext:
 
(void) - dragImage:at:offset:event:pasteboard:source:slideBack:
 
(void) - dragView:at:offset:event:pasteboard:source:slideBack:
 
(void) - drawRect:
 
(CPAppearance- effectiveAppearance
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(void) - encodeWithCoder:
 
(BOOL) - enterFullScreenMode
 
(BOOL) - enterFullScreenMode:withOptions:
 
(CPView- ephemeralSubviewNamed:
 
(void) - exitFullScreenMode
 
(void) - exitFullScreenModeWithOptions:
 
(CGRect) - frame
 
(CGPoint) - frameOrigin
 
(CGRect) - frameRectOfView:inSuperviewSize:
 
(CGSize) - frameSize
 
(CGRect) - frameWithNewSuperviewSize:
 
(BOOL) - hasCustomDrawRect
 
(BOOL) - hasCustomLayoutSubviews
 
(CPView- hitTest:
 
(BOOL) - hitTests
 
(id) - init
 
(id) - initWithCoder:
 
(BOOL) - inLiveResize
 
(BOOL) - isDescendantOf:
 
(BOOL) - isFlipped
 
(BOOL) - isHidden
 
(BOOL) - isHiddenOrHasHiddenAncestor
 
(BOOL) - isInFullScreenMode
 
(BOOL) - isOpaque
 
(CALayer- layer
 
(void) - layout
 
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
 
(void) - layoutIfNeeded
 
(void) - lockFocus
 
(CPMenu- menuForEvent:
 
(void) - mouseDown:
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsLayout
 
(BOOL) - needsPanelToBecomeKey
 
(CPView- nextKeyView
 
(CPView- nextValidKeyView
 
(void) - objectDidChangeTheme
 
(BOOL) - performKeyEquivalent:
 
(BOOL) - postsBoundsChangedNotifications
 
(BOOL) - postsFrameChangedNotifications
 
(CPView- previousKeyView
 
(CPView- previousValidKeyView
 
(CGRect) - rectForEphemeralSubviewNamed:
 
(void) - reflectScrolledClipView:
 
(CPArray) - registeredDraggedTypes
 
(void) - registerForDraggedTypes:
 
(void) - removeFromSuperview
 
(void) - removeTrackingArea:
 
(void) - replaceSubview:with:
 
(BOOL) - resignFirstResponder
 
(void) - resizeSubviewsWithOldSize:
 
(void) - resizeWithOldSuperviewSize:
 
(void) - rightMouseDown:
 
(CGSize) - scaleSize
 
(void) - scaleUnitSquareToSize:
 
(void) - scrollClipView:toPoint:
 
(void) - scrollPoint:
 
(void) - scrollRect:by:
 
(BOOL) - scrollRectToVisible:
 
(void) - setAlphaValue:
 
(void) - setAnimations:
 
(void) - setAppearance:
 
(void) - setAutoresizesSubviews:
 
(void) - setAutoresizingMask:
 
(void) - setBackgroundColor:
 
(void) - setBounds:
 
(void) - setBoundsOrigin:
 
(void) - setBoundsSize:
 
(void) - setCenter:
 
(void) - setClipsToBounds:
 
(void) - setDOMClassName:
 
(void) - setFrame:
 
(void) - setFrameOrigin:
 
(void) - setHidden:
 
(void) - setHitTests:
 
(void) - setLayer:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNeedsLayout
 
(void) - setNeedsLayout:
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setScaleSize:
 
(void) - setSubviews:
 
(void) - setTag:
 
(void) - setThemeClass:
 
(BOOL) - setThemeState:
 
(void) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray) - subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(void) - updateTrackingAreas
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidLayout
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillLayout
 
(void) - viewWillMoveToSuperview:
 
(void) - viewWillMoveToWindow:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 

Additional Inherited Members

- Class Methods inherited from CPView
(Class) + animatorClass
 
(CAAnimation+ defaultAnimationForKey:
 
(CPMenu+ defaultMenu
 
(CPString+ defaultThemeClass
 
(void) + initialize
 
(BOOL) + isHighDPIDrawingEnabled
 
(CPSet) + keyPathsForValuesAffectingBounds
 
(CPSet) + keyPathsForValuesAffectingFrame
 
(void) + setHighDPIDrawingEnabled:
 
(CPDictionary+ themeAttributes
 

Detailed Description

CPAccordionView provides a container for CPAccordionViewItem objects and manages layout state for all sub-layout items.

Example

var myAccordionView = [[CPAccordionView alloc] initWithFrame:CGRectMakeZero()];
var firstItem = [[CPAccordionViewItem alloc] initWithIdentifier:"firstSection"]];
[firstItem setView:[[CPView alloc] initWithFrame:CGRectMakeZero()]];
var secondItem = [[CPAccordionViewItem alloc] initWithIdentifier:"secondSection"]];
[secondItem setView:[[CPView alloc] initWithFrame:CGRectMakeZero()]];
[myAccordionView addItem:firstItem];
[myAccordionView addItem:secondItem];
[myAccordionView setAutoresizingMask: CPViewWidthSizable | CPViewHeightSizable];
  

Definition at line 2 of file CPAccordionView.h.

Method Documentation

◆ addItem:()

- (void) addItem: (CPAccordionViewItem anItem
implementation

Append a CPAccordionViewItem to the receiver. Note that the CPAccordionViewItem must contain a valid CPView derived component or a TypeError will be generated when the contents of the ViewItem are disclosed.

Definition at line 125 of file CPAccordionView.j.

◆ collapsedItemIndexes()

- (CPIndexSet) collapsedItemIndexes
implementation

Definition at line 217 of file CPAccordionView.j.

◆ collapseItemAtIndex:()

- (void) collapseItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 190 of file CPAccordionView.j.

◆ expandedItemIndexes()

- (CPIndexSet) expandedItemIndexes
implementation

Definition at line 212 of file CPAccordionView.j.

◆ expandItemAtIndex:()

- (void) expandItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 179 of file CPAccordionView.j.

◆ initWithFrame:()

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes the receiver for usage with the specified bounding rectangle

Returns
the initialized view

Reimplemented from CPView.

Definition at line 90 of file CPAccordionView.j.

◆ insertItem:atIndex:()

- (void) insertItem: (CPAccordionViewItem anItem
atIndex: (CPInteger)  anIndex 
implementation

Definition at line 130 of file CPAccordionView.j.

◆ itemHeaderPrototype()

- (CPView) itemHeaderPrototype
implementation

Definition at line 111 of file CPAccordionView.j.

◆ items()

- (CPArray) items
implementation

Definition at line 116 of file CPAccordionView.j.

◆ layoutSubviews()

- (void) layoutSubviews
implementation

Reimplemented from CPView.

Definition at line 260 of file CPAccordionView.j.

◆ removeAllItems()

- (void) removeAllItems
implementation

Definition at line 171 of file CPAccordionView.j.

◆ removeItem:()

- (void) removeItem: (CPAccordionViewItem anItem
implementation

Definition at line 151 of file CPAccordionView.j.

◆ removeItemAtIndex:()

- (void) removeItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 156 of file CPAccordionView.j.

◆ setEnabled:forItemAtIndex:()

- (void) setEnabled: (BOOL)  isEnabled
forItemAtIndex: (CPInteger)  anIndex 
implementation

Definition at line 226 of file CPAccordionView.j.

◆ setFrameSize:()

- (void) setFrameSize: (CGSize)  aSize
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.

Parameters
aSizethe new size for the frame

Reimplemented from CPView.

Definition at line 250 of file CPAccordionView.j.

◆ setItemHeaderPrototype:()

- (void) setItemHeaderPrototype: (CPView aView
implementation

Definition at line 106 of file CPAccordionView.j.

◆ toggleItemAtIndex:()

- (void) toggleItemAtIndex: (CPInteger)  anIndex
implementation

Definition at line 201 of file CPAccordionView.j.


The documentation for this class was generated from the following files: