mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 22:57:38 +00:00
NSSlider implemented. Optimizations in displaying and flushing mechanism. A bunch of memory allocation problems fixed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2494 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aee90a695e
commit
9837b14866
59 changed files with 1577 additions and 5103 deletions
|
@ -30,6 +30,11 @@
|
|||
#include <AppKit/NSColorWell.h>
|
||||
#include <AppKit/NSColor.h>
|
||||
|
||||
#define ASSIGN(a, b) \
|
||||
[b retain]; \
|
||||
[a release]; \
|
||||
a = b;
|
||||
|
||||
@implementation NSColorWell
|
||||
|
||||
//
|
||||
|
@ -53,11 +58,17 @@
|
|||
|
||||
is_bordered = YES;
|
||||
is_active = NO;
|
||||
the_color = [NSColor blackColor];
|
||||
ASSIGN(the_color, [NSColor blackColor]);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[the_color release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//
|
||||
// Drawing
|
||||
//
|
||||
|
@ -107,13 +118,13 @@
|
|||
|
||||
- (void)setColor:(NSColor *)color
|
||||
{
|
||||
the_color = color;
|
||||
ASSIGN(the_color, color);
|
||||
}
|
||||
|
||||
- (void)takeColorFrom:(id)sender
|
||||
{
|
||||
if ([sender respondsToSelector:@selector(color)])
|
||||
the_color = [sender color];
|
||||
ASSIGN(the_color, [sender color]);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue