Commit graph

4475 commits

Author SHA1 Message Date
ericwa
b2bc86196a * Source/GSThemeDrawing.m: Use theme tiles (if available)
to draw segmented controls, chosen based on the segment style constant,
and falling back to drawing buttons if the segment tiles are not
available.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29452 72102866-910b-0410-8b05-ffd578937521
2010-02-01 05:27:01 +00:00
ericwa
b6ff87adec Use theme tiles (if available) to draw menu backgrounds and items.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29447 72102866-910b-0410-8b05-ffd578937521
2010-01-30 05:00:29 +00:00
gcasa
94ea683223 * Headers/Additions/GNUstepGUI/GSTheme.h: Added new method
declaration for updateAllWindowsWithMenu:
	* Source/GSThemeMenu.m: Added default implementation of 
	updateAllWindowsWithMenu:
	* Source/NSMenu.m: Added call to updateAllWindowsWithMenu: on
	current theme.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29445 72102866-910b-0410-8b05-ffd578937521
2010-01-30 03:11:56 +00:00
ericwa
f886235d70 Use theme tiles (if available) to draw table headers. New tile names are
GSTableHeader and GSTableCorner.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29444 72102866-910b-0410-8b05-ffd578937521
2010-01-29 22:21:34 +00:00
ericwa
d8b6bbe16b Use tiles for drawing scroller slots, if available
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29443 72102866-910b-0410-8b05-ffd578937521
2010-01-29 20:55:24 +00:00
ericwa
2d68d4d027 Add support for looking up button tiles based on bezel style
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29441 72102866-910b-0410-8b05-ffd578937521
2010-01-29 08:08:10 +00:00
ericwa
773b43ab89 NSSegmentItem should be enabled by default
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29437 72102866-910b-0410-8b05-ffd578937521
2010-01-29 03:19:36 +00:00
ericwa
af81f8a914 NSSegmentedCell themeing support
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29435 72102866-910b-0410-8b05-ffd578937521
2010-01-29 03:11:43 +00:00
ericwa
b6dd322c45 Treat NSButtonCell's with a bezel style as being non-opaque
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29434 72102866-910b-0410-8b05-ffd578937521
2010-01-29 02:14:25 +00:00
ericwa
0f666924a3 Correct typo in NSTexturedRoundedBezelStyle
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29432 72102866-910b-0410-8b05-ffd578937521
2010-01-28 23:33:08 +00:00
ericwa
5fa5e2a83b Factor out table header cell drawing into a new GSTheme method,
-drawTableHeaderCell:withFrame:inView:state:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29431 72102866-910b-0410-8b05-ffd578937521
2010-01-28 07:25:04 +00:00
ericwa
775d9caf51 Create a new GSTheme method for drawing the background of NSMenuView,
-drawBackgroundForMenuView:withFrame:dirtyRect:horizontal:


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29430 72102866-910b-0410-8b05-ffd578937521
2010-01-28 04:28:23 +00:00
ericwa
0614c779b0 Remove some accidentally committed code from r29416
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29429 72102866-910b-0410-8b05-ffd578937521
2010-01-28 01:40:35 +00:00
wlux
bb813d8ae7 Send -applicationShouldTerminateAfterLastWindowClosed: to the delegate
only after a short delay so that all observers can process the
NSWindowWillCloseNotification. This ensures that a modified document
associated with the closed window has been closed before -terminate:
is called and therefore the user isn't asked twice whether she wants
to save the unsaved changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29428 72102866-910b-0410-8b05-ffd578937521
2010-01-28 00:10:42 +00:00
wlux
4381015ec7 Don't touch icon positions when the icon manager is not used, so that
any icon placement performed by the user does not get lost when a
miniwindow is deminiaturized.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29427 72102866-910b-0410-8b05-ffd578937521
2010-01-27 23:43:41 +00:00
wlux
d1faa4b3b4 Implement smart insert and delete and use it when cutting, copying,
pasting, and deleting full words in a text view or text field.

Note: I have changed NSTextView initialization to enable smart insert
and delete by default, since this is the default on OS X. (It is even
documented, though in a maybe obscure place, cf. "Text Editing
Programming Guide for Cocoa: Subclassing NSTextView".)  However, this
means that support for this feature will be somewhat inconsistent.
Smart insert and delete is enabled for text views created
programmatically (including the field editor), but not for text views
loaded from existing nib files.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29426 72102866-910b-0410-8b05-ffd578937521
2010-01-27 23:26:09 +00:00
ericwa
8369ad55c1 * Source/GSThemeDrawing.m (-buttonBorderForCell:style:state:):
Use the new contentRect when calculating the border for tiles


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29425 72102866-910b-0410-8b05-ffd578937521
2010-01-27 23:24:21 +00:00
ericwa
1ed115d842 * Source/GSThemeTools.m: Correct implementation of contentRectForRect
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29424 72102866-910b-0410-8b05-ffd578937521
2010-01-27 23:17:37 +00:00
ericwa
8906ec7b22 Support for the padding box/content rect feature of Nine Patch theme tiles
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29423 72102866-910b-0410-8b05-ffd578937521
2010-01-27 22:43:21 +00:00
fredkiefer
25a22d9fc9 Small clang compatibility patch by Niels Grewe
<niels.grewe@halbordnung.de>.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29421 72102866-910b-0410-8b05-ffd578937521
2010-01-27 14:23:45 +00:00
fredkiefer
7a9c943bc4 Implementation of -rangeOfTextTable:atIndex: method on
NSAttributedString.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29420 72102866-910b-0410-8b05-ffd578937521
2010-01-27 14:10:38 +00:00
qmathe
05a3aad048 Added the possibility to customize the title view look and behavior in a theme
with a GSTitleView subclass.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29419 72102866-910b-0410-8b05-ffd578937521
2010-01-27 11:29:07 +00:00
qmathe
57cdb1250b Dispatch drag events with -[NSApp sendEvent:] and make each synthetized drag
event the current event in order to be consistent with Mac OS X behavior.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29418 72102866-910b-0410-8b05-ffd578937521
2010-01-27 11:21:13 +00:00
ericwa
471c112e9d * Source/NSView.m (-setHidden:): When hiding a view, we need to
call -setNeedsDisplay:YES on the superview, rather than self


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29417 72102866-910b-0410-8b05-ffd578937521
2010-01-27 08:31:19 +00:00
ericwa
384f64e87e * Source/NSView.m (-setHidden:): Fix un-hiding of hidden views, loaded
from nib's, with subviews. The subview coordinates just need to be
invalidated when the view is unhidden.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29416 72102866-910b-0410-8b05-ffd578937521
2010-01-27 07:40:54 +00:00
gcasa
48a4ef2ece * Source/NSWindow.m: Uncomment updateMenu:.. method call in
-[NSWindow update] method.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29383 72102866-910b-0410-8b05-ffd578937521
2010-01-24 08:05:45 +00:00
ericwa
5c6e6f88c9 * Source/NSColorWell.m: Add a minimum distance which you need to
drag the color from a well before it is treated as a drag.
TODO: Unify this with the dragging threshold in other parts of
gui and make a user default called GSDragThreshold, maybe?



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29377 72102866-910b-0410-8b05-ffd578937521
2010-01-24 06:27:36 +00:00
ericwa
62a4f0dd3e * Source/GSWindowDecorationView.m: In drawRect:, clear the window
background before getting the theme to draw its background.
This makes windows with semitransparent background colors work
properly.
NOTE: While the clear operation is very fast, we may want to only do
it if the window background colour has an alpha value of < 1.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29376 72102866-910b-0410-8b05-ffd578937521
2010-01-24 05:06:33 +00:00
ericwa
dd093185eb * Source/NSMenuView.m: For horizontal menus, treat clicking in the
8 pixels of padding to the left of the first menu item as activating
the first menu item.
This lets you open the application menu with a Macintosh-syle
menu bar when the mouse is on the top-left pixel of the screen.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29375 72102866-910b-0410-8b05-ffd578937521
2010-01-24 00:08:32 +00:00
gcasa
3daab3781d Update menu code and set menu on window creation.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29373 72102866-910b-0410-8b05-ffd578937521
2010-01-23 23:41:07 +00:00
rmottola
13e9913ec8 do not process GSAppKitWindowLeave events for closed windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29332 72102866-910b-0410-8b05-ffd578937521
2010-01-20 14:58:59 +00:00
gcasa
e65a790956 Correct problem with popups in windows 95 mode.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29314 72102866-910b-0410-8b05-ffd578937521
2010-01-19 18:48:00 +00:00
fredkiefer
5bc41a34b0 Use YES as default value for AutoenablesItems.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29312 72102866-910b-0410-8b05-ffd578937521
2010-01-19 08:34:24 +00:00
rmottola
7268a24443 make extension checking case insensitive
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29310 72102866-910b-0410-8b05-ffd578937521
2010-01-17 23:37:11 +00:00
gcasa
20283d50fd * Source/NSWindow.m: Temporarily revert previous change for debugging.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29302 72102866-910b-0410-8b05-ffd578937521
2010-01-17 06:01:58 +00:00
qmathe
b5d13a91db Fixed sort direction stuck to the reverse of the sort descriptor prototype
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29298 72102866-910b-0410-8b05-ffd578937521
2010-01-16 22:43:31 +00:00
qmathe
ec403f1296 Rewrote _selectColumn:modifiers: to be simpler, support selection by range as
Cocoa does, and remove the toggle selection behavior when a column is clicked 
twice (in conflict with the ability to change the sort direction).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29296 72102866-910b-0410-8b05-ffd578937521
2010-01-16 20:29:59 +00:00
gcasa
83dac5cfec * Source/NSWindow.m: Don't use the flags for key/main window tracking.
These flags are getting out of sync due to different behavior on
	different backends.  Also, it's better to keep the state in one place
	instead of keeping them in sync.  I changed all of the instances of
	_f.is_key to [self isKeyWindow] and all of the instances of _f.is_main
	to [self isMainWindow] and those methods now check with NSApp to 
	determine if the current window is main.   I realize this is slower
	than the previous method of using flags, but it is also more resilient
	and reliable when the backend sends extra events.  This corrects the
	issue on Windows where we were losing the main window and had two 
	windows marked as "main".


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29295 72102866-910b-0410-8b05-ffd578937521
2010-01-16 19:56:27 +00:00
qmathe
239eec74dc Finished to implement the NSTable/OutlineView sort descriptor support.
More changes are needed to get proper sorting support (e.g. visual feedback).


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29293 72102866-910b-0410-8b05-ffd578937521
2010-01-16 14:45:13 +00:00
espectador
fd57feed5b Fixed bug #28580
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29292 72102866-910b-0410-8b05-ffd578937521
2010-01-16 05:22:02 +00:00
gcasa
df93c9277b * Headers/Additions/GNUstepGUI/GSTheme.h: Added method to call
back menuHeightForWindow:
	* Source/GSThemeMenu.m: Added default implementation of 
	menuHeightForWindow:.  Default implementation returns NSMenuView
	menuBarHeight.
	* Source/GSWindowDecorationView.m: Use menuHeightForWindow: instead
	of getting it directly from the menu view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29288 72102866-910b-0410-8b05-ffd578937521
2010-01-15 18:10:04 +00:00
dpsimons
6d057abc84 Raise an exception instead of crashing (at least on Windows) when we fail to obtain a window from the back end.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29284 72102866-910b-0410-8b05-ffd578937521
2010-01-14 23:57:11 +00:00
gcasa
c36c29e8ff * Source/NSApplication.m: For hide: perform miniaturizeAll:
on Windows, since hiding the app causes it to be inaccessible on 
	that platform.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29281 72102866-910b-0410-8b05-ffd578937521
2010-01-14 12:06:35 +00:00
gcasa
2f3f77f8bd * Source/NSToolbarFrameworkPrivate.h: Correct include for new
location of GSWidnowDecorationView.h.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29278 72102866-910b-0410-8b05-ffd578937521
2010-01-14 09:04:45 +00:00
gcasa
26109fa49c * Source/GSWindowDecorationView.h: Removed from here since I moved
it to the GNUstepGUI headers.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29277 72102866-910b-0410-8b05-ffd578937521
2010-01-14 08:16:44 +00:00
gcasa
dcea95cb77 * Headers/Additions/GNUstepGUI/GSTheme.h: Added methods
to support adding menus and processing commands from windows, if
       appropriate.
       * Headers/Additions/GNUstepGUI/GSWindowDecorationView.h: Added
       new methods for menu and toolbar flags.
       * Headers/AppKit/NSInterfaceStyle.h: Added new interface style.
       * Source/GNUmakefile: Added header.
       * Source/GSStandardWindowDecorationView.m: Change include
       to include header in new location.
       * Source/GSThemeMenu.m: Default theme implementation for
       Menus.
       * Source/GSWindowDecorationView.m: Add the setHasMenu:/setHasToolbar:
       flags.
       * Source/NSWindow.m: Use the theme to set the menu instead of
       setting it directly.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29271 72102866-910b-0410-8b05-ffd578937521
2010-01-13 20:51:30 +00:00
wlux
5736f119e9 Ensure proper working of autosaving for NSDocument subclasses that
override -writeWithBackupToFile:ofType:saveOperation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29267 72102866-910b-0410-8b05-ffd578937521
2010-01-11 21:26:12 +00:00
wlux
31586c0e6f Fix incorrect assignment in NSProgressIndicator -setDisplayedWhenStopped:
which made that method a no-op.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29266 72102866-910b-0410-8b05-ffd578937521
2010-01-11 21:15:54 +00:00
qmathe
a825d81220 Fixed broken cell editability in outline views by replicating NSTableView
changes r25091.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29264 72102866-910b-0410-8b05-ffd578937521
2010-01-11 14:04:44 +00:00
fredkiefer
7efba8c5a4 Better handling of text attachtment. Fixes bug #28464
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29260 72102866-910b-0410-8b05-ffd578937521
2010-01-11 12:32:27 +00:00