gecko-dev/camino/CHToolbarAdditions.m
2002-04-20 07:21:10 +00:00

29 lines
768 B
Objective-C

#import "CHToolbarAdditions.h"
#import <Foundation/Foundation.h>
@implementation NSToolbar (CHToolbarCustomizableAdditions)
- (BOOL) alwaysCustomizableByDrag {
return (BOOL) _tbFlags.clickAndDragPerformsCustomization;
}
- (void) setAlwaysCustomizableByDrag:(BOOL) flag {
_tbFlags.clickAndDragPerformsCustomization = (unsigned int) flag & 1;
}
- (BOOL) showsContextMenu {
return (BOOL) ! _tbFlags.showsNoContextMenu;
}
- (void) setShowsContextMenu:(BOOL) flag {
_tbFlags.showsNoContextMenu = (unsigned int) ! flag & 1;
}
- (unsigned int) indexOfFirstMovableItem {
return (unsigned int) _tbFlags.firstMoveableItemIndex;
}
- (void) setIndexOfFirstMovableItem:(unsigned int) anIndex {
_tbFlags.firstMoveableItemIndex = (unsigned int) anIndex & 0x3F;
}
@end