CPPopUpButton Class Reference

List of all members.

Public Member Functions

(id) - initWithFrame:pullsDown: [implementation]
(id) - initWithFrame: [implementation]
(void) - setBordered: [implementation]
(void) - setPullsDown: [implementation]
(BOOL) - pullsDown [implementation]
(void) - addItemWithTitle: [implementation]
(void) - addItemsWithTitles: [implementation]
(void) - insertItemWithTitle:atIndex: [implementation]
(void) - removeAllItems [implementation]
(void) - removeItemWithTitle: [implementation]
(void) - removeItemAtIndex: [implementation]
(CPMenuItem- selectedItem [implementation]
(CPString- titleOfSelectedItem [implementation]
(int) - indexOfSelectedItem [implementation]
(id) - objectValue [implementation]
(void) - selectItem: [implementation]
(void) - selectItemAtIndex: [implementation]
(void) - selectItemWithTag: [implementation]
(void) - selectItemWithTitle: [implementation]
(void) - setObjectValue: [implementation]
(CPMenu- menu [implementation]
(void) - setMenu: [implementation]
(int) - numberOfItems [implementation]
(CPArray- itemArray [implementation]
(CPMenuItem- itemAtIndex: [implementation]
(CPString- itemTitleAtIndex: [implementation]
(CPArray- itemTitles [implementation]
(CPMenuItem- itemWithTitle: [implementation]
(CPMenuItem- lastItem [implementation]
(int) - indexOfItem: [implementation]
(int) - indexOfItemWithTag: [implementation]
(int) - indexOfItemWithTitle: [implementation]
(int) - indexOfItemWithRepresentedObject: [implementation]
(int) - indexOfItemWithTarget:action: [implementation]
(CPRectEdge) - preferredEdge [implementation]
(void) - setPreferredEdge: [implementation]
(void) - setTitle: [implementation]
(void) - setImage: [implementation]
(void) - synchronizeTitleAndSelectedItem [implementation]
(void) - menuDidAddItem: [implementation]
(void) - menuDidChangeItem: [implementation]
(void) - menuDidRemoveItem: [implementation]
(void) - mouseDown: [implementation]
(void) - menuWindowDidFinishTracking:highlightedItem: [implementation]
(id) - initWithCoder: [implementation]
(void) - encodeWithCoder: [implementation]


Detailed Description

A CPPopUpButton contains a pop-up menu of items that a user can select from.

Definition at line 37 of file CPPopUpButton.j.


Member Function Documentation

- (void) addItemsWithTitles: (CPArray titles   [implementation]

Adds multiple new menu items with the titles specified in the provided array.

Parameters:
titles an arry of names for the new items

Definition at line 153 of file CPPopUpButton.j.

- (void) addItemWithTitle: (CPString aTitle   [implementation]

Adds a new menu item with the specified title.

Parameters:
the new menu item's tite

Definition at line 144 of file CPPopUpButton.j.

- (void) encodeWithCoder: (CPCoder aCoder   [implementation]

Encodes the data of the pop-up button into a coder

Parameters:
aCoder the coder to which the data will be written

Definition at line 733 of file CPPopUpButton.j.

- (int) indexOfItem: (CPMenuItem aMenuItem   [implementation]

Returns the index of the specified item or CPNotFound if the item is not in the list.

Parameters:
aMenuItem the item to obtain the index for

Definition at line 438 of file CPPopUpButton.j.

- (int) indexOfItemWithRepresentedObject: (id)  anObject   [implementation]

Returns the index of the item with the specified represented object or CPNotFound if a match does not exist.

Parameters:
anObject the item's represented object

Definition at line 467 of file CPPopUpButton.j.

- (int) indexOfItemWithTag: (int)  aTag   [implementation]

Returns the index of the item with the specified tag or CPNotFound if the item is not in the list.

Parameters:
aTag the item's tag

Definition at line 447 of file CPPopUpButton.j.

- (int) indexOfItemWithTarget: (id)  aTarget
action: (SEL)  anAction 
[implementation]

Returns the index of the item with the specified target and action. Returns CPNotFound if the no such item is in the list.

Parameters:
aTarget the item's target
anAction the item's action

Definition at line 479 of file CPPopUpButton.j.

- (int) indexOfItemWithTitle: (CPString aTitle   [implementation]

Returns the index of the item with the specified title or CPNotFound.

Parameters:
aTitle the item's titel

Definition at line 456 of file CPPopUpButton.j.

- (int) indexOfSelectedItem   [implementation]

Returns the index of the selected item. If no item is selected, it returns CPNotFound.

Definition at line 233 of file CPPopUpButton.j.

- (id) initWithCoder: (CPCoder aCoder   [implementation]

Initializes the pop-up button with data from the specified coder.

Parameters:
aCoder the coder from which to read the data
Returns:
the initialized pop-up button

Definition at line 714 of file CPPopUpButton.j.

- (id) initWithFrame: (CGRect)  aFrame   [implementation]

Definition at line 75 of file CPPopUpButton.j.

- (id) initWithFrame: (CGRect)  aFrame
pullsDown: (BOOL)  shouldPullDown 
[implementation]

Initializes the pop-up button to the specified size.

Parameters:
aFrame the size for the button
shouldPullDown YES makes this a pull-down menu, NO makes it a pop-up menu.
Returns:
the initialized pop-up button

Definition at line 54 of file CPPopUpButton.j.

- (void) insertItemWithTitle: (CPString aTitle
atIndex: (int)  anIndex 
[implementation]

Inserts a new item with the specified title and index location.

Parameters:
aTitle the new itme's title
anIndex the item's index in the menu

Definition at line 167 of file CPPopUpButton.j.

- (CPArray) itemArray   [implementation]

Returns an array of the items in the menu

Definition at line 378 of file CPPopUpButton.j.

- (CPMenuItem) itemAtIndex: (unsigned)  anIndex   [implementation]

Returns the item at the specified index or nil if the item does not exist.

Parameters:
anIndex the index of the item to obtain

Definition at line 387 of file CPPopUpButton.j.

- (CPString) itemTitleAtIndex: (unsigned)  anIndex   [implementation]

Returns the title of the item at the specified index or nil if no item exists.

Parameters:
anIndex the index of the item

Definition at line 396 of file CPPopUpButton.j.

- (CPArray) itemTitles   [implementation]

Returns an array of all the menu item titles.

Definition at line 404 of file CPPopUpButton.j.

- (CPMenuItem) itemWithTitle: (CPString aTitle   [implementation]

Returns the menu item with the specified title.

Parameters:
aTitle the title of the desired menu item

Definition at line 420 of file CPPopUpButton.j.

- (CPMenuItem) lastItem   [implementation]

Returns the last menu item

Definition at line 428 of file CPPopUpButton.j.

- (CPMenu) menu   [implementation]

Returns the button's menu of items.

Definition at line 308 of file CPPopUpButton.j.

- (void) menuDidAddItem: (CPNotification aNotification   [implementation]

Called when the menu has a new item added to it.

Parameters:
aNotification information about the event

Definition at line 574 of file CPPopUpButton.j.

- (void) menuDidChangeItem: (CPNotification aNotification   [implementation]

Called when a menu item has changed.

Parameters:
aNotification information about the event

Definition at line 602 of file CPPopUpButton.j.

- (void) menuDidRemoveItem: (CPNotification aNotification   [implementation]

Called when an item was removed from the menu.

Parameters:
aNotification information about the event

Definition at line 619 of file CPPopUpButton.j.

- (void) menuWindowDidFinishTracking: (_CPMenuWindow)  aMenuWindow
highlightedItem: (CPMenuItem aMenuItem 
[implementation]

Definition at line 670 of file CPPopUpButton.j.

- (void) mouseDown: (CPEvent anEvent   [implementation]

Definition at line 627 of file CPPopUpButton.j.

- (int) numberOfItems   [implementation]

Returns a count of the number of items in the button's menu.

Definition at line 370 of file CPPopUpButton.j.

- (id) objectValue   [implementation]

Returns the selected item's index. If no item is selected, it returns CPNotFound.

Definition at line 242 of file CPPopUpButton.j.

- (CPRectEdge) preferredEdge   [implementation]

Returns the button's edge where the pop-up menu will be displayed when there is not enough room to display directly above the button.

Definition at line 490 of file CPPopUpButton.j.

- (BOOL) pullsDown   [implementation]

Returns YES if the button is a pull-down menu. NO if the button is a pop-up menu.

Definition at line 134 of file CPPopUpButton.j.

- (void) removeAllItems   [implementation]

Removes all menu items from the pop-up button's menu

Definition at line 182 of file CPPopUpButton.j.

- (void) removeItemAtIndex: (int)  anIndex   [implementation]

Removes the menu item at the specified index

Parameters:
anIndex the index of the item to remove

Definition at line 204 of file CPPopUpButton.j.

- (void) removeItemWithTitle: (CPString aTitle   [implementation]

Removes a menu item with the specified title from the button.

Parameters:
aTitle the title of the item to remove

Definition at line 194 of file CPPopUpButton.j.

- (CPMenuItem) selectedItem   [implementation]

Returns the selected item or nil if no item is selected.

Definition at line 214 of file CPPopUpButton.j.

- (void) selectItem: (CPMenuItem aMenuItem   [implementation]

Selects the specified menu item.

Parameters:
aMenuItem the item to select

Definition at line 252 of file CPPopUpButton.j.

- (void) selectItemAtIndex: (int)  anIndex   [implementation]

Selects the item at the specified index

Parameters:
anIndex the index of the item to select

Definition at line 261 of file CPPopUpButton.j.

- (void) selectItemWithTag: (int)  aTag   [implementation]

Selects the menu item with the specified tag

Parameters:
the tag of the item to select

Definition at line 281 of file CPPopUpButton.j.

- (void) selectItemWithTitle: (CPString aTitle   [implementation]

Selects the item with the specified title

Parameters:
the title of the item to select

Definition at line 290 of file CPPopUpButton.j.

- (void) setBordered: (BOOL)  shouldBeBordered   [implementation]

Definition at line 80 of file CPPopUpButton.j.

- (void) setImage: (CPImage anImage   [implementation]

This method has no effect. Because the image is taken from the currently selected item, this method serves no purpose.

Definition at line 541 of file CPPopUpButton.j.

- (void) setMenu: (CPMenu aMenu   [implementation]

Sets the menu for the button

Definition at line 316 of file CPPopUpButton.j.

- (void) setObjectValue: (id)  aValue   [implementation]

Sets the object for the selected item. If no item is selected, then this method has no effect.

Parameters:
the object set for the selected item

Definition at line 299 of file CPPopUpButton.j.

- (void) setPreferredEdge: (CPRectEdge)  aRectEdge   [implementation]

Sets the preffered edge of the button to display the pop-up when there is a limited amount of screen space. By default, the pop-up should draw on top of the button.

Definition at line 500 of file CPPopUpButton.j.

- (void) setPullsDown: (BOOL)  shouldPullDown   [implementation]

Specifies whether the object is a pull-down or a pop-up menu.

Parameters:
shouldPullDown YES makes the pop-up button a pull-down menu. NO makes it a pop-up menu.

Definition at line 114 of file CPPopUpButton.j.

- (void) setTitle: (CPString aTitle   [implementation]

Sets the pop-up button's title.

Parameters:
aTitle the new title

Definition at line 510 of file CPPopUpButton.j.

- (void) synchronizeTitleAndSelectedItem   [implementation]

Makes sure the selected item and the item being displayed are one and the same.

Definition at line 551 of file CPPopUpButton.j.

- (CPString) titleOfSelectedItem   [implementation]

Returns the title of the selected item or nil if no item is selected.

Definition at line 225 of file CPPopUpButton.j.


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

Generated on Thu Dec 11 01:55:50 2008 for Cappuccino by  doxygen 1.5.7.1