Commit Graph
142 Commits
Author SHA1 Message Date
daboe01 f9fa6abbad fixed: small typo in comment 2016-10-18 21:46:21 +02:00
Alexandre Wilhelm c85355986b Fixed: manual merged with master 2016-03-06 18:47:58 -08:00
Didier Korthoudt d7426f6d35 Several fixes 2015-12-19 21:56:27 +01:00
Didier Korthoudt f3709a41e3 removeAllTrackingAreas 2015-12-01 21:06:55 +01:00
Didier Korthoudt 76ab5fbf78 CPControl-fix 2015-11-30 09:07:33 +01:00
Didier Korthoudt 1418dd8b29 First submit for CPTrackingArea 2015-11-06 14:09:23 +01:00
daboe01 f9e8875803 merge current master in 2015-07-04 16:46:24 +02:00
Alexandre Wilhelm 62f9488829 New: added property baseWritingDirection in CPControl
This PR adds the support for baseWritingDirection in CPControl.
Support of nib2cib has been added as well.

Test app in Tests/Manual/CPTextFieldEditingStyleTest/
2015-05-01 12:11:03 -07:00
Alexandre Wilhelm 34f724a4a4 Fixed: capp_lint fixes 2015-04-22 11:22:44 -07:00
Andrew Hankinson 397ae3407e Merge branch 'refs/heads/master' into NEW--CPTextView
Conflicts:
	AppKit/CPControl.j
2014-12-17 12:11:27 -05:00
Antoine Mercadal b0a7fe4079 Merge branch 'master' into objj-typedef-and-ivar-checks
+ fixed new warnings from master

Conflicts:
	Foundation/CPNotificationCenter.j
2014-11-26 12:00:34 -08:00
Christophe Serafin a5283a26ab Fixed: Enable CPTextField to have a specific height
When setting controlSize, CPTextfield height was forced to min-size height.
Now we check that the frame size is between the min and the max size. It allows to constrain
a CPControl to have a fixed height by specifying a min-size equivalent to the maxsize.
In CPTextField case, we only have a min-size which enable us to have a specific size.

Changes has been made in Aristo2 only.
2014-11-14 13:49:33 -08:00
Antoine Mercadal f9275a70af FIXED: New warnings reveleaded by ivar type checking
This patch fixes all new warnings
2014-11-06 10:17:05 -08:00
Andrew Hankinson bd71e779c3 Merge branch 'refs/heads/master' into NEW--CPTextView 2014-10-30 14:35:47 -04:00
Christophe Serafin 62e8d70d74 fix _adjustNib2CibSize calls 2014-08-18 13:08:09 -07:00
Christophe Serafin 4b639843ec fixed buttons positions and extended Nib2CibAlignment test 2014-08-14 18:18:08 -07:00
Christophe Serafin 3dc581efbb introduce nib2cib-adjustment-frame as theme attribute to enbable proper control alignment 2014-08-14 10:54:38 -07:00
Christophe Serafin c078bb04b2 Correction and optimizations based on Alex comments. Fix for CPDatePickerTest 2014-08-12 13:31:22 -07:00
Christophe Serafin db6975e07a force size only for bordered buttons and bezeled textfields 2014-08-11 18:08:15 -07:00
Christophe Serafin d15a853bf7 enable control size management on CPButton, CPPopUpButton, CPCheckbox, CPDatePicker, CPTexteField, CPStepper 2014-08-07 09:41:43 -07:00
Christophe Serafin 5feac3a7ff allow using regular, small and mini sizes from xCode and from code using setControlSize method. Available on CPTextField, CPStepper, CPDatePicker only for the moment 2014-08-05 17:34:58 -07:00
Christophe Serafin 12c427a9cf enable CPControl to use setControlSize. Created an example with CPStepper 2014-08-01 16:57:02 -07:00
Alexandre Wilhelmanddaboe01 39eeaea7e7 Fixed: circular import with CPText
Previously CPText was in CPTextView.j, now it is in CPText.j.
It fixes some other circular import as well, fixes some global var to import.
Fixed some code style.
2014-07-12 14:03:32 +02:00
Alexandre Wilhelm 26118ee881 New: Added CPControlTextEditingDelegate and CPTextFieldDelegate protocol
Added CPControlTextEditingDelegate and CPTextFieldDelegate protocol
2014-03-28 11:49:18 -07:00
Martin Carlberg 8419001810 Merge branch 'master' of https://github.com/cappuccino/cappuccino into protocol 2013-11-22 14:23:52 +01:00
Alexandre Wilhelm 8f70cebefc Typo 2013-10-29 11:22:55 -07:00
Alexandre Wilhelm 7f53d15e75 Fixed: the userInfo of the notification from textDidEndEditing is wrong
Previously, when overriding the method textDidEndEditing, the userInfo notification didn't contain the information about CPTextMovement
2013-10-29 11:13:48 -07:00
Alexandre Wilhelm ebc1025fd9 New: Added Movement Codes for CPTextDidEndEditingNotification
This PR adds a new feature for CPControl. Now when leaving the control, the userInfo of the notification CPTextDidEndEditingNotification contains the last movements of the control as in COCOA

Test app in Tests/Manual/CPTextFieldMovementsTest
2013-10-29 01:20:00 -07:00
Martin Carlberg bb58a206a8 Fixed: Removed all warnings of conflicting return and parameter types caused by the new compiler 2013-08-12 16:46:14 +02:00
Aparajita Fishman 650bc77b2c Fixed: number formatter was called twice for every setObjectValue.
Previously setObjectValue checked for a formatted value, and then called [self stringValue], which ended up formatting the value again.

Now all of the cases (no formatter, formatter succeeds, formatter fails) are handled explicitly in setObjectValue, eliminating the extra call to the formatter.
2013-07-22 21:26:18 -04:00
Aparajita Fishman afd5925499 Fixed: _CG and _CP macros were confusing and could degrade performance
Previously, Cappuccino was using preprocessor macros internally for the CGPoint/Size/Rect/Inset/Affine functions, as well as for CPRange. These macros had the same name as the corresponding function, but began with _. The functions were actually defined using the macros.

The motivation behind using macros was to increase performance by reducing function calls. However, there were a number of problems with this approach:

- There was an artificial dichotomy between _CG macros and the corresponding CG functions. We never completely replaced CG function calls with _CG macros. In fact, they were often mixed up in the same file. There was an extra burden on the programmer to remember to use the macro instead of the function.
- If a method call was passed as an argument to a macro, performance could actually be significantly *worse* than a function call. For example, _CGGetRectMakeCopy([view frame]) would expand to `{ origin:{ x:[view frame].origin.x, y:[view frame].origin.y }, size:{ width:[view frame].size.width, height:[view frame].size.height } }`. So instead of a single objj_msgSend and a single simple function call, we ended up with 4 objj_msgSend calls, which are way more expensive than simple function calls.
- Because of this expansion problem, to use macros efficiently required us to remember to use variables for all macro parameters. This didn't happen, and shouldn't have to happen.
- Finally, with modern Javascript engines, function call overhead is so small that it really isn't worth using the macros.

This commit eliminates the _CGGeometry, CGAffineTransformation and CPRange macros and replaces them with function calls.

BREAKING CHANGE:
The macros are no longer available. They could only be used with compiled code, but if there is any user code that used them, they will have to be replaced with the corresponding functions.
2013-03-13 12:22:10 -04:00
Alexander Ljungberg f4096b94a7 New: use @ref and @deref instead of Ref.h throughout Cappuccino. 2013-03-10 13:08:34 +00:00
Alexander Ljungberg 5b05dc92a1 More dictionary literals. 2013-02-25 18:27:44 +00:00
Aparajita Fishman abaa1e81f2 Support for multiple-value bindings
- CPView and subclasses support multiple-value hidden bindings.
- CPControl and subclasses support multiple-value enabled bindings.
- CPWindow and CPBox support multiple-value title with pattern bindings.
- CPButton supports multiple argument + target bindings.
- CPImageView and CPTextField support multiple-value editable bindings.
- CPMenuItem supports multiple-value enabled bindings.
- Fixed bugs in CPObjectController with simple collection operators.
- CPColorWell uses black as the placeholder color.
- Runtime object attributes from a cib are applied as they are read, not deferred.
- NSNumberFormatter now reads the number style from the xib.
- Normalized some parameter names.
- Formatting.
- Test app for all binding types.
2013-02-15 12:21:13 -05:00
Aparajita Fishman c29a54e21a More work on child windows
- Popovers are implemented as child windows.
- Renamed _CPAttachedWindow/_CPAttachedWindowView to _CPPopoverWindow/_CPPopoverWindowView, since that is its only use.
- The default for CPView -acceptsFirstMouse is now NO, per Cocoa. Subclasses override this as necessary.
- _CPWindowView -hitTest returns self it the mouse is within a resize region, which may be outside the window's frame.
- Fixed an off by one bug in CPDomWindowLayer -insertWindow:atIndex:, where inserting a visible window behind a window it is already behind would cause it to move up one from its intended position.
- Updated the ChildWindows and CPPopover test apps.
2013-01-27 10:32:23 +08:00
Aparajita Fishman 4f377bcebe Objj2 compiler fixes
Compiled all files individually:

- Added missing imports.
- Added @class/@global declarations to break circular dependencies.
- Misc. code cleanup.

Conflicts:
	AppKit/CPWindow/_CPWindow.j
	AppKit/Platform/DOM/CPPlatformWindow+DOM.j
2013-01-23 15:48:55 +07:00
Martin Carlberg 458fa9d02e Fixed a lot of small bugs found by new warning message from compiler 2013-01-18 14:24:37 +01:00
Martin Carlberg c297e926f9 Compiler now works with jake and can compiler the whole Cappuccino framework. A lot of test cases still fail 2012-12-16 17:38:47 +01:00
Aparajita Fishman 6e40020906 Allow nil value in presence of formatter, the formatter may want to format that 2012-08-09 20:31:26 -07:00
Aparajita Fishman 8444f808f6 By default controls will track the system font size
Use current system font size elsewhere
2012-07-18 09:53:09 -07:00
Aparajita Fishman 73fea44aa2 CPControl now archives/unarchives its formatter
This allows you to use a formatter with a table column's data view.
2012-07-09 21:30:09 -07:00
Aparajita Fishman cae5486ec6 Added missing class checks in +initialize, regularized checking code 2012-06-28 12:05:18 -07:00
Adam Radabaugh 84c8427bb4 Merge branch master 2012-06-23 14:21:45 -06:00
Aparajita Fishman 45da163230 text tweak 2012-06-18 09:31:34 -07:00
Adam Radabaugh 909c6ed171 Fix style issue in CPControl 2012-05-19 16:56:57 -06:00
Adam Radabaugh 919bfb7960 Fix style issue in CPControl 2012-05-18 17:11:04 -06:00
Adam Radabaugh ea0107f67f Enable additional button types in CPButton with manual test. 2012-05-01 15:11:34 -06:00
Aparajita Fishman aeb2671fc0 CPImageView enhancements
- Changed from deprecated image scaling constants to new ones.
- Added support for CPImageScaleProportionallyUpOrDown (thanks BlairDuncan).
- Cleaned up image layout code.
2012-04-12 14:55:46 -04:00
Aparajita Fishman 37d92c1182 Revert "Merge pull request #1438 from aradabaugh/master", it broke a few things
This reverts commit e081dbf127, reversing
changes made to 71e8f0201a.
2012-02-16 08:21:31 -08:00
aradabaugh edd09ef06a Enables additional buttonTypes for CPButton 2012-01-24 22:50:01 -07:00