CPObjectCPResponder
CPView
CPTabView
@implementation CPTabView : CPView
This class represents a view that has multiple subviews (CPTabViewItem
) presented as individual tabs.
Only one CPTabViewItem
is shown at a time, and other CPTabViewItem
s can be made visible
(one at a time) by clicking on the CPTabViewItem
's tab at the top of the tab view.
THe currently selected CPTabViewItem
is the view that is displayed.
Method Summary | |
---|---|
-(id) | initWithFrame:(CGRect)aFrame Initializes the receiver for usage with the specified bounding rectangle. |
-(void) | addTabViewItem:(CPTabViewItem)aTabViewItem Adds a CPTabViewItem to the tab view. |
-(CGRect) | contentRect Returns the content rectangle. |
-(int) | indexOfTabViewItem:(CPTabViewItem)aTabViewItem Returns the index of the specified item. |
-(int) | indexOfTabViewItemWithIdentifier:(CPString)anIdentifier Returns the index of the CPTabViewItem with the specified identifier. |
-(void) | insertTabViewItem:(CPTabViewItem)aTabViewItem atIndex:(unsigned)anIndex Inserts a CPTabViewItem into the tab view
at the specified index. |
-(void) | mouseDown:(CPEvent)anEvent Notifies the receiver that the user has clicked the mouse down in its area. |
-(unsigned) | numberOfTabViewItems Returns the number of items in the tab view. |
-(void) | removeTabViewItem:(CPTabViewItem)aTabViewItem Removes the specified tab view item from the tab view. |
-(void) | selectFirstTabViewItem:(id)aSender Sets the first tab view item in the array to be displayed to the user. |
-(void) | selectLastTabViewItem:(id)aSender Sets the last tab view item in the array to be displayed to the user. |
-(void) | selectNextTabViewItem:(id)aSender Sets the next tab item in the array to be displayed. |
-(void) | selectPreviousTabViewItem:(id)aSender Selects the previous item in the array for display. |
-(void) | selectTabViewItem:(CPTabViewItem)aTabViewItem Displays the specified item in the tab view. |
-(void) | selectTabViewItemAtIndex:(unsigned)anIndex Selects the item at the specified index. |
-(CPTabViewItem) | selectedTabViewItem Returns the current item being displayed. |
-(void) | setDelegate:(id)aDelegate Sets the delegate for this tab view. |
-(void) | setTabViewType:(CPTabViewType)aTabViewType Sets the tab view type. |
-(CPTabViewItem) | tabViewItemAtIndex:(unsigned)anIndex Returns the CPTabViewItem at the specified index. |
-(CPArray) | tabViewItems Returns the array of items that backs this tab view. |
-(CPTabViewType) | tabViewType Returns the tab view type. |
-(void) | viewDidMoveToWindow Called when the receiver has been moved to a new CPWindow . |
Method Detail |
---|
-(id)initWithFrame:(CGRect)aFrame
aFrame
-(void)addTabViewItem:(CPTabViewItem)aTabViewItem
CPTabViewItem
to the tab view.aTabViewItem
- the item to add-(CGRect)contentRect
-(int)indexOfTabViewItem:(CPTabViewItem)aTabViewItem
aTabViewItem
- the item to find the index for-(int)indexOfTabViewItemWithIdentifier:(CPString)anIdentifier
CPTabViewItem
with the specified identifier.anIdentifier
- the identifier of the item-(void)insertTabViewItem:(CPTabViewItem)aTabViewItem atIndex:(unsigned)anIndex
CPTabViewItem
into the tab view
at the specified index.aTabViewItem
- the item to insertanIndex
- the index for the item-(void)mouseDown:(CPEvent)anEvent
anEvent
- contains information about the click-(unsigned)numberOfTabViewItems
-(void)removeTabViewItem:(CPTabViewItem)aTabViewItem
aTabViewItem
- the item to remove-(void)selectFirstTabViewItem:(id)aSender
aSender
- the object making this request-(void)selectLastTabViewItem:(id)aSender
aSender
- the object making this request-(void)selectNextTabViewItem:(id)aSender
aSender
- the object making this request-(void)selectPreviousTabViewItem:(id)aSender
aSender
- the object making this request-(void)selectTabViewItem:(CPTabViewItem)aTabViewItem
aTabViewItem
- the item to display-(void)selectTabViewItemAtIndex:(unsigned)anIndex
anIndex
- the index of the item to display.-(CPTabViewItem)selectedTabViewItem
-(void)setDelegate:(id)aDelegate
aDelegate
- the tab view's delegate-(void)setTabViewType:(CPTabViewType)aTabViewType
aTabViewType
- the view type-(CPTabViewItem)tabViewItemAtIndex:(unsigned)anIndex
CPTabViewItem
at the specified index.anIndex
-(CPArray)tabViewItems
-(CPTabViewType)tabViewType
-(void)viewDidMoveToWindow
CPWindow
.Created on Sat Sep 13 14:15:43 PDT 2008