Commit graph

377 commits

Author SHA1 Message Date
Marcian Lytwyn
31f52310df First pass - XIB 5 loading - much work still needed - currently limits changes to
initWithCoder methods and encompasses entire loading to translate XIB 5 into older
XIB key processing.  ALl this eventually should be cleaned up properly but done
this way in order to expedite the code push into svn for Testplant usage.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40300 72102866-910b-0410-8b05-ffd578937521
2017-01-25 15:49:14 +00:00
Marcian Lytwyn
61e111f14f Slight cleanup to last rounding fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40249 72102866-910b-0410-8b05-ffd578937521
2016-12-01 17:48:44 +00:00
Marcian Lytwyn
1f01a2e4b0 Fix autoresize function due to double precision representation of tiny numbers i.e zero
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40235 72102866-910b-0410-8b05-ffd578937521
2016-11-25 17:00:22 +00:00
Marcian Lytwyn
80883d716e Merge with trunk revision 40072
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@40133 72102866-910b-0410-8b05-ffd578937521
2016-10-05 22:33:28 +00:00
Marcian Lytwyn
6305287d1c Force view to redraw on frame change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@39548 72102866-910b-0410-8b05-ffd578937521
2016-03-15 18:57:01 +00:00
Marcian Lytwyn
ffb26b5d34 Merge some code with main brnch revision 39289
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@39326 72102866-910b-0410-8b05-ffd578937521
2016-02-01 22:08:22 +00:00
Marcian Lytwyn
6e13a48b13 Reverting to change prior to Doug/Paul/Marcian changes - flicker problem exists but clears on toggle of scaled/unscaled modes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38984 72102866-910b-0410-8b05-ffd578937521
2015-09-11 21:41:13 +00:00
Marcian Lytwyn
0aa1aae7d3 Renable invalid rect cleanup in display processing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38983 72102866-910b-0410-8b05-ffd578937521
2015-09-11 17:02:46 +00:00
Marcian Lytwyn
d3da9b523e Cleanup and surround code with defines for later reuse
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38980 72102866-910b-0410-8b05-ffd578937521
2015-09-10 18:12:10 +00:00
Marcian Lytwyn
7b1427bcf6 Add named defines for code omit/include sequences
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38979 72102866-910b-0410-8b05-ffd578937521
2015-09-10 16:48:44 +00:00
Marcian Lytwyn
e3dbfd303b Revert to previous NSView display processing due to flicker issue
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38978 72102866-910b-0410-8b05-ffd578937521
2015-09-10 15:36:04 +00:00
Paul Landers
87153ac66d Potential fixes for remote view flickering issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38931 72102866-910b-0410-8b05-ffd578937521
2015-08-25 22:18:57 +00:00
Marcian Lytwyn
de5f907dca Complete merge with GUI main branch revision 38613
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38772 72102866-910b-0410-8b05-ffd578937521
2015-07-08 22:21:16 +00:00
Paul Landers
3d60883d2a Added checks to remove part of _invalidRect when only part of it is being drawn.
Removed previous changes to rect invalidation that this replaces. 



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38656 72102866-910b-0410-8b05-ffd578937521
2015-06-17 23:23:01 +00:00
Doug Simons
b89de028aa fix broken display update when expanding an outlineView item
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38458 72102866-910b-0410-8b05-ffd578937521
2015-04-17 15:39:53 +00:00
Marcian Lytwyn
1325ed9c44 Reset needs_display flag on valid subview draw complete
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38231 72102866-910b-0410-8b05-ffd578937521
2014-12-04 16:31:08 +00:00
Frank Le Grand
4b27157a46 Merged Trunk changes from rev 35219 to TestPlant branch.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36953 72102866-910b-0410-8b05-ffd578937521
2013-08-09 14:24:48 +00:00
Marcian Lytwyn
d8aa0014eb Attempt fix for constant re-display of view problem
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36779 72102866-910b-0410-8b05-ffd578937521
2013-06-30 18:23:05 +00:00
Marcian Lytwyn
36e77b95f7 Merge from revision 35723 from main branch plus NSCell allowsUndo flag extract from xib
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35724 72102866-910b-0410-8b05-ffd578937521
2012-10-19 22:51:20 +00:00
Marcian Lytwyn
9e04422b24 Prevent recursive notification sequence
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35617 72102866-910b-0410-8b05-ffd578937521
2012-09-28 20:41:14 +00:00
Marcian Lytwyn
a0564c8ee4 addSubview should not throw exception on nil view (behavior does not match OSX)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@35560 72102866-910b-0410-8b05-ffd578937521
2012-09-10 20:51:58 +00:00
Eric Wasylishen
d55752b22c * Source/NSView.m (-setBounds:, -setBoundsOrigin:, -setBoundsSize:):
Revert a portion of r32955 which I committed last april but I now
see was a mistake, and I just discovered is breaking the  copy-on-scroll
behaviour of NSClipView - we end up always redrawing the entire visible
portion of the document view right now.

In r32955 I added [self setNeedsDisplay: YES] calls to these methods
even though these are documented explicitly as not marking the view for
needing display. Approved by Fred for commit during the code freeze.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34606 72102866-910b-0410-8b05-ffd578937521
2012-01-21 19:15:51 +00:00
Eric Wasylishen
2f0f50cc95 Undo last change as it broke Graphos printing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34353 72102866-910b-0410-8b05-ffd578937521
2011-12-23 21:22:41 +00:00
Eric Wasylishen
d374f0acae * Source/NSView.m (-beginPageInRect:atPlacement:): Always translate
by the placement value. Previously, we would translate only if the
rect parameter was empty, which doesn't make sense to me.
This fixes the bug where the last page of a document printed from
Ink/TextEdit was incorrectly positioned at the bottom of the
printed page.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34352 72102866-910b-0410-8b05-ffd578937521
2011-12-23 20:33:19 +00:00
Fred Kiefer
8ad4aa86c4 Replace some occurences of int with NSInteger
and unsigned with NSUInteger. This allows to recompile gui on 
64 bit systems after the change to NSNotFound in base.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34312 72102866-910b-0410-8b05-ffd578937521
2011-12-17 17:16:09 +00:00
Eric Wasylishen
e6db640322 * Source/NSView.m: centerScanRect patch from Sebastian Reitenbach.
Note that this makes the NSView autoresizing and rounding test pass,
but the new centerScanRect test I just added fail.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34104 72102866-910b-0410-8b05-ffd578937521
2011-11-01 17:45:21 +00:00
Fred Kiefer
23b1ff3f36 Fix XIB loading bug reported by Julian Mayer as bug #34454.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33931 72102866-910b-0410-8b05-ffd578937521
2011-10-03 12:48:15 +00:00
Eric Wasylishen
c4048d4f4b * Source/NSView.m (_setNeedsDisplayInRect_real:): Enlarge
(if necessary) _invalidRect so it lies on integral device pixels.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33809 72102866-910b-0410-8b05-ffd578937521
2011-09-07 05:33:25 +00:00
Fred Kiefer
4e05c96c6f * Source/NSView.m (-setBoundsSize:): Adjust the origin as well.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33717 72102866-910b-0410-8b05-ffd578937521
2011-08-11 08:14:53 +00:00
Fred Kiefer
c100baf6b4 Lots of minimal changes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33613 72102866-910b-0410-8b05-ffd578937521
2011-07-23 13:43:33 +00:00
Fred Kiefer
34266c025a Declare variable at begin of method to allow compilation with older
compilers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33493 72102866-910b-0410-8b05-ffd578937521
2011-07-08 22:52:35 +00:00
Eric Wasylishen
e5bd93c5d8 * Source/NSView.m (-resizeWithOldSuperviewSize:): Factor out
autoresizing logic into a function. Add an extra code path to handle
when the flexible space is 0, which behaves like the old version
of the code (it divides the available space evenly).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33490 72102866-910b-0410-8b05-ffd578937521
2011-07-08 19:29:50 +00:00
Eric Wasylishen
88be063a41 * Headers/AppKit/NSView.h:
* Source/NSView.m (-resizeWithOldSuperviewSize): Pixel-align
view frame when autoresizing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33483 72102866-910b-0410-8b05-ffd578937521
2011-07-07 23:16:02 +00:00
Fred Kiefer
a71f6baac8 * Source/NSView.m (-resizeWithOldSuperviewSize): Reimplement to
resize proportionally as Cocoa does.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33482 72102866-910b-0410-8b05-ffd578937521
2011-07-07 22:19:07 +00:00
Fred Kiefer
87c05a3ba1 * Source/GSDragView.m (-init): Set the window background colour to clear.
* Headers/AppKit/NSAffineTransform.h,
* Headers/AppKit/NSView.h,
* Source/NSAffineTransform.m,
* Source/NSPrintOperation.m,
* Source/NSView.m: Use CGFlaot instead of float.
* Tests/gui/NSView/NSView_bounds_scale.m: New test file that currently fails.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33398 72102866-910b-0410-8b05-ffd578937521
2011-06-28 20:59:24 +00:00
Fred Kiefer
52aee6a0ee * Source/NSView.m (-_viewWillMoveToWindow:): Move the invalidation of
the coordinate transformations and the cursor rects before the
window test. Remove calls to coordinate invalidation from other places.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33347 72102866-910b-0410-8b05-ffd578937521
2011-06-19 10:04:24 +00:00
Fred Kiefer
b1a51425e6 * Source/NSView.m (-setBounds:, -setBoundsSize:): Rewrite of this
methods plus a few helpers. We pass now all the frame/bounds test cases.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33343 72102866-910b-0410-8b05-ffd578937521
2011-06-18 22:59:58 +00:00
Eric Wasylishen
1a25ffa41e * Source/NSView.m (-scrollRectToVisible:): Work when the receiver
isn't partially visible in the clip view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33297 72102866-910b-0410-8b05-ffd578937521
2011-06-14 02:27:35 +00:00
Fred Kiefer
f4a8cab41b * Source/NSView.m (-setSubviews:): New method.
Code by Banlu Kemiyatorn <object@gmail.com>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33068 72102866-910b-0410-8b05-ffd578937521
2011-05-19 08:19:13 +00:00
Fred Kiefer
6c54fd6be5 Remove most uses of the method [NSView -removeSubview:].
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33047 72102866-910b-0410-8b05-ffd578937521
2011-05-15 14:42:08 +00:00
Eric Wasylishen
5b0bfe8f6e 011-05-07 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSView.m (-convertPoint:toView:): Correct this
	method; it was applying the transforms backwards :-(


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33001 72102866-910b-0410-8b05-ffd578937521
2011-05-07 21:30:25 +00:00
Eric Wasylishen
b00942ae92 * Source/NSView.m (-updateBoundsMatrix):
Fix a bug where updateBoundsMatrix would refuse to restore a
view's scale to its original value, after a modified bounds rect
had been set.
* Source/NSView.m (-setBounds:, -setBoundsOrigin:, -setBoundsSize:):
Call [self setNeedsDisplay: YES]; at the ends of these methods.
While the Cocoa docs explicitly say that calling these methods
won't mark the view as needing redisplay, this doesn't seem to
be true in practice.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32955 72102866-910b-0410-8b05-ffd578937521
2011-04-30 06:40:14 +00:00
Eric Wasylishen
a5a57fdfdf * Source/NSView.m (-_rebuildCoordinates): Remove assumption that
the window content view's superview's transformation matrix is
the identity matrix.
* Source/NSView.m (-convertPoint..., convertRect..., convertSize...):
Rewrite these methods to remove the same assumption as above, and
also call -_matrixToWindow/-_matrixFromWindow rather than accessing
ivars directly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32887 72102866-910b-0410-8b05-ffd578937521
2011-04-18 21:02:36 +00:00
Fred Kiefer
a953d2bda0 Release the key value binding as it will be
retained in the binding table.
Leak found by static code analyser.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32484 72102866-910b-0410-8b05-ffd578937521
2011-03-07 13:35:37 +00:00
Fred Kiefer
4abc4ac83b Add the 10.5 coordinate transformation methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31755 72102866-910b-0410-8b05-ffd578937521
2010-12-22 17:06:35 +00:00
Jonathan Gillaspie
6198e3aa94 * Source/NSView.m: Added some basic santity checkts that the views
are in windows when converting rectangles.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31583 72102866-910b-0410-8b05-ffd578937521
2010-11-02 20:57:52 +00:00
Fred Kiefer
8d1ae3ab80 * Source/NSView.m (-_viewWillMoveToWindow:): When calling
[-releaseGState] make sure to keep the value of _allocate_gstate.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31409 72102866-910b-0410-8b05-ffd578937521
2010-09-24 18:35:18 +00:00
Fred Kiefer
5ef03d293a Fix bugs found by static code analysis.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31360 72102866-910b-0410-8b05-ffd578937521
2010-09-16 07:57:57 +00:00
Fred Kiefer
a3eb0e0e6e Check if the window and it's gstate exist before undefining the gstate.
Patch by Georg Fleischmann <G.Fleischmann@vhf.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31350 72102866-910b-0410-8b05-ffd578937521
2010-09-15 08:21:32 +00:00
Quentin Mathe
a7ca2b775f Replaced _rFlags.flipped_view use with -isFlipped and deprecated
_rFlagsType.flipped_view.
Still needs some work to automatically invalidate coordinates when the 
flipping changes e.g. between two drawing sessions.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31233 72102866-910b-0410-8b05-ffd578937521
2010-09-03 08:21:52 +00:00