Public Member Functions | |
(void) | - addItem: [implementation] |
(void) | - addItemsWithTitles: [implementation] |
(void) | - addItemWithTitle: [implementation] |
(void) | - encodeWithCoder: [implementation] |
(int) | - indexOfItem: [implementation] |
(int) | - indexOfItemWithRepresentedObject: [implementation] |
(int) | - indexOfItemWithTag: [implementation] |
(int) | - indexOfItemWithTarget:action: [implementation] |
(int) | - indexOfItemWithTitle: [implementation] |
(int) | - indexOfSelectedItem [implementation] |
(id) | - initWithCoder: [implementation] |
(id) | - initWithFrame: [implementation] |
(id) | - initWithFrame:pullsDown: [implementation] |
(void) | - insertItemWithTitle:atIndex: [implementation] |
(CPArray) | - itemArray [implementation] |
(CPMenuItem) | - itemAtIndex: [implementation] |
(CPString) | - itemTitleAtIndex: [implementation] |
(CPArray) | - itemTitles [implementation] |
(CPMenuItem) | - itemWithTitle: [implementation] |
(CPMenuItem) | - lastItem [implementation] |
(CPMenu) | - menu [implementation] |
(void) | - menuDidAddItem: [implementation] |
(void) | - menuDidChangeItem: [implementation] |
(void) | - menuDidRemoveItem: [implementation] |
(void) | - mouseDown: [implementation] |
(int) | - numberOfItems [implementation] |
(id) | - objectValue [implementation] |
(CPRectEdge) | - preferredEdge [implementation] |
(BOOL) | - pullsDown [implementation] |
(void) | - removeAllItems [implementation] |
(void) | - removeItemAtIndex: [implementation] |
(void) | - removeItemWithTitle: [implementation] |
(CPMenuItem) | - selectedItem [implementation] |
(void) | - selectItem: [implementation] |
(void) | - selectItemAtIndex: [implementation] |
(void) | - selectItemWithTag: [implementation] |
(void) | - selectItemWithTitle: [implementation] |
(void) | - setImage: [implementation] |
(void) | - setMenu: [implementation] |
(void) | - setObjectValue: [implementation] |
(void) | - setPreferredEdge: [implementation] |
(void) | - setPullsDown: [implementation] |
(void) | - setTitle: [implementation] |
(void) | - synchronizeTitleAndSelectedItem [implementation] |
(CPString) | - titleOfSelectedItem [implementation] |
Static Public Member Functions | |
(CPString) | + themeClass [implementation] |
A CPPopUpButton contains a pop-up menu of items that a user can select from.
Definition at line 41 of file CPPopUpButton.j.
- (void) addItem: | (CPMenuItem) | anItem | [implementation] |
Adds a new menu item using a CPMenuItem object.
Definition at line 126 of file CPPopUpButton.j.
- (void) addItemsWithTitles: | (CPArray) | titles | [implementation] |
Adds multiple new menu items with the titles specified in the provided array.
titles | an arry of names for the new items |
Definition at line 144 of file CPPopUpButton.j.
- (void) addItemWithTitle: | (CPString) | aTitle | [implementation] |
Adds a new menu item with the specified title.
the | new menu item's tite |
Definition at line 135 of file CPPopUpButton.j.
- (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
Encodes the data of the pop-up button into a coder
aCoder | the coder to which the data will be written |
Definition at line 741 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.
aMenuItem | the item to obtain the index for |
Definition at line 429 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.
anObject | the item's represented object |
Definition at line 458 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.
aTag | the item's tag |
Definition at line 438 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.
aTarget | the item's target | |
anAction | the item's action |
Definition at line 470 of file CPPopUpButton.j.
- (int) indexOfItemWithTitle: | (CPString) | aTitle | [implementation] |
Returns the index of the item with the specified title or CPNotFound.
aTitle | the item's titel |
Definition at line 447 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 224 of file CPPopUpButton.j.
- (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
Initializes the pop-up button with data from the specified coder.
aCoder | the coder from which to read the data |
Definition at line 720 of file CPPopUpButton.j.
- (id) initWithFrame: | (CGRect) | aFrame | [implementation] |
Definition at line 81 of file CPPopUpButton.j.
- (id) initWithFrame: | (CGRect) | aFrame | ||
pullsDown: | (BOOL) | shouldPullDown | ||
[implementation] |
Initializes the pop-up button to the specified size.
aFrame | the size for the button | |
shouldPullDown | YES makes this a pull-down menu, NO makes it a pop-up menu. |
Definition at line 60 of file CPPopUpButton.j.
- (void) insertItemWithTitle: | (CPString) | aTitle | ||
atIndex: | (int) | anIndex | ||
[implementation] |
Inserts a new item with the specified title and index location.
aTitle | the new itme's title | |
anIndex | the item's index in the menu |
Definition at line 158 of file CPPopUpButton.j.
- (CPArray) itemArray | [implementation] |
Returns an array of the items in the menu
Definition at line 369 of file CPPopUpButton.j.
- (CPMenuItem) itemAtIndex: | (unsigned) | anIndex | [implementation] |
Returns the item at the specified index or nil
if the item does not exist.
anIndex | the index of the item to obtain |
Definition at line 378 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.
anIndex | the index of the item |
Definition at line 387 of file CPPopUpButton.j.
- (CPArray) itemTitles | [implementation] |
Returns an array of all the menu item titles.
Definition at line 395 of file CPPopUpButton.j.
- (CPMenuItem) itemWithTitle: | (CPString) | aTitle | [implementation] |
Returns the menu item with the specified title.
aTitle | the title of the desired menu item |
Definition at line 411 of file CPPopUpButton.j.
- (CPMenuItem) lastItem | [implementation] |
Returns the last menu item
Definition at line 419 of file CPPopUpButton.j.
- (CPMenu) menu | [implementation] |
Returns the button's menu of items.
Definition at line 299 of file CPPopUpButton.j.
- (void) menuDidAddItem: | (CPNotification) | aNotification | [implementation] |
Called when the menu has a new item added to it.
aNotification | information about the event |
Definition at line 573 of file CPPopUpButton.j.
- (void) menuDidChangeItem: | (CPNotification) | aNotification | [implementation] |
Called when a menu item has changed.
aNotification | information about the event |
Definition at line 610 of file CPPopUpButton.j.
- (void) menuDidRemoveItem: | (CPNotification) | aNotification | [implementation] |
Called when an item was removed from the menu.
aNotification | information about the event |
Definition at line 627 of file CPPopUpButton.j.
- (void) mouseDown: | (CPEvent) | anEvent | [implementation] |
Definition at line 637 of file CPPopUpButton.j.
- (int) numberOfItems | [implementation] |
Returns a count of the number of items in the button's menu.
Definition at line 361 of file CPPopUpButton.j.
- (id) objectValue | [implementation] |
Returns the selected item's index. If no item is selected, it returns CPNotFound.
Definition at line 233 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 481 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 116 of file CPPopUpButton.j.
- (void) removeAllItems | [implementation] |
Removes all menu items from the pop-up button's menu
Definition at line 173 of file CPPopUpButton.j.
- (void) removeItemAtIndex: | (int) | anIndex | [implementation] |
Removes the menu item at the specified index
anIndex | the index of the item to remove |
Definition at line 195 of file CPPopUpButton.j.
- (void) removeItemWithTitle: | (CPString) | aTitle | [implementation] |
Removes a menu item with the specified title from the button.
aTitle | the title of the item to remove |
Definition at line 185 of file CPPopUpButton.j.
- (CPMenuItem) selectedItem | [implementation] |
Returns the selected item or nil
if no item is selected.
Definition at line 205 of file CPPopUpButton.j.
- (void) selectItem: | (CPMenuItem) | aMenuItem | [implementation] |
Selects the specified menu item.
aMenuItem | the item to select |
Definition at line 243 of file CPPopUpButton.j.
- (void) selectItemAtIndex: | (int) | anIndex | [implementation] |
Selects the item at the specified index
anIndex | the index of the item to select |
Definition at line 252 of file CPPopUpButton.j.
- (void) selectItemWithTag: | (int) | aTag | [implementation] |
Selects the menu item with the specified tag
the | tag of the item to select |
Definition at line 272 of file CPPopUpButton.j.
- (void) selectItemWithTitle: | (CPString) | aTitle | [implementation] |
Selects the item with the specified title
the | title of the item to select |
Definition at line 281 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 540 of file CPPopUpButton.j.
- (void) setMenu: | (CPMenu) | aMenu | [implementation] |
Sets the menu for the button
Definition at line 307 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.
the | object set for the selected item |
Definition at line 290 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 491 of file CPPopUpButton.j.
- (void) setPullsDown: | (BOOL) | shouldPullDown | [implementation] |
Specifies whether the object is a pull-down or a pop-up menu.
shouldPullDown | YES makes the pop-up button a pull-down menu. NO makes it a pop-up menu. |
Definition at line 93 of file CPPopUpButton.j.
- (void) setTitle: | (CPString) | aTitle | [implementation] |
Sets the pop-up button's title.
aTitle | the new title |
Definition at line 501 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 550 of file CPPopUpButton.j.
+ (CPString) themeClass | [implementation] |
Definition at line 49 of file CPPopUpButton.j.
- (CPString) titleOfSelectedItem | [implementation] |
Returns the title of the selected item or nil
if no item is selected.
Definition at line 216 of file CPPopUpButton.j.