File:  [mozdev] / chimera / NSToolbarAdditions.m
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Tue Feb 26 11:49:01 2002 UTC (17 years, 1 month ago) by macserv
Branches: MAIN
CVS tags: HEAD
Checking in the underlying prefs structure, and a prefPane, also fir structural integrity.  Also including a couple categories to extend a couple Cocoa objects, and some project changes to support building with the bundled prefPanes.  Also, added a contrib directory to house user contributed artifacts.  To come soon: more prefPanes, and the colorized icon store, with pref-generated notifications to be picked up by toolbars.

    1: #import "NSToolbarAdditions.h"
    2: #import <Foundation/Foundation.h>
    3: 
    4: @implementation NSToolbar (NSToolbarCustomizableAdditions)
    5: - (BOOL) alwaysCustomizableByDrag {
    6:     return (BOOL) _tbFlags.clickAndDragPerformsCustomization;
    7: }
    8: 
    9: - (void) setAlwaysCustomizableByDrag:(BOOL) flag {
   10: 	_tbFlags.clickAndDragPerformsCustomization = (unsigned int) flag & 1;
   11: }
   12: 
   13: - (BOOL) showsContextMenu {
   14: 	return (BOOL) ! _tbFlags.showsNoContextMenu;
   15: }
   16: 
   17: - (void) setShowsContextMenu:(BOOL) flag {
   18: 	_tbFlags.showsNoContextMenu = (unsigned int) ! flag & 1;
   19: }
   20: 
   21: - (unsigned int) indexOfFirstMovableItem {
   22: 	return (unsigned int) _tbFlags.firstMoveableItemIndex;
   23: }
   24: 
   25: - (void) setIndexOfFirstMovableItem:(unsigned int) anIndex {
   26: 	_tbFlags.firstMoveableItemIndex = (unsigned int) anIndex & 0x3F;
   27: }
   28: @end

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>