1 /* 2 NSButtonImageSource.h 3 4 Copyright (C) 2006 Free Software Foundation, Inc. 5 6 Author: Richard Frith-Macdonald <rfm@gnu.org> 7 Date: 2006 8 9 This file is part of the GNUstep GUI Library. 10 11 This library is free software; you can redistribute it and/or 12 modify it under the terms of the GNU Lesser General Public 13 License as published by the Free Software Foundation; either 14 version 2 of the License, or (at your option) any later version. 15 16 This library is distributed in the hope that it will be useful, 17 but WITHOUT ANY WARRANTY; without even the implied warranty of 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19 Lesser General Public License for more details. 20 21 You should have received a copy of the GNU Lesser General Public 22 License along with this library; see the file COPYING.LIB. 23 If not, see <http://www.gnu.org/licenses/> or write to the 24 Free Software Foundation, 51 Franklin Street, Fifth Floor, 25 Boston, MA 02110-1301, USA. 26 */ 27 28 #ifndef _GNUstep_H_NSImageSource 29 #define _GNUstep_H_NSImageSource 30 31 #import <Foundation/NSObject.h> 32 #import <AppKit/NSButtonCell.h> 33 34 @class NSString, NSMutableDictionary; 35 36 /** 37 * Handle images for button cell theming. 38 */ 39 @interface NSButtonImageSource : NSObject <NSCoding, NSCopying> 40 { 41 NSString *imageName; 42 NSMutableDictionary *images; 43 } 44 + (BOOL) archiveButtonImageSourceWithName: (NSString*)name 45 toDirectory: (NSString*)path; 46 + (id) buttonImageSourceWithName: (NSString*)name; 47 - (id) imageForState: (struct NSButtonState)state; 48 @end 49 50 @interface NSButtonCell (NSButtonImageSource) 51 - (id) _buttonImageSource; 52 - (void) _setButtonImageSource: (id)source; 53 @end 54 55 #endif /* _GNUstep_H_NSImageSource */ 56