mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 17:16:12 +00:00
29 lines
768 B
Mathematica
29 lines
768 B
Mathematica
|
#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
|