diff --git a/AppKit/CPButtonBar.j b/AppKit/CPButtonBar.j index 024924830..47f869597 100644 --- a/AppKit/CPButtonBar.j +++ b/AppKit/CPButtonBar.j @@ -234,10 +234,11 @@ { var button = buttonsNotHidden[count]; - [button removeFromSuperview]; - if ([button isHidden]) + { + [button removeFromSuperview]; [buttonsNotHidden removeObject:button]; + } } var currentButtonOffset = _resizeControlIsLeftAligned ? CGRectGetMaxX([self bounds]) + 1 : -1, diff --git a/AppKit/CPCheckBox.j b/AppKit/CPCheckBox.j index 4e41e52e6..ab674775b 100644 --- a/AppKit/CPCheckBox.j +++ b/AppKit/CPCheckBox.j @@ -111,6 +111,30 @@ CPCheckBoxImageOffset = 4.0; return startedTracking; } + +#pragma mark - +#pragma mark Override methods from CPButton + +- (CGSize)_minimumFrameSize +{ + var size = [super _minimumFrameSize], + contentView = [self ephemeralSubviewNamed:@"content-view"]; + + if (!contentView && [[self title] length]) + { + var minSize = [self currentValueForThemeAttribute:@"min-size"], + maxSize = [self currentValueForThemeAttribute:@"max-size"]; + + // Here we always add the min size to the control which is the size of the view of the checkBox + size.width += minSize.width + CPCheckBoxImageOffset; + + if (maxSize.width >= 0.0) + size.width = MIN(size.width, maxSize.width); + } + + return size; +} + @end @implementation _CPCheckBoxValueBinder : CPBinder diff --git a/AppKit/CPClipView.j b/AppKit/CPClipView.j index 8503c4cc5..93f8aacd6 100644 --- a/AppKit/CPClipView.j +++ b/AppKit/CPClipView.j @@ -46,75 +46,12 @@ return; if (_documentView) - { - [self _removeObserverDocumentView:_documentView]; [_documentView removeFromSuperview]; - } _documentView = aView; if (_documentView) - { [self addSubview:_documentView]; - [self _observeDocumentView]; - } -} - -- (void)_observeDocumentView -{ - var defaultCenter = [CPNotificationCenter defaultCenter]; - - [_documentView setPostsFrameChangedNotifications:YES]; - [_documentView setPostsBoundsChangedNotifications:YES]; - - [defaultCenter - addObserver:self - selector:@selector(viewFrameChanged:) - name:CPViewFrameDidChangeNotification - object:_documentView]; - - [defaultCenter - addObserver:self - selector:@selector(viewBoundsChanged:) - name:CPViewBoundsDidChangeNotification - object:_documentView]; -} - -- (void)_removeObserverDocumentView:(CPView)aDocumentView -{ - var defaultCenter = [CPNotificationCenter defaultCenter]; - - [defaultCenter - removeObserver:self - name:CPViewFrameDidChangeNotification - object:_documentView]; - - [defaultCenter - removeObserver:self - name:CPViewBoundsDidChangeNotification - object:_documentView]; -} - -- (void)_addObservers -{ - if (_isObserving) - return; - - [super _addObservers]; - - if (_documentView) - [self _observeDocumentView]; -} - -- (void)_removeObservers -{ - if (!_isObserving) - return; - - [super _removeObservers]; - - if (_documentView) - [self _removeObserverDocumentView:_documentView]; } /*! @@ -275,7 +212,6 @@ var CPClipViewDocumentViewKey = @"CPScrollViewDocumentView"; // Don't call setDocumentView: here. It calls addSubview:, but it's A) not necessary since the // view hierarchy is fully encoded and B) dangerous if the subview is not fully decoded. _documentView = [aCoder decodeObjectForKey:CPClipViewDocumentViewKey]; - [self _observeDocumentView]; } return self; diff --git a/AppKit/CPComboBox.j b/AppKit/CPComboBox.j index 6787948e3..f6d094eb1 100644 --- a/AppKit/CPComboBox.j +++ b/AppKit/CPComboBox.j @@ -53,6 +53,11 @@ CPComboBoxWillPopUpNotification = @"CPComboBoxWillPopUpNotification"; CPComboBoxStateButtonBordered = CPThemeState("button-bordered"); +var CPComboBoxDelegate_comboBoxSelectionIsChanging_ = 1 << 0, + CPComboBoxDelegate_comboBoxSelectionDidChange_ = 1 << 1, + CPComboBoxDelegate_comboBoxWillPopUp_ = 1 << 2, + CPComboBoxDelegate_comboBoxWillDismiss_ = 1 << 3; + var CPComboBoxTextSubview = @"text", CPComboBoxButtonSubview = @"button", CPComboBoxDefaultNumberOfVisibleItems = 5, @@ -61,19 +66,20 @@ var CPComboBoxTextSubview = @"text", @implementation CPComboBox : CPTextField { - CPArray _items; - _CPPopUpList _listDelegate; - id _dataSource; - BOOL _usesDataSource; - BOOL _completes; BOOL _canComplete; - int _numberOfVisibleItems; + BOOL _completes; BOOL _forceSelection; BOOL _hasVerticalScroller; - CPString _selectedStringValue; - CGSize _intercellSpacing; - float _itemHeight; BOOL _popUpButtonCausedResign; + BOOL _usesDataSource; + CGSize _intercellSpacing; + CPArray _items; + id _dataSource; + CPInteger _implementedDelegateComboBoxMethods; + CPString _selectedStringValue; + float _itemHeight; + int _numberOfVisibleItems; + _CPPopUpList _listDelegate; } + (CPString)defaultThemeClass @@ -228,41 +234,21 @@ var CPComboBoxTextSubview = @"text", if (aDelegate === delegate) return; - var defaultCenter = [CPNotificationCenter defaultCenter]; - - if (delegate) - { - [defaultCenter removeObserver:delegate name:CPComboBoxSelectionIsChangingNotification object:self]; - [defaultCenter removeObserver:delegate name:CPComboBoxSelectionDidChangeNotification object:self]; - [defaultCenter removeObserver:delegate name:CPComboBoxWillDismissNotification object:self]; - [defaultCenter removeObserver:delegate name:CPComboBoxWillPopUpNotification object:self]; - } + _implementedDelegateComboBoxMethods = 0; if (aDelegate) { if ([aDelegate respondsToSelector:@selector(comboBoxSelectionIsChanging:)]) - [defaultCenter addObserver:delegate - selector:@selector(comboBoxSelectionIsChanging:) - name:CPComboBoxSelectionIsChangingNotification - object:self]; + _implementedDelegateComboBoxMethods |= CPComboBoxDelegate_comboBoxSelectionIsChanging_; if ([aDelegate respondsToSelector:@selector(comboBoxSelectionDidChange:)]) - [defaultCenter addObserver:delegate - selector:@selector(comboBoxSelectionDidChange:) - name:CPComboBoxSelectionDidChangeNotification - object:self]; + _implementedDelegateComboBoxMethods |= CPComboBoxDelegate_comboBoxSelectionDidChange_; if ([aDelegate respondsToSelector:@selector(comboBoxWillPopUp:)]) - [defaultCenter addObserver:delegate - selector:@selector(comboBoxWillPopUp:) - name:CPComboBoxWillPopUpNotification - object:self]; + _implementedDelegateComboBoxMethods |= CPComboBoxDelegate_comboBoxWillPopUp_; if ([aDelegate respondsToSelector:@selector(comboBoxWillDismiss:)]) - [defaultCenter addObserver:delegate - selector:@selector(comboBoxWillDissmis:) - name:CPComboBoxWillDismissNotification - object:self]; + _implementedDelegateComboBoxMethods |= CPComboBoxDelegate_comboBoxWillDismiss_; } [super setDelegate:aDelegate]; @@ -412,49 +398,57 @@ var CPComboBoxTextSubview = @"text", if (_listDelegate === aDelegate) return; - var defaultCenter = [CPNotificationCenter defaultCenter]; - - if (_listDelegate) - { - [defaultCenter removeObserver:self name:_CPPopUpListWillPopUpNotification object:_listDelegate]; - [defaultCenter removeObserver:self name:_CPPopUpListWillDismissNotification object:_listDelegate]; - [defaultCenter removeObserver:self name:_CPPopUpListDidDismissNotification object:_listDelegate]; - [defaultCenter removeObserver:self name:_CPPopUpListItemWasClickedNotification object:_listDelegate]; - - var oldTableView = [_listDelegate tableView]; - - if (oldTableView) - { - [defaultCenter removeObserver:self name:CPTableViewSelectionIsChangingNotification object:oldTableView]; - [defaultCenter removeObserver:self name:CPTableViewSelectionDidChangeNotification object:oldTableView]; - } - } + [self _removeObserversForListDelegate:_listDelegate]; _listDelegate = aDelegate; + // We only add the observers if the CPComboBox is displayed + if ([self window]) + [self _addObserversForListDelegate:_listDelegate] + + // Apply our text style to the list + [_listDelegate setFont:[self font]]; + [_listDelegate setAlignment:[self alignment]]; + + [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; + + if (_intercellSpacing) + [[_listDelegate tableView] setIntercellSpacing:_intercellSpacing]; + + if (_itemHeight) + [[_listDelegate tableView] setRowHeight:_itemHeight]; +} + +- (void)_addObserversForListDelegate:(_CPPopUpList)aDelegate +{ + if (!aDelegate) + return; + + var defaultCenter = [CPNotificationCenter defaultCenter]; + [defaultCenter addObserver:self selector:@selector(comboBoxWillPopUp:) name:_CPPopUpListWillPopUpNotification - object:_listDelegate]; + object:aDelegate]; [defaultCenter addObserver:self selector:@selector(comboBoxWillDismiss:) name:_CPPopUpListWillDismissNotification - object:_listDelegate]; + object:aDelegate]; [defaultCenter addObserver:self selector:@selector(listDidDismiss:) name:_CPPopUpListDidDismissNotification - object:_listDelegate]; + object:aDelegate]; [defaultCenter addObserver:self selector:@selector(itemWasClicked:) name:_CPPopUpListItemWasClickedNotification - object:_listDelegate]; + object:aDelegate]; - [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; + [[aDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; - var tableView = [_listDelegate tableView]; + var tableView = [aDelegate tableView]; [defaultCenter addObserver:self selector:@selector(comboBoxSelectionIsChanging:) @@ -465,13 +459,27 @@ var CPComboBoxTextSubview = @"text", selector:@selector(comboBoxSelectionDidChange:) name:CPTableViewSelectionDidChangeNotification object:tableView]; +} - // Apply our text style to the list - [_listDelegate setFont:[self font]]; - [_listDelegate setAlignment:[self alignment]]; - [[_listDelegate scrollView] setHasVerticalScroller:_hasVerticalScroller]; - [[_listDelegate tableView] setIntercellSpacing:_intercellSpacing]; - [[_listDelegate tableView] setRowHeight:_itemHeight]; +- (void)_removeObserversForListDelegate:(_CPPopUpList)aDelegate +{ + if (!aDelegate) + return; + + var defaultCenter = [CPNotificationCenter defaultCenter]; + + [defaultCenter removeObserver:self name:_CPPopUpListWillPopUpNotification object:aDelegate]; + [defaultCenter removeObserver:self name:_CPPopUpListWillDismissNotification object:aDelegate]; + [defaultCenter removeObserver:self name:_CPPopUpListDidDismissNotification object:aDelegate]; + [defaultCenter removeObserver:self name:_CPPopUpListItemWasClickedNotification object:aDelegate]; + + var oldTableView = [aDelegate tableView]; + + if (oldTableView) + { + [defaultCenter removeObserver:self name:CPTableViewSelectionIsChangingNotification object:oldTableView]; + [defaultCenter removeObserver:self name:CPTableViewSelectionDidChangeNotification object:oldTableView]; + } } - (int)indexOfItemWithObjectValue:(id)anObject @@ -516,8 +524,6 @@ var CPComboBoxTextSubview = @"text", if (!_listDelegate) [self setListDelegate:[[_CPPopUpList alloc] initWithDataSource:self]]; - [self _selectMatchingItem]; - // Note the offset here is 1 less than the focus ring width because the outer edge // of the focus ring is very transparent and it looks better if the list is closer. if (CPComboBoxFocusRingWidth < 0) @@ -528,6 +534,7 @@ var CPComboBoxTextSubview = @"text", } [_listDelegate popUpRelativeToRect:[self _borderFrame] view:self offset:CPComboBoxFocusRingWidth - 1]; + [self _selectMatchingItem]; } /*! @ignore */ @@ -998,6 +1005,28 @@ var CPComboBoxTextSubview = @"text", } } + +#pragma mark - +#pragma mark Observers method + +- (void)_addObservers +{ + if (_isObserving) + return; + + [super _addObservers]; + [self _addObserversForListDelegate:_listDelegate]; +} + +- (void)_removeObservers +{ + if (!_isObserving) + return; + + [super _removeObservers]; + [self _removeObserversForListDelegate:_listDelegate]; +} + @end @implementation CPComboBox (CPComboBoxDelegate) @@ -1005,24 +1034,36 @@ var CPComboBoxTextSubview = @"text", /*! @ignore */ - (void)comboBoxSelectionIsChanging:(CPNotification)aNotification { + if (_implementedDelegateComboBoxMethods & CPComboBoxDelegate_comboBoxSelectionIsChanging_) + [_delegate comboBoxSelectionIsChanging:[[CPNotification alloc] initWithName:CPComboBoxSelectionIsChangingNotification object:self userInfo:nil]]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPComboBoxSelectionIsChangingNotification object:self]; } /*! @ignore */ - (void)comboBoxSelectionDidChange:(CPNotification)aNotification { + if (_implementedDelegateComboBoxMethods & CPComboBoxDelegate_comboBoxSelectionDidChange_) + [_delegate comboBoxSelectionDidChange:[[CPNotification alloc] initWithName:CPComboBoxSelectionDidChangeNotification object:self userInfo:nil]]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPComboBoxSelectionDidChangeNotification object:self]; } /*! @ignore */ - (void)comboBoxWillPopUp:(CPNotification)aNotification { + if (_implementedDelegateComboBoxMethods & CPComboBoxDelegate_comboBoxWillPopUp_) + [_delegate comboBoxWillPopUp:[[CPNotification alloc] initWithName:CPComboBoxWillPopUpNotification object:self userInfo:nil]]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPComboBoxWillPopUpNotification object:self]; } /*! @ignore */ - (void)comboBoxWillDismiss:(CPNotification)aNotification { + if (_implementedDelegateComboBoxMethods & CPComboBoxDelegate_comboBoxWillDismiss_) + [_delegate comboBoxWillDismiss:[[CPNotification alloc] initWithName:CPComboBoxWillDismissNotification object:self userInfo:nil]]; + [[CPNotificationCenter defaultCenter] postNotificationName:CPComboBoxWillDismissNotification object:self]; } diff --git a/AppKit/CPCursor.j b/AppKit/CPCursor.j index c6c96acdc..6e0b36cff 100755 --- a/AppKit/CPCursor.j +++ b/AppKit/CPCursor.j @@ -22,6 +22,7 @@ Cursor support by browser: */ @import +@import "CPImage.j" @global CPApp diff --git a/AppKit/CPDatePicker/_CPDatePickerCalendar.j b/AppKit/CPDatePicker/_CPDatePickerCalendar.j index 2d2e51348..c4ecb3866 100644 --- a/AppKit/CPDatePicker/_CPDatePickerCalendar.j +++ b/AppKit/CPDatePicker/_CPDatePickerCalendar.j @@ -737,7 +737,7 @@ var CPShortWeekDayNameArrayEn = [@"Mo", @"Tu", @"We", @"Th", @"Fr", @"Sa", @"Su" [dayTile setDate:[currentDate copy]]; [dayTile setStringValue:currentDate.getDate()]; - [dayTile setDisabled:![self isEnabled] || currentDate.getMonth() !== currentMonth.getMonth()]; + [dayTile setDisabled:![self isEnabled] || currentDate.getMonth() !== currentMonth.getMonth() || currentDate < [_datePicker minDate] || currentDate > [_datePicker maxDate]]; [dayTile setHighlighted:isPresentMonth && currentDate.getDate() == now.getDate()]; } diff --git a/AppKit/CPDatePicker/_CPDatePickerClock.j b/AppKit/CPDatePicker/_CPDatePickerClock.j index 2a8866dfa..2c3a76f56 100644 --- a/AppKit/CPDatePicker/_CPDatePickerClock.j +++ b/AppKit/CPDatePicker/_CPDatePickerClock.j @@ -25,7 +25,6 @@ @import "CPImageView.j" @import "CALayer.j" - @class _CPCibCustomResource @class CPDatePicker diff --git a/AppKit/CPDatePicker/_CPDatePickerTextField.j b/AppKit/CPDatePicker/_CPDatePickerTextField.j index 8fa09afce..2f9b42b41 100644 --- a/AppKit/CPDatePicker/_CPDatePickerTextField.j +++ b/AppKit/CPDatePicker/_CPDatePickerTextField.j @@ -338,10 +338,11 @@ var CPZeroKeyCode = 48, if ([anEvent keyCode] == CPReturnKeyCode) { [_currentTextField _endEditing]; - return YES; + + return [super performKeyEquivalent:anEvent]; } - return NO; + return [super performKeyEquivalent:anEvent]; } /*! KeyDown event @@ -1775,6 +1776,7 @@ var CPMonthDateType = 0, - (void)makeSelectable { [self setThemeState:CPThemeStateSelected]; + [_datePicker setThemeState:CPThemeStateEditing]; } /*! Unsert the theme CPThemeStateSelected @@ -1783,6 +1785,7 @@ var CPMonthDateType = 0, { _firstEvent = YES; [self unsetThemeState:CPThemeStateSelected]; + [_datePicker unsetThemeState:CPThemeStateEditing]; } diff --git a/AppKit/CPEvent.j b/AppKit/CPEvent.j index d0ab4e128..a1699aa34 100644 --- a/AppKit/CPEvent.j +++ b/AppKit/CPEvent.j @@ -32,6 +32,7 @@ @class CPTextField @class CPWindow +@class CPGraphicsContext @global CPApp diff --git a/AppKit/CPPasteboard.j b/AppKit/CPPasteboard.j index b8e0139f0..5372a5bef 100644 --- a/AppKit/CPPasteboard.j +++ b/AppKit/CPPasteboard.j @@ -28,6 +28,8 @@ @class CPWebScriptObject +@typedef DataTransfer + CPGeneralPboard = @"CPGeneralPboard"; CPFontPboard = @"CPFontPboard"; CPRulerPboard = @"CPRulerPboard"; diff --git a/AppKit/CPPopover.j b/AppKit/CPPopover.j index 252f24fa0..38ef4dd23 100644 --- a/AppKit/CPPopover.j +++ b/AppKit/CPPopover.j @@ -28,6 +28,7 @@ @import "CPImageView.j" @import "CPResponder.j" @import "CPView.j" +@import "CPViewController.j" @import "_CPPopoverWindow.j" @protocol CPPopoverDelegate diff --git a/AppKit/CPRuleEditor/CPRuleEditor.j b/AppKit/CPRuleEditor/CPRuleEditor.j index a02b8efe7..404c5546e 100644 --- a/AppKit/CPRuleEditor/CPRuleEditor.j +++ b/AppKit/CPRuleEditor/CPRuleEditor.j @@ -2207,7 +2207,7 @@ TODO: implement indexOfDropLine = FLOOR(y / _sliceHeight), numberOfRows = [self numberOfRows]; - if (indexOfDropLine < 0 || indexOfDropLine > numberOfRows || (indexOfDropLine >= [_draggingRows firstIndex] && indexOfDropLine <= [_draggingRows lastIndex] + 1)) + if (indexOfDropLine <= 0 || indexOfDropLine > numberOfRows || (indexOfDropLine >= [_draggingRows firstIndex] && indexOfDropLine <= [_draggingRows lastIndex] + 1)) { if (_subviewIndexOfDropLine !== CPNotFound && indexOfDropLine !== _subviewIndexOfDropLine) [self _clearDropLine]; diff --git a/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j b/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j index 30470d5c6..80509dd16 100644 --- a/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j +++ b/AppKit/CPRuleEditor/_CPRuleEditorViewSliceRow.j @@ -122,8 +122,8 @@ { var title = [[itemsArray objectAtIndex:index] title], font = [_ruleEditor font], - width = [title sizeWithFont:font].width + 20, - rect = CGRectMake(0, 0, (width - width % 40) + 80, [_ruleEditor rowHeight]), + width = [title sizeWithFont:font].width + 35, // 35 for right arrows + margins + rect = CGRectMake(0, 0, width, [_ruleEditor rowHeight]), popup = [[CPPopUpButton alloc] initWithFrame:rect]; [popup setValue:font forThemeAttribute:@"font"]; @@ -315,8 +315,14 @@ { [ruleView setControlSize:CPSmallControlSize]; + var minSize = [ruleView currentValueForThemeAttribute:@"min-size"], + frame = [ruleView frame]; + + // Force controls to their minimum size + frame.size.height = minSize.height; + [ruleView setFrame:frame]; + [_ruleOptionViews addObject:ruleView]; - var frame = [ruleView frame]; [_ruleOptionInitialViewFrames addObject:frame]; [_ruleOptionFrames addObject:frame]; diff --git a/AppKit/CPScrollView.j b/AppKit/CPScrollView.j index c93543315..aef8453a9 100644 --- a/AppKit/CPScrollView.j +++ b/AppKit/CPScrollView.j @@ -264,11 +264,6 @@ var CPScrollerStyleGlobal = CPScrollerStyleOverlay, _delegate = nil; _scrollTimer = nil; _implementedDelegateMethods = 0; - - [[CPNotificationCenter defaultCenter] addObserver:self - selector:@selector(_didReceiveDefaultStyleChange:) - name:CPScrollerStyleGlobalChangeNotification - object:nil]; } return self; @@ -1270,6 +1265,37 @@ Notifies the delegate when the scroll view has finished scrolling. #pragma mark - #pragma mark Overrides + +- (void)_removeObservers +{ + if (!_isObserving) + return; + + [[CPNotificationCenter defaultCenter] removeObserver:self + name:CPScrollerStyleGlobalChangeNotification + object:nil]; + + [super _removeObservers]; +} + +- (void)_addObservers +{ + if (_isObserving) + return; + + //Make sure to have the last global style for the scroller + [self _didReceiveDefaultStyleChange:nil]; + + [[CPNotificationCenter defaultCenter] addObserver:self + selector:@selector(_didReceiveDefaultStyleChange:) + name:CPScrollerStyleGlobalChangeNotification + object:nil]; + + [super _addObservers]; +} + + + - (void)drawRect:(CGRect)aRect { [super drawRect:aRect]; diff --git a/AppKit/CPSegmentedControl.j b/AppKit/CPSegmentedControl.j index e58d97ef1..2b9654047 100644 --- a/AppKit/CPSegmentedControl.j +++ b/AppKit/CPSegmentedControl.j @@ -25,6 +25,7 @@ @import "CPControl.j" @import "CPWindow_Constants.j" @import "_CPImageAndTextView.j" +@import "CPMenu.j" @global CPApp diff --git a/AppKit/CPShadow.j b/AppKit/CPShadow.j index 2246dbf58..06656f2c6 100644 --- a/AppKit/CPShadow.j +++ b/AppKit/CPShadow.j @@ -22,6 +22,9 @@ @import +@import "CGGeometry.j" +@import "CPColor.j" +@import "CPGraphicsContext.j" /*! @deprecated @@ -31,9 +34,9 @@ */ @implementation CPShadow : CPObject { - CGSize _offset @accessors(property=shadowOffset); + CGSize _offset @accessors(property=shadowOffset); float _blurRadius @accessors(property=shadowBlurRadius); - CPColor _color @accessors(property=shadowColor); + CPColor _color @accessors(property=shadowColor); } /*! diff --git a/AppKit/CPSound.j b/AppKit/CPSound.j index bf25bda98..218b141f7 100644 --- a/AppKit/CPSound.j +++ b/AppKit/CPSound.j @@ -23,6 +23,7 @@ @import @import +@typedef HTMLAudioElement @protocol CPSoundDelegate diff --git a/AppKit/CPStepper.j b/AppKit/CPStepper.j index 928180f62..3436d062f 100644 --- a/AppKit/CPStepper.j +++ b/AppKit/CPStepper.j @@ -25,7 +25,6 @@ @import "CPTextField.j" - /*! CPStepper is an implementation of Cocoa NSStepper. @@ -53,9 +52,9 @@ @param maxValue the maximal acceptable value of the stepper @return Initialized CPStepper */ -+ (CPStepper)stepperWithInitialValue:(float)aValue minValue:(float)aMinValue maxValue:(float)aMaxValue ++ (id)stepperWithInitialValue:(float)aValue minValue:(float)aMinValue maxValue:(float)aMaxValue { - var stepper = [[CPStepper alloc] initWithFrame:CGRectMakeZero()]; + var stepper = [[self alloc] initWithFrame:CGRectMakeZero()]; [stepper setDoubleValue:aValue]; [stepper setMinValue:aMinValue]; @@ -75,14 +74,14 @@ @return Initialized CPStepper */ -+ (CPStepper)stepper ++ (id)stepper { return [CPStepper stepperWithInitialValue:0.0 minValue:0.0 maxValue:59.0]; } + (Class)_binderClassForBinding:(CPString)aBinding { - if (aBinding == CPValueBinding || aBinding == CPMinValueBinding || aBinding == CPMaxValueBinding) + if (aBinding === CPValueBinding || aBinding === CPMinValueBinding || aBinding === CPMaxValueBinding) return [_CPStepperValueBinder class]; return [super _binderClassForBinding:aBinding]; @@ -90,7 +89,7 @@ - (CPString)_replacementKeyPathForBinding:(CPString)aBinding { - if (aBinding == CPValueBinding) + if (aBinding === CPValueBinding) return @"doubleValue"; return [super _replacementKeyPathForBinding:aBinding]; @@ -240,7 +239,7 @@ if (![self isEnabled]) return; - if (aSender == _buttonUp) + if (aSender === _buttonUp) [self setDoubleValue:([self doubleValue] + _increment)]; else [self setDoubleValue:([self doubleValue] - _increment)]; @@ -293,7 +292,7 @@ - (void)_updatePlaceholdersWithOptions:(CPDictionary)options forBinding:(CPString)aBinding { - var placeholder = (aBinding == CPMaxValueBinding) ? [_source maxValue] : [_source minValue]; + var placeholder = (aBinding === CPMaxValueBinding) ? [_source maxValue] : [_source minValue]; [super _updatePlaceholdersWithOptions:options]; diff --git a/AppKit/CPTableColumn.j b/AppKit/CPTableColumn.j index e0f944a8e..8c25cfb3d 100644 --- a/AppKit/CPTableColumn.j +++ b/AppKit/CPTableColumn.j @@ -28,8 +28,6 @@ @import "CPTextField.j" -@global CPTableViewColumnDidResizeNotification - @class _CPTableColumnHeaderView @class CPTableView @@ -186,7 +184,7 @@ CPTableColumnUserResizingMask = 1 << 1; [tableView tile]; if (!_disableResizingPosting) - [self _postDidResizeNotificationWithOldWidth:oldWidth]; + [[self tableView] _didResizeTableColumn:self oldWidth:oldWidth]; } } @@ -539,19 +537,6 @@ CPTableColumnUserResizingMask = 1 << 1; return _headerToolTip; } -/*! - @ignore -*/ -- (void)_postDidResizeNotificationWithOldWidth:(float)oldWidth -{ - [[self tableView] _didResizeTableColumn:self]; - - [[CPNotificationCenter defaultCenter] - postNotificationName:CPTableViewColumnDidResizeNotification - object:[self tableView] - userInfo:@{ @"CPTableColumn": self, @"CPOldWidth": oldWidth }]; -} - @end @implementation CPTableColumnValueBinder : CPBinder diff --git a/AppKit/CPTableHeaderView.j b/AppKit/CPTableHeaderView.j index d22dc4f71..55e297eb8 100644 --- a/AppKit/CPTableHeaderView.j +++ b/AppKit/CPTableHeaderView.j @@ -625,7 +625,7 @@ var _CPTableColumnHeaderViewStringValueKey = @"_CPTableColumnHeaderViewStringVal - (void)stopResizingTableColumn:(CPInteger)aColumnIndex at:(CGPoint)aPoint { var tableColumn = [[_tableView tableColumns] objectAtIndex:aColumnIndex]; - [tableColumn _postDidResizeNotificationWithOldWidth:_columnOldWidth]; + [_tableView _didResizeTableColumn:tableColumn oldWidth:_columnOldWidth]; [tableColumn setDisableResizingPosting:NO]; [_tableView setDisableAutomaticResizing:NO]; diff --git a/AppKit/CPTableView.j b/AppKit/CPTableView.j index e0961f6fa..110a42eaa 100644 --- a/AppKit/CPTableView.j +++ b/AppKit/CPTableView.j @@ -81,10 +81,12 @@ var CPTableViewDelegate_selectionShouldChangeInTableView_ CPTableViewDelegate_tableView_typeSelectStringForTableColumn_row_ = 1 << 17, CPTableViewDelegate_tableView_willDisplayView_forTableColumn_row_ = 1 << 18, CPTableViewDelegate_tableView_willRemoveView_forTableColumn_row_ = 1 << 19, - CPTableViewDelegate_tableViewSelectionDidChange_ = 1 << 20, - CPTableViewDelegate_tableViewSelectionIsChanging_ = 1 << 21, - CPTableViewDelegate_tableViewMenuForTableColumn_row_ = 1 << 22, - CPTableViewDelegate_tableView_shouldReorderColumn_toColumn_ = 1 << 23; + CPTableViewDelegate_tableViewColumnDidMove_ = 1 << 20, + CPTableViewDelegate_tableViewColumnDidResize_ = 1 << 21, + CPTableViewDelegate_tableViewSelectionDidChange_ = 1 << 22, + CPTableViewDelegate_tableViewSelectionIsChanging_ = 1 << 23, + CPTableViewDelegate_tableViewMenuForTableColumn_row_ = 1 << 24, + CPTableViewDelegate_tableView_shouldReorderColumn_toColumn_ = 1 << 25; //CPTableViewDraggingDestinationFeedbackStyles CPTableViewDraggingDestinationFeedbackStyleNone = -1; @@ -321,6 +323,8 @@ CPTableViewFirstColumnOnlyAutoresizingStyle = 5; CPTableColumn _draggedColumn; CPArray _differedColumnDataToRemove; + + CPView _observedClipView; } /*! @@ -1167,6 +1171,9 @@ NOT YET IMPLEMENTED [[CPNotificationCenter defaultCenter] postNotificationName:CPTableViewColumnDidMoveNotification object:self userInfo:@{ @"CPOldColumn": fromIndex, @"CPNewColumn": toIndex }]; + + if (_implementedDelegateMethods & CPTableViewDelegate_tableViewColumnDidMove_) + [_delegate tableViewColumnDidMove:[[CPNotification alloc] initWithName:CPTableViewColumnDidMoveNotification object:self userInfo:@{ @"CPOldColumn": fromIndex, @"CPNewColumn": toIndex }]]; } /*! @@ -1245,9 +1252,17 @@ NOT YET IMPLEMENTED /*! @ignore */ -- (void)_didResizeTableColumn:(CPTableColumn)theColumn +- (void)_didResizeTableColumn:(CPTableColumn)theColumn oldWidth:(int)oldWidth { [self _autosave]; + + [[CPNotificationCenter defaultCenter] + postNotificationName:CPTableViewColumnDidResizeNotification + object:self + userInfo:@{ @"CPTableColumn": theColumn, @"CPOldWidth": oldWidth }]; + + if (_implementedDelegateMethods & CPTableViewDelegate_tableViewColumnDidResize_) + [_delegate tableViewColumnDidResize:[[CPNotification alloc] initWithName:CPTableViewColumnDidResizeNotification object:self userInfo:@{ @"CPTableColumn": theColumn, @"CPOldWidth": oldWidth }]]; } //Selecting Columns and Rows @@ -2860,35 +2875,6 @@ Your delegate can implement this method to avoid subclassing the tableview to ad if (_delegate === aDelegate) return; - var defaultCenter = [CPNotificationCenter defaultCenter]; - - if (_delegate) - { - if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewColumnDidMoveNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewColumnDidResizeNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewSelectionDidChangeNotification - object:self]; - - if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) - [defaultCenter - removeObserver:_delegate - name:CPTableViewSelectionIsChangingNotification - object:self]; - } - _delegate = aDelegate; _implementedDelegateMethods = 0; @@ -2963,32 +2949,16 @@ Your delegate can implement this method to avoid subclassing the tableview to ad _implementedDelegateMethods |= CPTableViewDelegate_tableView_shouldReorderColumn_toColumn_; if ([_delegate respondsToSelector:@selector(tableViewColumnDidMove:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewColumnDidMove:) - name:CPTableViewColumnDidMoveNotification - object:self]; + _implementedDelegateMethods |= CPTableViewDelegate_tableViewColumnDidMove_; if ([_delegate respondsToSelector:@selector(tableViewColumnDidResize:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewColumnDidResize:) - name:CPTableViewColumnDidResizeNotification - object:self]; + _implementedDelegateMethods |= CPTableViewDelegate_tableViewColumnDidResize_; if ([_delegate respondsToSelector:@selector(tableViewSelectionDidChange:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewSelectionDidChange:) - name:CPTableViewSelectionDidChangeNotification - object:self]; + _implementedDelegateMethods |= CPTableViewDelegate_tableViewSelectionDidChange_; if ([_delegate respondsToSelector:@selector(tableViewSelectionIsChanging:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(tableViewSelectionIsChanging:) - name:CPTableViewSelectionIsChangingNotification - object:self]; + _implementedDelegateMethods |= CPTableViewDelegate_tableViewSelectionIsChanging_; } /*! @@ -4455,41 +4425,15 @@ Your delegate can implement this method to avoid subclassing the tableview to ad */ - (void)viewWillMoveToSuperview:(CPView)aView { - [super viewWillMoveToSuperview:aView]; - - var superview = [self superview], - defaultCenter = [CPNotificationCenter defaultCenter]; - - if (superview) - { - [defaultCenter - removeObserver:self - name:CPViewFrameDidChangeNotification - object:superview]; - - [defaultCenter - removeObserver:self - name:CPViewBoundsDidChangeNotification - object:superview]; - } - if ([aView isKindOfClass:[CPClipView class]]) + _observedClipView = aView; + else { - [aView setPostsFrameChangedNotifications:YES]; - [aView setPostsBoundsChangedNotifications:YES]; - - [defaultCenter - addObserver:self - selector:@selector(superviewFrameChanged:) - name:CPViewFrameDidChangeNotification - object:aView]; - - [defaultCenter - addObserver:self - selector:@selector(superviewBoundsChanged:) - name:CPViewBoundsDidChangeNotification - object:aView]; + [self _stopObservingClipView]; + _observedClipView = nil; } + + [super viewWillMoveToSuperview:aView]; } /*! @@ -5071,6 +5015,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad postNotificationName:CPTableViewSelectionIsChangingNotification object:self userInfo:nil]; + + if (_implementedDelegateMethods & CPTableViewDelegate_tableViewSelectionIsChanging_) + [_delegate tableViewSelectionIsChanging:[[CPNotification alloc] initWithName:CPTableViewSelectionIsChangingNotification object:self userInfo:nil]]; } /*! @@ -5082,6 +5029,9 @@ Your delegate can implement this method to avoid subclassing the tableview to ad postNotificationName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]; + + if (_implementedDelegateMethods & CPTableViewDelegate_tableViewSelectionDidChange_) + [_delegate tableViewSelectionDidChange:[[CPNotification alloc] initWithName:CPTableViewSelectionDidChangeNotification object:self userInfo:nil]]; } /*! @@ -5139,8 +5089,8 @@ Your delegate can implement this method to avoid subclassing the tableview to ad if (!_isObserving) return; + [self _stopObservingClipView]; [super _removeObservers]; - [self _stopObservingFirstResponder]; } - (void)_addObservers @@ -5148,13 +5098,64 @@ Your delegate can implement this method to avoid subclassing the tableview to ad if (_isObserving) return; + [self _startObservingClipView]; [super _addObservers]; - [self _startObservingFirstResponder]; } -- (void)_startObservingFirstResponder +/*! + Called when the receiver is about to be moved to a new window. + @param aWindow the window to which the receiver will be moved. +*/ +- (void)viewWillMoveToWindow:(CPWindow)aWindow { - [[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_firstResponderDidChange:) name:_CPWindowDidChangeFirstResponderNotification object:[self window]]; + [super viewWillMoveToWindow:aWindow]; + + [self _stopObservingFirstResponder]; + + if (aWindow) + [self _startObservingFirstResponderForWindow:aWindow]; +} + +- (void)_startObservingClipView +{ + if (!_observedClipView) + return; + + var defaultCenter = [CPNotificationCenter defaultCenter]; + + [_observedClipView setPostsFrameChangedNotifications:YES]; + [_observedClipView setPostsBoundsChangedNotifications:YES]; + + [defaultCenter addObserver:self + selector:@selector(superviewFrameChanged:) + name:CPViewFrameDidChangeNotification + object:_observedClipView]; + + [defaultCenter addObserver:self + selector:@selector(superviewBoundsChanged:) + name:CPViewBoundsDidChangeNotification + object:_observedClipView]; +} + +- (void)_stopObservingClipView +{ + if (!_observedClipView) + return; + + var defaultCenter = [CPNotificationCenter defaultCenter]; + + [defaultCenter removeObserver:self + name:CPViewFrameDidChangeNotification + object:_observedClipView]; + + [defaultCenter removeObserver:self + name:CPViewBoundsDidChangeNotification + object:_observedClipView]; +} + +- (void)_startObservingFirstResponderForWindow:(CPWindow)aWindow +{ + [[CPNotificationCenter defaultCenter] addObserver:self selector:@selector(_firstResponderDidChange:) name:_CPWindowDidChangeFirstResponderNotification object:aWindow]; } - (void)_stopObservingFirstResponder diff --git a/AppKit/CPTextField.j b/AppKit/CPTextField.j index dd41b0591..0d8576a45 100644 --- a/AppKit/CPTextField.j +++ b/AppKit/CPTextField.j @@ -38,8 +38,13 @@ @end +var CPTextFieldDelegate_control_didFailToFormatString_errorDescription_ = 1 << 1, + CPTextFieldDelegate_controlTextDidBeginEditing_ = 1 << 2, + CPTextFieldDelegate_controlTextDidChange_ = 1 << 3, + CPTextFieldDelegate_controlTextDidEndEditing_ = 1 << 4, + CPTextFieldDelegate_controlTextDidFocus_ = 1 << 5, + CPTextFieldDelegate_controlTextDidBlur_ = 1 << 6; -var CPTextFieldDelegate_control_didFailToFormatString_errorDescription_ = 1 << 1; @typedef CPTextFieldBezelStyle CPTextFieldSquareBezel = 0; /*! A textfield bezel with squared corners. */ @@ -877,7 +882,7 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); [super _addObservers]; - if ([self window] === self) + if ([[self window] firstResponder] === self) [self _setObserveWindowKeyNotifications:YES]; } @@ -1147,6 +1152,9 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); if ([note object] != self) return; + if (_implementedDelegateMethods & CPTextFieldDelegate_controlTextDidBlur_) + [_delegate controlTextDidBlur:note]; + [[CPNotificationCenter defaultCenter] postNotification:note]; } @@ -1156,6 +1164,9 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); if ([note object] != self) return; + if (_implementedDelegateMethods & CPTextFieldDelegate_controlTextDidFocus_) + [_delegate controlTextDidFocus:note]; + [[CPNotificationCenter defaultCenter] postNotification:note]; } @@ -1166,9 +1177,36 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); [self _continuouslyReverseSetBinding]; + if (_implementedDelegateMethods & CPTextFieldDelegate_controlTextDidChange_) + [_delegate controlTextDidChange:note]; + [super textDidChange:note]; } +- (void)textDidBeginEditing:(CPNotification)note +{ + //this looks to prevent false propagation of notifications for other objects + if ([note object] != self) + return; + + if (_implementedDelegateMethods & CPTextFieldDelegate_controlTextDidBeginEditing_) + [_delegate controlTextDidBeginEditing:[[CPNotification alloc] initWithName:CPControlTextDidBeginEditingNotification object:self userInfo:@{"CPFieldEditor": [note object]}]] + + [super textDidBeginEditing:note]; +} + +- (void)textDidEndEditing:(CPNotification)note +{ + //this looks to prevent false propagation of notifications for other objects + if ([note object] != self) + return; + + [super textDidEndEditing:note]; + + if (_implementedDelegateMethods & CPTextFieldDelegate_controlTextDidEndEditing_) + [_delegate controlTextDidEndEditing:note]; +} + - (void)_updateCursorForEvent:(CPEvent)anEvent { var frame = CGRectMakeCopy([self frame]), @@ -1713,17 +1751,8 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); - (void)setDelegate:(id )aDelegate { - var defaultCenter = [CPNotificationCenter defaultCenter]; - - //unsubscribe the existing delegate if it exists - if (_delegate) - { - [defaultCenter removeObserver:_delegate name:CPControlTextDidBeginEditingNotification object:self]; - [defaultCenter removeObserver:_delegate name:CPControlTextDidChangeNotification object:self]; - [defaultCenter removeObserver:_delegate name:CPControlTextDidEndEditingNotification object:self]; - [defaultCenter removeObserver:_delegate name:CPTextFieldDidFocusNotification object:self]; - [defaultCenter removeObserver:_delegate name:CPTextFieldDidBlurNotification object:self]; - } + if (_delegate === aDelegate) + return; _delegate = aDelegate; _implementedDelegateMethods = 0; @@ -1732,40 +1761,19 @@ CPTextFieldStatePlaceholder = CPThemeState("placeholder"); _implementedDelegateMethods |= CPTextFieldDelegate_control_didFailToFormatString_errorDescription_ if ([_delegate respondsToSelector:@selector(controlTextDidBeginEditing:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(controlTextDidBeginEditing:) - name:CPControlTextDidBeginEditingNotification - object:self]; + _implementedDelegateMethods |= CPTextFieldDelegate_controlTextDidBeginEditing_; if ([_delegate respondsToSelector:@selector(controlTextDidChange:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(controlTextDidChange:) - name:CPControlTextDidChangeNotification - object:self]; - + _implementedDelegateMethods |= CPTextFieldDelegate_controlTextDidChange_; if ([_delegate respondsToSelector:@selector(controlTextDidEndEditing:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(controlTextDidEndEditing:) - name:CPControlTextDidEndEditingNotification - object:self]; + _implementedDelegateMethods |= CPTextFieldDelegate_controlTextDidEndEditing_; if ([_delegate respondsToSelector:@selector(controlTextDidFocus:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(controlTextDidFocus:) - name:CPTextFieldDidFocusNotification - object:self]; + _implementedDelegateMethods |= CPTextFieldDelegate_controlTextDidFocus_; if ([_delegate respondsToSelector:@selector(controlTextDidBlur:)]) - [defaultCenter - addObserver:_delegate - selector:@selector(controlTextDidBlur:) - name:CPTextFieldDidBlurNotification - object:self]; + _implementedDelegateMethods |= CPTextFieldDelegate_controlTextDidBlur_; } - (id)delegate diff --git a/AppKit/CPView.j b/AppKit/CPView.j index cf1d6dfbd..7e9e2e919 100644 --- a/AppKit/CPView.j +++ b/AppKit/CPView.j @@ -175,6 +175,7 @@ var CPViewFlags = { }, BOOL _postsBoundsChangedNotifications; BOOL _inhibitFrameAndBoundsChangedNotifications; BOOL _inLiveResize; + BOOL _isSuperviewAClipView; #if PLATFORM(DOM) DOMElement _DOMElement; @@ -830,6 +831,8 @@ var CPViewFlags = { }, */ - (void)viewWillMoveToSuperview:(CPView)aView { + _isSuperviewAClipView = [aView isKindOfClass:[CPClipView class]]; + [self _removeObservers]; if (aView) @@ -961,6 +964,9 @@ var CPViewFlags = { }, if (_postsFrameChangedNotifications) [CachedNotificationCenter postNotificationName:CPViewFrameDidChangeNotification object:self]; + + if (_isSuperviewAClipView) + [[self superview] viewFrameChanged:[[CPNotification alloc] initWithName:CPViewFrameDidChangeNotification object:self userInfo:nil]]; } /*! @@ -1023,6 +1029,9 @@ var CPViewFlags = { }, if (_postsFrameChangedNotifications && !_inhibitFrameAndBoundsChangedNotifications) [CachedNotificationCenter postNotificationName:CPViewFrameDidChangeNotification object:self]; + if (_isSuperviewAClipView && !_inhibitFrameAndBoundsChangedNotifications) + [[self superview] viewFrameChanged:[[CPNotification alloc] initWithName:CPViewFrameDidChangeNotification object:self userInfo:nil]]; + #if PLATFORM(DOM) var transform = _superview ? _superview._boundsTransform : NULL; @@ -1092,7 +1101,7 @@ var CPViewFlags = { }, // Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed. if (top) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", top + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", top + "px"); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, top); partIndex++; } @@ -1100,13 +1109,13 @@ var CPViewFlags = { }, { var height = frameSize.height - top - bottom; - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", height + "px"); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, size.height - top - bottom); partIndex++; } if (bottom) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", bottom + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", bottom + "px"); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width, bottom); } } @@ -1118,7 +1127,7 @@ var CPViewFlags = { }, // Make sure to repeat the left and right pieces vertically if they're not the exact height needed. if (left) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], left + "px", frameSize.height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], left + "px", frameSize.height + "px"); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], left, size.height); partIndex++; } @@ -1126,13 +1135,13 @@ var CPViewFlags = { }, { var width = (frameSize.width - left - right); - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], width + "px", frameSize.height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], width + "px", frameSize.height + "px"); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], size.width - left - right, size.height); partIndex++; } if (right) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], right + "px", frameSize.height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], right + "px", frameSize.height + "px"); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], right, size.height); } } @@ -1182,6 +1191,9 @@ var CPViewFlags = { }, if (_postsFrameChangedNotifications && !_inhibitFrameAndBoundsChangedNotifications) [CachedNotificationCenter postNotificationName:CPViewFrameDidChangeNotification object:self]; + + if (_isSuperviewAClipView && !_inhibitFrameAndBoundsChangedNotifications) + [[self superview] viewFrameChanged:[[CPNotification alloc] initWithName:CPViewFrameDidChangeNotification object:self userInfo:nil]]; } /*! @@ -1216,6 +1228,9 @@ var CPViewFlags = { }, if (_postsBoundsChangedNotifications) [CachedNotificationCenter postNotificationName:CPViewBoundsDidChangeNotification object:self]; + + if (_isSuperviewAClipView) + [[self superview] viewBoundsChanged:[[CPNotification alloc] initWithName:CPViewBoundsDidChangeNotification object:self userInfo:nil]]; } /*! @@ -1278,6 +1293,9 @@ var CPViewFlags = { }, if (_postsBoundsChangedNotifications && !_inhibitFrameAndBoundsChangedNotifications) [CachedNotificationCenter postNotificationName:CPViewBoundsDidChangeNotification object:self]; + + if (_isSuperviewAClipView && !_inhibitFrameAndBoundsChangedNotifications) + [[self superview] viewBoundsChanged:[[CPNotification alloc] initWithName:CPViewBoundsDidChangeNotification object:self userInfo:nil]]; } /*! @@ -1316,6 +1334,9 @@ var CPViewFlags = { }, if (_postsBoundsChangedNotifications && !_inhibitFrameAndBoundsChangedNotifications) [CachedNotificationCenter postNotificationName:CPViewBoundsDidChangeNotification object:self]; + + if (_isSuperviewAClipView && !_inhibitFrameAndBoundsChangedNotifications) + [[self superview] viewBoundsChanged:[[CPNotification alloc] initWithName:CPViewBoundsDidChangeNotification object:self userInfo:nil]]; } @@ -1874,7 +1895,7 @@ var CPViewFlags = { }, _DOMImageParts[0].style.background = [_backgroundColor cssString]; if (patternImage) - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[0], [patternImage size].width + "px", [patternImage size].height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[0], [patternImage size].width + "px", [patternImage size].height + "px"); if (CPFeatureIsCompatible(CPOpacityRequiresFilterFeature)) _DOMImageParts[0].style.filter = "alpha(opacity=" + [_backgroundColor alphaComponent] * 100 + ")"; @@ -1888,7 +1909,7 @@ var CPViewFlags = { }, _DOMElement.style.background = colorCSS; if (patternImage) - CPDomDisplayServerSetStyleBackgroundSize(_DOMElement, [patternImage size].width + "px", [patternImage size].height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMElement, [patternImage size].width + "px", [patternImage size].height + "px"); } else { @@ -1993,7 +2014,7 @@ var CPViewFlags = { }, // Make sure to repeat the top and bottom pieces horizontally if they're not the exact width needed. if (top) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", top + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", top + "px"); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, top); partIndex++; @@ -2003,14 +2024,14 @@ var CPViewFlags = { }, var height = frameSize.height - top - bottom; //_DOMImageParts[partIndex].style.backgroundSize = frameSize.width + "px " + height + "px"; - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", height + "px"); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, top); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, height); partIndex++; } if (bottom) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", bottom + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], frameSize.width + "px", bottom + "px"); CPDOMDisplayServerSetStyleLeftBottom(_DOMImageParts[partIndex], NULL, 0.0, 0.0); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], frameSize.width, bottom); } @@ -2025,7 +2046,7 @@ var CPViewFlags = { }, // Make sure to repeat the left and right pieces vertically if they're not the exact height needed. if (left) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], left + "px", frameSize.height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], left + "px", frameSize.height + "px"); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], left, frameSize.height); partIndex++; @@ -2034,14 +2055,14 @@ var CPViewFlags = { }, { var width = (frameSize.width - left - right); - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], width + "px", frameSize.height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], width + "px", frameSize.height + "px"); CPDOMDisplayServerSetStyleLeftTop(_DOMImageParts[partIndex], NULL, left, 0.0); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], width, frameSize.height); partIndex++; } if (right) { - CPDomDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], right + "px", frameSize.height + "px"); + CPDOMDisplayServerSetStyleBackgroundSize(_DOMImageParts[partIndex], right + "px", frameSize.height + "px"); CPDOMDisplayServerSetStyleRightTop(_DOMImageParts[partIndex], NULL, 0.0, 0.0); CPDOMDisplayServerSetStyleSize(_DOMImageParts[partIndex], right, frameSize.height); } diff --git a/AppKit/CPWebView.j b/AppKit/CPWebView.j index fe344027e..a382122d0 100644 --- a/AppKit/CPWebView.j +++ b/AppKit/CPWebView.j @@ -25,6 +25,8 @@ @class CPWebScriptObject +@typedef Window + // FIXME: implement these where possible: /* CPWebViewDidBeginEditingNotification = "CPWebViewDidBeginEditingNotification"; diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index e2836fe32..160a03ee4 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -907,18 +907,21 @@ CPTexturedBackgroundWindowMask - (void)_orderFront { - [[self contentView] _addObservers]; #if PLATFORM(DOM) // -dw- if a sheet is clicked, the parent window should come up too if (_isSheet) [_parentView orderFront:self]; - if (!_isVisible) - [self _setFrame:_frame display:YES animate:NO constrainWidth:YES constrainHeight:YES]; + // Save the boolean since it will be updated in the method order:window:relativeTo: + var wasVisible = _isVisible; [_platformWindow orderFront:self]; [_platformWindow order:CPWindowAbove window:self relativeTo:nil]; + + // setFrame is set after ordering the window as this method can send some notifications + if (!wasVisible) + [self _setFrame:_frame display:YES animate:NO constrainWidth:YES constrainHeight:YES]; #endif if (!CPApp._keyWindow) @@ -939,6 +942,23 @@ CPTexturedBackgroundWindowMask { } +/* + Called when the window is displayed in the DOM +*/ +- (void)_windowWillBeAddedToTheDOM +{ + [[self contentView] _addObservers]; +} + +/* + Called when the window is removed in the DOM +*/ +- (void)_windowWillBeRemovedFromTheDOM +{ + [[self contentView] _removeObservers]; +} + + /* Makes the receiver the last window in the screen ordering. @param aSender the object that requested this @@ -968,8 +988,6 @@ CPTexturedBackgroundWindowMask if (!_isVisible) return; - [[self contentView] _removeObservers]; - if ([self isSheet]) { // -dw- as in Cocoa, orderOut: detaches the sheet and animates out diff --git a/AppKit/CPWindowController.j b/AppKit/CPWindowController.j index 8fa7b527d..2cfa3669c 100644 --- a/AppKit/CPWindowController.j +++ b/AppKit/CPWindowController.j @@ -25,6 +25,7 @@ @import "CPCib.j" @import "CPResponder.j" +@import "CPViewController.j" @import "CPWindow.j" @class CPDocument diff --git a/AppKit/CoreGraphics/CGContext.j b/AppKit/CoreGraphics/CGContext.j index a00199586..ed518129a 100644 --- a/AppKit/CoreGraphics/CGContext.j +++ b/AppKit/CoreGraphics/CGContext.j @@ -738,7 +738,7 @@ else if (CPFeatureIsCompatible(CPVMLFeature)) else { // I have declared these functions here to make it compile without warnings with the new compiler under rhino. - CGContextClearRect = CGContextDrawLinearGradient = CGContextClip = CGContextClipToRect = function() {throw new Error("function is not declared in this environment")} + CGContextClearRect = CGContextDrawLinearGradient = CGContextClip = CGContextClipToRect = CGContextDrawImage = function() {throw new Error("function is not declared in this environment")} } /*! @endcond diff --git a/AppKit/Platform/DOM/CPDOMDisplayServer.h b/AppKit/Platform/DOM/CPDOMDisplayServer.h index 614d10ecf..0ec941984 100644 --- a/AppKit/Platform/DOM/CPDOMDisplayServer.h +++ b/AppKit/Platform/DOM/CPDOMDisplayServer.h @@ -80,7 +80,7 @@ aDOMElement.style.bottom = ROUND(____p.y) + "px"; aDOMElement.width = MAX(0.0, ROUND(aWidth));\ aDOMElement.height = MAX(0.0, ROUND(aHeight)); -#define CPDomDisplayServerSetStyleBackgroundSize(aDOMElement, aWidth, aHeight)\ +#define CPDOMDisplayServerSetStyleBackgroundSize(aDOMElement, aWidth, aHeight)\ aDOMElement.style.backgroundSize = aWidth + ' ' + aHeight; #define CPDOMDisplayServerAppendChild(aParentElement, aChildElement) aParentElement.appendChild(aChildElement) @@ -129,7 +129,7 @@ aDOMElement.style.bottom = ROUND(____p.y) + "px"; CPDOMDisplayServerInstructions[__index + 2] = aWidth;\ CPDOMDisplayServerInstructions[__index + 3] = aHeight; -#define CPDomDisplayServerSetStyleBackgroundSize(aDOMElement, aWidth, aHeight)\ +#define CPDOMDisplayServerSetStyleBackgroundSize(aDOMElement, aWidth, aHeight)\ aDOMElement.style.backgroundSize = aWidth + ' ' + aHeight; #define CPDOMDisplayServerAppendChild(aParentElement, aChildElement)\ diff --git a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j index eeba3a894..80a04feae 100644 --- a/AppKit/Platform/DOM/CPPlatformWindow+DOM.j +++ b/AppKit/Platform/DOM/CPPlatformWindow+DOM.j @@ -1299,7 +1299,10 @@ var PreventScroll = true; // When ordering out, ignore otherWindow, simply remove aWindow from its level. // If layer is nil, this will be a no-op. if (orderingMode === CPWindowOut) + { + [aWindow _windowWillBeRemovedFromTheDOM]; return [layer removeWindow:aWindow]; + } /* If aWindow is a child of otherWindow and is not yet visible, @@ -1345,6 +1348,8 @@ var PreventScroll = true; if (otherWindow) insertionIndex = orderingMode === CPWindowAbove ? otherWindow._index + 1 : otherWindow._index; + [aWindow _windowWillBeAddedToTheDOM]; + // Place the window at the appropriate index. [layer insertWindow:aWindow atIndex:insertionIndex]; @@ -1395,6 +1400,9 @@ var PreventScroll = true; var index = ordering === CPWindowAbove ? parent._index + 1 : parent._index; + if (!childWasVisible) + [child _windowWillBeAddedToTheDOM]; + [aLayer insertWindow:child atIndex:index]; if (!childWasVisible) diff --git a/AppKit/Themes/Aristo/ThemeDescriptors.j b/AppKit/Themes/Aristo/ThemeDescriptors.j index efbbb1c23..4bac4681a 100755 --- a/AppKit/Themes/Aristo/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo/ThemeDescriptors.j @@ -1258,6 +1258,19 @@ var themedButtonValues = nil, ["textfield-bezel-square-disabled-8.png", 6.0, 6.0] ]), + bezelFocusedColor = PatternColor( + [ + ["textfield-bezel-square-focused-0.png", 6.0, 6.0], + ["textfield-bezel-square-focused-1.png", 1.0, 6.0], + ["textfield-bezel-square-focused-2.png", 6.0, 6.0], + ["textfield-bezel-square-focused-3.png", 6.0, 1.0], + ["textfield-bezel-square-focused-4.png", 1.0, 1.0], + ["textfield-bezel-square-focused-5.png", 6.0, 1.0], + ["textfield-bezel-square-focused-6.png", 6.0, 6.0], + ["textfield-bezel-square-focused-7.png", 1.0, 6.0], + ["textfield-bezel-square-focused-8.png", 6.0, 6.0] + ]), + bezelColorDatePickerTextField = PatternColor( [ [@"datepicker-date-segment-0.png", 4.0, 18.0], @@ -1268,6 +1281,7 @@ var themedButtonValues = nil, themeValues = [ [@"bezel-color", bezelColor, CPThemeStateBezeled], + [@"bezel-color", bezelFocusedColor, [CPThemeStateBezeled, CPThemeStateEditing]], [@"bezel-color", bezelDisabledColor, [CPThemeStateBezeled, CPThemeStateDisabled]], [@"font", [CPFont boldSystemFontOfSize:13.0]], @@ -1275,8 +1289,10 @@ var themedButtonValues = nil, [@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 3.0), CPThemeStateNormal], [@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 5.0), CPThemeStateBezeled], + [@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 5.0), [CPThemeStateBezeled, CPThemeStateEditing]], [@"bezel-inset", CGInsetMake(0.0, -3.0, 0.0, -3.0), CPThemeStateBezeled], + [@"bezel-inset", CGInsetMake(0.0, -3.0, 0.0, -3.0), [CPThemeStateBezeled, CPThemeStateEditing]], [@"datepicker-textfield-bezel-color", [CPColor clearColor], CPThemeStateNormal], [@"datepicker-textfield-bezel-color", bezelColorDatePickerTextField, CPThemeStateSelected], @@ -1301,10 +1317,12 @@ var themedButtonValues = nil, // CPThemeStateControlSizeSmall [@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 5.0), [CPThemeStateControlSizeSmall, CPThemeStateNormal]], [@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 5.0), [CPThemeStateControlSizeSmall, CPThemeStateBezeled]], + [@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 5.0), [CPThemeStateControlSizeSmall, CPThemeStateEditing, CPThemeStateBezeled]], [@"min-size-datepicker-textfield", CGSizeMake(6.0, 16.0), CPThemeStateControlSizeSmall], [@"date-hour-margin", 5.0, CPThemeStateControlSizeSmall], [@"stepper-margin", 3.0, CPThemeStateControlSizeSmall], + [@"stepper-margin", 3.0, [CPThemeStateControlSizeSmall, CPThemeStateEditing]], [@"min-size", CGSizeMake(0, 26.0), CPThemeStateControlSizeSmall], [@"max-size", CGSizeMake(-1.0, 26.0), CPThemeStateControlSizeSmall], @@ -1313,10 +1331,12 @@ var themedButtonValues = nil, // CPThemeStateControlSizeMini [@"content-inset", CGInsetMake(4.0, 0.0, 0.0, 4.0), [CPThemeStateControlSizeMini, CPThemeStateNormal]], [@"content-inset", CGInsetMake(4.0, 0.0, 0.0, 4.0), [CPThemeStateControlSizeMini, CPThemeStateBezeled]], + [@"content-inset", CGInsetMake(4.0, 0.0, 0.0, 4.0), [CPThemeStateControlSizeMini, CPThemeStateEditing, CPThemeStateBezeled]], [@"min-size-datepicker-textfield", CGSizeMake(6.0, 12.0), CPThemeStateControlSizeMini], [@"date-hour-margin", 2.0, CPThemeStateControlSizeMini], [@"stepper-margin", 2.0, CPThemeStateControlSizeMini], + [@"stepper-margin", 2.0, [CPThemeStateControlSizeMini, CPThemeStateEditing]], [@"min-size", CGSizeMake(0, 22.0), CPThemeStateControlSizeMini], [@"max-size", CGSizeMake(-1.0, 22.0), CPThemeStateControlSizeMini], diff --git a/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-highlighted-image.png b/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-highlighted-image.png new file mode 100644 index 000000000..92d3953cd Binary files /dev/null and b/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-highlighted-image.png differ diff --git a/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-image.png b/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-image.png index c223c965b..c9b7592cf 100644 Binary files a/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-image.png and b/AppKit/Themes/Aristo2/Resources/rule-editor-button-add-image.png differ diff --git a/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-highlighted-image.png b/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-highlighted-image.png new file mode 100644 index 000000000..ac6d5cdc9 Binary files /dev/null and b/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-highlighted-image.png differ diff --git a/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-image.png b/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-image.png index f99f803e3..0c2bce290 100644 Binary files a/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-image.png and b/AppKit/Themes/Aristo2/Resources/rule-editor-button-remove-image.png differ diff --git a/AppKit/Themes/Aristo2/ThemeDescriptors.j b/AppKit/Themes/Aristo2/ThemeDescriptors.j index bf72661f3..5fea39d42 100644 --- a/AppKit/Themes/Aristo2/ThemeDescriptors.j +++ b/AppKit/Themes/Aristo2/ThemeDescriptors.j @@ -824,6 +824,14 @@ var themedButtonValues = nil, height: 4.0 }), + bezelFocusedColor = PatternColor( + "textfield-bezel-square-focused{position}.png", + { + positions: "#", + width: 9.0, + height: 9.0 + }), + bezelColorDatePickerTextField = PatternColor( [ [@"datepicker-date-segment-0.png", 4.0, 18.0], @@ -835,14 +843,17 @@ var themedButtonValues = nil, [ [@"bezel-color", bezelColor["@"], CPThemeStateBezeled], [@"bezel-color", bezelColor["disabled"], [CPThemeStateBezeled, CPThemeStateDisabled]], + [@"bezel-color", bezelFocusedColor, [CPThemeStateBezeled, CPThemeStateEditing]], [@"font", [CPFont systemFontOfSize:CPFontCurrentSystemSize]], [@"text-color", [CPColor colorWithWhite:0.2 alpha:0.5], CPThemeStateDisabled], [@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 3.0), CPThemeStateNormal], [@"content-inset", CGInsetMake(3.0, 0.0, 0.0, 3.0), CPThemeStateBezeled], + [@"content-inset", CGInsetMake(6.0, 0.0, 0.0, 6.0), [CPThemeStateNormal, CPThemeStateBezeled, CPThemeStateEditing]], [@"bezel-inset", CGInsetMake(3.0, 0.0, 3.0, 0.0), CPThemeStateBezeled], + [@"bezel-inset", CGInsetMake(0.0, 0, 0.0, -3.0), [CPThemeStateNormal, CPThemeStateBezeled, CPThemeStateEditing]], [@"datepicker-textfield-bezel-color", [CPColor clearColor], CPThemeStateNormal], [@"datepicker-textfield-bezel-color", bezelColorDatePickerTextField, CPThemeStateSelected], @@ -859,6 +870,7 @@ var themedButtonValues = nil, [@"min-size-datepicker-textfield", CGSizeMake(6.0, 18.0)], [@"date-hour-margin", 7.0], [@"stepper-margin", 5.0], + [@"stepper-margin", 2.0, CPThemeStateEditing], [@"min-size", CGSizeMake(0, 29.0)], [@"max-size", CGSizeMake(-1.0, 29.0)], @@ -867,10 +879,12 @@ var themedButtonValues = nil, // CPThemeStateControlSizeSmall [@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 3.0), [CPThemeStateControlSizeSmall, CPThemeStateNormal]], [@"content-inset", CGInsetMake(2.0, 0.0, 0.0, 3.0), [CPThemeStateControlSizeSmall, CPThemeStateBezeled]], + [@"content-inset", CGInsetMake(5.0, 0.0, 0.0, 6.0), [CPThemeStateControlSizeSmall, CPThemeStateBezeled, CPThemeStateEditing]], [@"min-size-datepicker-textfield", CGSizeMake(6.0, 16.0), CPThemeStateControlSizeSmall], [@"date-hour-margin", 5.0, CPThemeStateControlSizeSmall], [@"stepper-margin", 3.0, CPThemeStateControlSizeSmall], + [@"stepper-margin", 0.0, [CPThemeStateControlSizeSmall, CPThemeStateEditing]], [@"min-size", CGSizeMake(0, 26.0), CPThemeStateControlSizeSmall], [@"max-size", CGSizeMake(-1.0, 26.0), CPThemeStateControlSizeSmall], @@ -879,10 +893,12 @@ var themedButtonValues = nil, // CPThemeStateControlSizeMini [@"content-inset", CGInsetMake(3.0, 0.0, 0.0, 3.0), [CPThemeStateControlSizeMini, CPThemeStateNormal]], [@"content-inset", CGInsetMake(1.0, 0.0, 0.0, 3.0), [CPThemeStateControlSizeMini, CPThemeStateBezeled]], + [@"content-inset", CGInsetMake(4.0, 0.0, 0.0, 6.0), [CPThemeStateControlSizeMini, CPThemeStateBezeled, CPThemeStateEditing]], [@"min-size-datepicker-textfield", CGSizeMake(6.0, 12.0), CPThemeStateControlSizeMini], [@"date-hour-margin", 2.0, CPThemeStateControlSizeMini], [@"stepper-margin", 2.0, CPThemeStateControlSizeMini], + [@"stepper-margin", -1.0, [CPThemeStateControlSizeMini, CPThemeStateEditing]], [@"min-size", CGSizeMake(0, 22.0), CPThemeStateControlSizeMini], [@"max-size", CGSizeMake(-1.0, 22.0), CPThemeStateControlSizeMini], @@ -2263,6 +2279,8 @@ var themedButtonValues = nil, sliceLastBottomBorderColor = [CPColor colorWithWhite:0.6 alpha:1.0], buttonAddImage = PatternImage(@"rule-editor-button-add-image.png", 20.0, 20.0), buttonRemoveImage = PatternImage(@"rule-editor-button-remove-image.png", 20.0, 20.0), + buttonAddHighlightedImage = PatternImage(@"rule-editor-button-add-highlighted-image.png", 20.0, 20.0), + buttonRemoveHighlightedImage = PatternImage(@"rule-editor-button-remove-highlighted-image.png", 20.0, 20.0), fontColor = [CPColor colorWithWhite:150 / 255 alpha:1], ruleEditorThemedValues = @@ -2276,9 +2294,9 @@ var themedButtonValues = nil, [@"font", [CPFont systemFontOfSize:10.0]], [@"font-color", fontColor], [@"add-image", buttonAddImage, CPThemeStateNormal], - [@"add-image", buttonAddImage, CPThemeStateHighlighted], + [@"add-image", buttonAddHighlightedImage, CPThemeStateHighlighted], [@"remove-image", buttonRemoveImage, CPThemeStateNormal], - [@"remove-image", buttonRemoveImage, CPThemeStateHighlighted], + [@"remove-image", buttonRemoveHighlightedImage, CPThemeStateHighlighted], [@"vertical-alignment", CPCenterVerticalTextAlignment], ]; diff --git a/AppKit/Themes/BlendKit/BKShowcaseController.j b/AppKit/Themes/BlendKit/BKShowcaseController.j index 99e0d0b05..5a57393fd 100644 --- a/AppKit/Themes/BlendKit/BKShowcaseController.j +++ b/AppKit/Themes/BlendKit/BKShowcaseController.j @@ -137,22 +137,27 @@ var BKLearnMoreToolbarItemIdentifier = @"BKLearnMoreToolbarItemId [theWindow setFullPlatformWindow:YES]; [theWindow makeKeyAndOrderFront:self]; + + [_themesCollectionView addObserver:self forKeyPath:@"selectionIndexes" options:CPKeyValueObservingOptionNew | CPKeyValueObservingOptionInitial context:nil]; } -- (void)collectionViewDidChangeSelection:(CPCollectionView)aCollectionView +- (void)observeValueForKeyPath:(CPString)keyPath ofObject:(id)object change:(CPDictionary)change context:(void)context { - var themeDescriptorClass = _themeDescriptorClasses[[[aCollectionView selectionIndexes] firstIndex]], - itemSize = [themeDescriptorClass itemSize]; + if (object == _themesCollectionView && keyPath == @"selectionIndexes") + { + var themeDescriptorClass = _themeDescriptorClasses[[[object selectionIndexes] firstIndex]], + itemSize = [themeDescriptorClass itemSize]; - // Make room for label and apply a minimum size. - itemSize.width = MAX(100.0, itemSize.width + 20.0); - itemSize.height = MAX(100.0, itemSize.height + 30.0); + // Make room for label and apply a minimum size. + itemSize.width = MAX(100.0, itemSize.width + 20.0); + itemSize.height = MAX(100.0, itemSize.height + 30.0); - [_themedObjectsCollectionView setMinItemSize:itemSize]; - [_themedObjectsCollectionView setMaxItemSize:itemSize]; + [_themedObjectsCollectionView setMinItemSize:itemSize]; + [_themedObjectsCollectionView setMaxItemSize:itemSize]; - [_themedObjectsCollectionView setContent:[themeDescriptorClass themedShowcaseObjectTemplates]]; - [BKShowcaseCell setBackgroundColor:[themeDescriptorClass showcaseBackgroundColor]]; + [_themedObjectsCollectionView setContent:[themeDescriptorClass themedShowcaseObjectTemplates]]; + [BKShowcaseCell setBackgroundColor:[themeDescriptorClass showcaseBackgroundColor]]; + } } - (BOOL)hasLearnMoreURL diff --git a/AppKit/_CPPopUpList.j b/AppKit/_CPPopUpList.j index 3dd357132..6ee4e1ff0 100644 --- a/AppKit/_CPPopUpList.j +++ b/AppKit/_CPPopUpList.j @@ -96,28 +96,41 @@ var ListColumnIdentifier = @"1"; return [super sendEvent:anEvent]; } -- (void)orderFront:(id)sender -{ - [self _trapNextMouseDown]; - [super orderFront:sender]; -} - - (void)_mouseWasClicked:(CPEvent)anEvent { + // This is needed, when the user close the list with the key enter + if (![self isVisible]) + { + [CPApp sendEvent:anEvent]; + return; + } + var mouseWindow = [anEvent window], - rect = [[[self delegate] dataSource] bounds], + rect = CGRectInsetByInset([[[self delegate] dataSource] bounds], [[[self delegate] dataSource] currentValueForThemeAttribute:@"content-inset"]), point = [[[self delegate] dataSource] convertPoint:[anEvent locationInWindow] fromView:nil]; + // If we click somewhere else than the comboBox or the panel we close the panel if (mouseWindow != self && !CGRectContainsPoint(rect, point)) + { [[self delegate] close]; + } else - [self _trapNextMouseDown]; + { + // If we click on the panel, the app will know what to do + if (mouseWindow == self) + [CPApp sendEvent:anEvent]; + + // If we click on the comboBox field, we will trap the next mouse down + if (CGRectContainsPoint(rect, point)) + [self _trapNextMouseDown]; + } + } - (void)_trapNextMouseDown { - // Don't dequeue the event so clicks in controls will work - [CPApp setTarget:self selector:@selector(_mouseWasClicked:) forNextEventMatchingMask:CPLeftMouseDownMask untilDate:nil inMode:CPDefaultRunLoopMode dequeue:NO]; + // Dequeue the event and mouseWasClicked will do what it needs to do + [CPApp setTarget:self selector:@selector(_mouseWasClicked:) forNextEventMatchingMask:CPLeftMouseDownMask untilDate:nil inMode:CPDefaultRunLoopMode dequeue:YES]; } @end @@ -323,6 +336,11 @@ var ListColumnIdentifier = @"1"; if ([_panel isVisible]) return; + [self listWillPopUp]; + + [_panel _trapNextMouseDown]; + [[aView window] addChildWindow:_panel ordered:CPWindowAbove]; + var rowRect = [_tableView rectOfRow:[self numberOfRowsInTableView:_tableView] - 1], frame = CGRectMake(0, 0, MAX(_listWidth, CGRectGetWidth(aRect)), CGRectGetMaxY(rowRect)); @@ -333,10 +351,6 @@ var ListColumnIdentifier = @"1"; [_scrollView setFrameSize:CGSizeMakeCopy(frame.size)]; [_tableView setEnabled:[_dataSource numberOfItemsInList:self] > 0]; [self scrollItemAtIndexToTop:[_tableView selectedRow]]; - - [self listWillPopUp]; - - [[aView window] addChildWindow:_panel ordered:CPWindowAbove]; } #pragma mark Setting Display Attributes diff --git a/AppKit/_CPPopoverWindow.j b/AppKit/_CPPopoverWindow.j index 818ae6d60..27d160e17 100644 --- a/AppKit/_CPPopoverWindow.j +++ b/AppKit/_CPPopoverWindow.j @@ -64,6 +64,7 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, BOOL _isObservingFrame; BOOL _shouldPerformAnimation; CPInteger _implementedDelegateMethods; + CGRect _targetRect; CPWindow _targetWindow; JSObject _orderOutTransitionFunction; JSObject _transitionCompleteFunction; @@ -206,8 +207,7 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, if (![_targetView window]) return; - var point = [self computeOriginFromRect:[_targetView bounds] ofView:_targetView preferredEdge:[_windowView preferredEdge]]; - + var point = [self computeOriginFromRect:_targetRect ofView:_targetView preferredEdge:[_windowView preferredEdge]]; [self setFrameOrigin:point]; } } @@ -362,7 +362,6 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, [self setFrameOrigin:point]; [_windowView showCursor]; [_windowView setNeedsDisplay:YES]; - [self makeKeyAndOrderFront:nil]; if (positioningView !== _targetView) { @@ -371,6 +370,9 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, _targetView = positioningView; } + _targetRect = aRect; + [self makeKeyAndOrderFront:nil]; + /* If _targetView's window is not a full platform window, add us as a child, because when we close we are detached from @@ -417,7 +419,7 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, if ([self isVisible]) { - var point = [self computeOriginFromRect:[_targetView bounds] ofView:_targetView preferredEdge:[_windowView preferredEdge]]; + var point = [self computeOriginFromRect:_targetRect ofView:_targetView preferredEdge:[_windowView preferredEdge]]; [self setFrameOrigin:point]; } } @@ -581,10 +583,12 @@ var _CPPopoverWindow_shouldClose_ = 1 << 4, - (void)_orderFront { - if (![self isVisible]) - [self _addFrameObserver]; + var wasVisible = [self isVisible]; [super _orderFront]; + + if (!wasVisible) + [self _addFrameObserver]; } - (void)_parentDidOrderInChild diff --git a/Foundation/CPCoder.j b/Foundation/CPCoder.j index d02d918e0..0bdc7b89a 100644 --- a/Foundation/CPCoder.j +++ b/Foundation/CPCoder.j @@ -53,7 +53,7 @@ @param aType the structure or object type @param anObject the object to be encoded */ -- (void)encodeValueOfObjCType:(CPString)aType at:(id)anObject +- (void)encodeValueOfObjJType:(CPString)aType at:(id)anObject { _CPRaiseInvalidAbstractInvocation(self, _cmd); } diff --git a/Foundation/CPDate.j b/Foundation/CPDate.j index 736ca9ff2..574873ef6 100644 --- a/Foundation/CPDate.j +++ b/Foundation/CPDate.j @@ -74,24 +74,36 @@ var CPDateReferenceDate = new Date(Date.UTC(2001, 0, 1, 0, 0, 0, 0)); - (id)initWithTimeIntervalSinceNow:(CPTimeInterval)seconds { + if (!_isNumberType(seconds)) + CPLog.warn(@"The parameter of the method initWithTimeIntervalSinceNow: should be an integer or a float"); + self = new Date((new Date()).getTime() + seconds * 1000); return self; } - (id)initWithTimeIntervalSince1970:(CPTimeInterval)seconds { + if (!_isNumberType(seconds)) + CPLog.warn(@"The parameter of the method initWithTimeIntervalSince1970: should be an integer or a float"); + self = new Date(seconds * 1000); return self; } - (id)initWithTimeIntervalSinceReferenceDate:(CPTimeInterval)seconds { + if (!_isNumberType(seconds)) + CPLog.warn(@"The parameter of the method initWithTimeIntervalSinceReferenceDate: should be an integer or a float"); + self = [self initWithTimeInterval:seconds sinceDate:CPDateReferenceDate]; return self; } - (id)initWithTimeInterval:(CPTimeInterval)seconds sinceDate:(CPDate)refDate { + if (!_isNumberType(seconds)) + CPLog.warn(@"The parameter of the method initWithTimeInterval:sinceDate: should be an integer or a float"); + self = new Date(refDate.getTime() + seconds * 1000); return self; } @@ -275,3 +287,11 @@ Date.parseISO8601 = function (date) }; Date.prototype.isa = CPDate; + +function _isNumberType(value) +{ + if (typeof value === 'number') + return YES; + else + return NO; +} \ No newline at end of file diff --git a/Foundation/CPError.j b/Foundation/CPError.j index 4acafe2ce..edc270514 100644 --- a/Foundation/CPError.j +++ b/Foundation/CPError.j @@ -24,31 +24,52 @@ @import "CPObject.j" @import "CPString.j" -CPCappuccinoErrorDomain = CPCocoaErrorDomain = @"CPCappuccinoErrorDomain"; -// CPPOSIXErrorDomain = @"CPPOSIXErrorDomain"; -// CPOSStatusErrorDomain = @"CPOSStatusErrorDomain"; +CPCappuccinoErrorDomain = kCFErrorDomainCappuccino; +CPCocoaErrorDomain = kCFErrorDomainCappuccino; // compat -CPUnderlyingErrorKey = @"CPUnderlyingErrorKey"; +CPUnderlyingErrorKey = kCFErrorUnderlyingErrorKey; -CPLocalizedDescriptionKey = @"CPLocalizedDescriptionKey"; -CPLocalizedFailureReasonErrorKey = @"CPLocalizedFailureReasonErrorKey"; -CPLocalizedRecoverySuggestionErrorKey = @"CPLocalizedRecoverySuggestionErrorKey"; +CPLocalizedDescriptionKey = kCFErrorLocalizedDescriptionKey; +CPLocalizedFailureReasonErrorKey = kCFErrorLocalizedFailureReasonKey; +CPLocalizedRecoverySuggestionErrorKey = kCFErrorLocalizedRecoverySuggestionKey; CPLocalizedRecoveryOptionsErrorKey = @"CPLocalizedRecoveryOptionsErrorKey"; CPRecoveryAttempterErrorKey = @"CPRecoveryAttempterErrorKey"; CPHelpAnchorErrorKey = @"CPHelpAnchorErrorKey"; CPStringEncodingErrorKey = @"CPStringEncodingErrorKey"; -CPURLErrorKey = @"CPURLErrorKey"; -CPFilePathErrorKey = @"CPFilePathErrorKey"; +CPURLErrorKey = kCFErrorURLKey; +CPFilePathErrorKey = kCFErrorFilePathKey; +/*! + @class CPError + @ingroup foundation + @brief Used for encapsulating, presenting, and recovery from errors. + CPError is toll-free bridged with CFError() methods. + + An example of initializing a CPError: +
+
+var userInfo = @{CPLocalizedDescriptionKey: @"A localized error description",
+                 CPLocalizedFailureReasonErrorKey: @"A localized failure reason",
+                 CPUnderlyingErrorKey: @"An underlying error message"},
+
+    err = [CPError errorWithDomain:CPCappuccinoErrorDomain code:-10 userInfo:userInfo];
+
+ */ @implementation CPError : CPObject { - CPInteger _code @accessors(property=code, readonly); - CPString _domain @accessors(property=domain, readonly); - CPDictionary _userInfo @accessors(property=userInfo, readonly); } ++ (id)alloc +{ + var obj = new CFError(); + obj.isa = [self class]; + + return obj; +} + + + (id)errorWithDomain:(CPString)aDomain code:(CPInteger)aCode userInfo:(CPDictionary)aDict { return [[CPError alloc] initWithDomain:aDomain code:aCode userInfo:aDict]; @@ -56,44 +77,94 @@ CPFilePathErrorKey = @"CPFilePathErrorKey"; - (id)initWithDomain:(CPString)aDomain code:(CPInteger)aCode userInfo:(CPDictionary)aDict { - if (self = [super init]) - { - _domain = aDomain; - _code = aCode; - _userInfo = aDict; - } - - return self; + var result = new CFError(aDomain, aCode, aDict); + result.isa = [self class]; + return result; } +- (CPInteger)code +{ + return self.code(); +} + +- (CPString)userInfo +{ + return self.userInfo(); +} + +- (CPString)domain +{ + return self.domain(); +} + +/*! + By default this method returns the object in the user info dictionary for the key + CPLocalizedDescriptionKey. If the user info dictionary doesn’t contain a value for + CPLocalizedDescriptionKey, a default string is constructed from the domain and code. + */ - (CPString)localizedDescription { - return [_userInfo objectForKey:CPLocalizedDescriptionKey]; + return self.description(); } - (CPString)localizedFailureReason { - return [_userInfo objectForKey:CPLocalizedFailureReasonErrorKey]; + return self.failureReason(); } - (CPArray)localizedRecoveryOptions { - return [_userInfo objectForKey:CPLocalizedRecoveryOptionsErrorKey]; + var userInfo = self.userInfo(), + recoveryOptions = userInfo.valueForKey(CPLocalizedRecoveryOptionsErrorKey); + + return recoveryOptions; } - (CPString)localizedRecoverySuggestion { - return [_userInfo objectForKey:CPLocalizedRecoverySuggestionErrorKey]; + return self.recoverySuggestion(); } - (id)recoveryAttempter { - return [_userInfo objectForKey:CPRecoveryAttempterErrorKey]; + var userInfo = self.userInfo(), + recoveryAttempter = userInfo.valueForKey(CPRecoveryAttempterErrorKey); + + return recoveryAttempter; } - (CPString)description { - return [CPString stringWithFormat:@"Error Domain=%@ Code=%d UserInfo=%p %@", _domain, _code, _userInfo, [self localizedDescription]]; + return [CPString stringWithFormat:@"Error Domain=%@ Code=%d \"%@\" UserInfo=%@", self.domain(), self.code(), self.description(), self.userInfo()]; } @end + +var CPErrorCodeKey = @"CPErrorCodeKey", + CPErrorDomainKey = @"CPErrorDomainKey", + CPErrorUserInfoKey = @"CPErrorUserInfoKey"; + +@implementation CPError (CPCoding) + +- (id)initWithCoder:(CPCoder)aCoder +{ + var code = [aCoder decodeIntForKey:CPErrorCodeKey], + domain = [aCoder decodeObjectForKey:CPErrorDomainKey], + userInfo = [aCoder decodeObjectForKey:CPErrorUserInfoKey]; + + return [self initWithDomain:domain + code:code + userInfo:userInfo]; +} + +- (void)encodeWithCoder:(CPCoder)aCoder +{ + [aCoder encodeObject:self.domain() forKey:CPErrorDomainKey]; + [aCoder encodeObject:self.code() forKey:CPErrorCodeKey]; + [aCoder encodeObject:self.userInfo() forKey:CPErrorUserInfoKey]; +} + +@end + +CFError.prototype.isa = CPError; + diff --git a/Foundation/CPInvocation.j b/Foundation/CPInvocation.j index a07b48952..ca881d33a 100644 --- a/Foundation/CPInvocation.j +++ b/Foundation/CPInvocation.j @@ -21,6 +21,7 @@ */ @import "CPObject.j" +@import "CPArray.j" /*! @class CPInvocation diff --git a/Foundation/CPNotification.j b/Foundation/CPNotification.j index 5b9e8d51b..4ba936ea2 100644 --- a/Foundation/CPNotification.j +++ b/Foundation/CPNotification.j @@ -22,6 +22,7 @@ @import "CPException.j" @import "CPObject.j" +@import "CPDictionary.j" /*! @class CPNotification diff --git a/Foundation/CPOperation.j b/Foundation/CPOperation.j index 4fbdd5612..b0b8a6154 100644 --- a/Foundation/CPOperation.j +++ b/Foundation/CPOperation.j @@ -117,10 +117,11 @@ CPOperationQueuePriorityVeryHigh = 8; [self willChangeValueForKey:@"isExecuting"]; _executing = NO; [self didChangeValueForKey:@"isExecuting"]; - [self willChangeValueForKey:@"isFinished"]; - _finished = YES; - [self didChangeValueForKey:@"isFinished"]; } + + [self willChangeValueForKey:@"isFinished"]; + _finished = YES; + [self didChangeValueForKey:@"isFinished"]; } /*! diff --git a/Foundation/CPOperationQueue.j b/Foundation/CPOperationQueue.j index 1e018df15..de9322ce6 100644 --- a/Foundation/CPOperationQueue.j +++ b/Foundation/CPOperationQueue.j @@ -70,7 +70,7 @@ var cpOperationMainQueue = nil; for (; i < count; i++) { var op = [_operations objectAtIndex:i]; - if ([op isReady] && ![op isCancelled] && ![op isFinished] && ![op isExecuting]) + if ([op isReady] && ![op isFinished] && ![op isExecuting]) { [op start]; } @@ -260,7 +260,7 @@ var cpOperationMainQueue = nil; for (; i < count; i++) { var op = [ops objectAtIndex:i]; - if ([op isReady] && ![op isCancelled] && ![op isFinished] && ![op isExecuting]) + if ([op isReady] && ![op isFinished] && ![op isExecuting]) { [op start]; } diff --git a/Foundation/CPURLConnection.j b/Foundation/CPURLConnection.j index 88a1afbf8..5a4f09f26 100644 --- a/Foundation/CPURLConnection.j +++ b/Foundation/CPURLConnection.j @@ -76,13 +76,12 @@ var CPURLConnectionDelegate = nil; */ @implementation CPURLConnection : CPObject { - CPURLRequest _request; + CPURLRequest _originalRequest @accessors(readonly, getter=originalRequest); + CPURLRequest _request @accessors(readonly, getter=currentRequest); id _delegate; BOOL _isCanceled; BOOL _isLocalFileConnection; - BOOL _withCredentials @accessors(property=withCredentials); - HTTPRequest _HTTPRequest; } @@ -99,25 +98,12 @@ var CPURLConnectionDelegate = nil; @return the data at the URL or \c nil if there was an error */ + (CPData)sendSynchronousRequest:(CPURLRequest)aRequest returningResponse:(/*{*/CPURLResponse/*}*/)aURLResponse -{ - var cfHTTPRequest = new CFHTTPRequest(); - - return [CPURLConnection _sendSynchronousRequest:aRequest returningResponse:aURLResponse withCFHTTPRequest:cfHTTPRequest]; -} - -+ (CPData)sendSynchronousRequest:(CPURLRequest)aRequest returningResponse:(/*{*/CPURLResponse/*}*/)aURLResponse withCredentials:(BOOL)withCredentials -{ - var cfHTTPRequest = new CFHTTPRequest(); - - cfHTTPRequest.setWithCredentials(withCredentials); - - return [CPURLConnection _sendSynchronousRequest:aRequest returningResponse:aURLResponse withCFHTTPRequest:cfHTTPRequest]; -} - -+ (CPData)_sendSynchronousRequest:(CPURLRequest)aRequest returningResponse:(/*{*/CPURLResponse/*}*/)aURLResponse withCFHTTPRequest:(CFHTTPRequest)aCFHTTPRequest { try { + var aCFHTTPRequest = new CFHTTPRequest(); + aCFHTTPRequest.setWithCredentials([aRequest withCredentials]); + aCFHTTPRequest.open([aRequest HTTPMethod], [[aRequest URL] absoluteString], NO); var fields = [aRequest allHTTPHeaderFields], @@ -152,17 +138,6 @@ var CPURLConnectionDelegate = nil; return [[self alloc] initWithRequest:aRequest delegate:aDelegate]; } -//overloaded method that allows user to set _withCredentials -+ (CPURLConnection)connectionWithRequest:(CPURLRequest)aRequest delegate:(id)aDelegate withCredentials:(BOOL)withCredentials -{ - var connection = [[self alloc] initWithRequest:aRequest delegate:aDelegate startImmediately:NO]; - - [connection setWithCredentials:withCredentials]; - [connection start]; - - return connection; -} - /* Default class initializer. Use one of the class methods instead. @param aRequest contains the URL to contact @@ -177,9 +152,9 @@ var CPURLConnectionDelegate = nil; if (self) { _request = aRequest; + _originalRequest = [aRequest copy]; _delegate = aDelegate; _isCanceled = NO; - _withCredentials = NO; var URL = [_request URL], scheme = [URL scheme]; @@ -191,6 +166,7 @@ var CPURLConnectionDelegate = nil; (window.location.protocol === "file:" || window.location.protocol === "app:")); _HTTPRequest = new CFHTTPRequest(); + _HTTPRequest.setWithCredentials([aRequest withCredentials]); if (shouldStartImmediately) [self start]; @@ -219,8 +195,6 @@ var CPURLConnectionDelegate = nil; { _isCanceled = NO; - _HTTPRequest.setWithCredentials(_withCredentials); - try { _HTTPRequest.open([_request HTTPMethod], [[_request URL] absoluteString], YES); diff --git a/Foundation/CPURLError.j b/Foundation/CPURLError.j new file mode 100644 index 000000000..77d901256 --- /dev/null +++ b/Foundation/CPURLError.j @@ -0,0 +1,39 @@ + +/* + * The CPURL Error Domain + */ +CPURLErrorDomain = @"CPURLErrorDomain"; + +/* + * CPURL UserInfo Error Keys + */ +CPURLErrorFailingURLErrorKey = @"CPErrorFailingURLKey"; +CPURLErrorFailingURLStringErrorKey = @"CPURLErrorFailingURLStringKey"; + +/* + * CPURL Error Codes + */ +CPURLErrorUnknown = -1; +CPURLErrorCancelled = kCFURLErrorCancelled; +CPURLErrorBadURL = kCFURLErrorBadURL; +CPURLErrorTimedOut = kCFURLErrorTimedOut; +CPURLErrorUnsupportedURL = kCFURLErrorUnsupportedURL; +CPURLErrorCannotFindHost = kCFURLErrorCannotFindHost; +CPURLErrorCannotConnectToHost = kCFURLErrorCannotConnectToHost; +CPURLErrorNetworkConnectionLost = kCFURLErrorNetworkConnectionLost; +CPURLErrorDNSLookupFailed = kCFURLErrorDNSLookupFailed; +CPURLErrorHTTPTooManyRedirects = kCFURLErrorHTTPTooManyRedirects; +CPURLErrorResourceUnavailable = kCFURLErrorResourceUnavailable; +CPURLErrorNotConnectedToInternet = kCFURLErrorNotConnectedToInternet; +CPURLErrorRedirectToNonExistentLocation = kCFURLErrorRedirectToNonExistentLocation; +CPURLErrorBadServerResponse = kCFURLErrorBadServerResponse; +CPURLErrorUserCancelledAuthentication = kCFURLErrorUserCancelledAuthentication; +CPURLErrorUserAuthenticationRequired = kCFURLErrorUserAuthenticationRequired; +CPURLErrorZeroByteResource = kCFURLErrorZeroByteResource; +CPURLErrorCannotDecodeRawData = kCFURLErrorCannotDecodeRawData; +CPURLErrorCannotDecodeContentData = kCFURLErrorCannotDecodeContentData; +CPURLErrorCannotParseResponse = kCFURLErrorCannotParseResponse; +CPURLErrorFileDoesNotExist = kCFURLErrorFileDoesNotExist; +CPURLErrorFileIsDirectory = kCFURLErrorFileIsDirectory; +CPURLErrorNoPermissionsToReadFile = kCFURLErrorNoPermissionsToReadFile; +CPURLErrorDataLengthExceedsMaximum = kCFURLErrorDataLengthExceedsMaximum; \ No newline at end of file diff --git a/Foundation/CPURLRequest.j b/Foundation/CPURLRequest.j index 703c81bcc..8d6a39e3b 100644 --- a/Foundation/CPURLRequest.j +++ b/Foundation/CPURLRequest.j @@ -35,12 +35,14 @@ */ @implementation CPURLRequest : CPObject { - CPURL _URL; + CPURL _URL @accessors(property=URL); // FIXME: this should be CPData - CPString _HTTPBody; - CPString _HTTPMethod; - CPDictionary _HTTPHeaderFields; + CPString _HTTPBody @accessors(property=HTTPBody); + CPString _HTTPMethod @accessors(property=HTTPMethod); + BOOL _withCredentials @accessors(property=withCredentials); + + CPDictionary _HTTPHeaderFields @accessors(readonly, getter=allHTTPHeaderFields); } /*! @@ -78,6 +80,7 @@ _HTTPBody = @""; _HTTPMethod = @"GET"; _HTTPHeaderFields = @{}; + _withCredentials = NO; [self setValue:"Thu, 01 Jan 1970 00:00:00 GMT" forHTTPHeaderField:"If-Modified-Since"]; [self setValue:"no-cache" forHTTPHeaderField:"Cache-Control"]; @@ -87,14 +90,6 @@ return self; } -/*! - Returns the request URL -*/ -- (CPURL)URL -{ - return _URL; -} - /*! Sets the URL for this request. @param aURL the new URL @@ -105,48 +100,6 @@ _URL = new CFURL(aURL); } -/*! - Sets the HTTP body for this request - @param anHTTPBody the new HTTP body -*/ -- (void)setHTTPBody:(CPString)anHTTPBody -{ - _HTTPBody = anHTTPBody; -} - -/*! - Returns the request's http body. -*/ -- (CPString)HTTPBody -{ - return _HTTPBody; -} - -/*! - Sets the request's http method. - @param anHTPPMethod the new http method -*/ -- (void)setHTTPMethod:(CPString)anHTTPMethod -{ - _HTTPMethod = anHTTPMethod; -} - -/*! - Returns the request's http method -*/ -- (CPString)HTTPMethod -{ - return _HTTPMethod; -} - -/*! - Returns a dictionary of the http header fields -*/ -- (CPDictionary)allHTTPHeaderFields -{ - return _HTTPHeaderFields; -} - /*! Returns the value for the specified header field. @param aField the header field to obtain a value for @@ -167,3 +120,23 @@ } @end + +/* + Implements the CPCopying Protocol for a CPURLRequest to provide deep copying for CPURLRequests +*/ +@implementation CPURLRequest (CPCopying) +{ +} + +- (id)copy +{ + var request = [[CPURLRequest alloc] initWithURL:[self URL]]; + [request setHTTPBody:[self HTTPBody]]; + [request setHTTPMethod:[self HTTPMethod]]; + [request setWithCredentials:[self withCredentials]]; + request._HTTPHeaderFields = [self allHTTPHeaderFields]; + + return request; +} + +@end diff --git a/Foundation/Foundation.j b/Foundation/Foundation.j index ab9d5fdb2..3fa485412 100755 --- a/Foundation/Foundation.j +++ b/Foundation/Foundation.j @@ -73,6 +73,7 @@ @import "CPUndoManager.j" @import "CPURL.j" @import "CPURLConnection.j" +@import "CPURLError.j" @import "CPURLRequest.j" @import "CPURLResponse.j" @import "CPUserDefaults.j" diff --git a/Jakefile b/Jakefile index d88f8aa73..56a4e30aa 100644 --- a/Jakefile +++ b/Jakefile @@ -111,6 +111,15 @@ task ("documentation-no-frame", function() generateDocs(true); }); +task ("docset", function() +{ + generateDocs(true); + var documentationDir = FILE.canonical(FILE.join("Tools", "Documentation")), + docsetShell = FILE.join(documentationDir, "support", "docset.sh"); + + OS.system([docsetShell, documentationDir]); +}); + function generateDocs(/* boolean */ noFrame) { // try to find a doxygen executable in the PATH; diff --git a/Objective-J/CFError.js b/Objective-J/CFError.js new file mode 100644 index 000000000..615bbade8 --- /dev/null +++ b/Objective-J/CFError.js @@ -0,0 +1,164 @@ +/* + * CFError.js + * Objective-J + * + * Created by Andrew Hankinson. + * Copyright 2014, Andrew Hankinson. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +GLOBAL(kCFErrorLocalizedDescriptionKey) = "CPLocalizedDescription"; +GLOBAL(kCFErrorLocalizedFailureReasonKey) = "CPLocalizedFailureReason"; +GLOBAL(kCFErrorLocalizedRecoverySuggestionKey) = "CPLocalizedRecoverySuggestion"; +GLOBAL(kCFErrorDescriptionKey) = "CPDescription"; +GLOBAL(kCFErrorUnderlyingErrorKey) = "CPUnderlyingError"; + +GLOBAL(kCFErrorURLKey) = "CPURL"; +GLOBAL(kCFErrorFilePathKey) = "CPFilePath"; + +// GLOBAL(kCFErrorDomainPOSIX) = ""; +// GLOBAL(kCFErrorDomainOSStatus) = ""; +// GLOBAL(kCFErrorDomainMach) = ""; +GLOBAL(kCFErrorDomainCappuccino) = "CPCappuccinoErrorDomain"; +GLOBAL(kCFErrorDomainCocoa) = kCFErrorDomainCappuccino; + + +GLOBAL(CFError) = function(/* CFString */ domain, /* int */ code, /* CFDictionary */ userInfo) +{ + this._domain = domain || NULL; + this._code = code || 0; + this._userInfo = userInfo || new CFDictionary(); + this._UID = objj_generateObjectUID(); +}; + +CFError.prototype.domain = function() +{ + return this._domain; +}; + +DISPLAY_NAME(CFError.prototype.domain); + +CFError.prototype.code = function() +{ + return this._code; +}; + +DISPLAY_NAME(CFError.prototype.code); + +/* + This follows the same logic to generate a description as the "real" CFError. +*/ +CFError.prototype.description = function() +{ + var localizedDesc = this._userInfo.valueForKey(kCFErrorLocalizedDescriptionKey); + if (localizedDesc) + return localizedDesc; + + var reason = this._userInfo.valueForKey(kCFErrorLocalizedFailureReasonKey); + if (reason) + { + var operationFailedStr = "The operation couldn\u2019t be completed. " + reason; + return operationFailedStr; + } + + // @TODO Add the bundle localized domain handler. + var result = "", + desc = this._userInfo.valueForKey(kCFErrorDescriptionKey); + if (desc) + { + // we have a description key. + var result = "The operation couldn\u2019t be completed. (error " + this._code + " - " + desc + ")"; + } + else + { + // just use error and code; + var result = "The operation couldn\u2019t be completed. (error " + this._code + ")"; + } + + return result; +}; + +DISPLAY_NAME(CFError.prototype.description); + +CFError.prototype.failureReason = function() +{ + return this._userInfo.valueForKey(kCFErrorLocalizedFailureReasonKey); +}; + +DISPLAY_NAME(CFError.prototype.failureReason); + +CFError.prototype.recoverySuggestion = function() +{ + return this._userInfo.valueForKey(kCFErrorLocalizedRecoverySuggestionKey); +}; + +DISPLAY_NAME(CFError.prototype.recoverySuggestion); + +CFError.prototype.userInfo = function () +{ + return this._userInfo; +}; + +DISPLAY_NAME(CFError.prototype.userInfo); + +/* + CFError Bridge Functions + The "Create" and "Copy" in the function names do not have any meaning + in Cappuccino; they are bridged here for compatibility reasons only. +*/ +GLOBAL(CFErrorCreate) = function(/* String */ domain, /*int */ code, /* CFDictionary */ userInfo) +{ + return new CFError(domain, code, userInfo); +}; + +GLOBAL(CFErrorCreateWithUserInfoKeysAndValues) = function(/* String */ domain, /* int */ code, /* array */ userInfoKeys, /* array */ userInfoValues, /* int */ numUserInfoValues) +{ + var userInfo = new CFMutableDictionary(); + while (numUserInfoValues--) + userInfo.setValueForKey(userInfoKeys[numUserInfoValues], userInfoValues[numUserInfoValues]); + + return new CFError(domain, code, userInfo); +}; + +GLOBAL(CFErrorGetCode) = function(/* CFError */ err) +{ + return err.code(); +}; + +GLOBAL(CFErrorGetDomain) = function(/* CFError */ err) +{ + return err.domain(); +}; + +GLOBAL(CFErrorCopyDescription) = function(/* CFError */ err) +{ + return err.description(); +}; + +GLOBAL(CFErrorCopyUserInfo) = function(/* CFError */ err) +{ + return err.userInfo(); +}; + +GLOBAL(CFErrorCopyFailureReason) = function(/* CFError */ err) +{ + return err.failureReason(); +}; + +GLOBAL(CFErrorCopyRecoverySuggestion) = function(/* CFError */err) +{ + return err.recoverySuggestion(); +}; diff --git a/Objective-J/CFHTTPRequest.js b/Objective-J/CFHTTPRequest.js index 6186dc80f..37bdf61e8 100644 --- a/Objective-J/CFHTTPRequest.js +++ b/Objective-J/CFHTTPRequest.js @@ -103,6 +103,9 @@ GLOBAL(CFHTTPRequest) = function() this._eventDispatcher = new EventDispatcher(this); this._nativeRequest = new NativeRequest(); + // by default, all requests will assume that credentials should not be sent. + this._nativeRequest.withCredentials = false; + var self = this; this._stateChangeHandler = function() { @@ -279,7 +282,7 @@ CFHTTPRequest.prototype.setWithCredentials = function(/*Boolean*/ willSendWithCr this._nativeRequest.withCredentials = willSendWithCredentials; }; -CFHTTPRequest.prototype.getWithCredentials = function() +CFHTTPRequest.prototype.withCredentials = function() { return this._nativeRequest.withCredentials; }; diff --git a/Objective-J/CFNetworkErrors.js b/Objective-J/CFNetworkErrors.js new file mode 100644 index 000000000..9473579b9 --- /dev/null +++ b/Objective-J/CFNetworkErrors.js @@ -0,0 +1,25 @@ +GLOBAL(kCFURLErrorUnknown) = -998; +GLOBAL(kCFURLErrorCancelled) = -999; +GLOBAL(kCFURLErrorBadURL) = -1000; +GLOBAL(kCFURLErrorTimedOut) = -1001; +GLOBAL(kCFURLErrorUnsupportedURL) = -1002; +GLOBAL(kCFURLErrorCannotFindHost) = -1003; +GLOBAL(kCFURLErrorCannotConnectToHost) = -1004; +GLOBAL(kCFURLErrorNetworkConnectionLost) = -1005; +GLOBAL(kCFURLErrorDNSLookupFailed) = -1006; +GLOBAL(kCFURLErrorHTTPTooManyRedirects) = -1007; +GLOBAL(kCFURLErrorResourceUnavailable) = -1008; +GLOBAL(kCFURLErrorNotConnectedToInternet) = -1009; +GLOBAL(kCFURLErrorRedirectToNonExistentLocation) = -1010; +GLOBAL(kCFURLErrorBadServerResponse) = -1011; +GLOBAL(kCFURLErrorUserCancelledAuthentication) = -1012; +GLOBAL(kCFURLErrorUserAuthenticationRequired) = -1013; +GLOBAL(kCFURLErrorZeroByteResource) = -1014; +GLOBAL(kCFURLErrorCannotDecodeRawData) = -1015; +GLOBAL(kCFURLErrorCannotDecodeContentData) = -1016; +GLOBAL(kCFURLErrorCannotParseResponse) = -1017; +GLOBAL(kCFURLErrorRequestBodyStreamExhausted) = -1021; +GLOBAL(kCFURLErrorFileDoesNotExist) = -1100; +GLOBAL(kCFURLErrorFileIsDirectory) = -1101; +GLOBAL(kCFURLErrorNoPermissionsToReadFile) = -1102; +GLOBAL(kCFURLErrorDataLengthExceedsMaximum) = -1103; \ No newline at end of file diff --git a/Objective-J/Includes.js b/Objective-J/Includes.js index a4373e3a0..43adc2de2 100644 --- a/Objective-J/Includes.js +++ b/Objective-J/Includes.js @@ -38,6 +38,8 @@ #include "CFHTTPRequest.js" #include "CFPropertyList.js" #include "CFDictionary.js" +#include "CFError.js" +#include "CFNetworkErrors.js" #include "CFData.js" #include "CFURL.js" #include "MarkedStream.js" diff --git a/Objective-J/ObjJAcornCompiler.js b/Objective-J/ObjJAcornCompiler.js index 79646a0e6..0e9d16f98 100644 --- a/Objective-J/ObjJAcornCompiler.js +++ b/Objective-J/ObjJAcornCompiler.js @@ -2381,9 +2381,9 @@ Reference: function(node, st, c) { buffer.concat(" "); // Add an extra space if it looks something like this: "return()". No space between return and expression. } buffer.concat("function(__input) { if (arguments.length) return "); - buffer.concat(node.element.name); + c(node.element, st, "Expression"); buffer.concat(" = __input; return "); - buffer.concat(node.element.name); + c(node.element, st, "Expression"); buffer.concat("; }"); if (!generate) compiler.lastPos = node.end; }, diff --git a/Tests/AppKit/CPComboBoxTest.j b/Tests/AppKit/CPComboBoxTest.j new file mode 100644 index 000000000..3d12ed91c --- /dev/null +++ b/Tests/AppKit/CPComboBoxTest.j @@ -0,0 +1,78 @@ +@import +@import +@import + +@import "CPNotificationCenterHelper.j" + +[CPApplication sharedApplication]; + +@implementation CPComboBoxTest : OJTestCase +{ + CPComboBox comboBox; + BOOL wasClicked +} + +- (void)setUp +{ + comboBox = [[CPComboBox alloc] initWithFrame:CGRectMake(0, 0, 200, 30)]; +} + +- (void)testCanCreate +{ + [self assertTrue:!!comboBox]; +} + +- (void)testPublicAccessors +{ + [comboBox setHasVerticalScroller:YES]; + [comboBox setIntercellSpacing:CGSizeMakeZero()]; + [comboBox setButtonBordered:YES]; + [comboBox setItemHeight:30]; + [comboBox setNumberOfVisibleItems:10]; +} + +- (void)testPerformClick +{ + [comboBox setTarget:self]; + [comboBox setAction:@selector(clickMe:)]; + [comboBox performClick:nil]; + [self assertTrue:wasClicked]; +} + +- (void)clickMe:(id)sender +{ + wasClicked = YES; +} + +- (void)testNotificationsRegistered +{ + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:[] message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + [comboBox setListDelegate:[[_CPPopUpList alloc] initWithDataSource:comboBox]]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:[] message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + + var theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0) + styleMask:CPWindowNotSizable]; + + [[theWindow contentView] addSubview:comboBox]; + + var expectedNotifications = [@"_CPPopUpListWillPopUpNotification", @"_CPPopUpListWillDismissNotification", @"_CPPopUpListDidDismissNotification", @"_CPPopUpListItemWasClickedNotification", @"CPTableViewSelectionIsChangingNotification", @"CPTableViewSelectionDidChangeNotification"].sort(); + + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:expectedNotifications message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + + [comboBox removeFromSuperview]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:[] message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + + [[theWindow contentView] addSubview:comboBox]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:expectedNotifications message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + + [[theWindow contentView] addSubview:comboBox]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:expectedNotifications message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + + [comboBox setListDelegate:nil]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:[] message:@"Notications registered for the CPComboBox in the notification center are wrong"]; + + [comboBox setListDelegate:[[_CPPopUpList alloc] initWithDataSource:comboBox]]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:comboBox] equals:expectedNotifications message:@"Notications registered for the CPComboBox in the notification center are wrong"]; +} + +@end \ No newline at end of file diff --git a/Tests/AppKit/CPNotificationCenterHelper.j b/Tests/AppKit/CPNotificationCenterHelper.j new file mode 100644 index 000000000..69aaed26c --- /dev/null +++ b/Tests/AppKit/CPNotificationCenterHelper.j @@ -0,0 +1,39 @@ +@import + +@implementation CPNotificationCenterHelper : CPObject +{ +} + ++ (void)registeredNotificationsForObserver:(id)anObserver +{ + var defaultCenter = [CPNotificationCenter defaultCenter], + names = [defaultCenter._namedRegistries keyEnumerator], + notifications = [], + name; + + while ((name = [names nextObject]) !== nil) + { + var notificationRegistry = [defaultCenter._namedRegistries objectForKey:name], + objectObservers = notificationRegistry._objectObservers, + keys = [objectObservers keyEnumerator], + key; + + // Iterate through every set of observers + while ((key = [keys nextObject]) !== nil) + { + var observers = [objectObservers objectForKey:key], + observer = nil, + observersEnumerator = [observers objectEnumerator]; + + while ((observer = [observersEnumerator nextObject]) !== nil) + { + if ([observer observer] == anObserver) + [notifications addObject:name]; + } + } + } + + return notifications.sort(); +} + +@end diff --git a/Tests/AppKit/CPScrollViewTest.j b/Tests/AppKit/CPScrollViewTest.j index d95839438..379cea865 100644 --- a/Tests/AppKit/CPScrollViewTest.j +++ b/Tests/AppKit/CPScrollViewTest.j @@ -1,5 +1,9 @@ @import +@import "CPNotificationCenterHelper.j" + +[CPApplication sharedApplication]; + @implementation CPScrollViewTest : OJTestCase { } @@ -256,6 +260,24 @@ [self assertPoint:CGPointMake(0, 0) equals:visibleRect.origin message:@"VisibleRect origin not at top left corner again"]; } +-(void)testNotificationsRegistered +{ + var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)], + theWindow = [[CPWindow alloc] initWithContentRect:CGRectMake(0.0, 0.0, 1024.0, 768.0) + styleMask:CPWindowNotSizable]; + + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:scrollView] equals:[] message:@"Notications registered for the scrollView in the notification center are wrong"]; + + [[theWindow contentView] addSubview:scrollView]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:scrollView] equals:[@"CPScrollerStyleGlobalChangeNotification"] message:@"Notications registered for the scrollView in the notification center are wrong"]; + + [[theWindow contentView] addSubview:scrollView]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:scrollView] equals:[@"CPScrollerStyleGlobalChangeNotification"] message:@"Notications registered for the scrollView in the notification center are wrong"]; + + [scrollView removeFromSuperview]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:scrollView] equals:[] message:@"Notications registered for the scrollView in the notification center are wrong"]; +} + - (void)assertPoint:(CGPoint)expected equals:(CGPoint)actual message:(CPString)message { [self assert:expected.x equals:actual.x message:@"X: " + message]; diff --git a/Tests/AppKit/CPTableViewTest.j b/Tests/AppKit/CPTableViewTest.j index c1c5d0180..ede7ed1e9 100644 --- a/Tests/AppKit/CPTableViewTest.j +++ b/Tests/AppKit/CPTableViewTest.j @@ -1,5 +1,7 @@ @import +@import "CPNotificationCenterHelper.j" + [CPApplication sharedApplication]; @implementation CPTableViewTest : OJTestCase @@ -303,6 +305,36 @@ [self assertTrue:[table bounds].size.width >= 200]; } +-(void)testNotificationsRegistered +{ + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:[@"_CPWindowDidChangeFirstResponderNotification"] message:@"Notications registered for the tableView in the notification center are wrong"]; + + [tableView removeFromSuperview]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:[] message:@"Notications registered for the tableView in the notification center are wrong"]; + + [[theWindow contentView] addSubview:tableView]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:[@"_CPWindowDidChangeFirstResponderNotification"] message:@"Notications registered for the tableView in the notification center are wrong"]; + + [[theWindow contentView] addSubview:tableView]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:[@"_CPWindowDidChangeFirstResponderNotification"] message:@"Notications registered for the tableView in the notification center are wrong"]; + + + var scrollView = [[CPScrollView alloc] initWithFrame:CGRectMake(0, 0, 100.0, 100.0)], + expectedNotifications = [@"_CPWindowDidChangeFirstResponderNotification", @"CPViewFrameDidChangeNotification", @"CPViewBoundsDidChangeNotification"].sort(); + + [scrollView setDocumentView:tableView]; + + [[theWindow contentView] addSubview:scrollView]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:expectedNotifications message:@"Notications registered for the tableView in the notification center are wrong"]; + + [[theWindow contentView] addSubview:scrollView]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:expectedNotifications message:@"Notications registered for the tableView in the notification center are wrong"]; + + [scrollView removeFromSuperview]; + [self assert:[CPNotificationCenterHelper registeredNotificationsForObserver:tableView] equals:[] message:@"Notications registered for the tableView in the notification center are wrong"]; + +} + @end @implementation FirstResponderConfigurableTableView : CPTableView diff --git a/Tests/AppKit/CPWindowTest.j b/Tests/AppKit/CPWindowTest.j index 2244a28d9..cf51e8cba 100644 --- a/Tests/AppKit/CPWindowTest.j +++ b/Tests/AppKit/CPWindowTest.j @@ -128,4 +128,12 @@ [self assertTrue:[[[self window] representedURL] class] === [CPURL class]]; } +- (void)testOrderingMethod +{ + [_window orderFront:self]; + [_window orderBack:self]; + [_window orderFront:self]; + [_window orderOut:self]; +} + @end diff --git a/Tests/Foundation/CPErrorTest.j b/Tests/Foundation/CPErrorTest.j new file mode 100644 index 000000000..7e482a3a2 --- /dev/null +++ b/Tests/Foundation/CPErrorTest.j @@ -0,0 +1,43 @@ +@import +@import + +@implementation CPErrorTest : OJTestCase +{ +} + +- (void)testInstanceInstantiation +{ + var err = [[CPError alloc] initWithDomain:CPCappuccinoErrorDomain + code:-10 + userInfo:nil]; + [self assertNotNull:err]; +} + +- (void)testClassInstantiation +{ + var err = [CPError errorWithDomain:CPCappuccinoErrorDomain + code:-10 + userInfo:nil]; + [self assertNotNull:err]; +} + +- (void)testUserInfoDict +{ + var userInfo = @{ + CPLocalizedDescriptionKey: @"A localized error description", + CPUnderlyingErrorKey: @"An underlying error", + CPLocalizedFailureReasonErrorKey: @"A localized error reason", + CPLocalizedRecoverySuggestionErrorKey: @"The world is about to explode. You can choose to ignore this.", + CPLocalizedRecoveryOptionsErrorKey: ["Cry", "Ignore"] + }, + err = [CPError errorWithDomain:CPCappuccinoErrorDomain + code:-10 + userInfo:userInfo]; + + [self assertNotNull:[err userInfo]]; + [self assert:[err localizedDescription] equals:@"A localized error description"]; + [self assert:[err localizedRecoveryOptions] equals:["Cry", "Ignore"]]; + [self assertNull:[err recoveryAttempter]]; +} + +@end \ No newline at end of file diff --git a/Tests/Foundation/CPOperationQueueTest.j b/Tests/Foundation/CPOperationQueueTest.j index 0cc5de666..5005a1ae7 100644 --- a/Tests/Foundation/CPOperationQueueTest.j +++ b/Tests/Foundation/CPOperationQueueTest.j @@ -16,6 +16,33 @@ globalResults = []; @end +@implementation TestCancelOperation : CPOperation +{ + BOOL _started @accessors(getter=didStart); + BOOL _mained @accessors(getter=didMain); +} + +- (id)init +{ + self = [super init]; + _started = NO; + _mained = NO; + return self; +} + +- (void)main +{ + _mained = YES; +} + +- (void)start +{ + [super start]; + _started = YES; +} + +@end + @implementation TestObserver : CPObject { CPArray changedKeyPaths @accessors; @@ -167,4 +194,27 @@ globalResults = []; [self assert:@"name" equals:[[obs changedKeyPaths] objectAtIndex:4]]; } +- (void)testCancelledOperationDoesStart +{ + var op = [[TestCancelOperation alloc] init], + queue = [[CPOperationQueue alloc] init]; + + [self assertFalse:[op isCancelled]]; + [self assertFalse:[op isFinished]]; + [self assertFalse:[op didMain]]; + [self assertFalse:[op didStart]]; + + [op cancel]; + + [self assertTrue:[op isCancelled]]; + [self assertFalse:[op isFinished]]; + + [queue addOperations:[op] waitUntilFinished:YES]; + + [self assertFalse:[op didMain]]; + [self assertTrue:[op didStart]]; + [self assertTrue:[op isCancelled]]; + [self assertTrue:[op isFinished]]; +} + @end \ No newline at end of file diff --git a/Tests/Foundation/CPOperationTest.j b/Tests/Foundation/CPOperationTest.j index 1c1beef56..ea424ef56 100644 --- a/Tests/Foundation/CPOperationTest.j +++ b/Tests/Foundation/CPOperationTest.j @@ -180,4 +180,21 @@ [self assert:@"isCancelled" equals:[[obs changedKeyPaths] objectAtIndex:9]]; } +- (void)testCancelledOperationIsFinished +{ + var results = @[], + funcOp = [CPFunctionOperation functionOperationWithFunction:function() {[results addObject:"funcOp"];}]; + + [funcOp cancel]; + [self assertTrue:[funcOp isCancelled]]; + [self assertFalse:[funcOp isFinished]]; + + [funcOp start]; + + [self assertTrue:[funcOp isCancelled]]; + [self assertTrue:[funcOp isFinished]]; + + [self assertTrue:([results count] == 0)]; +} + @end diff --git a/Tests/Foundation/CPURLConnectionTest.j b/Tests/Foundation/CPURLConnectionTest.j index 91df094d3..8d176c9e7 100644 --- a/Tests/Foundation/CPURLConnectionTest.j +++ b/Tests/Foundation/CPURLConnectionTest.j @@ -1,3 +1,4 @@ +@import @implementation CPURLConnectionTest : OJTestCase { @@ -36,10 +37,40 @@ [self assertNull:data]; } -- (void)testRequestWithCredentials +- (void)testClassMethodConnectionWithCredentials { - var connection = [CPURLConnection connectionWithRequest:[CPURLRequest requestWithURL:@"Tests/Foundation/CPURLConnectionTest.j"] delegate:self withCredentials:YES]; - [self assertTrue:[connection withCredentials]]; + var req = [CPURLRequest requestWithURL:[CPURL URLWithString:@"Tests/Foundation/CPURLConnectionTest.j"]]; + [req setWithCredentials:YES]; + var data = [CPURLConnection sendSynchronousRequest:req returningResponse:nil]; + + [self assertNotNull:data]; +} + +- (void)testInstanceMethodConnectionWithCredentials +{ + var req = [CPURLRequest requestWithURL:[CPURL URLWithString:@"Tests/Foundation/CPURLConnectionTest.j"]]; + [req setWithCredentials:YES]; + + var conn = [[CPURLConnection alloc] initWithRequest:req delegate:nil startImmediately:NO]; + + [self assertTrue:conn._HTTPRequest.withCredentials]; + + [req setWithCredentials:NO]; + [self assertTrue:conn._HTTPRequest.withCredentials]; +} + +- (void)testRequestGetters +{ + var req = [CPURLRequest requestWithURL:[CPURL URLWithString:@"Tests/Foundation/CPURLConnectionTest.j"]], + conn = [[CPURLConnection alloc] initWithRequest:req delegate:nil startImmediately:NO]; + + var originalRequest = [conn originalRequest], + currentRequest = [conn currentRequest]; + + [self assert:originalRequest._UID notEqual:currentRequest._UID]; + + [[conn currentRequest] setWithCredentials:YES]; + [self assert:[originalRequest withCredentials] notEqual:[currentRequest withCredentials]]; } @end diff --git a/Tests/Foundation/CPURLRequestTest.j b/Tests/Foundation/CPURLRequestTest.j new file mode 100644 index 000000000..2c9cbdb72 --- /dev/null +++ b/Tests/Foundation/CPURLRequestTest.j @@ -0,0 +1,30 @@ +@import + + +var exampleURL = "http://www.cappuccino-project.org"; + +@implementation CPURLRequestTest : OJTestCase +{ +} + +- (void)testClassMethods +{ + var url = [CPURL URLWithString:exampleURL], + req = [CPURLRequest requestWithURL:url]; + + [self assert:[req HTTPMethod] equals:@"GET"]; + [self assert:[req URL] equals:url]; +} + +- (void)testWithCredentials +{ + var url = [CPURL URLWithString:exampleURL], + req = [CPURLRequest requestWithURL:url]; + + [self assertFalse:[req withCredentials]]; + + [req setWithCredentials:YES]; + [self assertTrue:[req withCredentials]]; +} + +@end \ No newline at end of file diff --git a/Tests/Manual/CrossOriginTest/AppController.j b/Tests/Manual/CrossOriginTest/AppController.j new file mode 100644 index 000000000..2d3781175 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/AppController.j @@ -0,0 +1,78 @@ +/* + * AppController.j + * CrossOriginTest + * + * Created by You on December 5, 2014. + * Copyright 2014, Your Company All rights reserved. + */ + +@import +@import + +var corsServer = "http://localhost:8001"; + +@implementation AppController : CPObject +{ + @outlet CPWindow theWindow; + @outlet CPButton theButton; + @outlet CPButton setsWithCredentials; +} + +- (void)applicationDidFinishLaunching:(CPNotification)aNotification +{ +} + +- (void)awakeFromCib +{ + // This is called when the cib is done loading. + // You can implement this method on any object instantiated from a Cib. + // It's a useful hook for setting up current UI values, and other things. + + // In this case, we want the window from Cib to become our full browser window + [theWindow setFullPlatformWindow:YES]; +} + +-(void)connection:(CPURLConnection)connection didReceiveResponse:(CPHTTPURLResponse)response +{ + console.log("Response received"); +} + +-(void)connection:(CPURLConnection)connection didReceiveData:(CPString)data +{ + var wc = ([[connection originalRequest] withCredentials]) ? "YES" : "NO" + console.log("CPURLConnection was sent with credentials? " + wc + " Response: " + data); +} + +- (@action)stateOfWithCredentials:(id)aSender +{ + console.log([setsWithCredentials state]); +} + +- (@action)testCappuccinoRequest:(id)aSender +{ + var req = [CPURLRequest requestWithURL:[CPURL URLWithString:corsServer + @"/resp.json"]]; + [req setValue:@"no-cache" forHTTPHeaderField:@"Pragma"]; + [req setValue:@"no-store, no-cache, must-revalidate, post-check=0, pre-check=0" forHTTPHeaderField:@"Cache-Control"]; + [req setWithCredentials:[setsWithCredentials state]]; + [[CPURLConnection alloc] initWithRequest:req delegate:self startImmediately:YES]; +} + +- (@action)testNativeRequest:(id)aSender +{ + var wc = ([setsWithCredentials state]) ? true : false; + var req = new XMLHttpRequest(); + function reqListener () + { + console.log("Native XHR was sent with credentials? " + wc + " Response: " + this.responseText); + } + + req.onload = reqListener; + req.withCredentials = wc; + req.open("GET", corsServer + "/resp.json", true); + req.setRequestHeader("Pragma", "no-cache"); + req.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate, post-check=0, pre-check=0"); + + req.send(); +} + +@end diff --git a/Tests/Manual/CrossOriginTest/Info.plist b/Tests/Manual/CrossOriginTest/Info.plist new file mode 100644 index 000000000..2074fa146 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/Info.plist @@ -0,0 +1,14 @@ + + + + + Main cib file base name + MainMenu.cib + CPBundleName + CrossOriginTest + CPBundleVersion + 1.0 + CPHumanReadableCopyright + Copyright © 2014, Your Company All rights reserved. + + diff --git a/Tests/Manual/CrossOriginTest/Jakefile b/Tests/Manual/CrossOriginTest/Jakefile new file mode 100644 index 000000000..6a448e9b0 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/Jakefile @@ -0,0 +1,184 @@ +/* + * Jakefile + * CrossOriginTest + * + * Created by You on December 9, 2014. + * Copyright 2014, Your Company All rights reserved. + */ + +var ENV = require("system").env, + FILE = require("file"), + JAKE = require("jake"), + task = JAKE.task, + FileList = JAKE.FileList, + app = require("cappuccino/jake").app, + configuration = ENV["CONFIG"] || ENV["CONFIGURATION"] || ENV["c"] || "Debug", + OS = require("os"), + projectName = "CrossOriginTest"; + +app (projectName, function(task) +{ + ENV["OBJJ_INCLUDE_PATHS"] = "Frameworks"; + + if (configuration === "Debug") + ENV["OBJJ_INCLUDE_PATHS"] = FILE.join(ENV["OBJJ_INCLUDE_PATHS"], configuration); + + task.setBuildIntermediatesPath(FILE.join("Build", "CrossOriginTest.build", configuration)); + task.setBuildPath(FILE.join("Build", configuration)); + + task.setProductName("CrossOriginTest"); + task.setIdentifier("com.yourcompany.CrossOriginTest"); + task.setVersion("1.0"); + task.setAuthor("Your Company"); + task.setEmail("feedback @nospam@ yourcompany.com"); + task.setSummary("CrossOriginTest"); + task.setSources(new FileList("**/*.j").exclude(FILE.join("Build", "**")).exclude(FILE.join("Frameworks", "Source", "**"))); + task.setResources(new FileList("Resources/**")); + task.setIndexFilePath("index.html"); + task.setInfoPlistPath("Info.plist"); + + if (configuration === "Debug") + task.setCompilerFlags("-DDEBUG -g"); + else + task.setCompilerFlags("-O"); +}); + +task ("default", [projectName], function() +{ + printResults(configuration); +}); + +task ("build", ["default"], function() +{ + updateApplicationSize(); +}); + +task ("debug", function() +{ + configuration = ENV["CONFIGURATION"] = "Debug"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("release", function() +{ + configuration = ENV["CONFIGURATION"] = "Release"; + JAKE.subjake(["."], "build", ENV); +}); + +task ("run", ["debug"], function() +{ + OS.system(["open", FILE.join("Build", "Debug", projectName, "index.html")]); +}); + +task ("run-release", ["release"], function() +{ + OS.system(["open", FILE.join("Build", "Release", projectName, "index.html")]); +}); + +task ("deploy", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Deployment", projectName)); + OS.system(["press", "-f", FILE.join("Build", "Release", projectName), FILE.join("Build", "Deployment", projectName)]); + printResults("Deployment") +}); + +task ("desktop", ["release"], function() +{ + FILE.mkdirs(FILE.join("Build", "Desktop", projectName)); + require("cappuccino/nativehost").buildNativeHost(FILE.join("Build", "Release", projectName), FILE.join("Build", "Desktop", projectName, "CrossOriginTest.app")); + printResults("Desktop") +}); + +task ("run-desktop", ["desktop"], function() +{ + OS.system([FILE.join("Build", "Desktop", projectName, "CrossOriginTest.app", "Contents", "MacOS", "NativeHost"), "-i"]); +}); + +function printResults(configuration) +{ + print("----------------------------"); + print(configuration+" app built at path: "+FILE.join("Build", configuration, projectName)); + print("----------------------------"); +} + +function updateApplicationSize() +{ + print("Calculating application file sizes..."); + + var contents = FILE.read(FILE.join("Build", configuration, projectName, "Info.plist"), { charset:"UTF-8" }), + format = CFPropertyList.sniffedFormatOfString(contents), + plist = CFPropertyList.propertyListFromString(contents), + totalBytes = {executable:0, data:0, mhtml:0}; + + // Get the size of all framework executables and sprite data + var frameworksDir = "Frameworks"; + + if (configuration === "Debug") + frameworksDir = FILE.join(frameworksDir, "Debug"); + + var frameworks = FILE.list(frameworksDir); + + frameworks.forEach(function(framework) + { + if (framework !== "Source") + addBundleFileSizes(FILE.join(frameworksDir, framework), totalBytes); + }); + + // Read in the default theme name, and attempt to get its size + var themeName = plist.valueForKey("CPDefaultTheme") || "Aristo2", + themePath = nil; + + if (themeName === "Aristo" || themeName === "Aristo2") + themePath = FILE.join(frameworksDir, "AppKit", "Resources", themeName + ".blend"); + else + themePath = FILE.join("Frameworks", "Resources", themeName + ".blend"); + + if (FILE.isDirectory(themePath)) + addBundleFileSizes(themePath, totalBytes); + + // Add sizes for the app + addBundleFileSizes(FILE.join("Build", configuration, projectName), totalBytes); + + print("Executables: " + totalBytes.executable + ", sprite data: " + totalBytes.data + ", total: " + (totalBytes.executable + totalBytes.data)); + + var dict = new CFMutableDictionary(); + + dict.setValueForKey("executable", totalBytes.executable); + dict.setValueForKey("data", totalBytes.data); + dict.setValueForKey("mhtml", totalBytes.mhtml); + + plist.setValueForKey("CPApplicationSize", dict); + + FILE.write(FILE.join("Build", configuration, projectName, "Info.plist"), CFPropertyList.stringFromPropertyList(plist, format), { charset:"UTF-8" }); +} + +function addBundleFileSizes(bundlePath, totalBytes) +{ + var bundleName = FILE.basename(bundlePath), + environment = bundleName === "Foundation" ? "Objj" : "Browser", + bundlePath = FILE.join(bundlePath, environment + ".environment"); + + if (FILE.isDirectory(bundlePath)) + { + var filename = bundleName + ".sj", + filePath = new FILE.Path(FILE.join(bundlePath, filename)); + + if (filePath.exists()) + totalBytes.executable += filePath.size(); + + filePath = new FILE.Path(FILE.join(bundlePath, "dataURLs.txt")); + + if (filePath.exists()) + totalBytes.data += filePath.size(); + + filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLData.txt")); + + if (filePath.exists()) + totalBytes.mhtml += filePath.size(); + + filePath = new FILE.Path(FILE.join(bundlePath, "MHTMLPaths.txt")); + + if (filePath.exists()) + totalBytes.mhtml += filePath.size(); + } +} diff --git a/Tests/Manual/CrossOriginTest/README.md b/Tests/Manual/CrossOriginTest/README.md new file mode 100644 index 000000000..6c50ecada --- /dev/null +++ b/Tests/Manual/CrossOriginTest/README.md @@ -0,0 +1,45 @@ +This test checks the withCredentials CORS functionality with Cappuccino. + +Running the test: + +You will need to start two HTTP Servers; one on localhost:8000, and one on localhost:8001. + +The first: + +`$> python -m SimpleHTTPServer` // starts it on 8000 + +In another terminal window: + +`$> python cors-server.py` // starts another on 8001 + +Visit http://localhost:8000 in your web browser. There are two buttons and a checkbox. + +One button will issue a native XMLHTTPRequest. The other will issue a CPURLConnection request. The checkbox will control whether the withCredentials option is set on both types of requests. + +With the checkbox checked, you should press either of the buttons. In the terminal with the 'cors-server.py' script running you will see output that should match the following: + +``` +INFO:root:CORS: With Credentials +127.0.0.1 - - [05/Dec/2014 18:44:48] "GET /resp.json HTTP/1.1" 200 - +``` + +If you uncheck the checkbox, you should see the following: + +``` +INFO:root:CORS: No Credentials +127.0.0.1 - - [05/Dec/2014 18:44:56] "GET /resp.json HTTP/1.1" 200 - +``` + +This error message is controlled by the presence of the 'Cookies' header. + +NOTE: The cors-server.py will set a cookie for you (mycookie=cappuccino!), but only after the first request. If you don't have a cookie set for localhost, the server message will show 'No Credentials' on the first request since the Cookie header is not set. Subsequent requests will behave correctly. + +The browser console will also provide some status information about the request and response. + +# A note about IE** + +As best I can tell, IE behaves differently than all other browsers. I have tested this in Chrome and Firefox on Mac & Windows, Safari on Mac, IE11 on Windows. In this test, unchecking the 'With Credentials' will tell the browser to not send a cookie to the server if the server and client are not on the same host. However, in IE, it will pass the cookie along if the server and host are on the same top domain, but not necessarily the same host. The corollary of this is that if the two servers are on different domains, the `withCredentials` setting in IE does absolutely nothing. + +To get it to work, you must instruct your users to adjust their cookie privacy settings and allow third-party cookies. This seemed to work for me, but dynamically adjusting the `withCredentials` parameter did nothing with this on -- IE always sent the cookies if it was configured to do so. + +* What, you expected IE to actually work like the rest of the world? \ No newline at end of file diff --git a/Tests/Manual/CrossOriginTest/Resources/MainMenu.xib b/Tests/Manual/CrossOriginTest/Resources/MainMenu.xib new file mode 100644 index 000000000..a9914bcd6 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/Resources/MainMenu.xib @@ -0,0 +1,1759 @@ + + + + 1050 + 14B25 + 6250 + 1343.16 + 755.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 6250 + + + NSButton + NSButtonCell + NSCustomObject + NSMenu + NSMenuItem + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + NewApplication + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + + NewApplication + + + + About NewApplication + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit NewApplication + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + + File + + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + + Open Recent + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save + s + 1048576 + 2147483647 + + + + + + Save As… + S + 1179648 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + + Edit + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + + Find + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + + Spelling and Grammar + + + + Show Spelling… + : + 1048576 + 2147483647 + + + + + + Check Spelling + ; + 1048576 + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + + Substitutions + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + + Speech + + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + + View + + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + + Window + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 1048576 + 2147483647 + + + submenuAction: + + + Help + + + + NewApplication Help + ? + 1048576 + 2147483647 + + + + + + + + _NSMainMenu + + + 7 + 2 + {{335, 390}, {480, 360}} + 1946157056 + Window + NSWindow + + + + + 256 + + + + 268 + {{142, 196}, {197, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Native XMLHTTPRequest + + YES + 13 + 1044 + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{133, 163}, {215, 32}} + + + _NS:9 + YES + + 67108864 + 134217728 + Cappuccino CPURLRequest + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{178, 272}, {124, 18}} + + + + _NS:9 + YES + + -2080374784 + 268435456 + With Credentials + + _NS:9 + + 1211912448 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + NO + + + {480, 360} + + + + + {{0, 0}, {1920, 1177}} + {10000000000000, 10000000000000} + YES + + + AppController + + + + + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 451 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + clearRecentDocuments: + + + + 127 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + showHelp: + + + + 360 + + + + saveDocument: + + + + 362 + + + + saveDocumentAs: + + + + 363 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + theButton + + + + 462 + + + + theWindow + + + + 463 + + + + setsWithCredentials + + + + 471 + + + + stateOfWithCredentials: + + + + 472 + + + + testNativeRequest: + + + + 473 + + + + testCappuccinoRequest: + + + + 474 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + + MainMenu + + + 19 + + + + + + + + 56 + + + + + + + + 103 + + + + + + + + 217 + + + + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + 75 + + + + + 80 + + + + + 72 + + + + + 82 + + + + + 124 + + + + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 125 + + + + + + + + 126 + + + + + 205 + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + + + + + + 216 + + + + + + + + 200 + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 106 + + + + + + + + 111 + + + + + 57 + + + + + + + + + + + + 58 + + + + + 136 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 24 + + + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + + + + + + 296 + + + + + + + + + 297 + + + + + 298 + + + + + 211 + + + + + + + + 212 + + + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + + + + + + 349 + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + + + + + + 372 + + + + + + + + + + 450 + + + + + 460 + + + + + + + + 461 + + + + + 465 + + + + + + + + 466 + + + + + 468 + + + + + + + + 469 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{303, 221}, {480, 360}} + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 474 + + + + + AppController + NSObject + + id + id + id + + + + stateOfWithCredentials: + id + + + testCappuccinoRequest: + id + + + testNativeRequest: + id + + + + NSButton + NSButton + NSWindow + + + + setsWithCredentials + NSButton + + + theButton + NSButton + + + theWindow + NSWindow + + + + IBProjectSource + ../.XcodeSupport/AppController.h + + + + + 0 + IBCocoaFramework + NO + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + {12, 12} + {10, 2} + {15, 15} + + + diff --git a/Tests/Manual/CrossOriginTest/cors-server.py b/Tests/Manual/CrossOriginTest/cors-server.py new file mode 100644 index 000000000..937f2188a --- /dev/null +++ b/Tests/Manual/CrossOriginTest/cors-server.py @@ -0,0 +1,44 @@ +import SimpleHTTPServer +import SocketServer +import logging +import cgi + +logging.basicConfig(level=logging.INFO) +PORT = 8001 + +class ServerHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): + + def end_headers (self): + self.send_header('Set-Cookie', 'mycookie=cappuccino!') + self.send_header('Access-Control-Allow-Origin', 'http://142.157.142.237:8000') + self.send_header('Access-Control-Allow-Methods', 'GET, OPTIONS') + self.send_header("Access-Control-Allow-Headers", "X-Requested-With, If-Modified-Since, Cache-Control, Pragma") + self.send_header('Access-Control-Allow-Credentials', 'true') + SimpleHTTPServer.SimpleHTTPRequestHandler.end_headers(self) + + def do_OPTIONS(self): + logging.info("OPTIONS Request") + self.send_response(204, "No Content") + self.send_header('Access-Control-Allow-Origin', 'http://142.157.142.237:8000') + self.send_header('Access-Control-Allow-Methods', 'GET, OPTIONS') + self.send_header("Access-Control-Allow-Headers", "X-Requested-With, If-Modified-Since, Cache-Control, Pragma") + self.send_header('Access-Control-Allow-Credentials', 'true') + self.send_header("Access-Control-Max-Age", 10) + self.send_header("content-length", 0) + + def do_GET(self): + try: + self.headers['Cookie'] + logging.info("CORS: With Credentials") + logging.info(self.headers['Cookie']) + except KeyError, e: + logging.info("CORS: No Credentials") + SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self) + +Handler = ServerHandler + +SocketServer.TCPServer.allow_reuse_address = True +httpd = SocketServer.TCPServer(("0.0.0.0", PORT), Handler) + +print "serving at port", PORT +httpd.serve_forever() \ No newline at end of file diff --git a/Tests/Manual/CrossOriginTest/index-debug.html b/Tests/Manual/CrossOriginTest/index-debug.html new file mode 100644 index 000000000..59a519b3d --- /dev/null +++ b/Tests/Manual/CrossOriginTest/index-debug.html @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + TestIEWithCredentials + + + + + + + + + + + + + + +
+
+
+ +
+
+ +
+ + diff --git a/Tests/Manual/CrossOriginTest/index.html b/Tests/Manual/CrossOriginTest/index.html new file mode 100644 index 000000000..b38196c63 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/index.html @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + CrossOriginTest + + + + + + + + + + + + +
+
+
+ +
+
+ +
+ + diff --git a/Tests/Manual/CrossOriginTest/main.j b/Tests/Manual/CrossOriginTest/main.j new file mode 100644 index 000000000..fb705f3f3 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/main.j @@ -0,0 +1,18 @@ +/* + * AppController.j + * CrossOriginTest + * + * Created by You on December 9, 2014. + * Copyright 2014, Your Company All rights reserved. + */ + +@import +@import + +@import "AppController.j" + + +function main(args, namedArgs) +{ + CPApplicationMain(args, namedArgs); +} diff --git a/Tests/Manual/CrossOriginTest/resp.json b/Tests/Manual/CrossOriginTest/resp.json new file mode 100644 index 000000000..5d76ff1e6 --- /dev/null +++ b/Tests/Manual/CrossOriginTest/resp.json @@ -0,0 +1 @@ +{"response": "ok"} \ No newline at end of file diff --git a/Tests/Objective-J/CFErrorTest.j b/Tests/Objective-J/CFErrorTest.j new file mode 100644 index 000000000..cea9ba69a --- /dev/null +++ b/Tests/Objective-J/CFErrorTest.j @@ -0,0 +1,60 @@ +@import + + +@implementation CFErrorTest : OJTestCase + +- (void)testCreate +{ + var err = new CFError(); + [self assertNotNull:err]; +} + +- (void)testCreateWithParams +{ + var err = new CFError(kCFErrorDomainCappuccino, -1000, nil); + [self assertNotNull:err]; + [self assert:-1000 equals:err.code()]; +} + +- (void)testCreateGlobal +{ + var err = CFErrorCreate(kCFErrorDomainCappuccino, -1000, nil); + [self assertNotNull:err]; + + [self assert:kCFErrorDomainCappuccino equals:err.domain()]; + [self assert:-1000 equals:err.code()]; + [self assert:@"CPCappuccinoErrorDomain" equals:CFErrorGetDomain(err)]; +} + +- (void)testCreateWithUserInfoKeysAndValues +{ + var err = CFErrorCreateWithUserInfoKeysAndValues(kCFErrorDomainCappuccino, -1000, [kCFErrorLocalizedDescriptionKey, kCFErrorDescriptionKey], [@"A localized description", @"An error description"], 2); + [self assertNotNull:err]; + + var info = err.userInfo(); + [self assert:2 equals:info.count()]; +} + +- (void)testDescriptionCaseOne +{ + // Description case 1: Localized Key set + var err = CFErrorCreateWithUserInfoKeysAndValues(kCFErrorDomainCappuccino, -1000, [kCFErrorLocalizedDescriptionKey], [@"A localized Description Key"], 1); + [self assert:@"A localized Description Key" equals:err.description()]; + [self assert:@"A localized Description Key" equals:CFErrorCopyDescription(err)]; +} + +- (void)testDescriptionCaseTwo +{ + // Case 2: Reason set; description generated + var err = CFErrorCreateWithUserInfoKeysAndValues(kCFErrorDomainCappuccino, -1000, [kCFErrorLocalizedFailureReasonKey], [@"A localized reason"], 1); + [self assert:@"The operation couldn\u2019t be completed. A localized reason" equals:err.description()]; +} + +- (void)testDescriptionCaseThree +{ + // Case 3: Final fall-back. + var err = CFErrorCreateWithUserInfoKeysAndValues(kCFErrorDomainCappuccino, -1000, [kCFErrorDescriptionKey], [@"A description key"], 1); + [self assert:@"The operation couldn\u2019t be completed. (error -1000 - A description key)" equals:err.description()]; +} + +@end \ No newline at end of file diff --git a/Tests/Objective-J/CFHTTPRequestTest.j b/Tests/Objective-J/CFHTTPRequestTest.j index f6afe5a58..c10edba85 100644 --- a/Tests/Objective-J/CFHTTPRequestTest.j +++ b/Tests/Objective-J/CFHTTPRequestTest.j @@ -7,10 +7,10 @@ - (void)testSetWithCredentials { var cfHTTPRequest = new CFHTTPRequest(); - [self assertFalse:cfHTTPRequest.getWithCredentials()]; + [self assertFalse:cfHTTPRequest.withCredentials()]; cfHTTPRequest.setWithCredentials(YES); - [self assertTrue:cfHTTPRequest.getWithCredentials()]; + [self assertTrue:cfHTTPRequest.withCredentials()]; } @end diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Misc/ref-self.j b/Tests/Objective-J/Preprocessor/OutputTests/Misc/ref-self.j new file mode 100644 index 000000000..d94fa2450 --- /dev/null +++ b/Tests/Objective-J/Preprocessor/OutputTests/Misc/ref-self.j @@ -0,0 +1,11 @@ +@implementation TC +{ + id _control; +} + +- (id)a +{ + @ref(_control); +} + +@end diff --git a/Tests/Objective-J/Preprocessor/OutputTests/Misc/ref-self.js b/Tests/Objective-J/Preprocessor/OutputTests/Misc/ref-self.js new file mode 100644 index 000000000..778d931d6 --- /dev/null +++ b/Tests/Objective-J/Preprocessor/OutputTests/Misc/ref-self.js @@ -0,0 +1,9 @@ +{var the_class = objj_allocateClassPair(Nil, "TC"), +meta_class = the_class.isa;class_addIvars(the_class, [new objj_ivar("_control")]);objj_registerClassPair(the_class); +class_addMethods(the_class, [new objj_method(sel_getUid("a"), function $TC__a(self, _cmd) +{ + function(__input) { if (arguments.length) return self._control = __input; return self._control; }; +} + +,["id"])]); +} diff --git a/Tests/Objective-J/Preprocessor/OutputTests/OutputTest.j b/Tests/Objective-J/Preprocessor/OutputTests/OutputTest.j index a94c74f3b..fcd96ba3c 100644 --- a/Tests/Objective-J/Preprocessor/OutputTests/OutputTest.j +++ b/Tests/Objective-J/Preprocessor/OutputTests/OutputTest.j @@ -22,6 +22,7 @@ var FILENAMES = [ "Misc/regex-simple-char-classes", "Misc/empty-loops", "Misc/empty-statements", + "Misc/ref-self", ]; @implementation OutputTest : OJTestCase diff --git a/Tools/Documentation/Cappuccino.doxygen b/Tools/Documentation/Cappuccino.doxygen index 5cd23fc26..c2abad4e4 100644 --- a/Tools/Documentation/Cappuccino.doxygen +++ b/Tools/Documentation/Cappuccino.doxygen @@ -1,92 +1,122 @@ -# Doxyfile 1.7.1 +# Doxyfile 1.8.7 # This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project +# doxygen (www.doxygen.org) for a project. # -# All text after a hash (#) is considered a comment and will be ignored +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. # The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. DOXYFILE_ENCODING = UTF-8 -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. PROJECT_NAME = " API" -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. PROJECT_NUMBER = 0.9.7-1 -PROJECT_LOGO = ./Tools/Documentation/logo.png +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = ./Tools/Documentation/logo.png + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. OUTPUT_DIRECTORY = Documentation -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. CREATE_SUBDIRS = NO +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, -# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English -# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, -# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, -# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. OUTPUT_LANGUAGE = English -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. +# The default value is: YES. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ @@ -101,8 +131,9 @@ ABBREVIATE_BRIEF = "The $name class" \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# doxygen will generate a detailed section even if there is only a brief # description. +# The default value is: NO. ALWAYS_DETAILED_SEC = NO @@ -110,153 +141,207 @@ ALWAYS_DETAILED_SEC = NO # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. +# The default value is: NO. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. JAVADOC_AUTOBRIEF = NO -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. QT_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. MULTILINE_CPP_IS_BRIEF = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_FOR_C = NO -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given extension. -# Doxygen has a built-in mapping, but you can override or extend it using this -# tag. The format is ext=language, where ext is a file extension, and language -# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, -# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make -# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C -# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions -# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. EXTENSION_MAPPING = j=Objective-C +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. +# The default value is: NO. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. +# The default value is: NO. CPP_CLI_SUPPORT = NO -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. SIP_SUPPORT = NO -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. IDL_PROPERTY_SUPPORT = NO @@ -264,351 +349,441 @@ IDL_PROPERTY_SUPPORT = NO # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. +# The default value is: NO. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. SUBGROUPING = YES -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. TYPEDEF_HIDES_STRUCT = NO -# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to -# determine which symbols to keep in memory and which to flush to disk. -# When the cache is full, less often used symbols will be written to disk. -# For small to medium size projects (<1000 input files) the default value is -# probably good enough. For larger projects a too small cache size can cause -# doxygen to be busy swapping symbols to and from disk most of the time -# causing a significant performance penality. -# If the system has enough physical memory increasing the cache will improve the -# performance by keeping more symbols in memory. Note that the value works on -# a logarithmic scale so increasing the size by one will rougly double the -# memory usage. The cache size is given by this formula: -# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, -# corresponding to a cache size of 2^16 = 65536 symbols +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. -SYMBOL_CACHE_SIZE = 0 +LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. EXTRACT_ALL = YES -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. EXTRACT_PRIVATE = YES -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. EXTRACT_STATIC = YES -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. EXTRACT_LOCAL_METHODS = YES # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. EXTRACT_ANON_NSPACES = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. +# The default value is: system dependent. CASE_SENSE_NAMES = NO -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. SHOW_INCLUDE_FILES = YES -# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen -# will list include files with double quotes in the documentation -# rather than with sharp brackets. +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. FORCE_LOCAL_INCLUDES = NO -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. SORT_BRIEF_DOCS = YES -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen -# will sort the (brief and detailed) documentation of class members so that -# constructors and destructors are listed first. If set to NO (the default) -# the constructors will appear in the respective orders defined by -# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. -# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO -# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. SORT_MEMBERS_CTORS_1ST = NO -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. SORT_GROUP_NAMES = YES -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. GENERATE_TODOLIST = NO -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. GENERATE_TESTLIST = NO -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. GENERATE_BUGLIST = NO -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. SHOW_FILES = YES -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. The create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. -# You can optionally specify a file name after the option, if omitted -# DoxygenLayout.xml will be used as the name of the layout file. +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. LAYOUT_FILE = +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. Do not use file names with spaces, bibtex cannot handle them. See +# also \cite for info how to create references. + +CITE_BIB_FILES = + #--------------------------------------------------------------------------- -# configuration options related to warning and progress messages +# Configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. WARN_IF_UNDOCUMENTED = NO -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. WARN_IF_DOC_ERROR = NO -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). WARN_LOGFILE = debug.txt #--------------------------------------------------------------------------- -# configuration options related to the input files +# Configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. INPUT = AppKit.doc \ Foundation.doc # This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. FILE_PATTERNS = *.c \ *.cc \ @@ -643,29 +818,34 @@ FILE_PATTERNS = *.c \ *.vhdl \ *.j -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. RECURSIVE = YES -# The EXCLUDE tag can be used to specify files and/or directories that should +# The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded # from the input. +# The default value is: NO. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* EXCLUDE_PATTERNS = _* @@ -674,683 +854,1077 @@ EXCLUDE_PATTERNS = _* # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* EXCLUDE_SYMBOLS = _* -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). EXAMPLE_PATH = ./Tools/Documentation/README.html \ ./LICENSE # If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. FILTER_SOURCE_FILES = NO +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + #--------------------------------------------------------------------------- -# configuration options related to source browsing +# Configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. SOURCE_BROWSER = YES -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. REFERENCED_BY_RELATION = NO -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. REFERENCES_RELATION = NO -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentation. +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index +# Configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. ALPHABETICAL_INDEX = YES -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. IGNORE_PREFIX = #--------------------------------------------------------------------------- -# configuration options related to the HTML output +# Configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a # standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. -#HTML_STYLESHEET = doxygen.css +HTML_STYLESHEET = -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. -# Doxygen will adjust the colors in the stylesheet and background images -# according to this color. Hue is specified as an angle on a colorwheel, -# see http://en.wikipedia.org/wiki/Hue for more information. -# For instance the value 0 represents red, 60 is yellow, 120 is green, -# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. -# The allowed range is 0 to 359. +# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user- +# defined cascading style sheet that is included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet file to the output directory. For an example +# see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_HUE = 220 -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of -# the colors in the HTML output. For a value of 0 the output will use -# grayscales only. A value of 255 will produce the most vivid colors. +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_SAT = 98 -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to -# the luminance component of the colors in the HTML output. Values below -# 100 gradually make the output lighter, whereas values above 100 make -# the output darker. The value divided by 100 is the actual gamma applied, -# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, -# and 100 does not change the gamma. +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting -# this to NO can help when comparing the output of multiple runs. +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_TIMESTAMP = YES -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. HTML_DYNAMIC_SECTIONS = YES -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. -# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. -GENERATE_DOCSET = NO +GENERATE_DOCSET = YES -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. DOCSET_FEEDNAME = "Doxygen generated docs" -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. -DOCSET_BUNDLE_ID = org.doxygen.Project +DOCSET_BUNDLE_ID = org.cappuccino-project.cappuccino -# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify # the documentation publisher. This should be a reverse domain-name style # string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. -DOCSET_PUBLISHER_ID = org.doxygen.Publisher +DOCSET_PUBLISHER_ID = org.cappuccino-project -# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. -DOCSET_PUBLISHER_NAME = Publisher +DOCSET_PUBLISHER_NAME = "Cappuccino Project" -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be # written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. CHM_INDEX_ENCODING = -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated -# that can be used as input for Qt's qhelpgenerator to generate a -# Qt Compressed Help (.qch) of the generated HTML documentation. +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_QHP = NO -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can -# be used to specify the file name of the resulting .qch file. -# The path specified is relative to the HTML output folder. +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. QCH_FILE = -# The QHP_NAMESPACE tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#namespace +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_NAMESPACE = org.doxygen.Project -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating -# Qt Help Project output. For more information please see -# http://doc.trolltech.com/qthelpproject.html#virtual-folders +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_VIRTUAL_FOLDER = doc -# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to -# add. For more information please see -# http://doc.trolltech.com/qthelpproject.html#custom-filters +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_NAME = -# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see -# -# Qt Help Project / Custom Filters. +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's -# filter section matches. -# -# Qt Help Project / Filter Attributes. +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. QHP_SECT_FILTER_ATTRS = -# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can -# be used to specify the location of Qt's qhelpgenerator. -# If non-empty doxygen will try to run qhelpgenerator on the generated -# .qhp file. +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. QHG_LOCATION = -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files -# will be generated, which together with the HTML files, form an Eclipse help -# plugin. To install this plugin and make it available under the help contents -# menu in Eclipse, the contents of the directory containing the HTML and XML -# files needs to be copied into the plugins directory of eclipse. The name of -# the directory within the plugins directory should be the same as -# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before -# the help appears. +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_ECLIPSEHELP = NO -# A unique identifier for the eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have -# this name. +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. ECLIPSE_DOC_ID = org.doxygen.Project -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 +DISABLE_INDEX = YES # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to YES, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). -# Windows users are probably better off using the HTML help feature. +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. GENERATE_TREEVIEW = YES -# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, -# and Class Hierarchy pages using a tree view instead of an ordered list. +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. -USE_INLINE_TREES = NO +ENUM_VALUES_PER_LINE = 4 -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. TREEVIEW_WIDTH = 250 -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open -# links to external symbols imported via tag files in a separate window. +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. EXT_LINKS_IN_WINDOW = NO -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are -# not supported properly for IE 6.0, but are supported on all modern browsers. -# Note that when changing this option you need to delete any form_*.png files -# in the HTML output before the changes have effect. +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. FORMULA_TRANSPARENT = YES -# When the SEARCHENGINE tag is enabled doxygen will generate a search box -# for the HTML output. The underlying search engine uses javascript -# and DHTML and should work on any modern browser. Note that when using -# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets -# (GENERATE_DOCSET) there is already a search function so this one should -# typically be disabled. For large projects the javascript based search engine -# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /