API  1.0.0
CPBox Class Reference

#import <CPBox.h>

+ Inheritance diagram for CPBox:

Instance Methods

(CPColor- borderColor
 
(CGRect) - borderRect
 
(CPBorderType) - borderType
 
(float) - borderWidth
 
(CPBoxType) - boxType
 
(CPView- contentView
 
(CGSize) - contentViewMargins
 
(float) - cornerRadius
 
(void) - drawRect:
 
(void) - encodeWithCoder:
 
(CPColor- fillColor
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(void) - setBorderColor:
 
(void) - setBorderType:
 
(void) - setBorderWidth:
 
(void) - setBoxType:
 
(void) - setContentView:
 
(void) - setContentViewMargins:
 
(void) - setCornerRadius:
 
(void) - setFillColor:
 
(void) - setFrameFromContentFrame:
 
(void) - setTitle:
 
(void) - setTitleFont:
 
(void) - setTitlePosition:
 
(void) - setValue:forKey:
 
(void) - sizeToFit
 
(CPString- title
 
(CPFont- titleFont
 
(int) - titlePosition
 
(CPTextField- titleView
 
- 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:
 
(CPAppearance- effectiveAppearance
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(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
 
(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) - layoutSubviews
 
(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) - setFrameSize:
 
(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
 

Class Methods

(id) + boxEnclosingView:
 
(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:
 

Detailed Description

A CPBox is a simple view which can display a border.

Definition at line 2 of file CPBox.h.

Method Documentation

◆ borderColor()

- (CPColor) borderColor
implementation

Definition at line 224 of file CPBox.j.

◆ borderRect()

- (CGRect) borderRect
implementation

Returns the receiver's border rectangle.

Returns
the border rectangle of the box

Definition at line 136 of file CPBox.j.

◆ borderType()

- (CPBorderType) borderType
implementation

Returns the receiver's border type. Possible values are:

CPNoBorder
CPLineBorder
CPBezelBorder
CPGrooveBorder
Returns
the border type of the box

Definition at line 153 of file CPBox.j.

◆ borderWidth()

- (float) borderWidth
implementation

Definition at line 237 of file CPBox.j.

◆ boxEnclosingView:()

+ (id) boxEnclosingView: (CPView aView
implementation

Definition at line 93 of file CPBox.j.

◆ boxType()

- (CPBoxType) boxType
implementation

Returns the receiver's box type. Possible values are:

CPBoxPrimary
CPBoxSecondary
CPBoxSeparator
CPBoxOldStyle
CPBoxCustom

(In the current implementation, all values act the same except CPBoxSeparator.)

Returns
the box type of the box.

Definition at line 195 of file CPBox.j.

◆ contentView()

- (CPView) contentView
implementation

Definition at line 276 of file CPBox.j.

◆ contentViewMargins()

- (CGSize) contentViewMargins
implementation

Definition at line 303 of file CPBox.j.

◆ cornerRadius()

- (float) cornerRadius
implementation

Definition at line 250 of file CPBox.j.

◆ defaultThemeClass()

+ (CPString) defaultThemeClass
implementation

Reimplemented from CPView.

Definition at line 74 of file CPBox.j.

◆ drawRect:()

- (void) drawRect: (CGRect)  aRect
implementation

Draws the receiver into aRect. This method should be overridden by subclasses.

Parameters
aRectthe area that should be drawn into

Reimplemented from CPView.

Definition at line 438 of file CPBox.j.

◆ encodeWithCoder:()

- (void) encodeWithCoder: (CPCoder aCoder
implementation

Archives the view to a coder.

Parameters
aCoderthe object into which the view's data will be archived.

Reimplemented from CPView.

Provided by category CPBox(CPCoding).

Definition at line 644 of file CPBox.j.

◆ fillColor()

- (CPColor) fillColor
implementation

Definition at line 263 of file CPBox.j.

◆ initWithCoder:()

- (id) initWithCoder: (CPCoder aCoder
implementation

Initializes the view from an archive.

Parameters
aCoderthe coder from which to initialize
Returns
the initialized view

Reimplemented from CPView.

Provided by category CPBox(CPCoding).

Definition at line 603 of file CPBox.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 108 of file CPBox.j.

◆ setBorderColor:()

- (void) setBorderColor: (CPColor color
implementation

Definition at line 229 of file CPBox.j.

◆ setBorderType:()

- (void) setBorderType: (CPBorderType)  aBorderType
implementation

Sets the receiver's border type. Valid values are:

CPNoBorder
CPLineBorder
CPBezelBorder
CPGrooveBorder
Parameters
borderTypethe border type to use

Definition at line 171 of file CPBox.j.

◆ setBorderWidth:()

- (void) setBorderWidth: (float)  width
implementation

Definition at line 242 of file CPBox.j.

◆ setBoxType:()

- (void) setBoxType: (CPBoxType)  aBoxType
implementation

Sets the receiver's box type. Valid values are:

CPBoxPrimary
CPBoxSecondary
CPBoxSeparator
CPBoxOldStyle
CPBoxCustom

(In the current implementation, all values act the same except CPBoxSeparator.)

Parameters
aBoxTypethe box type of the box.

Definition at line 215 of file CPBox.j.

◆ setContentView:()

- (void) setContentView: (CPView aView
implementation

Definition at line 281 of file CPBox.j.

◆ setContentViewMargins:()

- (void) setContentViewMargins: (CGSize)  size
implementation

Definition at line 308 of file CPBox.j.

◆ setCornerRadius:()

- (void) setCornerRadius: (float)  radius
implementation

Definition at line 255 of file CPBox.j.

◆ setFillColor:()

- (void) setFillColor: (CPColor color
implementation

Definition at line 268 of file CPBox.j.

◆ setFrameFromContentFrame:()

- (void) setFrameFromContentFrame: (CGRect)  aRect
implementation

Definition at line 316 of file CPBox.j.

◆ setTitle:()

- (void) setTitle: (CPString aTitle
implementation

Definition at line 325 of file CPBox.j.

◆ setTitleFont:()

- (void) setTitleFont: (CPFont aFont
implementation

Definition at line 350 of file CPBox.j.

◆ setTitlePosition:()

- (void) setTitlePosition: (int)  aTitlePotisition
implementation

Definition at line 335 of file CPBox.j.

◆ setValue:forKey:()

- (void) setValue: (id)  aValue
forKey: (CPString aKey 
implementation

Definition at line 430 of file CPBox.j.

◆ sizeToFit()

- (void) sizeToFit
implementation

Definition at line 400 of file CPBox.j.

◆ themeAttributes()

+ (CPDictionary) themeAttributes
implementation

Reimplemented from CPView.

Definition at line 79 of file CPBox.j.

◆ title()

- (CPString) title
implementation

Synthesized accessor method.

Provided by category CPBox(CPSynthesizedAccessors).

Definition at line 663 of file CPBox.j.

◆ titleFont()

- (CPFont) titleFont
implementation

Definition at line 345 of file CPBox.j.

◆ titlePosition()

- (int) titlePosition
implementation

Synthesized accessor method.

Provided by category CPBox(CPSynthesizedAccessors).

Definition at line 671 of file CPBox.j.

◆ titleView()

- (CPTextField) titleView
implementation

Return the text field used to display the receiver's title.

This is the Cappuccino equivalent to the titleCell method.

Definition at line 360 of file CPBox.j.


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