Header files reorganized. All the definitions were moved in appropiate files.

Each header file includes only the header files it needs and it uses
@class to forward reference a class.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2189 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
netcrep 1997-02-18 00:29:25 +00:00
parent 8c3afd9724
commit d5fd123408
151 changed files with 2718 additions and 3068 deletions

View file

@ -26,15 +26,16 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include <gnustep/gui/NSButton.h>
#include <gnustep/gui/NSWindow.h>
#include <gnustep/gui/NSButtonCell.h>
#include <gnustep/gui/NSApplication.h>
#include <AppKit/NSButton.h>
#include <AppKit/NSWindow.h>
#include <AppKit/NSButtonCell.h>
#include <AppKit/NSApplication.h>
#include <gnustep/gui/LogFile.h>
//
// class variables
//
id MB_NSBUTTON_CLASS;
static id MB_NSBUTTON_CLASS = nil;
//
// NSButton implementation
@ -94,9 +95,9 @@ id MB_NSBUTTON_CLASS;
//
// Setting the Button Type
//
- (void)setType:(NSButtonType)aType
- (void)setButtonType:(NSButtonType)aType
{
[cell setType:aType];
[cell setButtonType:aType];
[self display];
}
@ -111,6 +112,21 @@ id MB_NSBUTTON_CLASS;
//
// Setting the State
//
- (void)setIntValue:(int)anInt
{
[self setState:(anInt != 0)];
}
- (void)setFloatValue:(float)aFloat
{
[self setState:(aFloat != 0)];
}
- (void)setDoubleValue:(double)aDouble
{
[self setState:(aDouble != 0)];
}
- (void)setState:(int)value
{
[cell setState:value];
@ -194,6 +210,16 @@ id MB_NSBUTTON_CLASS;
[self display];
}
- (void)setAlignment:(NSTextAlignment)mode
{
[cell setAlignment:mode];
}
- (NSTextAlignment)alignment
{
return [cell alignment];
}
//
// Modifying Graphic Attributes
//
@ -270,6 +296,7 @@ id MB_NSBUTTON_CLASS;
// capture mouse
[[self window] captureMouse: self];
[self lockFocus];
done = NO;
e = theEvent;
@ -300,6 +327,7 @@ id MB_NSBUTTON_CLASS;
[cell highlight: NO withFrame: bounds
inView: self];
#if 0
//
// Perform different state changes based upon our type
//
@ -326,11 +354,18 @@ id MB_NSBUTTON_CLASS;
[cell setState:1];
NSDebugLog(@"toggle state on\n");
}
default:
break;
}
#endif
[cell setState:![self state]];
// Have the target perform the action
[self sendAction:[self action] to:[self target]];
[cell drawWithFrame:bounds inView:self];
}
[self unlockFocus];
}
- (void)performClick:(id)sender