API  0.9.6
 All Classes Files Functions Variables Macros Modules Pages
CPPopUpButton Class Reference

#import <CPPopUpButton.h>

+ Inheritance diagram for CPPopUpButton:

Instance Methods

(void) - addItem:
 
(void) - addItemsWithTitles:
 
(void) - addItemWithTitle:
 
(int) - indexOfItem:
 
(int) - indexOfItemWithRepresentedObject:
 
(int) - indexOfItemWithTag:
 
(int) - indexOfItemWithTarget:action:
 
(int) - indexOfItemWithTitle:
 
(int) - indexOfSelectedItem
 
(id) - initWithCoder:
 
(id) - initWithFrame:
 
(id) - initWithFrame:pullsDown:
 
(void) - insertItemWithTitle:atIndex:
 
(CPArray- itemArray
 
(CPMenuItem- itemAtIndex:
 
(CPString- itemTitleAtIndex:
 
(CPArray- itemTitles
 
(CPMenuItem- itemWithTitle:
 
(CPMenuItem- lastItem
 
(void) - mouseDown:
 
(int) - numberOfItems
 
(id) - objectValue
 
(void) - observeValueForKeyPath:ofObject:change:context:
 
(CPRectEdge) - preferredEdge
 
(BOOL) - pullsDown
 
(void) - removeAllItems
 
(void) - removeItemAtIndex:
 
(void) - removeItemWithTitle:
 
(void) - rightMouseDown:
 
(CPUInteger) - selectedIndex
 
(CPMenuItem- selectedItem
 
(void) - selectItem:
 
(void) - selectItemAtIndex:
 
(void) - selectItemWithTag:
 
(void) - selectItemWithTitle:
 
(void) - setImage:
 
(void) - setObjectValue:
 
(void) - setPreferredEdge:
 
(void) - setPullsDown:
 
(void) - setSelectedIndex:
 
(void) - setTitle:
 
(void) - synchronizeTitleAndSelectedItem
 
(void) - takeValueFromKeyPath:ofObjects:
 
(CPString- titleOfSelectedItem
 
- Instance Methods inherited from CPButton
(BOOL) - allowsMixedState
 
(CPImage- alternateImage
 
(CPString- alternateTitle
 
(CGRect) - bezelRectForBounds:
 
(unsigned) - bezelStyle
 
(CGRect) - contentRectForBounds:
 
(CPView- createEphemeralSubviewNamed:
 
(void) - encodeWithCoder:
 
(CPInteger) - highlightsBy
 
(CPImage- image
 
(BOOL) - imageDimsWhenDisabled
 
(float) - imageOffset
 
(void) - invalidateTimers
 
(BOOL) - isBordered
 
(CPString- keyEquivalent
 
(unsigned) - keyEquivalentModifierMask
 
(void) - layoutSubviews
 
(CPInteger) - nextState
 
(void) - onContinousEvent:
 
(void) - performClick:
 
(BOOL) - performKeyEquivalent:
 
(CGRect) - rectForEphemeralSubviewNamed:
 
(void) - setAllowsMixedState:
 
(void) - setAlternateImage:
 
(void) - setAlternateTitle:
 
(void) - setBezelStyle:
 
(void) - setBordered:
 
(void) - setButtonType:
 
(void) - setHighlightsBy:
 
(void) - setImageDimsWhenDisabled:
 
(void) - setImageOffset:
 
(void) - setKeyEquivalent:
 
(void) - setKeyEquivalentModifierMask:
 
(void) - setNextState
 
(void) - setObjectValue:
 
(void) - setPeriodicDelay:interval:
 
(void) - setShowsStateBy:
 
(void) - setState:
 
(CPInteger) - showsStateBy
 
(void) - sizeToFit
 
(BOOL) - startTrackingAt:
 
(CPInteger) - state
 
(void) - stopTracking:at:mouseIsUp:
 
(CPString- title
 
(void) - viewWillMoveToWindow:
 
- Instance Methods inherited from CPControl
(SEL) - action
 
(CPTextAlignment) - alignment
 
(BOOL) - continueTracking:at:
 
(double) - doubleValue
 
(float) - floatValue
 
(CPFont- font
 
(CPFormatter- formatter
 
(void) - highlight:
 
(CPCellImagePosition) - imagePosition
 
(CPImageScaling) - imageScaling
 
(int) - integerValue
 
(int) - intValue
 
(BOOL) - isContinuous
 
(BOOL) - isEnabled
 
(BOOL) - isHighlighted
 
(CPLineBreakMode) - lineBreakMode
 
(unsigned) - mouseDownFlags
 
(void) - mouseEntered:
 
(void) - mouseExited:
 
(BOOL) - sendAction:to:
 
(int) - sendActionOn:
 
(BOOL) - sendsActionOnEndEditing
 
(void) - setAction:
 
(void) - setAlignment:
 
(void) - setContinuous:
 
(void) - setDoubleValue:
 
(void) - setEnabled:
 
(void) - setFloatValue:
 
(void) - setFont:
 
(void) - setFormatter:
 
(void) - setHighlighted:
 
(void) - setImagePosition:
 
(void) - setImageScaling:
 
(void) - setIntegerValue:
 
(void) - setIntValue:
 
(void) - setLineBreakMode:
 
(void) - setSendsActionOnEndEditing:
 
(void) - setState:
 
(void) - setStringValue:
 
(void) - setTarget:
 
(void) - setTextColor:
 
(void) - setTextShadowColor:
 
(void) - setTextShadowOffset:
 
(void) - setVerticalAlignment:
 
(CPString- stringValue
 
(void) - takeDoubleValueFrom:
 
(void) - takeFloatValueFrom:
 
(void) - takeIntegerValueFrom:
 
(void) - takeIntValueFrom:
 
(void) - takeObjectValueFrom:
 
(void) - takeStringValueFrom:
 
(id) - target
 
(CPColor- textColor
 
(void) - textDidBeginEditing:
 
(void) - textDidChange:
 
(void) - textDidEndEditing:
 
(CPColor- textShadowColor
 
(CGSize) - textShadowOffset
 
(void) - trackMouse:
 
(BOOL) - tracksMouseOutsideOfFrame
 
(void) - unhighlightButtonTimerDidFinish:
 
(CPTextVerticalAlignment) - verticalAlignment
 
- Instance Methods inherited from CPView
(BOOL) - acceptsFirstMouse:
 
(void) - addSubview:
 
(void) - addSubview:positioned:relativeTo:
 
(CGRect) - adjustScroll:
 
(float) - alphaValue
 
(BOOL) - autoresizesSubviews
 
(unsigned) - autoresizingMask
 
(BOOL) - autoscroll:
 
(CPColor- backgroundColor
 
(CGRect) - bounds
 
(CGPoint) - boundsOrigin
 
(CGSize) - boundsSize
 
(BOOL) - canBecomeKeyView
 
(CGPoint) - center
 
(BOOL) - clipsToBounds
 
(CGPoint) - convertPoint:fromView:
 
(CGPoint) - convertPoint:toView:
 
(CGPoint) - convertPointFromBase:
 
(CGPoint) - convertPointToBase:
 
(CGRect) - convertRect:fromView:
 
(CGRect) - convertRect:toView:
 
(CGRect) - convertRectFromBase:
 
(CGRect) - convertRectToBase:
 
(CGSize) - convertSize:fromView:
 
(CGSize) - convertSize:toView:
 
(id) - currentValueForThemeAttribute:
 
(void) - didAddSubview:
 
(void) - display
 
(void) - displayIfNeeded
 
(void) - displayIfNeededInRect:
 
(void) - displayRect:
 
(void) - displayRectIgnoringOpacity:inContext:
 
(void) - dragImage:at:offset:event:pasteboard:source:slideBack:
 
(void) - dragView:at:offset:event:pasteboard:source:slideBack:
 
(void) - drawRect:
 
(CPMenuItem- enclosingMenuItem
 
(CPScrollView- enclosingScrollView
 
(BOOL) - enterFullScreenMode
 
(BOOL) - enterFullScreenMode:withOptions:
 
(CPView- ephemeralSubviewNamed:
 
(void) - exitFullScreenMode
 
(void) - exitFullScreenModeWithOptions:
 
(CGRect) - frame
 
(CGPoint) - frameOrigin
 
(CGSize) - frameSize
 
(BOOL) - hasThemeAttribute:
 
(BOOL) - hasThemeState:
 
(CPView- hitTest:
 
(BOOL) - hitTests
 
(id) - init
 
(BOOL) - inLiveResize
 
(BOOL) - isDescendantOf:
 
(BOOL) - isFlipped
 
(BOOL) - isHidden
 
(BOOL) - isHiddenOrHasHiddenAncestor
 
(BOOL) - isInFullScreenMode
 
(BOOL) - isOpaque
 
(CALayer- layer
 
(CPView- layoutEphemeralSubviewNamed:positioned:relativeToEphemeralSubviewNamed:
 
(void) - layoutIfNeeded
 
(void) - lockFocus
 
(CPMenu- menuForEvent:
 
(BOOL) - mouseDownCanMoveWindow
 
(BOOL) - needsDisplay
 
(BOOL) - needsPanelToBecomeKey
 
(CPView- nextKeyView
 
(CPView- nextValidKeyView
 
(BOOL) - postsBoundsChangedNotifications
 
(BOOL) - postsFrameChangedNotifications
 
(CPView- previousKeyView
 
(CPView- previousValidKeyView
 
(void) - reflectScrolledClipView:
 
(CPArray- registeredDraggedTypes
 
(void) - registerForDraggedTypes:
 
(void) - registerThemeValues:
 
(void) - registerThemeValues:inherit:
 
(void) - removeFromSuperview
 
(void) - replaceSubview:with:
 
(void) - resizeSubviewsWithOldSize:
 
(void) - resizeWithOldSuperviewSize:
 
(void) - scrollClipView:toPoint:
 
(void) - scrollPoint:
 
(void) - scrollRect:by:
 
(BOOL) - scrollRectToVisible:
 
(void) - setAlphaValue:
 
(void) - setAutoresizesSubviews:
 
(void) - setAutoresizingMask:
 
(void) - setBackgroundColor:
 
(void) - setBounds:
 
(void) - setBoundsOrigin:
 
(void) - setBoundsSize:
 
(void) - setCenter:
 
(void) - setClipsToBounds:
 
(void) - setFrame:
 
(void) - setFrameOrigin:
 
(void) - setFrameSize:
 
(void) - setHidden:
 
(void) - setHitTests:
 
(void) - setLayer:
 
(void) - setNeedsDisplay:
 
(void) - setNeedsDisplayInRect:
 
(void) - setNeedsLayout
 
(void) - setNextKeyView:
 
(void) - setPostsBoundsChangedNotifications:
 
(void) - setPostsFrameChangedNotifications:
 
(void) - setSubviews:
 
(void) - setTag:
 
(void) - setTheme:
 
(void) - setThemeClass:
 
(BOOL) - setThemeState:
 
(void) - setToolTip:
 
(void) - setValue:forThemeAttribute:
 
(void) - setValue:forThemeAttribute:inState:
 
(void) - setWantsLayer:
 
(CPArray- subviews
 
(CPView- superview
 
(CPInteger) - tag
 
(CPTheme- theme
 
(CPString- themeClass
 
(unsigned) - themeState
 
(CPString- toolTip
 
(void) - unlockFocus
 
(void) - unregisterDraggedTypes
 
(BOOL) - unsetThemeState:
 
(id) - valueForThemeAttribute:
 
(id) - valueForThemeAttribute:inState:
 
(void) - viewDidChangeTheme
 
(void) - viewDidEndLiveResize
 
(void) - viewDidHide
 
(void) - viewDidMoveToSuperview
 
(void) - viewDidMoveToWindow
 
(void) - viewDidUnhide
 
(void) - viewWillDraw
 
(void) - viewWillMoveToSuperview:
 
(void) - viewWillStartLiveResize
 
(CPView- viewWithTag:
 
(CGRect) - visibleRect
 
(BOOL) - wantsLayer
 
(void) - willRemoveSubview:
 
(CPWindow- window
 
- Instance Methods inherited from CPResponder
(BOOL) - acceptsFirstResponder
 
(BOOL) - becomeFirstResponder
 
(void) - doCommandBySelector:
 
(void) - flagsChanged:
 
(void) - insertBackTab:
 
(void) - insertLineBreak:
 
(void) - insertNewline:
 
(void) - insertTab:
 
(void) - insertText:
 
(void) - interpretKeyEvents:
 
(void) - keyDown:
 
(void) - keyUp:
 
(CPMenu- menu
 
(void) - mouseDragged:
 
(void) - mouseMoved:
 
(void) - mouseUp:
 
(CPResponder- nextResponder
 
(void) - noResponderFor:
 
(BOOL) - resignFirstResponder
 
(void) - rightMouseUp:
 
(void) - scrollWheel:
 
(void) - setMenu:
 
(void) - setNextResponder:
 
(BOOL) - tryToPerform:with:
 
(CPUndoManager- undoManager
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray- exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(CPString+ defaultThemeClass
 
(CPSet+ keyPathsForValuesAffectingSelectedIndex
 
(CPSet+ keyPathsForValuesAffectingSelectedItem
 
(CPSet+ keyPathsForValuesAffectingSelectedTag
 
- Class Methods inherited from CPButton
(id) + buttonWithTitle:
 
(id) + buttonWithTitle:theme:
 
(id) + themeAttributes
 
- Class Methods inherited from CPControl
(void) + initialize
 
- Class Methods inherited from CPView
(CPMenu+ defaultMenu
 
(CPSet+ keyPathsForValuesAffectingBounds
 
(CPSet+ keyPathsForValuesAffectingFrame
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(Class) + class
 
(void) + exposeBinding:
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isSubclassOfClass:
 
(CPSet+ keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Additional Inherited Members

- Instance Variables inherited from CPObject
Class isa
 

Detailed Description

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

Definition at line 2 of file CPPopUpButton.h.

Method Documentation

- (void) addItem: (CPMenuItem anItem
implementation

Adds a new menu item using a CPMenuItem object.

Definition at line 142 of file CPPopUpButton.j.

- (void) addItemsWithTitles: (CPArray titles
implementation

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

Parameters
titlesan array of names for the new items

Definition at line 160 of file CPPopUpButton.j.

- (void) addItemWithTitle: (CPString aTitle
implementation

Adds a new menu item with the specified title.

Parameters
thenew menu item's title

Definition at line 151 of file CPPopUpButton.j.

+ (CPString) defaultThemeClass
implementation

Reimplemented from CPButton.

Definition at line 41 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
aMenuItemthe item to obtain the index for

Definition at line 401 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
anObjectthe item's represented object

Definition at line 430 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
aTagthe item's tag

Definition at line 410 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
aTargetthe item's target
anActionthe item's action

Definition at line 442 of file CPPopUpButton.j.

- (int) indexOfItemWithTitle: (CPString aTitle
implementation

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

Parameters
aTitlethe item's title

Definition at line 419 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 240 of file CPPopUpButton.j.

- (id) initWithCoder: (CPCoder aCoder
implementation

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

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

Reimplemented from CPButton.

Provided by category CPPopUpButton(CPCoding).

Definition at line 1060 of file CPPopUpButton.j.

- (id) initWithFrame: (CGRect)  aFrame
implementation

Initializes and returns a newly allocated CPButton object with a specified frame rectangle.

Parameters
aFrameThe frame rectangle for the created button object.
Returns
An initialized CPView object or nil if the object couldn't be created.

Reimplemented from CPButton.

Definition at line 94 of file CPPopUpButton.j.

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

Initializes the pop-up button to the specified size.

Parameters
aFramethe size for the button
shouldPullDownYES makes this a pull-down menu, NO makes it a pop-up menu.
Returns
the initialized pop-up button

Definition at line 67 of file CPPopUpButton.j.

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

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

Parameters
aTitlethe new item's title
anIndexthe item's index in the menu

Definition at line 174 of file CPPopUpButton.j.

- (CPArray) itemArray
implementation

Returns an array of the items in the menu

Definition at line 334 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
anIndexthe index of the item to obtain

Definition at line 343 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
anIndexthe index of the item

Definition at line 352 of file CPPopUpButton.j.

- (CPArray) itemTitles
implementation

Returns an array of all the menu item titles.

Definition at line 360 of file CPPopUpButton.j.

- (CPMenuItem) itemWithTitle: (CPString aTitle
implementation

Returns the menu item with the specified title.

Parameters
aTitlethe title of the desired menu item

Definition at line 377 of file CPPopUpButton.j.

+ (CPSet) keyPathsForValuesAffectingSelectedIndex
implementation

Definition at line 46 of file CPPopUpButton.j.

+ (CPSet) keyPathsForValuesAffectingSelectedItem
implementation

Definition at line 56 of file CPPopUpButton.j.

+ (CPSet) keyPathsForValuesAffectingSelectedTag
implementation

Definition at line 51 of file CPPopUpButton.j.

- (CPMenuItem) lastItem
implementation

Returns the last menu item

Definition at line 391 of file CPPopUpButton.j.

- (void) mouseDown: (CPEvent anEvent
implementation

Notifies the receiver that the user has clicked the mouse down in its area.

Parameters
anEventcontains information about the click

Reimplemented from CPButton.

Definition at line 661 of file CPPopUpButton.j.

- (int) numberOfItems
implementation

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

Definition at line 326 of file CPPopUpButton.j.

- (id) objectValue
implementation

Returns the receiver's object value.

Reimplemented from CPControl.

Definition at line 298 of file CPPopUpButton.j.

- (void) observeValueForKeyPath: (CPString aKeyPath
ofObject: (id)  anObject
change: (CPDictionary changes
context: (id)  aContext 
implementation

Definition at line 540 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 453 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 132 of file CPPopUpButton.j.

- (void) removeAllItems
implementation

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

Definition at line 189 of file CPPopUpButton.j.

- (void) removeItemAtIndex: (int)  anIndex
implementation

Removes the menu item at the specified index

Parameters
anIndexthe index of the item to remove

Definition at line 209 of file CPPopUpButton.j.

- (void) removeItemWithTitle: (CPString aTitle
implementation

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

Parameters
aTitlethe title of the item to remove

Definition at line 199 of file CPPopUpButton.j.

- (void) rightMouseDown: (CPEvent anEvent
implementation

Notifies the receiver that the user has clicked the right mouse down in its area.

Parameters
anEventcontains information about the right click

Reimplemented from CPView.

Definition at line 728 of file CPPopUpButton.j.

- (CPUInteger) selectedIndex
implementation

Definition at line 269 of file CPPopUpButton.j.

- (CPMenuItem) selectedItem
implementation

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

Definition at line 219 of file CPPopUpButton.j.

- (void) selectItem: (CPMenuItem aMenuItem
implementation

Selects the specified menu item.

Parameters
aMenuItemthe item to select

Definition at line 250 of file CPPopUpButton.j.

- (void) selectItemAtIndex: (CPUInteger)  anIndex
implementation

Selects the item at the specified index

Parameters
anIndexthe index of the item to select

Definition at line 259 of file CPPopUpButton.j.

- (void) selectItemWithTag: (int)  aTag
implementation

Selects the menu item with the specified tag

Parameters
thetag of the item to select

Definition at line 307 of file CPPopUpButton.j.

- (void) selectItemWithTitle: (CPString aTitle
implementation

Selects the item with the specified title

Parameters
thetitle of the item to select

Definition at line 316 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.

Reimplemented from CPButton.

Definition at line 512 of file CPPopUpButton.j.

- (void) setObjectValue: (int)  anIndex
implementation

Selects the item at the specified index

Parameters
anIndexthe index of the item to select

Definition at line 278 of file CPPopUpButton.j.

- (void) setPreferredEdge: (CPRectEdge)  aRectEdge
implementation

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 463 of file CPPopUpButton.j.

- (void) setPullsDown: (BOOL)  shouldPullDown
implementation

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.

Parameters
shouldPullDownYES 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
implementation

Definition at line 264 of file CPPopUpButton.j.

- (void) setTitle: (CPString aTitle
implementation

Sets the pop-up button's title.

Parameters
aTitlethe new title

Reimplemented from CPButton.

Definition at line 473 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 522 of file CPPopUpButton.j.

- (void) takeValueFromKeyPath: (CPString aKeyPath
ofObjects: (CPArray objects 
implementation

Definition at line 754 of file CPPopUpButton.j.

- (CPString) titleOfSelectedItem
implementation

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

Definition at line 232 of file CPPopUpButton.j.


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