mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 19:21:16 +00:00
Add missing isFlipped methods to controls.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25473 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a46f252beb
commit
74b20f9065
6 changed files with 956 additions and 908 deletions
|
@ -1,3 +1,12 @@
|
|||
2007-09-10 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTableHeaderView.m,
|
||||
* Source/NSSlider.m,
|
||||
* Source/NSProgressIndicator.m,
|
||||
* Source/NSButton.m (-isFlipped): Add fliiping.
|
||||
* Source/NSTableHeaderView.m (-drawRect:): Adjust for flipping.
|
||||
* Source/NSTabView.m: Mark as needing an isFlipped method.
|
||||
|
||||
2007-09-09 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (-makeKeyAndOrderFront:): Use
|
||||
|
|
|
@ -81,6 +81,11 @@ static id buttonCellClass = nil;
|
|||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL) isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
/** <p>Sets the NSButtonCell's type to <var>aType</var> and marks self for
|
||||
display.See <ref type="type" id="NSButtonType">NSButtonType</ref> for more
|
||||
information.</p><p>See Also: [NSButtonCell-setButtonType:]</p>
|
||||
|
|
|
@ -68,6 +68,11 @@ static NSColor *fillColour = nil;
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (BOOL) isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)animate:(id)sender
|
||||
{
|
||||
if (!_isIndeterminate)
|
||||
|
|
|
@ -97,6 +97,11 @@ static Class cellClass;
|
|||
return self;
|
||||
}
|
||||
|
||||
- (BOOL) isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
/**<p>Returns the value by which the slider will be incremented if the
|
||||
user holds down the ALT key.</p><p>See Also: -setAltIncrementValue:</p> */
|
||||
- (double) altIncrementValue
|
||||
|
|
|
@ -75,6 +75,14 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
/*
|
||||
// FIXME: This should be defined
|
||||
- (BOOL) isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
*/
|
||||
|
||||
// tab management.
|
||||
|
||||
- (void) addTabViewItem: (NSTabViewItem*)tabViewItem
|
||||
|
|
|
@ -81,6 +81,12 @@
|
|||
_resizedColumn = -1;
|
||||
return self;
|
||||
}
|
||||
|
||||
- (BOOL) isFlipped
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
/*
|
||||
* Setting the table view
|
||||
*/
|
||||
|
@ -171,7 +177,10 @@
|
|||
lastColumnToDraw = [_tableView numberOfColumns] - 1;
|
||||
|
||||
drawingRect = [self headerRectOfColumn: firstColumnToDraw];
|
||||
if ([self isFlipped])
|
||||
{
|
||||
drawingRect.origin.y++;
|
||||
}
|
||||
drawingRect.size.height--;
|
||||
|
||||
columns = [_tableView tableColumns];
|
||||
|
@ -235,13 +244,20 @@
|
|||
drawingRect.origin.x += width;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
NSRectEdge up_sides[] = {NSMinYEdge, NSMaxXEdge};
|
||||
NSRectEdge dn_sides[] = {NSMaxYEdge, NSMaxXEdge};
|
||||
float grays[] = {NSBlack, NSBlack};
|
||||
|
||||
if ([self isFlipped])
|
||||
{
|
||||
NSDrawTiledRects(_bounds, aRect, up_sides, grays, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDrawTiledRects(_bounds, aRect, dn_sides, grays, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) mouseDown: (NSEvent*)event
|
||||
|
|
Loading…
Reference in a new issue