Gregory John Casamento
db773ae9ec
Don't add the view again if it's one that has already been added, this causes the application to poll unneccessarily
2024-04-22 09:00:53 -04:00
Gregory John Casamento
e19038665b
Use an NSMapTable to store which views have been displayed
2024-04-22 09:00:53 -04:00
Gregory John Casamento
a73c3cc876
Add code to track if a view has been rendered, fix issue with duplication of the view, I am not sure if this method of tracking that the view has been rendered is correct, but it works for now
2024-04-22 09:00:53 -04:00
Gregory John Casamento
20f29b2d1d
Add code to cause delegate methods which are not used for viewBased tables to be called in viewBased mode, add code to instantiate the prototypeCellView when adding it to the tableView
2024-04-22 09:00:53 -04:00
Gregory John Casamento
5294e2a126
Add private method to return the prototypeCellViews array
2024-04-22 09:00:53 -04:00
Gregory John Casamento
e4c7bb540c
Add prototype cell view support, remove code that forces prototypeCellView to be NSView
2024-04-22 09:00:53 -04:00
Gregory John Casamento
b06b23c97c
Add code to instnatiate the NSTableCellView if the delegate method does not exist
2024-04-22 09:00:53 -04:00
Gregory John Casamento
74487bcfa5
Remove comment
2024-04-22 09:00:53 -04:00
Gregory John Casamento
d11c7e3dbc
Remove unused variables
2024-04-22 09:00:53 -04:00
Gregory John Casamento
a9653a71a2
Draw the view in the confines of the cell frame
2024-04-22 09:00:53 -04:00
Gregory John Casamento
ebdbe0930f
Add methods to theme and to NSTableView to get the view from the delegate, this is a partial commit to save my place here... will follow up shortly
2024-04-22 09:00:53 -04:00
Gregory John Casamento
0be95eba5b
Update gorm version and add new code to store/retrieve NSViewBased key
2024-04-22 09:00:53 -04:00
Gregory John Casamento
e322757c5f
Add NSNibDeclarations, declare image and text views as outlets
2024-04-22 09:00:53 -04:00
Gregory John Casamento
fa6889234a
Add NSTableCellView class header and simple implementation
2024-04-22 09:00:53 -04:00
Gregory John Casamento
c9539af267
Add new classes
2024-04-22 09:00:53 -04:00
Gregory John Casamento
0276e307cc
Fix compile error, add new class
2024-04-22 09:00:53 -04:00
Gregory John Casamento
20a08a894f
Minor updates
2024-04-22 09:00:53 -04:00
Gregory John Casamento
68ce44ee19
Initial skeleton for NSTableCellView
2024-04-22 09:00:53 -04:00
Gregory John Casamento
1b467763bc
Rebased to master
2024-04-22 09:00:53 -04:00
Gregory John Casamento
cad79f2e0e
Add non-keyed coding
2024-04-22 09:00:53 -04:00
Gregory John Casamento
4856bec185
Add NSNibDeclarations, declare image and text views as outlets
2024-04-22 09:00:53 -04:00
Gregory John Casamento
b895ffe953
Add NSTableCellView class header and simple implementation
2024-04-22 09:00:53 -04:00
Gregory John Casamento
4800a950ef
Add new classes
2024-04-22 09:00:53 -04:00
Gregory John Casamento
3acf49a33d
Fix compile error, add new class
2024-04-22 09:00:53 -04:00
Gregory John Casamento
a7a7a1e691
Minor updates
2024-04-22 09:00:53 -04:00
Gregory John Casamento
94eecbabc0
Add table row action class
2024-04-22 09:00:53 -04:00
Gregory John Casamento
d939fdfd1e
Add objectValue accessors
2024-04-22 09:00:53 -04:00
Gregory John Casamento
e270ab39aa
Add NSNibDeclarations as an include
2024-04-22 09:00:53 -04:00
Gregory John Casamento
edb517ceca
Initial skeleton for NSTableCellView
2024-04-22 09:00:53 -04:00
Gregory John Casamento
968e78ab34
Add initial versions of NSTableCellView.[hm] and NSTableRowView.[hm]
2024-04-22 09:00:53 -04:00
williameveretteggplant
d1562a37cd
Left shift key equivalent modifier mask in xib unarchiver ( #259 )
...
* Left shift key equivalent modifier mask in xib unarchiver
This is necessary to offset the 8 bit right shift that occurs in the initWithCoder: method in NSButtonCell
* Shift modifier mask in xib unarchiver
2024-04-19 18:58:00 +02:00
williameveretteggplant
192c121a9d
Set editable property in NSCell default to false ( #257 )
...
Unarchiving a NSCell element from a xib will have the editable property set to false unless explicitly set to true.
2024-04-09 17:26:30 +02:00
williameveretteggplant
7b8c02182e
Fix NSImageView intercepting mouse events when not editable ( #256 )
...
* Update NSImageView.m
* Refactor editable condition
* Remove empty line, left over from previous changes
---------
Co-authored-by: Fred Kiefer <fredkiefer@gmx.de>
2024-04-08 20:54:47 +02:00
Frederik Carlier
892ed4877e
NSBox: (re-)implement isOpaque ( #254 )
...
This (re-)implements logic where a box is marked
as opaque if it is a custom box which is not
transparent, but moves the logic to `GSTheme`,
allowing themes to override this loggic.
This fixes the rendering of custom boxes with a
custom fill color; the current implementation
would mark them as non-opaque and hence the fill
color would not be rendered.
- The original implementation (from 1999) always
returned `YES`
(53bcb50240
)
- A more complete implementation was backported
from the Testplant branch in 2012
(e85b16bc05
, by
@fredkiefer, upstream commit
36e77b95f7
)
- More recently, the a return value of `NO` was
hardcoded
(02bc49e2d5
, by
@ericwa)
2024-04-04 22:23:14 +02:00
Frederik Carlier
95f302442c
NSBox: decode NSBorderColor2 and NSFillColor2 ( #255 )
2024-04-04 20:34:42 +02:00
Frederik Carlier
85b8a3e495
[NSTableView initWithCoder]: Read alternatingRowBackgroundColors, from tableViewFlags ( #252 )
...
* [NSTableView initWithCoder]: Read alternatingRowBackgroundColors, from tableViewFlags
* [NSTableView _numRows]: Check _tableColumns is not empty
* [NSTableView encodeWithCoder]: add autosaveTableColumns, usesAlternatingRowBackgroundColors
2024-04-03 23:54:10 +02:00
Frederik Carlier
059d13f5ab
highlightTableViewSelection: Always use default selection color if not set. ( #253 )
...
The current implementation will attempt to assign a default value for selectionColor if backgroundColor is white. There's two issues with that:
1. `backgroundColor` is likely in the `NSNamedColorSpace`, whereas it is being compared to `[NSColor whiteColor]`, which is in the `NSCalibratedWhiteColorSpace`. That comparision will always return false.
2. Users will probably expect the selected item to be highlighted in a different color even if the background color is not white. For example, the consider a scenario where the default background color is white, and the alternate background color is grey. It makes sense to always highlight the selected row in blue. This aligns with the behavior when `highlightedTableRowBackgroundColor` is defined.
2024-04-03 23:43:33 +02:00
Frederik Carlier
f46accfa9c
GSXib5KeyedUnarchiver: Add mapping for NSSegmentItemLabel, NSSegmentItemImage ( #251 )
2024-04-03 23:24:22 +02:00
Frederik Carlier
c6082e31db
NSGraphicsContext: Suppress incompatible pointer type warning ( #250 )
...
```
NSGraphicsContext.m:349:50: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types]
methods = [[classMethodTable objectForKey: [self class]] pointerValue];
^~~~~~~~~~~~
/usr/local/include/Foundation/NSDictionary.h:115:26: note: passing argument to parameter 'aKey' here
(GS_GENERIC_TYPE(KeyT))aKey; // Primitive
^
NSGraphicsContext.m:354:37: warning: incompatible pointer types sending 'Class' to parameter of type 'id<NSCopying>' [-Wincompatible-pointer-types]
forKey: [self class]];
^~~~~~~~~~~~
```
2024-04-01 22:54:57 +02:00
Frederik Carlier
c50123f870
GSTextStorage: Add function prototypes ( #249 )
...
Add a function prototype for:
- `addImp` (`(void)addObject:(ObjectType)anObject`)
- `insImp` (`(void)insertObject:(ObjectType)anObject atIndex:(NSUInteger)index`)
- `remImp` (`(void)removeObject:(ObjectType)anObject`)
- cntImp (`count`)
Fixes warning: passing arguments to a function without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
2024-04-01 22:53:23 +02:00
Frederik Carlier
4470a157d7
Remove unused variables ( #247 )
...
Fixes a compiler warnings
2024-04-01 21:05:46 +02:00
Frederik Carlier
1c26da1f27
NSInterfaceStyle: Fix void-pointer-to-enum-cast warning ( #248 )
...
Cast to `uintptr_t` before casting to `enum` to suppress warning.
```
NSInterfaceStyle.m:134:15: warning: cast to smaller integer type 'NSInterfaceStyle' from 'void *' [-Wvoid-pointer-to-enum-cast]
style = (NSInterfaceStyle)NSMapGet(styleMap, key);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NSInterfaceStyle.m:234:24: warning: cast to smaller integer type 'NSInterfaceStyle' from 'void *' [-Wvoid-pointer-to-enum-cast]
if (newStyle != ((NSInterfaceStyle)val))
^~~~~~~~~~~~~~~~~~~~~
```
2024-04-01 16:49:46 +02:00
Frederik Carlier
2372b76cc8
This commits updates the libs-gui build process to generate a gnustep-gui.pc file which is installed in /lib/pkgconfig and contains the GNUstep gui version number, the libraries to link (equivalent to gnustep-config --gui-libs) with and the C flags to use (equivalent to gnustep-config --objc-flags). ( #246 )
...
This can be useful when linking with libs-gui in projects which don't use the GNUstep build system.
2024-03-27 23:39:23 +01:00
Fred Kiefer
c12fdd26f7
Set delegate of NSTextView to nil in dealloc.
2024-03-26 22:53:44 +01:00
Fred Kiefer
a054b21355
* Source/NSTextView.m: Add support for NSFilenamenPboardType.
...
Change by OnFlApp (https://githup.com/onflapp )
2024-03-18 22:53:46 +01:00
OnFlApp
1e956c96df
NSTextView: support drop for NSFilenamesPboardType ( #156 )
...
* NSTextView: support drop for NSFilenamesPboardType
* code cleanup
* code fixes
2024-03-18 22:35:29 +01:00
rfm
324308b4e8
fixup error in pasteboard types provided when png is available
2024-03-04 22:08:00 +00:00
Riccardo
7a215fcb01
Magick fix ( #244 )
...
* Fix include for ImageMagick 7
* add version test for MagickCore and conditionally include the path to MagickCore.h
* autoreconf with 2.69
2024-02-29 09:26:24 +01:00
rfm
cff4f39db3
Set timeout for pasteboard to 30 seconds rather than 2 (for slow providers).
2024-02-20 10:10:32 +00:00
Sergei Golovin
53cb373976
Support tab renaming in terminal ( #243 )
...
* add missed methods declarations to GSTheme.h
* style tweaks
2024-02-19 09:11:56 +01:00