mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 10:00:54 +00:00
29 lines
768 B
Objective-C
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
|