API 0.9.5
AppKit

Classes

class  CPAccordionView
class  CPAccordionViewItem
class  CPAlert
class  CPAnimation
class  CPApplication
class  CPBezierPath
class  CPBox
class  CPBrowser
class  CPButton
class  CPCib
class  CPClipView
class  CPCollectionView
class  CPColor
class  CPColorPanel
class  CPColorPicker
class  CPColorWell
class  CPControl
class  CPCookie
class  CPDocument
class  CPDocumentController
class  CPEvent
class  CPFlashMovie
class  CPFlashView
class  CPFont
class  CPFontManager
class  CPGraphicsContext
class  CPImage
class  CPImageView
class  CPLevelIndicator
class  CPMenu
class  CPMenuItem
class  CPOutlineView
class  CPPanel
class  CPPasteboard
class  CPPopover
class  CPPopUpButton
class  CPPredicateEditor
 CPPredicateEditor is a subclass of CPRuleEditor that is specialized for editing CPPredicate objects. More...
class  CPPredicateEditorRowTemplate
 CPPredicateEditorRowTemplate describes available predicates and how to display them. More...
class  CPProgressIndicator
class  CPResponder
class  CPRuleEditor
 A view for creating and configuring criteria. More...
class  CPScreen
class  CPScroller
class  CPSearchField
class  CPSecureTextField
class  CPSegmentedControl
class  CPShadowView
class  CPSlider
class  CPSplitView
class  CPTableView
class  CPTabView
class  CPTabViewItem
class  CPTextField
class  CPTheme
class  CPThemeBlend
class  CPToolbar
class  CPToolbarItem
class  CPView
class  CPViewController
class  CPWebView
class  CPWindow
class  CPWindowController

Functions

function CGInsetFromString (aString)
function CGPointFromEvent (anEvent)
function CGPointFromString (aString)
function CGRectContainsRect (lhsRect, rhsRect)
function CGRectDivide (inRect, slice, rem, amount, edge)
function CGRectFromString (aString)
function CGRectIntegral (aRect)
function CGRectIntersection (lhsRect, rhsRect)
function CGRectIntersectsRect (lhsRect, rhsRect)
function CGRectStandardize (aRect)
function CGRectUnion (lhsRect, rhsRect)
function CGSizeFromString (aString)
function CPDivideRect (inRect, slice, rem, amount, edge)
function CPPointCreateCopy (aPoint)
function CPPointEqualToPoint (lhsPoint, rhsPoint)
function CPPointFromEvent (anEvent)
function CPPointFromString (aString)
function CPPointMake (x, y)
function CPPointMakeZero ()
function CPRectContainsPoint (aRect, aPoint)
function CPRectContainsRect (possibleOuter, possibleInner)
function CPRectCreateCopy (aRect)
function CPRectEqualToRect (lhsRect, rhsRect)
function CPRectFromString (aString)
function CPRectGetHeight (aRect)
function CPRectGetMaxX (aRect)
function CPRectGetMaxY (aRect)
function CPRectGetMidX (aRect)
function CPRectGetMidY (aRect)
function CPRectGetMinX (aRect)
function CPRectGetMinY (aRect)
function CPRectGetWidth (aRect)
function CPRectInset (aRect, dX, dY)
function CPRectIntegral (aRect)
function CPRectIntersection (lhsRect, rhsRect)
function CPRectIntersectsRect (lhsRect, rhsRect)
function CPRectIsEmpty (aRect)
function CPRectIsNull (aRect)
function CPRectMake (x, y, width, height)
function CPRectMakeZero ()
function CPRectOffset (aRect, dX, dY)
function CPRectStandardize (aRect)
function CPRectUnion (lhsRect, rhsRect)
function CPSizeCreateCopy (aSize)
function CPSizeEqualToSize (lhsSize, rhsSize)
function CPSizeFromString (aString)
function CPSizeMake (width, height)
function CPSizeMakeZero ()
function CPStringFromCGInset (anInset)
function CPStringFromPoint (aPoint)
function CPStringFromRect (aRect)
function CPStringFromSize (aSize)

Variables

 CGInsetFromCPString = CGInsetFromString
 CPRadioImageOffset = 4.0

Function Documentation

function CGInsetFromString ( aString  )

Definition at line 270 of file CGGeometry.j.

function CGPointFromEvent ( anEvent  )

Definition at line 265 of file CGGeometry.j.

function CGPointFromString ( aString  )

Definition at line 244 of file CGGeometry.j.

function CGRectContainsRect ( lhsRect  ,
rhsRect   
)

Returns a BOOL indicating whether CGRect lhsRect contains CGRect rhsRect. CGRect

Parameters:
lhsRectthe CGRect to test if rhsRect is inside of
rhsRectthe CGRect to test if it fits inside lhsRect.
Returns:
BOOL YES if rhsRect fits inside lhsRect.

Definition at line 136 of file CGGeometry.j.

function CGRectDivide ( inRect  ,
slice  ,
rem  ,
amount  ,
edge   
)

Creates two rectangles -- slice and rem -- from inRect, by dividing inRect with a line that's parallel to the side of inRect specified by edge. The size of slice is determined by amount, which specifies the distance from edge.

slice and rem must not be NULL, must not be the same object, and must not be the same object as inRect.

CGRect

Definition at line 94 of file CGGeometry.j.

function CGRectFromString ( aString  )

Definition at line 258 of file CGGeometry.j.

function CGRectIntegral ( aRect  )

Makes the origin and size of a CGRect all integers. Specifically, by making the southwest corner the origin (rounded down), and the northeast corner a CGSize (rounded up).

Parameters:
aRectthe rectangle to operate on
Returns:
CGRect the modified rectangle (same as the input) CGRect

Definition at line 164 of file CGGeometry.j.

function CGRectIntersection ( lhsRect  ,
rhsRect   
)

Returns the intersection of the two provided rectangles as a new rectangle.

Parameters:
lhsRectthe first rectangle used for calculation
rhsRectthe second rectangle used for calculation
Returns:
CGRect the intersection of the two rectangles CGRect

Definition at line 188 of file CGGeometry.j.

function CGRectIntersectsRect ( lhsRect  ,
rhsRect   
)

Returns YES if the two rectangles intersect CGRect

Parameters:
lhsRectthe first CGRect
rhsRectthe second CGRect
Returns:
BOOL YES if the two rectangles have any common spaces, and NO, otherwise.

Definition at line 150 of file CGGeometry.j.

function CGRectStandardize ( aRect  )

Definition at line 204 of file CGGeometry.j.

function CGRectUnion ( lhsRect  ,
rhsRect   
)

Definition at line 225 of file CGGeometry.j.

function CGSizeFromString ( aString  )

Definition at line 251 of file CGGeometry.j.

function CPDivideRect ( inRect  ,
slice  ,
rem  ,
amount  ,
edge   
)

Creates two rectangles -- slice and rem -- from inRect, by dividing inRect with a line that's parallel to the side of inRect specified by edge. The size of slice is determined by amount, which specifies the distance from edge.

slice and rem must not be NULL.

CGRect

Definition at line 391 of file CPGeometry.j.

function CPPointCreateCopy ( aPoint  )

Creates a copy of a specified point and returns the copy CGPoint

Parameters:
thepoint to be copied
Returns:
CGPoint the copy of the provided CGPoint

Definition at line 46 of file CPGeometry.j.

function CPPointEqualToPoint ( lhsPoint  ,
rhsPoint   
)

Tests whether the two CGPoints are equal to each other by comparing their x and y members.

Parameters:
lhsPointthe first CGPoint to check
rhsPointthe second CGPoint to check
Returns:
BOOL YES if the two points have the same x's, and the same y's.

Definition at line 249 of file CPGeometry.j.

function CPPointFromEvent ( anEvent  )

CGPoint

Parameters:
anEvent
Returns:
CGPoint

Definition at line 485 of file CPGeometry.j.

function CPPointFromString ( aString  )

Returns a CGPoint from a string with a comma separated pair of integers. CGPoint

Parameters:
aStringa string containing two comma separated integers
Returns:
CGPoint the point object created from the string

Definition at line 447 of file CPGeometry.j.

function CPPointMake ( ,
y   
)

Makes a CGPoint object out of two numbers provided as arguments CGPoint

Parameters:
xthe x-coordinate of the CGPoint
ythe y-coordinate of the CGPoint
Returns:
CGPoint a CGPoint with an X and Y coordinate equal to the function arguments

Definition at line 58 of file CPGeometry.j.

function CPPointMakeZero ( )

Returns a point located at (0, 0). CGPoint

Returns:
CGPoint a point located at (0, 0)

Definition at line 515 of file CPGeometry.j.

function CPRectContainsPoint ( aRect  ,
aPoint   
)

Returns YES if the CGRect, aRect, contains the CGPoint, aPoint.

Parameters:
aRectthe rectangle to test with
aPointthe point to test with CGRect
Returns:
BOOL YES if the rectangle contains the point, NO otherwise.

Definition at line 220 of file CPGeometry.j.

function CPRectContainsRect ( possibleOuter  ,
possibleInner   
)

Returns a BOOL indicating whether CGRect possibleOuter contains CGRect possibleInner. CGRect

Parameters:
possibleOuterthe CGRect to test if possibleInner is inside of
possibleInnerthe CGRect to test if it fits inside possibleOuter.
Returns:
BOOL YES if possibleInner fits inside possibleOuter.

Definition at line 236 of file CPGeometry.j.

function CPRectCreateCopy ( aRect  )

Creates a copy of the provided rectangle CGRect

Parameters:
aRectthe CGRect that will be copied
Returns:
CGRect the rectangle copy

Definition at line 114 of file CPGeometry.j.

function CPRectEqualToRect ( lhsRect  ,
rhsRect   
)

Test whether the two CGRects have the same origin and size CGRect

Parameters:
lhsRectthe first CGRect to compare
rhsRectthe second CGRect to compare
Returns:
BOOL YES if the two rectangles have the same origin and size. NO, otherwise.

Definition at line 261 of file CPGeometry.j.

function CPRectFromString ( aString  )

Returns a CGRect created from a string. CGRect

Parameters:
aStringa string in the form generated by CPStringFromRect
Returns:
CGRect the rectangle created from the string

Definition at line 473 of file CPGeometry.j.

function CPRectGetHeight ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
int

Definition at line 272 of file CPGeometry.j.

function CPRectGetMaxX ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
int

Definition at line 282 of file CPGeometry.j.

function CPRectGetMaxY ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
int

Definition at line 292 of file CPGeometry.j.

function CPRectGetMidX ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
float

Definition at line 302 of file CPGeometry.j.

function CPRectGetMidY ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
float

Definition at line 312 of file CPGeometry.j.

function CPRectGetMinX ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
int

Definition at line 322 of file CPGeometry.j.

function CPRectGetMinY ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
int

Definition at line 332 of file CPGeometry.j.

function CPRectGetWidth ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
int

Definition at line 342 of file CPGeometry.j.

function CPRectInset ( aRect  ,
dX  ,
dY   
)

Makes a CGRect with an origin and size equal to aRect less the dX/dY insets specified.

Parameters:
dXthe size of the inset in the x-axis
dYthe size of the inset in the y-axis CGRect
Returns:
CGRect a rectangle like aRect with an inset

Definition at line 70 of file CPGeometry.j.

function CPRectIntegral ( aRect  )

CGRect

Returns:
void
Deprecated:

Definition at line 82 of file CPGeometry.j.

function CPRectIntersection ( lhsRect  ,
rhsRect   
)

Returns the intersection of the two provided rectangles as a new rectangle CGRect

Parameters:
lhsRectthe first rectangle used for calculation
rhsRectthe second rectangle used for calculation
Returns:
CGRect the intersection of the two rectangles

Definition at line 95 of file CPGeometry.j.

function CPRectIntersectsRect ( lhsRect  ,
rhsRect   
)

Returns YES if the two rectangles intersect CGRect

Parameters:
lhsRectthe first CGRect
rhsRectthe second CGRect
Returns:
BOOL YES if the two rectangles have any common spaces, and NO, otherwise.

Definition at line 354 of file CPGeometry.j.

function CPRectIsEmpty ( aRect  )

Returns YES if the CGRect has no area. The test is performed by checking if the width and height are both zero. CGRect

Parameters:
aRectthe CGRect to test
Returns:
BOOL YES if the CGRect has no area, and NO, otherwise.

Definition at line 366 of file CPGeometry.j.

function CPRectIsNull ( aRect  )

Returns YES if the CGRect has no area. The test is performed by checking if the width and height are both zero. CGRect

Returns:
BOOL YES if the CGRect has no area, and NO, otherwise.

Definition at line 377 of file CPGeometry.j.

function CPRectMake ( ,
y  ,
width  ,
height   
)

Returns a CGRect made of the specified arguments CGRect

Parameters:
xthe x-coordinate of the rectangle's origin
ythe y-coordinate of the rectangle's origin
widththe width of the new rectangle
heightthe height of the new rectangle
Returns:
CGRect the new rectangle

Definition at line 128 of file CPGeometry.j.

function CPRectMakeZero ( )

Returns a rectangle at origin (0,0) and size of (0,0). CGRect

Returns:
CGRect a zeroed out CGRect

Definition at line 505 of file CPGeometry.j.

function CPRectOffset ( aRect  ,
dX  ,
dY   
)

Creates a new rectangle with its origin offset by dX and dY. CGRect

Parameters:
aRectthe rectangle to copy the origin and size from
dXthe amount added to the x-size of the new rectangle
dYthe amount added to the y-size of the new rectangle
Returns:
CGRect the new rectangle with modified size

Definition at line 141 of file CPGeometry.j.

function CPRectStandardize ( aRect  )

CGRect

Parameters:
aRecta CGRect
Returns:
CGRect

Definition at line 151 of file CPGeometry.j.

function CPRectUnion ( lhsRect  ,
rhsRect   
)

Returns the smallest rectangle that can contain the two argument CGRects. CGRect

Parameters:
lhsRectthe first CGRect to use for the union calculation
rhsRectthe second CGRect to use for the union calculation
Returns:
CGRect the union rectangle

Definition at line 179 of file CPGeometry.j.

function CPSizeCreateCopy ( aSize  )

Creates and returns a copy of the provided CGSize CGSize

Parameters:
aSizethe CGSize to copy
Returns:
CGSize the copy of the CGSize

Definition at line 195 of file CPGeometry.j.

function CPSizeEqualToSize ( lhsSize  ,
rhsSize   
)

Returns YES if the two CGSizes are identical. CGSize

Parameters:
lhsSizethe first CGSize to compare
rhsSizethe second CGSize to compare
Returns:
BOOL YES if the two sizes are identical. NO, otherwise.

Definition at line 403 of file CPGeometry.j.

function CPSizeFromString ( aString  )

Returns a CGSize from a string containing a pair of comma separated integers. CGSize

Parameters:
aStringa string containing two comma separated integers
Returns:
CGSize the size object created from the string

Definition at line 460 of file CPGeometry.j.

function CPSizeMake ( width  ,
height   
)

Creates and returns a new CGSize object from the provided dimensions. CGSize

Parameters:
widththe width for the new CGSize
heightthe height for the new CGSize
Returns:
CGSize the new CGSize

Definition at line 207 of file CPGeometry.j.

function CPSizeMakeZero ( )

Returns a zero sized CGSize. CGSize

Returns:
CGSize a size object with zeros for width and height

Definition at line 495 of file CPGeometry.j.

function CPStringFromCGInset ( anInset  )

Definition at line 279 of file CGGeometry.j.

function CPStringFromPoint ( aPoint  )

Returns a human readable string of the provided CGPoint. CGPoint

Parameters:
aPointthe point to represent
Returns:
CGPoint a string representation of the CGPoint

Definition at line 414 of file CPGeometry.j.

function CPStringFromRect ( aRect  )

Returns a human readable string of the provided CGRect. CGRect

Parameters:
aRectthe rectangle to represent
Returns:
CGString the string representation of the rectangle

Definition at line 436 of file CPGeometry.j.

function CPStringFromSize ( aSize  )

Returns a human readable string of the provided CGSize. CGSize

Parameters:
aSizethe size to represent
Returns:
CGSize a string representation of the CGSize

Definition at line 425 of file CPGeometry.j.


Variable Documentation

CGInsetFromCPString = CGInsetFromString

Definition at line 277 of file CGGeometry.j.

from this mailing list thread: http://groups.google.com/group/objectivej/browse_thread/thread/7c41cbd9cbee9ea3

-----------------------------------

Creating a checkbox is easy enough:

checkbox = [[CPCheckBox alloc] initWithFrame:aFrame];

That's basically all there is to it. Radio buttons are very similar, the key difference is the introduction of a new class CPRadioGroup, which defines which radio buttons are part of the same group:

[myRadioButton setRadioGroup:aRadioGroup];

Every radio button receives a unique radio group by default (so if you do nothing further, they will all behave independently), but you can use an existing radio button's group with other buttons as so:

button1 = [[CPRadio alloc] initWithFrame:aFrame]; ... button2 = [[CPRadio alloc] initWithFrame:aFrame radioGroup:[button1 radioGroup]]; ... button3 = [[CPRadio alloc] initWithFrame:aFrame radioGroup:[button1 radioGroup]]; ...etc...

Here, all the radio buttons will act "together". [[button1 radioGroup] allRadios] returns every button that's part of this group, and [[button1 radioGroup] selectedRadio] returns the currently selected option.

Definition at line 64 of file CPRadio.j.

 All Classes Files Functions Variables Defines