mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-04 00:30:43 +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
d49f05cc20
commit
8946a56bfc
2 changed files with 20 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
||||||
#ifndef _GNUstep_H_NSColorPanel
|
#ifndef _GNUstep_H_NSColorPanel
|
||||||
#define _GNUstep_H_NSColorPanel
|
#define _GNUstep_H_NSColorPanel
|
||||||
|
|
||||||
|
#include <AppKit/NSApplication.h>
|
||||||
#include <AppKit/NSBox.h>
|
#include <AppKit/NSBox.h>
|
||||||
#include <AppKit/NSButton.h>
|
#include <AppKit/NSButton.h>
|
||||||
#include <AppKit/NSColorPicking.h>
|
#include <AppKit/NSColorPicking.h>
|
||||||
|
@ -64,6 +65,10 @@ enum {
|
||||||
NSColorPanelAllModesMask = 127
|
NSColorPanelAllModesMask = 127
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@interface NSApplication (NSColorPanel)
|
||||||
|
- (void) orderFrontColorPanel: (id)sender;
|
||||||
|
@end
|
||||||
|
|
||||||
@interface NSColorPanel : NSPanel
|
@interface NSColorPanel : NSPanel
|
||||||
{
|
{
|
||||||
// Attributes
|
// Attributes
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
#include <AppKit/NSImage.h>
|
#include <AppKit/NSImage.h>
|
||||||
#include <AppKit/NSPasteboard.h>
|
#include <AppKit/NSPasteboard.h>
|
||||||
#include <AppKit/NSWindow.h>
|
#include <AppKit/NSWindow.h>
|
||||||
#include <AppKit/NSApplication.h>
|
|
||||||
#include <AppKit/IMLoading.h>
|
#include <AppKit/IMLoading.h>
|
||||||
|
|
||||||
#define MAX_ALPHA_VALUE 100.0
|
#define MAX_ALPHA_VALUE 100.0
|
||||||
|
@ -51,6 +50,21 @@ static int _gs_gui_color_picker_mask = NSColorPanelAllModesMask;
|
||||||
// FIXME: This should be NSWheelModeColorPanel
|
// FIXME: This should be NSWheelModeColorPanel
|
||||||
static int _gs_gui_color_picker_mode = NSRGBModeColorPanel;
|
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)
|
@interface NSColorPanel (PrivateMethods)
|
||||||
- (void) _loadPickers;
|
- (void) _loadPickers;
|
||||||
- (void) _loadPickerAtPath: (NSString *)path;
|
- (void) _loadPickerAtPath: (NSString *)path;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue