mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:07:38 +00:00
Initial implementation of NSScroller.
Reinstate NSCursor and NSColorWell changes that got lost. Utilize config.h file instead of compiler defines. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2228 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8ed2402f35
commit
e3b40cf7bc
24 changed files with 916 additions and 144 deletions
|
@ -27,6 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <AppKit/NSColorWell.h>
|
||||
#include <AppKit/NSColor.h>
|
||||
|
||||
@implementation NSColorWell
|
||||
|
||||
|
@ -45,14 +46,30 @@
|
|||
//
|
||||
// Instance methods
|
||||
//
|
||||
- initWithFrame:(NSRect)frameRect
|
||||
{
|
||||
[super initWithFrame: frameRect];
|
||||
|
||||
is_bordered = YES;
|
||||
is_active = NO;
|
||||
the_color = [NSColor blackColor];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
//
|
||||
// Drawing
|
||||
//
|
||||
- (void)drawRect:(NSRect)rect
|
||||
{
|
||||
// xxx Draw border
|
||||
NSLog(@"NSColorWell drawRect: %f %f %f %f\n", rect.origin.x, rect.origin.y,
|
||||
rect.size.width, rect.size.height);
|
||||
|
||||
// Draw border
|
||||
if (is_bordered)
|
||||
[self drawBorderRect: rect];
|
||||
|
||||
// Draw the color inside
|
||||
[self drawWellInside: rect];
|
||||
}
|
||||
|
||||
|
@ -133,3 +150,14 @@
|
|||
}
|
||||
|
||||
@end
|
||||
|
||||
//
|
||||
// GNUstep backend methods
|
||||
//
|
||||
@implementation NSColorWell (GNUstepBackend)
|
||||
|
||||
- (void)drawBorderRect:(NSRect)aRect
|
||||
{
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue