![]() |
API 0.9.5
|
#import <CPPopUpButton.h>
Inheritance diagram for CPPopUpButton:A CPPopUpButton contains a pop-up menu of items that a user can select from.
Definition at line 2 of file CPPopUpButton.h.
| - (void) addItem: | (CPMenuItem) | anItem |
Adds a new menu item using a CPMenuItem object.
Definition at line 142 of file CPPopUpButton.j.
| - (void) addItemsWithTitles: | (CPArray) | titles |
Adds multiple new menu items with the titles specified in the provided array.
| titles | an array of names for the new items |
Definition at line 160 of file CPPopUpButton.j.
| - (void) addItemWithTitle: | (CPString) | aTitle |
Adds a new menu item with the specified title.
| the | new menu item's title |
Definition at line 151 of file CPPopUpButton.j.
| + (CPString) defaultThemeClass |
Reimplemented from CPButton.
Definition at line 41 of file CPPopUpButton.j.
| - (int) indexOfItem: | (CPMenuItem) | aMenuItem |
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 417 of file CPPopUpButton.j.
| - (int) indexOfItemWithRepresentedObject: | (id) | anObject |
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 446 of file CPPopUpButton.j.
| - (int) indexOfItemWithTag: | (int) | aTag |
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 426 of file CPPopUpButton.j.
| - (int) indexOfItemWithTarget: | (id) | aTarget | |
| action: | (SEL) | anAction | |
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 458 of file CPPopUpButton.j.
| - (int) indexOfItemWithTitle: | (CPString) | aTitle |
Returns the index of the item with the specified title or CPNotFound.
| aTitle | the item's title |
Definition at line 435 of file CPPopUpButton.j.
| - (int) indexOfSelectedItem |
Returns the index of the selected item. If no item is selected, it returns CPNotFound.
Definition at line 240 of file CPPopUpButton.j.
| - (id) initWithCoder: | (CPCoder) | aCoder |
Initializes the pop-up button with data from the specified coder.
| aCoder | the coder from which to read the data |
Reimplemented from CPButton.
Definition at line 788 of file CPPopUpButton.j.
| - (id) initWithFrame: | (CGRect) | aFrame |
Initializes and returns a newly allocated CPButton object with a specified frame rectangle.
| aFrame | The frame rectangle for the created button object. |
Reimplemented from CPButton.
Definition at line 94 of file CPPopUpButton.j.
| - (id) initWithFrame: | (CGRect) | aFrame | |
| pullsDown: | (BOOL) | shouldPullDown | |
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 67 of file CPPopUpButton.j.
| - (void) insertItemWithTitle: | (CPString) | aTitle | |
| atIndex: | (int) | anIndex | |
Inserts a new item with the specified title and index location.
| aTitle | the new item's title |
| anIndex | the item's index in the menu |
Definition at line 174 of file CPPopUpButton.j.
| - (CPArray) itemArray |
Returns an array of the items in the menu
Definition at line 350 of file CPPopUpButton.j.
| - (CPMenuItem) itemAtIndex: | (unsigned) | anIndex |
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 359 of file CPPopUpButton.j.
| - (CPString) itemTitleAtIndex: | (unsigned) | anIndex |
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 368 of file CPPopUpButton.j.
| - (CPArray) itemTitles |
Returns an array of all the menu item titles.
Definition at line 376 of file CPPopUpButton.j.
| - (CPMenuItem) itemWithTitle: | (CPString) | aTitle |
Returns the menu item with the specified title.
| aTitle | the title of the desired menu item |
Definition at line 393 of file CPPopUpButton.j.
| + (CPSet) keyPathsForValuesAffectingSelectedIndex |
Definition at line 46 of file CPPopUpButton.j.
| + (CPSet) keyPathsForValuesAffectingSelectedItem |
Definition at line 56 of file CPPopUpButton.j.
| + (CPSet) keyPathsForValuesAffectingSelectedTag |
Definition at line 51 of file CPPopUpButton.j.
| - (CPMenuItem) lastItem |
Returns the last menu item
Definition at line 407 of file CPPopUpButton.j.
| - (void) mouseDown: | (CPEvent) | anEvent |
Notifies the receiver that the user has clicked the mouse down in its area.
| anEvent | contains information about the click |
Reimplemented from CPButton.
Definition at line 669 of file CPPopUpButton.j.
| - (int) numberOfItems |
Returns a count of the number of items in the button's menu.
Definition at line 342 of file CPPopUpButton.j.
| - (id) objectValue |
Returns the receiver's object value.
Reimplemented from CPControl.
Definition at line 314 of file CPPopUpButton.j.
| - (void) observeValueForKeyPath: | (CPString) | aKeyPath | |
| ofObject: | (id) | anObject | |
| change: | (CPDictionary) | changes | |
| context: | (id) | aContext | |
Definition at line 556 of file CPPopUpButton.j.
| - (CPRectEdge) preferredEdge |
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 469 of file CPPopUpButton.j.
| - (BOOL) pullsDown |
Returns YES if the button is a pull-down menu. NO if the button is a pop-up menu.
Definition at line 132 of file CPPopUpButton.j.
| - (void) removeAllItems |
Removes all menu items from the pop-up button's menu
Definition at line 189 of file CPPopUpButton.j.
| - (void) removeItemAtIndex: | (int) | anIndex |
Removes the menu item at the specified index
| anIndex | the index of the item to remove |
Definition at line 209 of file CPPopUpButton.j.
| - (void) removeItemWithTitle: | (CPString) | aTitle |
Removes a menu item with the specified title from the button.
| aTitle | the title of the item to remove |
Definition at line 199 of file CPPopUpButton.j.
| - (void) rightMouseDown: | (CPEvent) | anEvent |
Notifies the receiver that the user has clicked the right mouse down in its area.
| anEvent | contains information about the right click |
Reimplemented from CPView.
Definition at line 736 of file CPPopUpButton.j.
| - (CPUInteger) selectedIndex |
Definition at line 285 of file CPPopUpButton.j.
| - (CPMenuItem) selectedItem |
Returns the selected item or nil if no item is selected.
Definition at line 219 of file CPPopUpButton.j.
| - (int) selectedTag |
Definition at line 248 of file CPPopUpButton.j.
| - (void) selectItem: | (CPMenuItem) | aMenuItem |
Selects the specified menu item.
| aMenuItem | the item to select |
Definition at line 266 of file CPPopUpButton.j.
| - (void) selectItemAtIndex: | (CPUInteger) | anIndex |
Selects the item at the specified index
| anIndex | the index of the item to select |
Definition at line 275 of file CPPopUpButton.j.
| - (void) selectItemWithTag: | (int) | aTag |
Selects the menu item with the specified tag
| the | tag of the item to select |
Definition at line 323 of file CPPopUpButton.j.
| - (void) selectItemWithTitle: | (CPString) | aTitle |
Selects the item with the specified title
| the | title of the item to select |
Definition at line 332 of file CPPopUpButton.j.
| - (void) setImage: | (CPImage) | anImage |
This method has no effect. Because the image is taken from the currently selected item, this method serves no purpose.
Reimplemented from CPButton.
Definition at line 528 of file CPPopUpButton.j.
| - (void) setObjectValue: | (int) | anIndex |
Selects the item at the specified index
| anIndex | the index of the item to select |
Definition at line 294 of file CPPopUpButton.j.
| - (void) setPreferredEdge: | (CPRectEdge) | aRectEdge |
Sets the preferred 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 479 of file CPPopUpButton.j.
| - (void) setPullsDown: | (BOOL) | shouldPullDown |
Specifies whether the object is a pull-down or a pop-up menu. If the button pulls down the menu items represent actions, not states. So the text in the button will NOT change when the user selects something different.
| shouldPullDown | YES makes the pop-up button a pull-down menu. NO makes it a pop-up menu. |
Definition at line 109 of file CPPopUpButton.j.
| - (void) setSelectedIndex: | (CPUInteger) | anIndex |
Definition at line 280 of file CPPopUpButton.j.
| - (void) setTitle: | (CPString) | aTitle |
Sets the pop-up button's title.
| aTitle | the new title |
Reimplemented from CPButton.
Definition at line 489 of file CPPopUpButton.j.
| - (void) synchronizeTitleAndSelectedItem |
Makes sure the selected item and the item being displayed are one and the same.
Definition at line 538 of file CPPopUpButton.j.
Definition at line 762 of file CPPopUpButton.j.
| - (CPString) titleOfSelectedItem |
Returns the title of the selected item or nil if no item is selected.
Definition at line 232 of file CPPopUpButton.j.