Variables | |
CPDocModalWindowMask = 1 << 6 | |
global CPApp | CPRadioImageOffset = 4.0 |
var | CPScrollViewDelegate_scrollViewDidScroll_ = 1 << 1 |
var | CPScrollViewDelegate_scrollViewWillScroll_ = 1 << 0 |
var | CPScrollViewFadeOutTime = 1.3 |
var | HORIZONTAL_MARGIN = 2 |
var | NAMES_FOR_PARTS = {} |
var | PARTS_ARRANGEMENT = [CPScrollerKnobSlot, CPScrollerDecrementLine, CPScrollerIncrementLine, CPScrollerKnob] |
var | PARTS_FOR_NAMES = {} |
var | TIMER_INTERVAL = 0.2 |
CPDocModalWindowMask = 1 << 6 |
The CPPanel class defines objects that manage the panels of the Cappuccino user interface. A panel is a window that serves an auxiliary function within an application. It generally displays controls that the user can act on to give instructions to the application or to modify the contents of a standard window.</p>
Panels behave differently from standard windows in only a small number of ways, but the ways are important to the user interface:
To aid in their auxiliary role, panels can be assigned special behaviors:
global CPApp CPRadioImageOffset = 4.0 |
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.
var CPScrollViewDelegate_scrollViewDidScroll_ = 1 << 1 |
Definition at line 94 of file CPScrollView.j.
var CPScrollViewDelegate_scrollViewWillScroll_ = 1 << 0 |
Definition at line 93 of file CPScrollView.j.
var CPScrollViewFadeOutTime = 1.3 |
Definition at line 96 of file CPScrollView.j.
var HORIZONTAL_MARGIN = 2 |
This class displays an array as a grid of objects, where each object is represented by a view. The view is controlled by creating a CPCollectionViewItem and specifying its view, then setting that item as the collection view prototype.
- (void)collectionView:(CPCollectionView)collectionView didDoubleClickOnItemAtIndex:(int)index; Called when the user double-clicks on an item in the collection view.
collectionView | the collection view that received the double-click |
index | the index of the item that received the double-click |
- (CPData)collectionView:(CPCollectionView)collectionView dataForItemsAtIndexes:(CPIndexSet)indices forType:(CPString)aType; Invoked to obtain data for a set of indices.
collectionView | the collection view to obtain data for |
indices | the indices to return data for |
aType | the data type |
- (CPArray)collectionView:(CPCollectionView)collectionView dragTypesForItemsAtIndexes:(CPIndexSet)indices; Invoked to obtain the data types supported by the specified indices for placement on the pasteboard.
collectionView | the collection view the items reside in |
indices | the indices to obtain drag types |
Definition at line 80 of file CPCollectionView.j.
NAMES_FOR_PARTS[CPScrollerKnob] = {} |
Definition at line 54 of file CPScroller.j.
var PARTS_ARRANGEMENT = [CPScrollerKnobSlot, CPScrollerDecrementLine, CPScrollerIncrementLine, CPScrollerKnob] |
Definition at line 53 of file CPScroller.j.
var PARTS_FOR_NAMES = {} |
Definition at line 55 of file CPScroller.j.
var TIMER_INTERVAL = 0.2 |
Used to display views that are too large for the viewing area. the CPScrollView places scroll bars on the side of the view to allow the user to scroll and see the entire contents of the view.
Definition at line 92 of file CPScrollView.j.