Commit graph

64 commits

Author SHA1 Message Date
Nicola Pero
9dfbbceaf2 Updated for changes in semantics of NSMutableAttributedString -string
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12497 72102866-910b-0410-8b05-ffd578937521
2002-02-11 17:21:13 +00:00
Nicola Pero
57ea7f8bf1 Fixed drawing of background color which had broken nextstep-like look&feel
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11898 72102866-910b-0410-8b05-ffd578937521
2001-12-25 14:07:25 +00:00
Adam Fedor
d47e202fbe Markup for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
Pierre-Yves Rivaille
a83fb608b9 drawInteriorWithFrame: inView: removed the code that drew the background
(osx doesn't draw background)


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11780 72102866-910b-0410-8b05-ffd578937521
2001-12-16 23:35:06 +00:00
Pierre-Yves Rivaille
410c6189e6 [NSButtonCell _init]: assign @"" to _keyEquivalent and to _altContents
This behaviour is more consistent with other OPENSTEP implementations.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11231 72102866-910b-0410-8b05-ffd578937521
2001-10-23 22:42:55 +00:00
Mirko Viviani
f005f68b2c * Source/NSButtonCell.m ([NSButtonCell -drawInteriorWithFrame:
inView:]): fix mask if cell is highlighted and it isn't in off state.

* Source/NSCell.m ([NSCell -trackMouse:inRect:ofView:untilMouseUp:]):
set next cell state and send action after -stopTracking:

* Source/NSBrowser.m ([NSBrowser -keyDown:]): does nothing for arrow up
and down.
([NSBrowser -moveUp:]): removed.
([NSBrowser -moveDown:]): removed.
([NSBrowser -_performLoadOfColumn:]): fix matrix creation, enable
matrix autoscroll.
([NSBrowser -_performLoadOfColumn:]): implemented reusesColumns.

* Source/NSMatrix.m ([NSMatrix -keyDown:]): implemented keyboard
navigation.
([NSMatrix -moveUp:]): likewise.
([NSMatrix -moveDown:]): likewise.
([NSMatrix -moveLeft:]): likewise.
([NSMatrix -moveRight:]): likewise.
([NSMatrix -performClick:]): implemented.
([NSMatrix -mouseDown:]): scroll rect only if autoscroll is enabled,
do not hightlight a cell directly but use the matrix method.
Now it handles only NSListModeMatrix mode to reduce complexity
introduced by other modes.
([NSMatrix -_mouseDownNonListMode:]): fixed.
([NSMatrix -highlightCell:atRow:column:]): enable the cell dotted
outline.
([NSMatrix -drawCellAtRow:column:]): likewise.
([NSMatrix -drawRect:]): removed drawing of dotted outline. Rewritten
due to changes in -getRow:column:forPoint:
([NSMatrix -getRow:column:forPoint:]): set row and column to -1 if
point is not inside a cell.
([NSMatrix -_selectCell:atRow:column:]): use mnemonic value for cell
state, does not enable dotted outline and check for nil aCell.
([NSMatrix -selectTextAtRow:column:]): likewise.
([NSMatrix -_setState:highlight:startIndex:endIndex:]): use matrix
highlightCell: method and mnemonic for cell state.
([NSMatrix -deselectAllCells]): likewise.
([NSMatrix -selectAll:]): likewise.
([NSMatrix -setSelectionFrom:to:anchor:highlight:]): likewise.
([NSMatrix -performKeyEquivalent:]): select next cell state.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9594 72102866-910b-0410-8b05-ffd578937521
2001-04-16 19:52:52 +00:00
Mirko Viviani
60b8f20ce4 * Source/NSButtonCell.m ([NSButtonCell -setCellAttribute:to:]):
implemented.
([NSButtonCell -cellAttribute:]): implemented.

* Source/NSPopUpButton.m ([NSPopUpButton -keyDown:]): implemented
keyboard selection.
([NSPopUpButton -resignFirstResponder]): implemented.
([NSPopUpButton -resignKeyWindow]): implemented.

* Source/NSPopUpButtonCell.m ([NSPopUpButtonCell
-drawInteriorWithFrame:inView:]): from -drawWithFrame:inView:

* Source/NSButton.m ([NSButton -becomeFirstResponder]): set cell first
responder.
([NSButton -resignFirstResponder]): likewise.
([NSButton -becomeKeyWindow]): likewise.
([NSButton -resignKeyWindow]): likewise.

* Source/NSBrowserCell.m ([NSBrowserCell -drawInteriorWithFrame:
inView:]): draw correct dotted box.

* Source/NSBrowser.m ([NSBrowser -becomeFirstResponder]): make first
responder the latest column.
([NSBrowser -acceptsFirstResponder]): accepts first responder status.
([NSBrowser -keyDown:]): handle tabs to select next/previous key view.
([NSBrowser -moveRight:]): make browser column the first responder.
([NSBrowser -moveUp:]): likewise.
([NSBrowser -moveDown:]): likewise.
([NSBrowser -moveLeft:]): likewise.
([NSBrowser -_unloadFromColumn:]): remove columns from superview and
array.
([NSBrowser -_remapColumnSubviews:]): set the correct first responder.

* Source/NSWindow.m ([NSWindow -sendEvent:]): retain/release first
responder for keyUp/keyDown events. Discard NSLeftMouseDown for closed
windows.
([NSWindow -dealloc]): release _originalResponder

* Source/NSView.m ([NSView -removeSubview:]): remove next responder.

* Source/NSCell.m ([NSCell -setUpFieldEditorAttributes:]): clear
selected range.
([NSCell -editWithFrame:inView:editor:delegate:event:]): redisplay
textObject after invoking mouseDown:
([NSCell -drawInteriorWithFrame:inView:]): draw dotted-line outline
when first responder.
([NSCell -setCellAttribute:to:]): implemented.

* Source/NSTextView.m ([NSTextView -moveUp:]): don't call
_illegalMovement: for the text field editor.
([NSTextView -moveDown:]): likewise.
([NSTextView -moveLeft:]): likewise.
([NSTextView -moveRight:]): likewise.

* Source/NSTextField.m ([NSTextField -textDidEndEditing:]): fixed
return/tab/backtab text movement code.

* Headers/gnustep/gui/NSGraphics.h: added NSDottedFrameRect prototype.

* Headers/gnustep/gui/NSMatrix.h: added ivars for dotted frame rect.
* Source/NSMatrix.m ([NSMatrix -selectCell:]): implemented.
([NSMatrix -_selectCell:atRow:column:]): new method.
([NSMatrix -selectCellAtRow:column:]): call _selectCell:atRow:column:
([NSMatrix -selectCellWithTag:]): likewise.
([NSMatrix -selectAll:]): Do not select disabled or editable cells.
([NSMatrix -textDidEndEditing:]): fixed return/tab/backtab text
movement code.
([NSMatrix -_selectNextSelectableCellAfterRow:column:]): don't select
disabled cells.
([NSMatrix -_selectPreviousSelectableCellBeforeRow:column:]): likewise.
([NSMatrix -_privateFrame:mode:numberOfRows:numberOfColumns:]): set
dottedRow and dottedColumn.
([NSMatrix -insertRow:withCells:]): likewise.
([NSMatrix -removeColumn:]): likewise.
([NSMatrix -removeRow:]): likewise.
([NSMatrix -mouseDown:]): likewise and discard disabled cells.
([NSMatrix -drawRect:]): set shows cell first responder.
([NSMatrix -becomeFirstResponder]): draw dotted box for cell.
([NSMatrix -resignFirstResponder]): likewise.
([NSMatrix -becomeKeyWindow]): likewise.
([NSMatrix -resignKeyWindow]): likewise.
([NSMatrix -_setNeedsDisplayDottedCell]): likewise.
([NSMatrix -selectTextAtRow:column:]): set shows cell first responder.
([NSMatrix -setState:atRow:column:]): likewise. Deselect previous
selected cell in radio mode.

* Source/NSSavePanel.m (createRowsForColumn:): use _gsSavePanelCompare:
and check extension against _requiredFileType and not "app", "bundle",
etc.
([NSString -_gsSavePanelCompare:]): filename compare.
([NSSavePanel -_initWithoutGModel]): set key view for keyboard
interaction.
([NSSavePanel -keyDown:]): removed.
([NSSavePanel -controlTextDidEndEditing:]): removed.

* Source/NSOpenPanel.m ([NSOpenPanel -_shouldShowExtension:isDir:]):
added isDir argument.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9473 72102866-910b-0410-8b05-ffd578937521
2001-03-22 00:27:37 +00:00
Fred Kiefer
7465643efd Simplified mask definition in [drawInteriorWithFrame:inView:] and
[cellSize].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8454 72102866-910b-0410-8b05-ffd578937521
2000-12-28 23:39:54 +00:00
Fred Kiefer
3088176c7a Dummy implementation for new methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8444 72102866-910b-0410-8b05-ffd578937521
2000-12-26 21:43:27 +00:00
Nicola Pero
bb4466e3b6 When copying, only make a superficial copy of ivars
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8306 72102866-910b-0410-8b05-ffd578937521
2000-12-12 17:11:21 +00:00
Fred Kiefer
c2f8b2e407 Adopted to changes in NSCell.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8265 72102866-910b-0410-8b05-ffd578937521
2000-12-07 00:20:17 +00:00
Nicola Pero
8fc09a3db5 Use NSString interface to determine size of string to be drawn
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6281 72102866-910b-0410-8b05-ffd578937521
2000-03-15 02:40:43 +00:00
Richard Frith-MacDonald
751ed9aca0 Tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6264 72102866-910b-0410-8b05-ffd578937521
2000-03-10 18:32:41 +00:00
Pascal J. Bourguignon
68d4c08d6b Updated -cellSize to process multiline string value. This should
improve greately the behaviour  of NSTextField and consequently of the
NSPanel building functions.

Updated -[NSCell _drawText:inFrame:]
and -[NSButtonCell drawInteriorWithFrame:inView:]
to handle properly multiline strings.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6257 72102866-910b-0410-8b05-ffd578937521
2000-03-10 13:27:50 +00:00
Nicola Pero
da27eeb391 Fixed bug - was causing problems with gmodels
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6185 72102866-910b-0410-8b05-ffd578937521
2000-03-05 23:43:53 +00:00
Adam Fedor
b33bb418f4 Merge from 0.6.5
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6040 72102866-910b-0410-8b05-ffd578937521
2000-02-19 00:40:47 +00:00
Nicola Pero
0d392b8d0c Updated for change in NSCell
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5807 72102866-910b-0410-8b05-ffd578937521
2000-01-22 01:49:45 +00:00
Nicola Pero
9490cc737c Fixed font height; changes in spacings when drawing
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5756 72102866-910b-0410-8b05-ffd578937521
2000-01-13 23:07:17 +00:00
Nicola Pero
631014d925 Updated for change in NSCell ivar plus tiny optms
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5693 72102866-910b-0410-8b05-ffd578937521
2000-01-07 18:27:51 +00:00
Richard Frith-MacDonald
e70a5cde23 Encoding/decoding fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5522 72102866-910b-0410-8b05-ffd578937521
1999-12-15 17:16:40 +00:00
Nicola Pero
7dac780ead Updated for ivar changings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5491 72102866-910b-0410-8b05-ffd578937521
1999-12-13 16:20:59 +00:00
Nicola Pero
7060d72b9c Prefixed ivars with underscores; access ivars.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5459 72102866-910b-0410-8b05-ffd578937521
1999-12-13 02:38:14 +00:00
Richard Frith-MacDonald
00c273aef7 Tidied
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5404 72102866-910b-0410-8b05-ffd578937521
1999-12-07 16:36:29 +00:00
Richard Frith-MacDonald
19d7c90318 Improved drawing cells with images and titles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5402 72102866-910b-0410-8b05-ffd578937521
1999-12-07 10:51:14 +00:00
Nicola Pero
54765435d2 Fixed isOpaque to reflect the way we draw buttons.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5213 72102866-910b-0410-8b05-ffd578937521
1999-11-16 23:47:51 +00:00
David Lazaro Saz
55e90741fb Added a comment to separate the implementation of the NSCopying protocol.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5205 72102866-910b-0410-8b05-ffd578937521
1999-11-16 22:09:07 +00:00
Nicola Pero
4a5fffd2f4 move back to NSCommandKey for key equivalents
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5011 72102866-910b-0410-8b05-ffd578937521
1999-10-14 00:40:48 +00:00
Nicola Pero
554076c79b Use Control for key equivalent.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5000 72102866-910b-0410-8b05-ffd578937521
1999-10-13 00:50:19 +00:00
Adam Fedor
7088652849 GUI updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4928 72102866-910b-0410-8b05-ffd578937521
1999-09-21 15:42:14 +00:00
Richard Frith-MacDonald
dd34792910 Lock focus fixes - get cells to lock focus before drawing themselves.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4924 72102866-910b-0410-8b05-ffd578937521
1999-09-21 05:10:54 +00:00
David Lazaro Saz
061c43304a First a correction to the make/Changelog file to add my e-mail to
a past entry I did (I forgot :)
GUI: Changes to make buttons NeXTish and nicer.  Modified size and drawing
methods in core/gui/Source/NSButtonCell.m


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4886 72102866-910b-0410-8b05-ffd578937521
1999-09-14 01:45:58 +00:00
Richard Frith-MacDonald
0dd419d272 Tidied to get rid of pretty useless private method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4871 72102866-910b-0410-8b05-ffd578937521
1999-09-11 10:08:56 +00:00
Richard Frith-MacDonald
63b1e96172 Nocolas patch for cell size calculation, plus some tidying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4869 72102866-910b-0410-8b05-ffd578937521
1999-09-11 05:25:53 +00:00
Richard Frith-MacDonald
fd0242bd0d [-cellSize] implemented
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4864 72102866-910b-0410-8b05-ffd578937521
1999-09-10 05:18:32 +00:00
Richard Frith-MacDonald
f67aa2a775 performClick in focus view
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4346 72102866-910b-0410-8b05-ffd578937521
1999-06-02 20:51:02 +00:00
Richard Frith-MacDonald
61e4a40589 Send actions as we should
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4343 72102866-910b-0410-8b05-ffd578937521
1999-06-02 20:37:19 +00:00
Adam Fedor
78d19303e0 Fix up clipping
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4246 72102866-910b-0410-8b05-ffd578937521
1999-05-13 13:51:57 +00:00
Adam Fedor
ac26385d09 Fix up lockFocus, restoring graphics context.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4243 72102866-910b-0410-8b05-ffd578937521
1999-05-11 15:43:10 +00:00
Richard Frith-MacDonald
9f478f8a62 Fix suggested by Benhur
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4191 72102866-910b-0410-8b05-ffd578937521
1999-05-03 17:31:11 +00:00
Richard Frith-MacDonald
6847940a3e Set backgrounds of images before drawing them.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4184 72102866-910b-0410-8b05-ffd578937521
1999-05-02 18:27:38 +00:00
Richard Frith-MacDonald
05a45da8bf Tidied and fixed a couple of bugs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3969 72102866-910b-0410-8b05-ffd578937521
1999-03-24 09:21:06 +00:00
Richard Frith-MacDonald
dbbeff810a Merged in 'dawn' CVS branch
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3827 72102866-910b-0410-8b05-ffd578937521
1999-03-02 08:58:30 +00:00
Richard Frith-MacDonald
295f1d2a08 iUpdated for NSGraphicsContext
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3804 72102866-910b-0410-8b05-ffd578937521
1999-02-25 15:45:22 +00:00
Richard Frith-MacDonald
d72e09ffca Uncomment instruction to clip to drawing frame.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3722 72102866-910b-0410-8b05-ffd578937521
1999-02-16 13:21:42 +00:00
Michael Silva
d6da78443c * Source/NSBox.m Source/NSButtonCell.m Source/NSCell.m
Source/NSColorWell.m Source/NSMatrix.m Source/NSPrintInfo.m
Source/NSScroller.m Source/NSSliderCell.m: fixed compilation
warnings by including proper includes.

* Tools/Functions.m: Defined NSRectClip(). Fixes fatal linking
errors in Tools/


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3712 72102866-910b-0410-8b05-ffd578937521
1999-02-15 19:35:02 +00:00
Richard Frith-MacDonald
ea05b49ebb Handle flipped views
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3709 72102866-910b-0410-8b05-ffd578937521
1999-02-15 12:50:49 +00:00
Richard Frith-MacDonald
9b25f83278 Various updates to get keyboard equivalents for buttons working (especially
for panels).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3461 72102866-910b-0410-8b05-ffd578937521
1998-12-15 16:20:22 +00:00
Felipe A. Rodriguez
f29476bc08 * NSWindow.m renmae captureMouse: to _captureMouse: (designate as non OS),
various methods add fieldEditor support.
	* GSContext.m/GSContext.h revert to previous code as solution discussed
	with Adam Fedor regarding backends had problems I had not forseen.
	* NSBrowserCell.h/.m specify text subcell as an NSCell, eliminate image
	cell, copyWithZone: optimize and eliminate use of ASSIGN (fixes serious
	dealloc bug), highlight: eliminate method (fixes dup display bug).
	* NSButtonCell.m copyWithZone: optimize and eliminate use of ASSIGN
	* NSStringDrawing.h/.m remove unimplemented draw methods from Category
	(these are backend specific, can't be defined twice and are already
	implemented in xraw).
	* NSApplication.h redefine initialize_gnustep_backend () per Adam's
	redefinition in the backend.
	* Functions.m/.h remove initialize_gnustep_backend()
 	* NSCell.m preliminary implementation of fieldEditor mechanism,
	copyWithZone: optimize and eliminate use of ASSIGN
	* NSControl.m rename cell class global to _NSCONTROL_CELL_CLASS
	* NSMatrix.m implement NSControl's updateCell: to prevent unecessary
	matrix drawing if possible.
	* NSView.m -resizeWithOldSuperviewSize reverted code to my own once more
	(fewer lines and no if/else logic), changed code to use view frame instead
	of bounds per 3.3/4.2 docs, optimize to avoid floating point math and scale
	adjustment unless view has been scaled.
	* NSScrollView.m define as externs various PS* functions for use in
	drawing, polish drawing, move all backend code to front.
	* Tools/dummy.m define dummy PS* functions employed in gui.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3454 72102866-910b-0410-8b05-ffd578937521
1998-12-14 09:54:38 +00:00
Felipe A. Rodriguez
4dd58372f6 * move DPSOperators.h to XDPS.
* move GPS headers into a new backend.
	* define GSContext.h/GSContext.m as abstract super for all drawing
		destinations (eliminates the need for DPS, GPS, DGS at the root of
		the AppKit) add appropriate defintion to various classes.
	* NSMatrix.m add abstract backend code from xraw (eliminate backend).
	* NSSlider.m add abstract backend code from xraw (eliminate backend).
	* NSSliderCell.m add abstract backend code from xraw (eliminate backend).
	* NSSplitView.m add abstract backend code from xraw (eliminate backend).
		replace private divider highlight method with NSHighlightRect()
	* NSWindow.m add class method to create backend specific window view.
	* NSTextField.m add abstract backend code from xraw (eliminate backend).
	* NSForm.m add abstract backend code from xraw (eliminate backend).
	* NSFormCell.m add abstract backend code from xraw (eliminate backend).
	* NSColorWell.m add abstract backend code from xraw (eliminate backend).
	* NSButton.m add abstract backend code from xraw (eliminate backend).
	* NSControl.m add abstract backend code from xraw (eliminate backend).
	* NSBox.m add abstract backend code from xraw (eliminate backend).
	* NSBrowser.m add abstract backend code from xraw (eliminate backend).
	* NSBrowserCell.m add abstract backend code from xraw (eliminate backend).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3321 72102866-910b-0410-8b05-ffd578937521
1998-11-25 17:16:48 +00:00
Adam Fedor
2ec2e70df2 Preliminary drawing engine
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3222 72102866-910b-0410-8b05-ffd578937521
1998-11-16 20:32:48 +00:00