Alexander Ljungberg
07330a0ca8
Select tokens by clicking on them. Select multiple tokens by holding down shift. Also fixed a bug when deleting multiple tokens at a time.
2010-10-23 13:49:36 -03:00
Alexander Ljungberg
d68f4359ac
Reduce token shifting when a token is selected. Ideally there shouldn't be any shifting at all, but placing a tiny editor at the right spot simplifies scroll handling.
2010-10-23 00:22:40 -03:00
Alexander Ljungberg
d4cfa4b24f
Minor optimisations and cleanup.
2010-10-23 00:00:00 -03:00
Alexander Ljungberg
2912acb4f5
Simplify: remove _selectedTokenIndexes since we now have _selectedRange. Hide the editor when tokens are selected. Preserve cursor position when tokens are deleted.
2010-10-22 23:45:48 -03:00
Alexander Ljungberg
85683d8f18
Navigate among tokens with the arrow keys. Insert and delete tokens relative to the cursor.
2010-10-22 20:43:40 -03:00
Alexander Ljungberg
e66f22d094
Allow the editor to be placed anywhere based on a selection range.
2010-10-21 23:46:03 -03:00
Alexander Ljungberg
d0b29fd38c
Fix resizing and initial sizing of token fields.
2010-10-21 17:49:41 -03:00
Alexander Ljungberg
28378ff19b
Minor performance tweaks.
2010-10-21 17:11:47 -03:00
Alexander Ljungberg
b4f2f15698
Fixed: if a token field had many tokens and a long token name was entered, that token name had to be edited in the small amount of space left on the right hand side of the token field. Now the editor wraps to a new line as needed.
2010-10-21 17:04:09 -03:00
Alexander Ljungberg
2210c1f4c5
Implemented token field overflow support as in Cocoa: if more tokens than can fit are entered, they wrap to a new line. If the new line does not fit within the height of the token field, the previous line is scrolled out of view.
...
Note: this replaces the previous non Cocoa behaviour where the token field would grow height-wise with new tokens. This behaviour can still be useful, as seen in Apple Mail, but it will now require the user to subclass CPTokenField, override layoutSubview and set the frame size to the size of the scroll view's document view.
2010-10-21 15:56:17 -03:00
Alexander Ljungberg
d63e4f8021
Remove some placeholder comments for methods which now exist.
2010-10-21 00:47:58 -03:00
Alexander Ljungberg
8ec78f20d1
Implement _minimumFrameSize for CPTokenField tokens. Also honor min-size width - not used by Aristo but potentially useful for custom themes.
2010-10-15 12:40:09 -03:00
Alexander Ljungberg
b4c8da8f3d
Fix CPTokenField imports.
2010-10-14 20:21:00 -03:00
Antoine Mercadal
ca0c68c9bf
fix: CPTokenFieldToken impacted by new CPTextField sizeToFit behaviour
2010-10-13 13:34:37 +02:00
Paul Baumgart
01852d8075
Fix a bunch of missing @imports.
...
All classes (excluding the ones prefixed with underscores) in Foundation
and AppKit can now be loaded individually except CPOpenPanel and
CPSavePanel. These two classes have some sort of dependency cycle
that seems impossible to resolve without forward declarations (which
we don't have).
2010-10-05 15:54:25 -07:00
Alexander Ljungberg
e7e9c24aaa
Fix accidental globals in CPTokenField, convert tabs to spaces.
2010-10-03 00:35:57 -04:00
Alexander Ljungberg
69b30df8e6
Fixed: with more than one token field, the separator character for all fields would be bound to that of the first field.
2010-10-03 00:23:05 -04:00
Alexander Ljungberg
1b45f621a7
Created and implemented a first draft Aristo theme for CPTokenField.
2010-10-02 22:41:38 -04:00
Alexander Ljungberg
421a51f008
Made CPTokenField themeable separately from CPTextField since the placeholder insets must be handled differently.
2010-10-02 19:38:12 -04:00
Alexander Ljungberg
cce21e7e87
Fixed: forgot to define a theme name for the CPTokenField close button.
2010-10-02 19:38:01 -04:00
Alexander Ljungberg
f6236ca317
Fixed: CPTokenField setObjectValue:nil did not clear the token field.
2010-10-02 19:37:48 -04:00
Alexander Ljungberg
77e10c94e9
Fixed: if setValue was called to clear a token field, the placeholder message would not appear.
2010-10-02 19:37:37 -04:00
Alexander Ljungberg
38cc1943ee
Reverse binding support for deleting tokens using the delete button. Fixed: if the last token was deleted using the close button without the token field being the first responder, the placeholder message would not appear.
2010-10-02 19:37:31 -04:00
Alexander Ljungberg
3b1047e97d
Implemented tokenizingCharacterSet property for CPTokenField. This changes the default tag separator to "," and allows tags with spaces. The previous behaviour can be restored using [field setTokenizingCharacterSet:[CPCharacterSet characterSetWithCharactersInString:@" "]].
2010-10-02 19:37:17 -04:00
Alexander Ljungberg
34c1a1ce10
Fixed: if a CPTokenField was a subview of a container not at the top at the window, such as is often the case with a toolbar, the autocomplete view of CPTokenField would appear offset downwards.
...
Also switched the background of the autocomplete view to a simple menu style for now since the other graphics were not available.
2010-10-02 19:37:08 -04:00
Alexander Ljungberg
b0e3e38791
Reverse bindings support for when tokens are deleted through the close button.
2010-10-02 19:36:55 -04:00
Alexander Ljungberg
124a63736f
Made CPTokenField themeable. Todo: the autocomplete drop-down is still hardcoded and Aristo style images are needed.
2010-10-02 19:36:24 -04:00
Alexander Ljungberg
688c46c793
Fixed some typos in the previous CPTokenField commit.
2010-10-02 15:36:35 -04:00
Alexander Ljungberg
ee2228a83c
Fixed: if [CPTokenField setObjectValue:X] was called while the token field was the first responder, the input value would be set to a string version of the object value due to CPTextField's setObjectValue method.
2010-10-02 15:36:29 -04:00
Klaas Pieter Annema and Alexander Ljungberg
9f4dd3c2b8
added various hacks to make the cptokenfield work with the new enstore admin
2010-10-02 15:36:24 -04:00
Klaas Pieter Annema and Alexander Ljungberg
c80a28077a
fixed some tokenfield issues
2010-10-02 15:36:19 -04:00
Klaas Pieter Annema and Alexander Ljungberg
47c631c58e
added CPTokenField
2010-10-02 15:36:11 -04:00