/BWToolkitFramework.framework/Versions/A/Headers/BWSelectableToolbar.h

http://rtm2cocoa.googlecode.com/ · C++ Header · 36 lines · 16 code · 8 blank · 12 comment · 0 complexity · deeca08404d06df016f7e01b4a5518a1 MD5 · raw file

  1. //
  2. // BWSelectableToolbar.h
  3. // BWToolkit
  4. //
  5. // Created by Brandon Walkin (www.brandonwalkin.com)
  6. // All code is provided under the New BSD license.
  7. //
  8. #import <Cocoa/Cocoa.h>
  9. @class BWSelectableToolbarHelper;
  10. // Notification that gets sent when a toolbar item has been clicked. You can get the button that was clicked by getting the object
  11. // for the key @"BWClickedItem" in the supplied userInfo dictionary.
  12. extern NSString * const BWSelectableToolbarItemClickedNotification;
  13. @interface BWSelectableToolbar : NSToolbar
  14. {
  15. BWSelectableToolbarHelper *helper;
  16. NSMutableArray *itemIdentifiers;
  17. NSMutableDictionary *itemsByIdentifier, *enabledByIdentifier;
  18. BOOL inIB;
  19. // For the IB inspector
  20. int selectedIndex;
  21. BOOL isPreferencesToolbar;
  22. }
  23. // Call one of these methods to set the active tab.
  24. - (void)setSelectedItemIdentifier:(NSString *)itemIdentifier; // Use if you want an action in the tabbed window to change the tab.
  25. - (void)setSelectedItemIdentifierWithoutAnimation:(NSString *)itemIdentifier; // Use if you want to show the window with a certain item selected.
  26. // Programmatically disable or enable a toolbar item.
  27. - (void)setEnabled:(BOOL)flag forIdentifier:(NSString *)itemIdentifier;
  28. @end