mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Make the same change in NSDrawer and also switch to CGFloat.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34314 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8ad4aa86c4
commit
c35a95998d
3 changed files with 32 additions and 24 deletions
14
ChangeLog
14
ChangeLog
|
@ -9,6 +9,7 @@
|
|||
* Headers/AppKit/NSSlider.h
|
||||
* Headers/AppKit/NSTabView.h
|
||||
* Headers/AppKit/NSCell.h
|
||||
* Headers/AppKit/NSDrawer.h
|
||||
* Source/NSSliderCell.m
|
||||
* Source/NSLevelIndicator.m
|
||||
* Source/NSButtonCell.m
|
||||
|
@ -16,7 +17,6 @@
|
|||
* Source/NSMenu.m
|
||||
* Source/NSMenuItem.m
|
||||
* Source/NSLevelIndicatorCell.m
|
||||
* Source/GSToolbarView.m
|
||||
* Source/NSComboBoxCell.m
|
||||
* Source/NSToolbarItem.m
|
||||
* Source/NSSlider.m
|
||||
|
@ -28,9 +28,17 @@
|
|||
* Source/NSOutlineView.m
|
||||
* Source/NSParagraphStyle.m
|
||||
* Source/NSPopUpButtonCell.m
|
||||
* Source/NSView.m: Replace some occurences of int with NSInteger
|
||||
* Source/NSView.m
|
||||
* Source/NSDrawer.m
|
||||
* Source/GSNibLoading.m
|
||||
* Source/GSXibLoader.m
|
||||
* Source/GSToolbarView.m
|
||||
* Source/GSTheme.m
|
||||
* Source/GSThemeDrawing.m
|
||||
* ColorPickers/GSNamedColorPicker.m:
|
||||
Replace some occurences of int with NSInteger
|
||||
and unsigned with NSUInteger. This allows to recompile gui on 64
|
||||
bit systems after the change in base to NSNotFound.
|
||||
bit systems after the change to NSNotFound in base.
|
||||
|
||||
2011-12-16 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
|
|
|
@ -55,9 +55,9 @@ enum {
|
|||
NSSize _maxContentSize;
|
||||
NSSize _minContentSize;
|
||||
NSSize _contentSize;
|
||||
float _leadingOffset;
|
||||
float _trailingOffset;
|
||||
int _state;
|
||||
CGFloat _leadingOffset;
|
||||
CGFloat _trailingOffset;
|
||||
NSInteger _state;
|
||||
}
|
||||
|
||||
// Creation
|
||||
|
@ -74,15 +74,15 @@ enum {
|
|||
|
||||
// Managing Size
|
||||
- (NSSize) contentSize;
|
||||
- (float) leadingOffset;
|
||||
- (CGFloat) leadingOffset;
|
||||
- (NSSize) maxContentSize;
|
||||
- (NSSize) minContentSize;
|
||||
- (void) setContentSize: (NSSize)size;
|
||||
- (void) setLeadingOffset: (float)offset;
|
||||
- (void) setLeadingOffset: (CGFloat)offset;
|
||||
- (void) setMaxContentSize: (NSSize)size;
|
||||
- (void) setMinContentSize: (NSSize)size;
|
||||
- (void) setTrailingOffset: (float)offset;
|
||||
- (float) trailingOffset;
|
||||
- (void) setTrailingOffset: (CGFloat)offset;
|
||||
- (CGFloat) trailingOffset;
|
||||
|
||||
// Managing Edge
|
||||
- (NSRectEdge) edge;
|
||||
|
@ -98,7 +98,7 @@ enum {
|
|||
// Delegation and State
|
||||
- (id) delegate;
|
||||
- (void) setDelegate: (id)anObject;
|
||||
- (int) state;
|
||||
- (NSInteger) state;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static NSNotificationCenter *nc = nil;
|
|||
NSRect _latestParentFrame;
|
||||
BOOL _wasOpen;
|
||||
}
|
||||
- (NSRect) frameFromParentWindowFrameInState:(int)state;
|
||||
- (NSRect) frameFromParentWindowFrameInState:(NSInteger)state;
|
||||
|
||||
// open/close
|
||||
- (void) openOnEdge;
|
||||
|
@ -151,15 +151,15 @@ static NSNotificationCenter *nc = nil;
|
|||
return _container;
|
||||
}
|
||||
|
||||
- (NSRect) frameFromParentWindowFrameInState:(int)state
|
||||
- (NSRect) frameFromParentWindowFrameInState:(NSInteger)state
|
||||
{
|
||||
NSRect newFrame = [_parentWindow frame];
|
||||
float totalOffset = [_drawer leadingOffset] + [_drawer trailingOffset];
|
||||
CGFloat totalOffset = [_drawer leadingOffset] + [_drawer trailingOffset];
|
||||
NSRectEdge edge = [_drawer preferredEdge];
|
||||
BOOL opened = (state == NSDrawerOpenState || state == NSDrawerOpeningState);
|
||||
NSSize size = [_parentWindow frame].size; // [_drawer maxContentSize];
|
||||
NSRect windowContentRect = [[_parentWindow contentView] frame];
|
||||
float windowHeightWithoutTitleBar = windowContentRect.origin.y + windowContentRect.size.height; // FIXME: This should probably add the toolbar height too, if the window has a toolbar
|
||||
CGFloat windowHeightWithoutTitleBar = windowContentRect.origin.y + windowContentRect.size.height; // FIXME: This should probably add the toolbar height too, if the window has a toolbar
|
||||
|
||||
if (edge == NSMinXEdge) // left
|
||||
{
|
||||
|
@ -364,10 +364,10 @@ static NSNotificationCenter *nc = nil;
|
|||
NSTimeInterval slideDelay = 0.03;
|
||||
NSDate *nextStop = [NSDate dateWithTimeIntervalSinceNow:slideDelay];
|
||||
int count = 10;
|
||||
float deltaX = (newFrame.origin.x - frame.origin.x) / count;
|
||||
float deltaY = (newFrame.origin.y - frame.origin.y) / count;
|
||||
float deltaW = (newFrame.size.width - frame.size.width) / count;
|
||||
float deltaH = (newFrame.size.height - frame.size.height) / count;
|
||||
CGFloat deltaX = (newFrame.origin.x - frame.origin.x) / count;
|
||||
CGFloat deltaY = (newFrame.origin.y - frame.origin.y) / count;
|
||||
CGFloat deltaW = (newFrame.size.width - frame.size.width) / count;
|
||||
CGFloat deltaH = (newFrame.size.height - frame.size.height) / count;
|
||||
while (count--)
|
||||
{
|
||||
frame.origin.x += deltaX;
|
||||
|
@ -660,7 +660,7 @@ static NSNotificationCenter *nc = nil;
|
|||
return [[_drawerWindow contentView] frame].size;
|
||||
}
|
||||
|
||||
- (float) leadingOffset
|
||||
- (CGFloat) leadingOffset
|
||||
{
|
||||
return _leadingOffset;
|
||||
}
|
||||
|
@ -699,7 +699,7 @@ static NSNotificationCenter *nc = nil;
|
|||
[_drawerWindow setContentSize: size];
|
||||
}
|
||||
|
||||
- (void) setLeadingOffset: (float)offset
|
||||
- (void) setLeadingOffset: (CGFloat)offset
|
||||
{
|
||||
_leadingOffset = offset;
|
||||
}
|
||||
|
@ -714,12 +714,12 @@ static NSNotificationCenter *nc = nil;
|
|||
_minContentSize = size;
|
||||
}
|
||||
|
||||
- (void) setTrailingOffset: (float)offset
|
||||
- (void) setTrailingOffset: (CGFloat)offset
|
||||
{
|
||||
_trailingOffset = offset;
|
||||
}
|
||||
|
||||
- (float) trailingOffset
|
||||
- (CGFloat) trailingOffset
|
||||
{
|
||||
return _trailingOffset;
|
||||
}
|
||||
|
@ -796,7 +796,7 @@ static NSNotificationCenter *nc = nil;
|
|||
SET_DELEGATE_NOTIFICATION(WillOpen);
|
||||
}
|
||||
|
||||
- (int) state
|
||||
- (NSInteger) state
|
||||
{
|
||||
return _state;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue