git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4445 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Michael Silva 1999-06-21 04:38:35 +00:00
parent bd2f314275
commit 5dc712706c
6 changed files with 22 additions and 2 deletions

View file

@ -7,6 +7,7 @@
common_TabUnSelectedJunction.tiff
common_TabUnSelectedLeft.tiff
common_TabUnSelectedRight.tiff: all tiffs needed to draw NSTabs.
* Images/common_3DArrowDown.tiff: for NSPopUp in pulldown mode.
* Source/NSTabView.m: lots of work on drawing. Should draw correct
in almost all cases. However, without event code I can't test it
yet.

View file

@ -43,6 +43,7 @@
@interface NSPopUpButtonMatrix : NSMenuMatrix
{
BOOL pull_down;
int selected_cell;
NSPopUpButton *popup_button;
}

View file

@ -33,6 +33,7 @@ imagedir = $(GNUSTEP_RESOURCES)/Images
IMAGE_FILES = \
GNUstep_Images_Copyright \
common_3DArrowDown.tiff \
common_ArrowDown.tiff \
common_ArrowUp.tiff \
common_ArrowRight.tiff \

Binary file not shown.

View file

@ -82,6 +82,16 @@
{
ASSIGN(popup_button, popb);
}
- (void)setPullsDown:(BOOL)pull
{
pull_down = pull;
}
- (BOOL)pullsDown
{
return pull_down;
}
@end
//
@ -121,6 +131,7 @@
[super initWithFrame:frameRect];
list_items = [[NSPopUpButtonMatrix alloc] initWithFrame:frameRect];
[list_items setPopUpButton:self];
[list_items setPullsDown:flag];
is_up = NO;
pulls_down = flag;
selected_item = 0;
@ -159,7 +170,10 @@
- (void)buttonSelected:(id)sender
{
selected_item = [self indexOfItemWithTitle:[sender title]];
if (!pulls_down)
selected_item = [self indexOfItemWithTitle:[sender title]];
else
selected_item = 0;
[self synchronizeTitleAndSelectedItem];

View file

@ -62,7 +62,10 @@
if ([(NSPopUpButton *)view titleOfSelectedItem] == contents)
{
[super _drawImage:[NSImage imageNamed:@"common_Nibble"] inFrame:rect];
if ([(NSPopUpButton *)view pullsDown] == NO)
[super _drawImage:[NSImage imageNamed:@"common_Nibble"] inFrame:rect];
else
[super _drawImage:[NSImage imageNamed:@"common_3DArrowDown"] inFrame:rect];
}
}
@end