mode
カラーピッカーの現在のモードを返します
解説
カラーピッカーの現在のモードを返します。
【mode】
● NSGrayModeColorPanel
● NSRGBModeColorPanel
● NSCMYKModeColorPanel
● NSHSBModeColorPanel
● NSCustomPaletteModeColorPanel
● NSColorListModeColorPanel
● NSWheelModeColorPanel
返り値
( int )
整数値
引数
フレームワーク
ApplicationKit
クラス
NSColorPanel
Instance Methods
使用可能
10.0
参照
- setMode:
+ setPickerMode:
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSColorPanel *cPanel = [NSColorPanel sharedColorPanel]; [[NSApplication sharedApplication] orderFrontColorPanel:cPanel]; switch ([cPanel mode]){ case NSGrayModeColorPanel: NSLog(@"NSGrayModeColorPanel"); break; case NSRGBModeColorPanel: NSLog(@"NSRGBModeColorPanel"); break; case NSCMYKModeColorPanel: NSLog(@"NSCMYKModeColorPanel"); break; case NSHSBModeColorPanel: NSLog(@"NSHSBModeColorPanel"); break; case NSCustomPaletteModeColorPanel: NSLog(@"NSCustomPaletteModeColorPanel"); break; case NSColorListModeColorPanel: NSLog(@"NSColorListModeColorPanel"); break; case NSWheelModeColorPanel: NSLog(@"NSWheelModeColorPanel"); break; default : break; } } @end