Share Pastebin
Guest
Public paste!

nomothetis

By: a guest | Jul 2nd, 2008 | Syntax: Objective C | Size: 1.27 KB | Hits: 375 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. /*
  2.  * This a the header file for whose implementation is at
  3.  * http://pastebin.com/m27607663.
  4.  */
  5.  
  6. #import <Cocoa/Cocoa.h>
  7.  
  8. /*
  9.  * The toolbar delegate. This delegate modifies the default behavior of
  10.  * NSToolbar as follows:
  11.  *
  12.  * 1. It adds a search item to the list of available items.
  13.  * 2. It sets up an NSToolbarFlexibleSpaceItem and the custom search item as
  14.  *    the default items in the toolbar. This will ensure that the search
  15.  *    item is flushed right on the toolbar.
  16.  */
  17.  
  18. @interface ITToolbarDelegate : NSObject {
  19.     /*
  20.      * The view containing the toolbar item; custom items contain a separate
  21.      * view that must be created in Interface Builder and linked to an instance
  22.      * of this delegate to be properly loaded.
  23.      */
  24.     IBOutlet NSView * searchToolbarItemView;
  25. }
  26.  
  27. /*
  28.  * See documentation in NSToolbar - delegate methods.
  29.  */
  30. - (NSArray *)toolbarAllowedItemIdentifiers:(NSToolbar *)toolbar;
  31.  
  32. /*
  33.  * See documentation in NSToolbar - delegate methods.
  34.  */
  35. - (NSArray *)toolbarDefaultItemIdentifiers:(NSToolbar *)toolbar;
  36.  
  37. /*
  38.  * See documentation in NSToolbar - delegate methods.
  39.  */
  40. - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar
  41.      itemForItemIdentifier:(NSString *)itemIdentifier
  42.  willBeInsertedIntoToolbar:(BOOL)flag;
  43.  
  44. @end