mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
Moved the method [NSApplication orderFrontColorPanel:] to here.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14401 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f6b4091ddc
commit
893f70929d
2 changed files with 20 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
#ifndef _GNUstep_H_NSColorPanel
|
||||
#define _GNUstep_H_NSColorPanel
|
||||
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSBox.h>
|
||||
#include <AppKit/NSButton.h>
|
||||
#include <AppKit/NSColorPicking.h>
|
||||
|
@ -64,6 +65,10 @@ enum {
|
|||
NSColorPanelAllModesMask = 127
|
||||
};
|
||||
|
||||
@interface NSApplication (NSColorPanel)
|
||||
- (void) orderFrontColorPanel: (id)sender;
|
||||
@end
|
||||
|
||||
@interface NSColorPanel : NSPanel
|
||||
{
|
||||
// Attributes
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
#include <AppKit/NSImage.h>
|
||||
#include <AppKit/NSPasteboard.h>
|
||||
#include <AppKit/NSWindow.h>
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/IMLoading.h>
|
||||
|
||||
#define MAX_ALPHA_VALUE 100.0
|
||||
|
@ -51,6 +50,21 @@ static int _gs_gui_color_picker_mask = NSColorPanelAllModesMask;
|
|||
// FIXME: This should be NSWheelModeColorPanel
|
||||
static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
||||
|
||||
|
||||
@implementation NSApplication (NSColorPanel)
|
||||
|
||||
- (void) orderFrontColorPanel: sender
|
||||
{
|
||||
NSColorPanel *colorPanel = [NSColorPanel sharedColorPanel];
|
||||
|
||||
if (colorPanel)
|
||||
[colorPanel orderFront: nil];
|
||||
else
|
||||
NSBeep();
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface NSColorPanel (PrivateMethods)
|
||||
- (void) _loadPickers;
|
||||
- (void) _loadPickerAtPath: (NSString *)path;
|
||||
|
|
Loading…
Reference in a new issue