1 // 2 // PXColorPaletteController.m 3 // Pixen-XCode 4 // 5 // Copyright (c) 2004 Open Sword Group 6 7 // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation 8 // files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, 9 //copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 10 // to whom the Software is furnished to do so, subject to the following conditions: 11 12 // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 13 14 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 15 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 16 // BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 17 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 18 19 20 #import <Foundation/NSObject.h> 21 #import <AppKit/NSNibDeclarations.h> 22 23 @class NSMatrix; 24 @class NSPanel; 25 @class NSScrollView; 26 27 @interface PXColorPaletteController : NSObject 28 { 29 IBOutlet NSMatrix *matrix; //relaly an Outlet ? 30 IBOutlet NSScrollView *scrollView; 31 IBOutlet NSPanel *panel; 32 IBOutlet id leftMatrixWell, rightMatrixWell; 33 id palette; 34 IBOutlet id switcher; 35 id canvas; 36 } 37 38 39 //singleton 40 +(id) sharedPaletteController; 41 42 - (void)selectDefaultPalette; 43 - (void)selectPaletteNamed:(id)aName; 44 - (void)palette:aPalette foundDuplicateColorsAtIndex:(unsigned)first andIndex:(unsigned)second; 45 - (void)setPalette:(id)newPalette; 46 - (void)reloadDataForCanvas:(id)aCanvas; 47 48 //Accessor 49 -(NSPanel *) palettePanel; 50 51 @end 52