Alexander Ljungberg
21bb383193
Refs #1527 . Fix button performClick: highlight.
...
Critically this is what enables button highlighting on key equivalents.
2012-06-25 18:13:16 +01:00
Alexander Ljungberg
bd83885eca
Refs #1527 . Backwards compatibility.
...
If no highlight or state masks were encoded (button was encoded prior to them being added), make sure to let the default settings stand.
2012-06-25 17:42:31 +01:00
Alexander Ljungberg
d34d139658
Refs #1572 . Default CPButton type.
...
If a button is created in code it should act like a regular momentary push in button by default.
2012-06-25 17:21:56 +01:00
Alexander Ljungberg
f5c201c0be
Refs #1572 . Fixed: CPPushInCellMask in showsStateBy.
...
Code didn't match comment.
2012-06-25 17:18:07 +01:00
Alexander Ljungberg
10fcc0c452
Refs #1572 . Minor fixes.
2012-06-25 16:26:44 +01:00
Alexander Ljungberg
378822b777
Merge pull request #1572 from slevenbits/cpbutton-masks
...
CPButton and subclasses respect highlightsBy and showsStateBy masks now.
Conflicts:
AppKit/CPButton.j
Tests/Manual/CPButtonTest/AppController.j
Tests/Manual/CPButtonTest/Info.plist
Tests/Manual/CPButtonTest/Resources/MainMenu.cib
Tests/Manual/CPButtonTest/Resources/MainMenu.xib
2012-06-25 16:05:03 +01:00
Ilya Kulakov
7cf3ac3b40
CPButton and subclasses respect highlightsBy and showsStateBy now.
2012-06-25 18:57:10 +07:00
Ilya Kulakov
66f5e1fb64
Take into account highlightsBy and showsStateBy when decoding cib.
...
nib2cib was modified to take into account these variables
during conversion nib->cib.
2012-06-25 18:57:01 +07:00
Ilya Kulakov
c80417c433
Add highlightsBy method that returns current higlightsBy mask.
2012-06-25 18:56:56 +07:00
Adam Radabaugh
5fbf0f83cb
Make the check for CPOnOffButton tracking correctly use the highlights mask.
2012-06-23 14:26:46 -06:00
Adam Radabaugh
84c8427bb4
Merge branch master
2012-06-23 14:21:45 -06:00
Alexander Ljungberg
d39849b297
Improve token field keyboard navigation when tokens are selected.
...
If one or more token is selected and the left arrow key is pressed, collapse the selection to the left of the first selected token.
Similarly, on right arrow key collapse to the right of the last token.
Note that shift-left and shift-right have no effect if the first or last token respectively in the field are already selected.
2012-06-21 19:24:22 +01:00
Alexander Ljungberg
7764921c21
Select all support for CPTokenField.
...
Cmd-A (Mac) or Ctrl-A (other) finishes any ongoing editing and selects all tokens in a token field.
This commit also adds support for the `selectText:` and `selectAll:` methods.
2012-06-21 19:17:34 +01:00
Alexander Ljungberg
26ceb25e7b
Merge pull request #1569 from slevenbits/rwelephant-token-field
...
Token field improved autocomplete, key bindings support, clean up
2012-06-21 10:32:33 -07:00
Aparajita Fishman
45da163230
text tweak
2012-06-18 09:31:34 -07:00
Aparajita Fishman
6f50900b1b
Added missing removeObjectAtArrangedObjectIndex, added missing return
2012-06-18 09:00:59 -07:00
Alexander Ljungberg
2200e40001
Fixed: browser shortcuts wouldn't work when a token field was active.
...
We now leave the default propagation policy of Cappuccino in place, which normally is NO for regular characters but YES for things which could be shortcuts.
2012-06-16 12:31:50 +01:00
Alexander Ljungberg
44b609f604
Don't make space for editing in token field if tokens are selected.
...
If the editor is placed while there is a token selection it can cause the token view to become scrollable to a white area at the bottom even that there is no editing cursor. And even if the editor is not at the bottom, the empty space made for the editor makes no sense when no editing cursor is visible.
2012-06-16 12:31:50 +01:00
Alexander Ljungberg
d5918157ff
Overwrite selected tokens by typing support.
...
If tokens are selected in `CPTokenField` and new text is entered, the selected tokens are overwritten by the newly entered text.
2012-06-16 12:31:50 +01:00
Alexander Ljungberg
19b53746cf
Fix nil representedObjectForEditingString: response handling.
...
If `tokenField: representedObjectForEditingString:` returns nil, act the same as if the delegate method didn't exist. This matches Cocoa.
2012-06-16 12:31:50 +01:00
Alexander Ljungberg
d0769ec360
Oops. Fix object value fix.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
3c20bf8ad6
Allow token field insertText: to be somewhat overridden.
...
If `insertText:` is overridden to do nothing, nothing in inserted.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
3eab2a528f
Make token field object value more like Cocoa.
...
If a half typed token is in the field, Cocoa tries to convert it to a representedObject before responding to objectValue. Now CPTokenField does the same.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
fb404a0671
Hide private token field API. Fix return type.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
6d6cf52180
Minor token field optimisation.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
55ca956f50
Remove nonstandard CPCopyRange.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
f43c643d5a
Allow token field subclasses to override defaultCompletionDelay.
...
Also fixed incorrect return type.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
69f5fc536c
Key bindings support for token field.
...
Also improve compatibility with `CPTextField` superclass and subclassing support by properly using `interpretKeyEvents:` like `CPTextField`.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
132ac7c03f
Token field 'keyUp:' support.
2012-06-16 12:31:49 +01:00
Alexander Ljungberg
5683af9bc8
Improve token field subclassing support.
...
Token field now triggers autocompletion from textDidChange: which better meets the expectations of Cappuccino programmers, and is closer to how Cocoa does it.
Eliminated custom non-Cappuccino key press handler.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
429933f601
Fix token field keyDown: handling.
...
`CPTokenField` had custom key down handling making it function poorly with Cappuccino's event handling and subclasses.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
317364681a
Fixed: make sure autocomplete menu fits within browser.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
9575fd7771
Autosize token field autocomplete menu.
...
The new menu is much more efficient for the user:
* Less tall items makes it much easier to select among many completions.
* Exactly wide enough for widest item.
* Tall enough to show all items (instead of just 3 as before).
* Uses a maximum width and height defined by the screen edges and some Cocoa-like constants.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
85cfb18906
Place token autocomplete underneath what's being completed.
...
This matches Cocoa.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
33fe1573ad
Ensure autocomplete menu is on top.
...
The menu should appear above other normal windows and controls like a regular CPMenu. To do this, put the pop up in its own window with the `CPPopUpMenuWindowLevel` window level.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
2574fac44a
Remove token field reference.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
b166995327
Move autocomplete into reusable class.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
feaf9c6f20
Improve CPTokenField autocomplete scrolling.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
0ef03d31b8
Refactor CPTokenField autocomplete.
...
The new code is simpler (single responsibility principle) and makes it easier to improve on autocomplete.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
80ee88d3a7
Hide another non-public API in CPTokenField.
2012-06-16 12:31:48 +01:00
Alexander Ljungberg
bbc45dd947
Support tokenField:representedObjectForEditingString: delegate method.
...
This improves support for represented objects and is used both when an autocompletion suggestion is used or when the name of a token is typed in by hand.
The behaviour of taking an array of strings from `completionsForSubstring` and then asking for a represented object once a choice has been accepted matches the behaviour of Cocoa.
2012-06-16 12:31:47 +01:00
Alexander Ljungberg
d07ee3ea23
Hide non-public API in CPTokenField.
...
Also improve documentation.
2012-06-16 12:31:47 +01:00
Alexander Ljungberg
7ffd65476b
Fixed: token field auto completions.
...
Auto completions are strings, not represented objects. Revert "Fix CPTokenField autocompletion to deal with represented objects"
This reverts commit 8b9a0edeba .
2012-06-16 12:31:47 +01:00
Alexander Ljungberg
ca0a07cab8
Formatting.
2012-06-16 12:31:47 +01:00
Antoine Mercadal
0d29f15b70
Merge pull request #1513 from BlairDuncan/MenuTimestampFix
...
Fix for menu selection that was broken with the change to CPEvent timestamp
2012-06-14 17:02:06 -07:00
Antoine Mercadal
714d36d8c8
Merge branch 'CPImageView-bindings' of https://github.com/cacaodev/cappuccino into pull1534
2012-06-14 13:05:04 -07:00
Antoine Mercadal
cd94819099
Merge branch 'issue1435' of https://github.com/stewa/cappuccino into issue1435
2012-06-14 11:58:49 -07:00
Antoine Mercadal
52199776d5
Merge pull request #1537 from mrcarlberg/cptableview_selection_radius
...
Added a themed attribute for round rect selection of rows. [+1]
2012-06-14 10:29:58 -07:00
Antoine Mercadal
ecdb064a5b
Makes CPButton to dim image when disabled by default
2012-06-13 15:21:45 -07:00
Antoine Mercadal
d67a03bfb4
make disabled buttonbar buttons more visible
2012-06-13 14:30:26 -07:00