mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
New ivars for NSView and improved canDraw implemetantion.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18802 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f169d28edb
commit
d82befe200
3 changed files with 36 additions and 15 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2004-03-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Header/AppKit/NSView.h:
|
||||
Added ivars _is_hidden, _in_live_resize and _focusRingType.
|
||||
* Source/NSView.m:
|
||||
(-canDraw) fully implemented. (-displayIfNeededInRectIgnoringOpacity:,
|
||||
-displayRectIgnoringOpacity:) use canDraw. (-setFocusRingType:,
|
||||
-focusRingType, -needsToDrawRect:, -isHidden, -setHidden:,
|
||||
-inLiveResize, -viewWillStartLiveResize, -viewDidEndLiveResize)
|
||||
implemented. (-canBecomeKeyView) use isHiddenOrHasHiddenAncestor
|
||||
instead of isHidden.
|
||||
|
||||
2004-03-07 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Documentation/Gui/Gui.gsdoc: Use automatic indexing
|
||||
|
|
|
@ -114,6 +114,10 @@ typedef enum _NSFocusRingType {
|
|||
BOOL _coordinates_valid;
|
||||
BOOL _allocate_gstate;
|
||||
BOOL _renew_gstate;
|
||||
BOOL _is_hidden;
|
||||
BOOL _in_live_resize;
|
||||
|
||||
NSFocusRingType _focusRingType;
|
||||
|
||||
void *_nextKeyView;
|
||||
void *_previousKeyView;
|
||||
|
|
|
@ -1708,7 +1708,9 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (BOOL) canDraw
|
||||
{ // not implemented per OS spec FIX ME
|
||||
if (_window != nil)
|
||||
if (((viewIsPrinting != nil) && [self isDescendantOf: viewIsPrinting]) ||
|
||||
((_window != nil) && ([_window windowNumber] != 0) &&
|
||||
![self isHiddenOrHasHiddenAncestor]))
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
@ -1832,7 +1834,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (void) displayIfNeededInRectIgnoringOpacity: (NSRect)aRect
|
||||
{
|
||||
if (viewIsPrinting == nil && _window == nil)
|
||||
if (![self canDraw])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -1964,7 +1966,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
BOOL subviewNeedsDisplay = NO;
|
||||
NSRect neededRect;
|
||||
|
||||
if (viewIsPrinting == nil && _window == nil)
|
||||
if (![self canDraw])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -2103,8 +2105,12 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
|
||||
- (BOOL) needsToDrawRect: (NSRect)aRect
|
||||
{
|
||||
// FIXME
|
||||
return YES;
|
||||
NSRect rect;
|
||||
struct NSWindow_struct *window_t;
|
||||
|
||||
window_t = (struct NSWindow_struct *)_window;
|
||||
rect = [[window_t->_rectsBeingDrawn lastObject] rectValue];
|
||||
return NSIntersectsRect(rect, aRect);
|
||||
}
|
||||
|
||||
- (void) getRectsBeingDrawn: (const NSRect **)rects count: (int *)count
|
||||
|
@ -2239,19 +2245,18 @@ in the main thread.
|
|||
|
||||
- (void) setKeyboardFocusRingNeedsDisplayInRect: (NSRect)rect
|
||||
{
|
||||
// FIXME
|
||||
// FIXME For external type special handling is needed
|
||||
[self setNeedsDisplayInRect: rect];
|
||||
}
|
||||
|
||||
- (void) setFocusRingType: (NSFocusRingType)focusRingType
|
||||
{
|
||||
// FIXME
|
||||
_focusRingType = focusRingType;
|
||||
}
|
||||
|
||||
- (NSFocusRingType) focusRingType
|
||||
{
|
||||
// FIXME
|
||||
return NSFocusRingTypeDefault;
|
||||
return _focusRingType;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2259,13 +2264,12 @@ in the main thread.
|
|||
*/
|
||||
- (void) setHidden: (BOOL)flag
|
||||
{
|
||||
// FIXME
|
||||
_is_hidden = flag;
|
||||
}
|
||||
|
||||
- (BOOL) isHidden
|
||||
{
|
||||
// FIXME
|
||||
return NO;
|
||||
return _is_hidden;
|
||||
}
|
||||
|
||||
- (BOOL) isHiddenOrHasHiddenAncestor
|
||||
|
@ -2278,18 +2282,19 @@ in the main thread.
|
|||
*/
|
||||
- (BOOL) inLiveResize
|
||||
{
|
||||
// FIXME
|
||||
return NO;
|
||||
return _in_live_resize;
|
||||
}
|
||||
|
||||
- (void) viewWillStartLiveResize
|
||||
{
|
||||
// FIXME
|
||||
_in_live_resize = YES;
|
||||
}
|
||||
|
||||
- (void) viewDidEndLiveResize
|
||||
{
|
||||
// FIXME
|
||||
_in_live_resize = NO;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3009,7 +3014,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
- (BOOL) canBecomeKeyView
|
||||
{
|
||||
// FIXME
|
||||
return [self acceptsFirstResponder] && ![self isHidden];
|
||||
return [self acceptsFirstResponder] && ![self isHiddenOrHasHiddenAncestor];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue