Commit graph

144 commits

Author SHA1 Message Date
Mirko Viviani
50cf187fad * Source/NSSavePanel.m ([NSSavePanel -browser:createRowsForColumn:
inMatrix:]): do not treat a file package a directory with an empty
extension.
* Source/NSMatrix.m ([NSMatrix -_mouseDownNonListMode:]): retain the
currentEvent. Fix to prevent theEvent to become nil.
Do not allow empty selection in NSRadioModeMatrix.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9834 72102866-910b-0410-8b05-ffd578937521
2001-05-05 21:45:59 +00:00
Nicola Pero
29e5e5ea83 Use the public NSFileManager API to enumerate the contents of a directory,
so that the library is not broken when the internals of NSFileManager are
changed


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@9532 72102866-910b-0410-8b05-ffd578937521
2001-04-06 22:41:55 +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
Mirko Viviani
51d87dae28 2000-09-14 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSPanel.m ([GSAlertPanel
	-initWithContentRect:styleMask:backing:defer:screen:]): set alternate
	return image.
	* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]):
	removed.
	* Source/NSSavePanel.m ([NSSavePanel -controlTextDidEndEditing:]):
	repost currentEvent.
	([NSSavePanel -_initWithoutGModel]): removed form cell action, set
	_okButton image.
	([NSSavePanel -_performReturn:]): removed.
	* Images/common_retH.tiff: new file.
	* Images/GNUmakefile (IMAGE_FILES): update.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7518 72102866-910b-0410-8b05-ffd578937521
2000-09-14 21:53:03 +00:00
Mirko Viviani
05a9cab8f7 2000-09-13 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Source/NSBrowser.m ([NSBrowser -_performLoadOfColumn:]): fixed
	intercell space values.

	* Source/NSText.m ([NSText -keyDown:]): removed forward for illegal
	text field events.

	* Source/NSSavePanel.m ([NSSavePanel -controlTextDidEndEditing:]):
	implemented for text field movement.
	([NSSavePanel -_performReturn:]): new private method.
	([NSSavePanel -_initWithoutGModel]): set form cell action to
	_performReturn:

	* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]): call
	super.
	([NSOpenPanel -_selectCellName:]):,
	([NSOpenPanel -controlTextDidChange:]): enable okButton if there is
	text in the text field.
	([NSOpenPanel -ok:]): returns if nothing selected.

	* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): removed workaround.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7506 72102866-910b-0410-8b05-ffd578937521
2000-09-13 20:18:01 +00:00
Mirko Viviani
df00948e11 2000-09-10 Mirko Viviani <mirko.viviani@rccr.cremona.it>
* Tools/gpbs.m ([PasteboardEntry -lostOwnership]): workaround to avoid
	core dump due to NSConnection bug.

	* Source/NSWindow.m ([NSWindow -keyDown:]): discard and do not perform
	key equivalent for null character events. Triggered return key for
	default button cell.
	([NSWindow -defaultButtonCell]), ([NSWindow -setDefaultButtonCell:]),
	([NSWindow -disableKeyEquivalentForDefaultButtonCell]),
	([NSWindow -enableKeyEquivalentForDefaultButtonCell]): implemented.
	([NSWindow -dealloc]): release _defaultButtonCell

	* Headers/AppKit/NSWindow.h: added ivar and flag.

	* Source/NSOpenPanel.m ([NSOpenPanel -controlTextDidEndEditing:]),
	([NSOpenPanel -controlTextDidChange:]), ([NSOpenPanel -ok:]):
	implemented keyboard navigation.
	([NSOpenPanel -runModalForDirectory:file:types:]): do not allow
	branch selection if can't choose directories.
	([NSOpenPanel -_selectTextInColumn:]),
	([NSOpenPanel -_selectCellName:]): new private methods.
	([NSOpenPanel -filenames]): change for choose dirs.

	* Source/NSText.m ([NSText -keyDown:]): forwards text field illegal
	events to the next responder.

	* Source/NSBrowser.m ([NSBrowser -moveUp:]), ([NSBrowser -moveDown:]),
	([NSBrowser -moveLeft:]), ([NSBrowser -moveRight:]),
	([NSBrowser -keyDown:]): implemented keyboard navigation
	([NSBrowser -selectedCell]), ([NSBrowser -selectedCells]),
	([NSBrowser -columnOfMatrix:]), ([NSBrowser -selectedColumn]):
	changed return value from NSNotFound to -1 to conforms to NSMatrix
	([NSBrowser -doClick:]): fix for new return values, added support for
	multiple and branch selection.
	([NSBrowser -setLastColumn:]): mark column titles need display
	([NSBrowser -_getTitleOfColumn:]): fix for multiple selection.

	* Source/NSCell.m ([NSCell -setState:]): bug fix: set value to
	NSOnState if someone try to set NSMixedState in a two state cell.
	([NSCell -performClick:]): do not perform click if the cell is
	disabled.

	* Source/NSMatrix.m ([NSMatrix
	-_privateFrame:mode:numberOfRows:numberOfColumns:]),
	([NSMatrix -deselectAllCells]), ([NSMatrix -deselectSelectedCell]),
	([NSMatrix -selectAll:]): bug fix: set _selectRow and _selectColumn
	to -1 when no cells are selected
	([NSMatrix -performKeyEquivalent:]): saves _selectedRow and
	_selectedColumn.
	([NSMatrix -getRow:column:ofCell:]): check for null values for row and
	column.
	([NSMatrix -selectCellAtRow:column:]): deselect the current selection
	only in NSRadioModeMatrix mode.
	([NSMatrix -mouseDown:]): use the new code also for NSRadioModeMatrix
	and fix for this mode.

	* Source/NSSavePanel.m ([NSSavePanel -selectCellWithString:]): select
	text of the cell and enable okButton.
	([NSSavePanel -controlTextDidChange:]): implemented.
	([NSSavePanel -controlTextDidEndEditing:]): removed.
	([NSSavePanel -browser:createRowsForColumn:inMatrix:]): follows
	symbolic links.
	([NSSavePanel -_initWithoutGModel]): set browser doubleAction to
	performClick: of the _okButton. Set _okButton as default window button.
	Disable _okButton.
	([NSSavePanel -browser:selectCellWithString:inColumn:]),
	([NSSavePanel -selectText:]), ([NSSavePanel -keyDown:]): implemented
	keyboard navigation.
	([NSSavePanel -runModalForDirectory:file:]): enable _okButton if
	filename is valid.
	([NSSavePanel -_selectTextInColumn:]), ([NSSavePanel -_selectText:]),
	([NSSavePanel -_selectCellName:]): new private methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7468 72102866-910b-0410-8b05-ffd578937521
2000-09-10 21:55:17 +00:00
Nicola Pero
66fd318187 Enclosed creation of a matrix column into an autorelease pool; do not
create then destroy a column in the matrix if it is void


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7351 72102866-910b-0410-8b05-ffd578937521
2000-09-03 19:19:40 +00:00
Nicola Pero
e83c3e9738 Fixed sizing when adding and removing accessory views
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7296 72102866-910b-0410-8b05-ffd578937521
2000-08-30 22:41:53 +00:00
Nicola Pero
f9dca23152 Double clicking on an item now opens it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7287 72102866-910b-0410-8b05-ffd578937521
2000-08-30 10:12:37 +00:00
Richard Frith-MacDonald
42e851197f Minor updates
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6223 72102866-910b-0410-8b05-ffd578937521
2000-03-08 21:26:11 +00:00
Nicola Pero
87f186d425 Tidyup, use a button for application icon
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5786 72102866-910b-0410-8b05-ffd578937521
2000-01-14 22:38:54 +00:00
Nicola Pero
0314eb34aa Fixed sizes of buttons and form, position of title
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5762 72102866-910b-0410-8b05-ffd578937521
2000-01-13 23:13:38 +00:00
Richard Frith-MacDonald
23944eb608 Tidied autoresize constants
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5583 72102866-910b-0410-8b05-ffd578937521
1999-12-20 10:11:26 +00:00
Nicola Pero
fcb9c37b09 Use setNeedsDisplay: now that Richard (thanks richard :-) made it work
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5568 72102866-910b-0410-8b05-ffd578937521
1999-12-17 23:25:37 +00:00
Nicola Pero
14b72cfc87 Fixed bug which was causing NSOKButton to be returned on abort.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5425 72102866-910b-0410-8b05-ffd578937521
1999-12-09 04:58:20 +00:00
Nicola Pero
ad2983f3a7 Rewriting of most of the brain.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5393 72102866-910b-0410-8b05-ffd578937521
1999-12-07 05:55:13 +00:00
Nicola Pero
147add82bf Use a NSForm for the typing field.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5309 72102866-910b-0410-8b05-ffd578937521
1999-11-28 16:49:38 +00:00
Nicola Pero
b2e2c0e9ca Maintenance, Clean up, tiny optimizations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5299 72102866-910b-0410-8b05-ffd578937521
1999-11-27 02:33:12 +00:00
Nicola Pero
2eb27c30f7 Added code to deal with editing in the form the file name.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5180 72102866-910b-0410-8b05-ffd578937521
1999-11-14 03:27:44 +00:00
Nicola Pero
c7690fb68b Rewritten.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5102 72102866-910b-0410-8b05-ffd578937521
1999-10-30 02:10:37 +00:00
Nicola Pero
867be115f0 Changed ok button to display OK rather than Ok
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5095 72102866-910b-0410-8b05-ffd578937521
1999-10-27 13:32:02 +00:00
Nicola Pero
4b79f086d7 Cleanup for sizes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5091 72102866-910b-0410-8b05-ffd578937521
1999-10-27 12:15:44 +00:00
Nicola Pero
9e83c21343 Rethinked code to add accessory views; cleaned, tested.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5083 72102866-910b-0410-8b05-ffd578937521
1999-10-26 19:53:15 +00:00
Nicola Pero
771be28699 Tidy up.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5059 72102866-910b-0410-8b05-ffd578937521
1999-10-23 01:57:48 +00:00
Nicola Pero
c16bb04b88 Make the panel non resizable
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5034 72102866-910b-0410-8b05-ffd578937521
1999-10-18 22:56:42 +00:00
Richard Frith-MacDonald
a1fef22ebb Fixed error in last mod
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4939 72102866-910b-0410-8b05-ffd578937521
1999-09-24 03:56:57 +00:00
Richard Frith-MacDonald
b462835083 Browser cell and save panel updates.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4937 72102866-910b-0410-8b05-ffd578937521
1999-09-23 16:00:14 +00:00
Richard Frith-MacDonald
5296afaafe Minor tidying
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4914 72102866-910b-0410-8b05-ffd578937521
1999-09-20 04:41:47 +00:00
Richard Frith-MacDonald
738bb09559 Access superclass ivars directly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4786 72102866-910b-0410-8b05-ffd578937521
1999-09-01 08:35:16 +00:00
Richard Frith-MacDonald
24157a3f73 Rewritten version.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4411 72102866-910b-0410-8b05-ffd578937521
1999-06-16 11:23:48 +00:00
Richard Frith-MacDonald
6d2240bb29 Changfes suggested by Marc.Champesme@lipn.univ-paris13.fr
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4125 72102866-910b-0410-8b05-ffd578937521
1999-04-23 16:15:11 +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
Adam Fedor
6bde69b8ec Move GMArchiver files so gui doesnt depend on extenions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3614 72102866-910b-0410-8b05-ffd578937521
1999-01-28 18:34:31 +00:00
Lyndon Tremblay
8030340145 Added browser delegate support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3283 72102866-910b-0410-8b05-ffd578937521
1998-11-21 00:09:47 +00:00
Lyndon Tremblay
fdff9084d0 Loads "SavePanel" instead of "/usr/GNUstep/Library/Model/SavePanel.gmodel"
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3258 72102866-910b-0410-8b05-ffd578937521
1998-11-20 00:19:19 +00:00
Lyndon Tremblay
8c8b46ac00 Fake class for gmodel loading, loads from gmodel.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3254 72102866-910b-0410-8b05-ffd578937521
1998-11-19 21:55:18 +00:00
Felipe A. Rodriguez
2b9b066fcc * NSSplitView.m in drawRect moved NSRectFill() to backend
* NSSavePanel.m commented out call to NSRunAlertPanel
	* NSText.h and NSText.m integrated source from Daniel B�hringer.
	* NSTextView.h and NSTextView.m integrated source from Daniel B�hringer.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2936 72102866-910b-0410-8b05-ffd578937521
1998-08-20 09:56:26 +00:00
Felipe A. Rodriguez
fd64d9ffb9 * NSView.h added specific values and comments to resize constants enum.
* NSView.m implemented resizeWithOldSuperviewSize (needs work).
	* NSMatrix.m mousedown clarified description comment.
	* NSSavePanel.m integrated source from Daniel B�hringer into premliminary
		implementations provided by Scott Christley.
	* NSSavePanel.h integrated source from Daniel B�hringer into premliminary
		implementations provided by Scott Christley.
	* NSOpenPanel.m integrated source from Daniel B�hringer into premliminary
		implementations provided by Scott Christley.
	* NSOpenPanel.h integrated source from Daniel B�hringer into premliminary
		implementations provided by Scott Christley.
	* NSStringDrawing.h defined NSAttributedString portion of extension.
	* NSAttributedString.h created preliminary implementation of extension.
	* Appkit.h added includes for NSAttributedString and NSStringDrawing.
	* NSPasteboard.h added extern NSRTFDPboardType define.
	* externs.m defined NSRTFDPboardType.
	* NSText.h integrated source from Daniel B�hringer
	* NSTextView.m preliminary implementation from Daniel B�hringer
	* NSTextView.h preliminary implementation from Daniel B�hringer
	* NSSplitView.m in drawRect use NSRectFill()


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2934 72102866-910b-0410-8b05-ffd578937521
1998-08-19 09:00:26 +00:00
Felipe A. Rodriguez
ddfdb35ec3 * NSSplitView in initWithFrame changed default back color to light gray.
* NSSavePanel modified to inherit from NSPanel per OS spec.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2896 72102866-910b-0410-8b05-ffd578937521
1998-08-04 08:33:31 +00:00
Scott Christley
aee90a695e Convert to the GNUstep makefile package.
The config.h files should not be installed with the other
header files; it is only used for compilation, so the source
files should include it not the header files.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2439 72102866-910b-0410-8b05-ffd578937521
1997-09-23 22:43:24 +00:00
Scott Christley
d4bfac2d3a Added scaling and rotation support.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2386 72102866-910b-0410-8b05-ffd578937521
1997-08-18 17:10:23 +00:00
Scott Christley
151bf11e2c Header files reorganized. All the definitions were moved in appropiate files.
Each header file includes only the header files it needs and it uses
@class to forward reference a class.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2189 72102866-910b-0410-8b05-ffd578937521
1997-02-18 00:29:25 +00:00
Scott Christley
50604fcf31 Corrected FSF address and moved comment about NET-Community
support into SUPPORT file.
Additional NSImage work.
Added resources for common TIFF images.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@1869 72102866-910b-0410-8b05-ffd578937521
1996-10-18 17:14:13 +00:00
GNUstep Maintainer
4faed08751 Initial revision
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@1580 72102866-910b-0410-8b05-ffd578937521
1996-05-30 20:03:15 +00:00