├── .gitignore ├── .gitmodules ├── .mailmap ├── .travis.yml ├── .travis ├── configure.sh └── make.sh ├── AUTHORS ├── CHANGELOG.md ├── CMakeLists.txt ├── CONTRIBUTING.md ├── INSTALL.md ├── LICENSE ├── README.md ├── axrcore.qbs ├── cmake ├── CoreVariables.cmake ├── FindDependencies.cmake ├── Package.cmake ├── PackageFilenames.cmake ├── PackageLinux.cmake ├── PackageOverrides.cmake.in ├── Utilities.cmake └── postpackage.sh ├── config.in.h ├── docs ├── CMakeLists.txt ├── Doxyfile ├── hss │ └── library-architecture.hss └── images │ └── library-structure.jpg ├── pre-commit ├── pre-configure.bat ├── pre-configure.sh ├── share ├── axr.xsl └── icons │ ├── hero.icns │ ├── hero.ico │ ├── hero.png │ ├── hss.icns │ ├── hss.ico │ ├── hss.png │ ├── prototype.icns │ ├── prototype.ico │ └── prototype.png ├── src ├── CMakeLists.txt ├── cocoa │ ├── CMakeLists.txt │ ├── NSAXRDocument.h │ ├── NSAXRDocument.mm │ ├── NSAXRView.h │ ├── NSAXRView.mm │ └── cocoa.qbs ├── core │ ├── AXRGlobal.cpp │ ├── AXRGlobal.h │ ├── CMakeLists.txt │ ├── axr.h │ ├── axr │ │ ├── AXRController.cpp │ │ ├── AXRController.h │ │ ├── AXRDocument.cpp │ │ ├── AXRDocument.h │ │ ├── AXRDocumentDelegate.h │ │ ├── AXRExecutionFrame.cpp │ │ ├── AXRExecutionFrame.h │ │ ├── AXRExecutionPointer.cpp │ │ └── AXRExecutionPointer.h │ ├── core.qbs │ ├── debug │ │ ├── AXRError.cpp │ │ ├── AXRError.h │ │ ├── AXRWarning.cpp │ │ └── AXRWarning.h │ ├── hss │ │ ├── enums │ │ │ └── HSSTypeEnums.h │ │ ├── input │ │ │ ├── HSSInputEvent.cpp │ │ │ ├── HSSInputEvent.h │ │ │ ├── HSSKeyboardEvent.cpp │ │ │ ├── HSSKeyboardEvent.h │ │ │ ├── HSSMouseEvent.cpp │ │ │ └── HSSMouseEvent.h │ │ ├── objects │ │ │ ├── HSSContainer.cpp │ │ │ ├── HSSContainer.h │ │ │ ├── HSSDisplayObject.cpp │ │ │ ├── HSSDisplayObject.h │ │ │ ├── HSSEvent.cpp │ │ │ ├── HSSEvent.h │ │ │ ├── HSSFont.cpp │ │ │ ├── HSSFont.h │ │ │ ├── HSSLayoutLine.cpp │ │ │ ├── HSSLayoutLine.h │ │ │ ├── HSSMargin.cpp │ │ │ ├── HSSMargin.h │ │ │ ├── HSSMultipleValue.cpp │ │ │ ├── HSSMultipleValue.h │ │ │ ├── HSSObject.cpp │ │ │ ├── HSSObject.h │ │ │ ├── HSSRgb.cpp │ │ │ ├── HSSRgb.h │ │ │ ├── HSSTextBlock.cpp │ │ │ ├── HSSTextBlock.h │ │ │ ├── HSSTextEnums.h │ │ │ ├── HSSValue.cpp │ │ │ ├── HSSValue.h │ │ │ ├── actions │ │ │ │ ├── HSSAction.cpp │ │ │ │ ├── HSSAction.h │ │ │ │ ├── HSSFunctionAction.cpp │ │ │ │ ├── HSSFunctionAction.h │ │ │ │ ├── HSSRequest.cpp │ │ │ │ └── HSSRequest.h │ │ │ ├── gradients │ │ │ │ ├── HSSColorStop.cpp │ │ │ │ ├── HSSColorStop.h │ │ │ │ ├── HSSGradient.cpp │ │ │ │ ├── HSSGradient.h │ │ │ │ ├── HSSLinearGradient.cpp │ │ │ │ ├── HSSLinearGradient.h │ │ │ │ ├── HSSRadialGradient.cpp │ │ │ │ └── HSSRadialGradient.h │ │ │ ├── shapes │ │ │ │ ├── HSSCircle.cpp │ │ │ │ ├── HSSCircle.h │ │ │ │ ├── HSSPolygon.cpp │ │ │ │ ├── HSSPolygon.h │ │ │ │ ├── HSSRectangle.cpp │ │ │ │ ├── HSSRectangle.h │ │ │ │ ├── HSSRoundedRect.cpp │ │ │ │ ├── HSSRoundedRect.h │ │ │ │ ├── HSSShape.cpp │ │ │ │ └── HSSShape.h │ │ │ └── strokes │ │ │ │ ├── HSSAbstractStroke.cpp │ │ │ │ ├── HSSAbstractStroke.h │ │ │ │ ├── HSSStroke.cpp │ │ │ │ └── HSSStroke.h │ │ ├── parsing │ │ │ ├── HSSCodeParser.cpp │ │ │ └── HSSCodeParser.h │ │ ├── processing │ │ │ ├── HSSAbstractVisitor.cpp │ │ │ ├── HSSAbstractVisitor.h │ │ │ ├── HSSVisitorManager.cpp │ │ │ └── HSSVisitorManager.h │ │ ├── rendering │ │ │ ├── HSSCascader.cpp │ │ │ ├── HSSCascader.h │ │ │ ├── HSSLayout.cpp │ │ │ ├── HSSLayout.h │ │ │ ├── HSSPath.cpp │ │ │ ├── HSSPath.h │ │ │ ├── HSSPathAddEllipse.cpp │ │ │ ├── HSSPathAddEllipse.h │ │ │ ├── HSSPathAddPolygon.cpp │ │ │ ├── HSSPathAddPolygon.h │ │ │ ├── HSSPathArcTo.cpp │ │ │ ├── HSSPathArcTo.h │ │ │ ├── HSSPathCloseSubpath.cpp │ │ │ ├── HSSPathCloseSubpath.h │ │ │ ├── HSSPathCommand.cpp │ │ │ ├── HSSPathCommand.h │ │ │ ├── HSSPathLineTo.cpp │ │ │ ├── HSSPathLineTo.h │ │ │ ├── HSSPathMoveTo.cpp │ │ │ ├── HSSPathMoveTo.h │ │ │ ├── HSSPathSubtract.cpp │ │ │ ├── HSSPathSubtract.h │ │ │ ├── HSSRenderGradient.cpp │ │ │ ├── HSSRenderGradient.h │ │ │ ├── HSSRenderTreeBuilder.cpp │ │ │ ├── HSSRenderTreeBuilder.h │ │ │ ├── HSSRenderer.cpp │ │ │ └── HSSRenderer.h │ │ ├── tokenizing │ │ │ ├── HSSStringToken.cpp │ │ │ ├── HSSStringToken.h │ │ │ ├── HSSToken.cpp │ │ │ ├── HSSToken.h │ │ │ ├── HSSTokenType.h │ │ │ ├── HSSTokenizer.cpp │ │ │ └── HSSTokenizer.h │ │ ├── values │ │ │ ├── HSSAssignment.cpp │ │ │ ├── HSSAssignment.h │ │ │ ├── HSSFunctionCall.cpp │ │ │ ├── HSSFunctionCall.h │ │ │ ├── HSSMultipleValueDefinition.cpp │ │ │ ├── HSSMultipleValueDefinition.h │ │ │ ├── HSSNegatedVal.cpp │ │ │ ├── HSSNegatedVal.h │ │ │ ├── HSSParserNode.cpp │ │ │ ├── HSSParserNode.h │ │ │ ├── HSSParserReceiver.h │ │ │ ├── HSSPropertyPath.cpp │ │ │ ├── HSSPropertyPath.h │ │ │ ├── HSSPropertyPathNode.cpp │ │ │ ├── HSSPropertyPathNode.h │ │ │ ├── HSSScopedParserNode.cpp │ │ │ ├── HSSScopedParserNode.h │ │ │ ├── HSSSelectorChain.cpp │ │ │ ├── HSSSelectorChain.h │ │ │ ├── constants │ │ │ │ ├── HSSBooleanConstant.cpp │ │ │ │ ├── HSSBooleanConstant.h │ │ │ │ ├── HSSKeywordConstant.cpp │ │ │ │ ├── HSSKeywordConstant.h │ │ │ │ ├── HSSNumberConstant.cpp │ │ │ │ ├── HSSNumberConstant.h │ │ │ │ ├── HSSObjectNameConstant.cpp │ │ │ │ ├── HSSObjectNameConstant.h │ │ │ │ ├── HSSPercentageConstant.cpp │ │ │ │ ├── HSSPercentageConstant.h │ │ │ │ ├── HSSPropertyNameConstant.cpp │ │ │ │ ├── HSSPropertyNameConstant.h │ │ │ │ ├── HSSStringConstant.cpp │ │ │ │ └── HSSStringConstant.h │ │ │ ├── expressions │ │ │ │ ├── HSSComparison.cpp │ │ │ │ ├── HSSComparison.h │ │ │ │ ├── HSSDivision.cpp │ │ │ │ ├── HSSDivision.h │ │ │ │ ├── HSSExpression.cpp │ │ │ │ ├── HSSExpression.h │ │ │ │ ├── HSSMultiplication.cpp │ │ │ │ ├── HSSMultiplication.h │ │ │ │ ├── HSSSubtraction.cpp │ │ │ │ ├── HSSSubtraction.h │ │ │ │ ├── HSSSum.cpp │ │ │ │ ├── HSSSum.h │ │ │ │ ├── HSSUnaryExpression.cpp │ │ │ │ ├── HSSUnaryExpression.h │ │ │ │ ├── HSSUnarySubtraction.cpp │ │ │ │ ├── HSSUnarySubtraction.h │ │ │ │ ├── HSSUnarySum.cpp │ │ │ │ └── HSSUnarySum.h │ │ │ ├── filters │ │ │ │ ├── HSSEmptyFilter.cpp │ │ │ │ ├── HSSEmptyFilter.h │ │ │ │ ├── HSSEvenChildFilter.cpp │ │ │ │ ├── HSSEvenChildFilter.h │ │ │ │ ├── HSSEvenFilter.cpp │ │ │ │ ├── HSSEvenFilter.h │ │ │ │ ├── HSSFilter.cpp │ │ │ │ ├── HSSFilter.h │ │ │ │ ├── HSSFirstChildFilter.cpp │ │ │ │ ├── HSSFirstChildFilter.h │ │ │ │ ├── HSSFirstFilter.cpp │ │ │ │ ├── HSSFirstFilter.h │ │ │ │ ├── HSSFlag.cpp │ │ │ │ ├── HSSFlag.h │ │ │ │ ├── HSSLastChildFilter.cpp │ │ │ │ ├── HSSLastChildFilter.h │ │ │ │ ├── HSSLastFilter.cpp │ │ │ │ ├── HSSLastFilter.h │ │ │ │ ├── HSSOddChildFilter.cpp │ │ │ │ ├── HSSOddChildFilter.h │ │ │ │ ├── HSSOddFilter.cpp │ │ │ │ └── HSSOddFilter.h │ │ │ ├── functions │ │ │ │ ├── HSSArgument.cpp │ │ │ │ ├── HSSArgument.h │ │ │ │ ├── HSSAttrFunction.cpp │ │ │ │ ├── HSSAttrFunction.h │ │ │ │ ├── HSSCase.cpp │ │ │ │ ├── HSSCase.h │ │ │ │ ├── HSSCustomFunction.cpp │ │ │ │ ├── HSSCustomFunction.h │ │ │ │ ├── HSSEvaluableFunction.cpp │ │ │ │ ├── HSSEvaluableFunction.h │ │ │ │ ├── HSSFlagFunction.cpp │ │ │ │ ├── HSSFlagFunction.h │ │ │ │ ├── HSSFunction.cpp │ │ │ │ ├── HSSFunction.h │ │ │ │ ├── HSSFunctionFunction.cpp │ │ │ │ ├── HSSFunctionFunction.h │ │ │ │ ├── HSSIfFunction.cpp │ │ │ │ ├── HSSIfFunction.h │ │ │ │ ├── HSSInsertFunction.cpp │ │ │ │ ├── HSSInsertFunction.h │ │ │ │ ├── HSSLogFunction.cpp │ │ │ │ ├── HSSLogFunction.h │ │ │ │ ├── HSSOverrideFunction.cpp │ │ │ │ ├── HSSOverrideFunction.h │ │ │ │ ├── HSSRefFunction.cpp │ │ │ │ ├── HSSRefFunction.h │ │ │ │ ├── HSSReturnFunction.cpp │ │ │ │ ├── HSSReturnFunction.h │ │ │ │ ├── HSSSelFunction.cpp │ │ │ │ ├── HSSSelFunction.h │ │ │ │ ├── HSSStartTimerFunction.cpp │ │ │ │ ├── HSSStartTimerFunction.h │ │ │ │ ├── HSSStopTimerFunction.cpp │ │ │ │ ├── HSSStopTimerFunction.h │ │ │ │ ├── HSSSwitchFunction.cpp │ │ │ │ ├── HSSSwitchFunction.h │ │ │ │ ├── HSSTargetedFunction.cpp │ │ │ │ ├── HSSTargetedFunction.h │ │ │ │ ├── HSSToNumFunction.cpp │ │ │ │ ├── HSSToNumFunction.h │ │ │ │ ├── HSSToggleTimerFunction.cpp │ │ │ │ └── HSSToggleTimerFunction.h │ │ │ ├── other parser nodes │ │ │ │ ├── HSSCommentNode.cpp │ │ │ │ ├── HSSCommentNode.h │ │ │ │ ├── HSSInvalidNode.cpp │ │ │ │ ├── HSSInvalidNode.h │ │ │ │ ├── HSSSymbolNode.cpp │ │ │ │ ├── HSSSymbolNode.h │ │ │ │ ├── HSSWhitespaceNode.cpp │ │ │ │ └── HSSWhitespaceNode.h │ │ │ ├── selectors │ │ │ │ ├── HSSCombinator.cpp │ │ │ │ ├── HSSCombinator.h │ │ │ │ ├── HSSEventSelector.cpp │ │ │ │ ├── HSSEventSelector.h │ │ │ │ ├── HSSNameSelector.cpp │ │ │ │ ├── HSSNameSelector.h │ │ │ │ ├── HSSNegation.cpp │ │ │ │ ├── HSSNegation.h │ │ │ │ ├── HSSParentSelector.cpp │ │ │ │ ├── HSSParentSelector.h │ │ │ │ ├── HSSRootSelector.cpp │ │ │ │ ├── HSSRootSelector.h │ │ │ │ ├── HSSSelector.cpp │ │ │ │ ├── HSSSelector.h │ │ │ │ ├── HSSSimpleSelector.cpp │ │ │ │ ├── HSSSimpleSelector.h │ │ │ │ ├── HSSThisSelector.cpp │ │ │ │ ├── HSSThisSelector.h │ │ │ │ ├── HSSUniversalSelector.cpp │ │ │ │ └── HSSUniversalSelector.h │ │ │ └── statements │ │ │ │ ├── HSSComment.cpp │ │ │ │ ├── HSSComment.h │ │ │ │ ├── HSSInstruction.cpp │ │ │ │ ├── HSSInstruction.h │ │ │ │ ├── HSSObjectDefinition.cpp │ │ │ │ ├── HSSObjectDefinition.h │ │ │ │ ├── HSSPropertyDefinition.cpp │ │ │ │ ├── HSSPropertyDefinition.h │ │ │ │ ├── HSSRule.cpp │ │ │ │ ├── HSSRule.h │ │ │ │ ├── HSSStatement.cpp │ │ │ │ ├── HSSStatement.h │ │ │ │ ├── HSSVarDeclaration.cpp │ │ │ │ └── HSSVarDeclaration.h │ │ └── various │ │ │ ├── HSSCallback.cpp │ │ │ ├── HSSCallback.h │ │ │ ├── HSSClonable.cpp │ │ │ ├── HSSClonable.h │ │ │ ├── HSSMultipleSelection.cpp │ │ │ ├── HSSMultipleSelection.h │ │ │ ├── HSSObservable.cpp │ │ │ ├── HSSObservable.h │ │ │ ├── HSSObservableMapping.cpp │ │ │ ├── HSSObservableMapping.h │ │ │ ├── HSSObservableProperties.h │ │ │ ├── HSSSelection.cpp │ │ │ ├── HSSSelection.h │ │ │ ├── HSSSimpleSelection.cpp │ │ │ └── HSSSimpleSelection.h │ ├── logging │ │ ├── AXRAbstractLogger.cpp │ │ ├── AXRAbstractLogger.h │ │ ├── AXRGenericLogger.cpp │ │ ├── AXRGenericLogger.h │ │ ├── AXRLoggerEnums.h │ │ ├── AXRLoggerManager.cpp │ │ └── AXRLoggerManager.h │ ├── platform │ │ ├── AXRPlatform.cpp │ │ ├── AXRPlatform.h │ │ ├── AXRPlatformDriver.cpp │ │ ├── AXRPlatformDriver.h │ │ ├── AXRPlatformDriverMac.h │ │ ├── AXRPlatformDriverMac.mm │ │ ├── AXRPlatformDriverQt.cpp │ │ ├── AXRPlatformDriverQt.h │ │ └── axr_platform_config.h │ ├── types │ │ ├── AXRBuffer.cpp │ │ ├── AXRBuffer.h │ │ ├── HSSChar.cpp │ │ ├── HSSChar.h │ │ ├── HSSPoint.cpp │ │ ├── HSSPoint.h │ │ ├── HSSPoint.mm │ │ ├── HSSRect.cpp │ │ ├── HSSRect.h │ │ ├── HSSRect.mm │ │ ├── HSSSize.cpp │ │ ├── HSSSize.h │ │ ├── HSSSize.mm │ │ ├── HSSString.cpp │ │ └── HSSString.h │ ├── utf8 │ │ ├── utf8.h │ │ ├── utf8_checked.h │ │ ├── utf8_core.h │ │ └── utf8_unchecked.h │ └── xml │ │ ├── XMLParser.cpp │ │ └── XMLParser.h ├── layout-tests │ ├── CMakeLists.txt │ ├── Json.cpp │ ├── Json.h │ ├── TestCase.cpp │ ├── TestCase.h │ ├── TestSuite.cpp │ ├── TestSuite.h │ ├── layout-tests.qbs │ └── main.cpp └── qt │ ├── CMakeLists.txt │ ├── QAXRWidget.cpp │ ├── QAXRWidget.h │ └── qt.qbs ├── tests ├── assorted │ ├── README │ ├── buttons.hss │ ├── dark.hss │ ├── mess │ │ ├── _test.hss │ │ ├── features.hss │ │ ├── hover_in_objdef.hss │ │ ├── polygon.hss │ │ ├── speech_bubble.hss │ │ ├── style10.hss │ │ ├── style11.hss │ │ ├── style12.hss │ │ ├── style13.hss │ │ ├── style3.hss │ │ ├── style4.hss │ │ ├── style5.hss │ │ ├── style6.hss │ │ ├── style7.hss │ │ ├── style8.hss │ │ ├── style9.hss │ │ ├── test10.xml │ │ ├── test11.xml │ │ ├── test12.xml │ │ ├── test13.xml │ │ ├── test2.hss │ │ ├── test2.xml │ │ ├── test3.hss │ │ ├── test3.xml │ │ ├── test4.hss │ │ ├── test4.xml │ │ ├── test5.hss │ │ ├── test5.xml │ │ ├── test6.hss │ │ ├── test6.xml │ │ ├── test7.hss │ │ ├── test7.xml │ │ ├── test8.hss │ │ ├── test8.xml │ │ ├── test9.hss │ │ └── test9.xml │ ├── smileys.hss │ ├── test.hss │ ├── test.xml │ └── triangle.hss ├── hss │ ├── README │ ├── basic │ │ ├── b001-blank-document.hss │ │ ├── b001-blank-document.xml │ │ ├── b002-blank-document-with-comments.hss │ │ └── b002-blank-document-with-comments.xml │ ├── colors │ │ └── c001-multi-digit-colors.hss │ ├── filters │ │ ├── fl001-basic.hss │ │ └── fl001-basic.xml │ ├── fonts │ │ ├── f001-basic.hss │ │ ├── f001-basic.xml │ │ ├── f002-named-font.hss │ │ └── f002-named-font.xml │ ├── functions │ │ ├── attr │ │ │ ├── at001-basic.hss │ │ │ ├── at001-basic.xml │ │ │ ├── at002-expressions.hss │ │ │ ├── at002-expressions.xml │ │ │ ├── at003-decimals-and-percentages.hss │ │ │ └── at003-decimals-and-percentages.xml │ │ └── ref │ │ │ ├── r001-basic.hss │ │ │ ├── r001-basic.xml │ │ │ ├── r002-to-percentage.hss │ │ │ ├── r002-to-percentage.xml │ │ │ ├── r003-expressions-basic.hss │ │ │ ├── r003-expressions-basic.xml │ │ │ ├── r004-expressions.hss │ │ │ ├── r004-expressions.xml │ │ │ ├── r005-cross-property.hss │ │ │ ├── r005-cross-property.xml │ │ │ ├── r006-multiple-elements.hss │ │ │ ├── r006-multiple-elements.xml │ │ │ ├── r007-modifiers.hss │ │ │ └── r007-modifiers.xml │ ├── instructions │ │ ├── i001-new-basic.hss │ │ ├── i001-new-basic.xml │ │ ├── i002-wrapping.hss │ │ ├── i002-wrapping.xml │ │ ├── i003-import-master.hss │ │ ├── i003-import-slave.hss │ │ ├── i003-import.xml │ │ ├── i004-delete.hss │ │ ├── i004-delete.xml │ │ ├── i005-new-quantity.hss │ │ └── i005-new-quantity.xml │ ├── selectors │ │ ├── s001-simple-selectors.hss │ │ ├── s001-simple-selectors.xml │ │ ├── s002-hierarchy.hss │ │ ├── s002-hierarchy.xml │ │ ├── s003-child-combinator.hss │ │ ├── s003-child-combinator.xml │ │ ├── s004-descendant-combinator.hss │ │ ├── s004-descendant-combinator.xml │ │ ├── s005-sibling-combinators.hss │ │ ├── s005-sibling-combinators.xml │ │ ├── s006-negations.hss │ │ ├── s006-negations.xml │ │ ├── s007-grouping.hss │ │ ├── s007-grouping.xml │ │ ├── s008-descendant-combinator-2.hss │ │ ├── s008-descendant-combinator-2.xml │ │ ├── s009-sibling-combinators-2.hss │ │ └── s009-sibling-combinators-2.xml │ └── shapes │ │ ├── sh001-rectangle.hss │ │ ├── sh001-rectangle.xml │ │ ├── sh002-rounded-rectangle.hss │ │ ├── sh002-rounded-rectangle.xml │ │ ├── sh005-custom-path.hss │ │ └── sh005-custom-path.xml ├── layout-tests │ ├── selectors │ │ ├── hierarchy │ │ │ ├── test-case.json │ │ │ ├── test.hss │ │ │ └── test.xml │ │ ├── simple │ │ │ ├── test-case.json │ │ │ ├── test.hss │ │ │ └── test.xml │ │ └── tests.json │ └── tests.json ├── path-handling │ ├── dotdot.hss │ ├── index.xml │ ├── root-absolute.hss │ ├── root-relative.hss │ └── subfolder │ │ ├── dot.hss │ │ └── relative.hss ├── regressions │ └── qpointer-crasher.hss ├── rendering │ ├── README │ ├── behavior │ │ ├── bh001-common-styles.hss │ │ ├── bh001-load-slave.hss │ │ ├── bh001-load-slave.xml │ │ ├── bh001-load.hss │ │ ├── bh001-load.xml │ │ ├── bh002-mouse-events.hss │ │ └── bh002-mouse-events.xml │ ├── gradients │ │ ├── gr001-basic.hss │ │ ├── gr001-basic.xml │ │ ├── gr002-color-stops.hss │ │ └── gr002-color-stops.xml │ └── strokes │ │ ├── br001-basic.hss │ │ ├── br001-basic.xml │ │ ├── br002-multiple-strokes.hss │ │ ├── br002-multiple-strokes.xml │ │ ├── br003-ref-strokes.hss │ │ ├── br003-ref-strokes.xml │ │ ├── br004-strokes-ref-size.hss │ │ └── br004-strokes-ref-size.xml ├── style.hss ├── test-project │ ├── color.hss │ ├── en │ │ └── strings.hss │ ├── foundation.hss │ ├── home.hss │ ├── home.xml │ ├── navigation.xml │ ├── style.hss │ └── typography.hss └── xml │ ├── README.md │ └── billion-laughs.xml └── validate.rb /.gitignore: -------------------------------------------------------------------------------- 1 | *-debug/ 2 | *-release/ 3 | 4 | # CMakeLists.txt prevents in-source builds, but the process will still get far 5 | # enough such that a few CMake files are introduced into the source directory 6 | CMakeCache.txt 7 | CMakeFiles 8 | 9 | # In-source doxygen builds 10 | src/core/docs 11 | 12 | # Visual Studio creates these as part of the resource build process 13 | *.aps 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "cmake/solar"] 2 | path = cmake/solar 3 | url = https://github.com/petroules/solar-cmake.git 4 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | # Correct veosotano to Miro Keller 2 | Miro Keller 3 | 4 | # One commit has wrong email address 5 | Jake Petroules 6 | 7 | # Valerij has one commit under his username 8 | Valerij Primachenko 9 | 10 | # Marc enabled the "anonymous" option in github at some point 11 | Marc G. 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | compiler: 3 | - gcc 4 | - clang 5 | before_script: sudo ./pre-configure.sh && .travis/configure.sh 6 | script: .travis/make.sh 7 | notifications: 8 | recipients: 9 | - axr-ci@googlegroups.com 10 | email: 11 | on_success: change 12 | on_failure: always 13 | irc: "irc.freenode.net#axr" 14 | -------------------------------------------------------------------------------- /.travis/configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Clone all submodules 5 | git submodule update --init --recursive 6 | 7 | # Clone dependent repositories 8 | git clone https://github.com/axr/common.git ../common 9 | 10 | # Make build directories for both shared and static mode 11 | mkdir ../build-shared ../build-static 12 | 13 | args="-D CMAKE_BUILD_TYPE=Release -D AXR_ALL_WARNINGS=ON -D AXR_BUILD_CORE=ON -D AXR_BUILD_DOCS=ON" 14 | 15 | # Configure using CMake (shared) 16 | cd ../build-shared 17 | cmake $args -D BUILD_SHARED_LIBS=ON ../core 18 | 19 | # Configure using CMake (static) 20 | cd ../build-static 21 | cmake $args -D BUILD_SHARED_LIBS=OFF ../core 22 | -------------------------------------------------------------------------------- /.travis/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Build all variants 5 | cd .. 6 | 7 | build-targets() 8 | { 9 | cmake --build $1 --config Release --target all 10 | cmake --build $1 --config Release --target distribution 11 | cmake --build $1 --config Release --target package_source 12 | } 13 | 14 | build-targets build-shared 15 | build-targets build-static 16 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Miro Keller 2 | Jake Petroules 3 | Ragnis Armus 4 | Valerij Primachenko 5 | Alexandre Bizri 6 | Marc G. 7 | Carlos Ricardo Feliz 8 | Anando Gopal Chatterjee 9 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ### Version 0.4.8 - 2012-11-27 2 | 3 | * Added @parent reference object 4 | * Implemented attr() function 5 | * Implemented visible property 6 | * 5 and 7 digit colors are now supported 7 | * Implemented color keywords (black, white, transparent) 8 | * Implemented :firstChild, :lastChild, :even, :odd, :oddChild, :evenChild, and 9 | :parent filters 10 | * Implemented :empty filter for elements 11 | * Converted various platform-specific build systems to CMake 12 | * Utilize CPack for automatically building distribution packages for all OSs 13 | * Converted rendering and all other internals to use Qt 14 | * Eliminated all third party dependencies (except the newly introduced Qt) 15 | * Rearchitecture of how the library is used, and the ability for an application 16 | to render multiple AXR "documents" without requiring a separate thread for 17 | each document 18 | * Partial support for weights on fonts 19 | * Renamed "overflow" to "contained" 20 | * xml-stylesheet now uses href instead of src 21 | * Add ability to check AXR version at runtime 22 | * Much improved parity across operating systems (no more AXRWrapper classes) 23 | * Modularization of the project into several source repositories 24 | * Massive reorganization of the source code structure 25 | * More reliable XML parsing and file loading (no more 1 KB file size limit!) 26 | * Doxygen docs now built in source tree 27 | * Logging/debugging improvements 28 | * Icons and QuickLook previews for HSS files on OS X 29 | * Dozens of bug fixes 30 | * Continuous Integration! 31 | 32 | ### Version 0.4.7 - 2012-06-17 33 | 34 | * Add support for @polygon 35 | * Improved readme to encourage participation 36 | * Add support for the @root reference object 37 | * Add support for a new contentAlignX value 38 | * Fix many crashes and error messages 39 | * Add "content" property (accepts strings to override the content text) 40 | * Add basic infrastructure for layout tests 41 | * Add documentation about most of the classes 42 | * Make AXRCore a thread-specific singleton 43 | * Implement selector grouping 44 | * Add support for importing the HSS framework 45 | * Minor fixes 46 | 47 | ### Version 0.4.6 - 2012-04-08 48 | 49 | * Implement cloning on all HSS objects 50 | * Implement flags 51 | * Add flow property 52 | * Add @click event (as a clone of mouseUp, for now) 53 | * Add support for decimal values (eg. 1.257) 54 | * Add support for #new(n) { } 55 | * Add overflow property 56 | * Massively improve layout algorithm in the secondary direction 57 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | Read our [wiki page](http://wiki.axrproject.org/prototype/building). 2 | -------------------------------------------------------------------------------- /cmake/CoreVariables.cmake: -------------------------------------------------------------------------------- 1 | set(AXR_VERSION_MAJOR 0) 2 | set(AXR_VERSION_MINOR 4) 3 | set(AXR_VERSION_PATCH 9) 4 | set(AXR_VERSION_BUILD 0) 5 | set(AXR_VERSION_STRING "${AXR_VERSION_MAJOR}.${AXR_VERSION_MINOR}") 6 | 7 | if(AXR_VERSION_BUILD GREATER 0) 8 | set(AXR_VERSION_STRING "${AXR_VERSION_STRING}.${AXR_VERSION_PATCH}.${AXR_VERSION_BUILD}") 9 | elseif(AXR_VERSION_PATCH GREATER 0) 10 | set(AXR_VERSION_STRING "${AXR_VERSION_STRING}.${AXR_VERSION_PATCH}") 11 | endif() 12 | 13 | # Numeric-only version string; i.e. 1.0.7.3 14 | set(AXR_VERSION_STRING_REAL ${AXR_VERSION_STRING}) 15 | 16 | # TODO: Re-enable git tags when this mess is sorted out 17 | # Human-readable version string; i.e. 1.0.8-beta1 18 | # git_append_shorttag(AXR_VERSION_STRING) 19 | 20 | set(AXR_VENDOR "AXR Project Contributors") 21 | set(AXR_DOMAIN "axrproject.org") 22 | set(AXR_CONTACT "info@axrproject.org") 23 | set(AXR_WEB_URL "http://${AXR_DOMAIN}/") 24 | 25 | set(AXR_README_FILE "${CMAKE_SOURCE_DIR}/README.md") 26 | set(AXR_LICENSE_FILE "${CMAKE_SOURCE_DIR}/LICENSE") 27 | 28 | set(AXR_README_FILE_TXT "${CMAKE_BINARY_DIR}/README.txt") 29 | set(AXR_LICENSE_FILE_TXT "${CMAKE_BINARY_DIR}/LICENSE.txt") 30 | 31 | set(AXR_README_FILE_RTF "${CMAKE_BINARY_DIR}/README.rtf") 32 | if(PANDOC) 33 | execute_process(COMMAND ${PANDOC} -s -o "${AXR_README_FILE_RTF}" "${AXR_README_FILE}") 34 | endif() 35 | -------------------------------------------------------------------------------- /cmake/FindDependencies.cmake: -------------------------------------------------------------------------------- 1 | if(AXR_BUILD_CORE) 2 | ### Qt ### 3 | find_package(Qt4 4.8 COMPONENTS QtCore QtGui REQUIRED) 4 | find_package(Qt4 4.8 COMPONENTS QtScript) 5 | if(QT_QTCORE_FOUND AND QT_QTGUI_FOUND) 6 | set(QT4_FOUND TRUE) # Optional means optional. 7 | endif() 8 | include(${QT_USE_FILE}) 9 | add_definitions(${QT_DEFINITIONS} -DNOMINMAX) 10 | 11 | ### DPKG ### 12 | find_program(DPKG NAMES "dpkg-deb" PATHS "/usr/bin") 13 | if(DPKG) 14 | get_filename_component(DPKG_PATH ${DPKG} ABSOLUTE) 15 | message(STATUS "Found dpkg-deb: ${DPKG_PATH}") 16 | set(DPKG_FOUND TRUE) 17 | else() 18 | message(STATUS "Could not find dpkg-deb; will not build Debian packages") 19 | set(DPKG_FOUND FALSE) 20 | endif() 21 | 22 | ### RPMBUILD ### 23 | find_program(RPMBUILD NAMES "rpmbuild" PATHS "/usr/bin") 24 | if(RPMBUILD) 25 | get_filename_component(RPMBUILD_PATH ${RPMBUILD} ABSOLUTE) 26 | message(STATUS "Found rpmbuild: ${RPMBUILD_PATH}") 27 | set(RPMBUILD_FOUND TRUE) 28 | else() 29 | message(STATUS "Could not find rpmbuild; will not build RPM packages") 30 | set(RPMBUILD_FOUND FALSE) 31 | endif() 32 | 33 | ### pandoc ### 34 | find_program(PANDOC NAMES "pandoc.exe" "pandoc" PATHS "C:\\Program Files (x86)\\Pandoc\\bin" "/usr/local/bin" "/usr/bin") 35 | if(PANDOC) 36 | message(STATUS "Found pandoc: ${PANDOC}") 37 | else() 38 | message(STATUS "Could not find pandoc; will not build distribution packages") 39 | endif() 40 | endif() 41 | 42 | if(AXR_BUILD_DOCS) 43 | find_package(Doxygen REQUIRED) 44 | endif() 45 | -------------------------------------------------------------------------------- /cmake/PackageFilenames.cmake: -------------------------------------------------------------------------------- 1 | # Platform name 2 | string(TOLOWER "${CMAKE_SYSTEM_NAME}" OS_CODE) 3 | 4 | if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") 5 | set(OS_CODE "osx") 6 | endif() 7 | 8 | # Architecture name 9 | set(ARCH_CODE "${CMAKE_TARGET_ARCHITECTURE_CODE}") 10 | 11 | # The "canonical" identifiers we use in CMake (i386/x86_64) are the same as what OS X uses 12 | if(CMAKE_TARGET_ARCHITECTURE_CODE STREQUAL "i386") 13 | if(WIN32) 14 | set(ARCH_CODE "x86") 15 | elseif(RPMBUILD_FOUND) 16 | # TODO: in some cases this may be i386 or i586 depending on the distribution... 17 | # There's also i486 and i786 which seem much less common 18 | set(ARCH_CODE "i686") 19 | endif() 20 | elseif(CMAKE_TARGET_ARCHITECTURE_CODE STREQUAL "x86_64") 21 | if(WIN32) 22 | set(ARCH_CODE "x64") 23 | elseif(DPKG_FOUND) 24 | set(ARCH_CODE "amd64") 25 | endif() 26 | endif() 27 | 28 | function(package_file_name output_variable pfn_package_prefix pfn_version_string) 29 | if(DPKG_FOUND) 30 | set(${output_variable} "${pfn_package_prefix}_${pfn_version_string}_${ARCH_CODE}" PARENT_SCOPE) 31 | elseif(RPMBUILD_FOUND) 32 | # Note that the "1" is the RPM package release number 33 | # Due to the way we package and distribute this should probably never change 34 | # but it's necessary to note its presence here since it's an awkward way of doing things... 35 | set(${output_variable} "${pfn_package_prefix}-${pfn_version_string}-1.${ARCH_CODE}" PARENT_SCOPE) 36 | else() 37 | set(${output_variable} "${pfn_package_prefix}-${pfn_version_string}-${OS_CODE}-${ARCH_CODE}" PARENT_SCOPE) 38 | endif() 39 | endfunction() 40 | 41 | function(src_package_file_name output_variable spfn_package_prefix spfn_version_string) 42 | set(${output_variable} "${spfn_package_prefix}-${spfn_version_string}-src" PARENT_SCOPE) 43 | endfunction() 44 | -------------------------------------------------------------------------------- /cmake/PackageLinux.cmake: -------------------------------------------------------------------------------- 1 | # Performs common Linux packaging functionality: 2 | # - Installs Debian copyright file from common 3 | # - Generates and installs Debian changelog 4 | # - Generates RPM changelog that can be read from $CMAKE_BINARY_DIR/rpm/changelog 5 | 6 | if(DPKG_FOUND OR RPMBUILD_FOUND) 7 | # Temporary directories for intermediary files 8 | file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/deb") 9 | file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/rpm") 10 | 11 | # Generate Debian and RPM changelogs from our markdown formatted changelog 12 | find_package(PythonInterp REQUIRED) 13 | execute_process(COMMAND ${PYTHON_EXECUTABLE} ${AXR_COMMON_SOURCE_DIR_REL}/changelog.py --deb "${CMAKE_BINARY_DIR}/deb/changelog" --rpm "${CMAKE_BINARY_DIR}/rpm/changelog" "${BROWSER_PACKAGE_PREFIX}" CHANGELOG.md WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") 14 | endif() 15 | 16 | if(DPKG_FOUND) 17 | # Configure and install Debian copyright file 18 | execute_process(COMMAND date -R OUTPUT_VARIABLE DATE_R OUTPUT_STRIP_TRAILING_WHITESPACE) 19 | configure_file("${AXR_COMMON_SOURCE_DIR}/debian-copyright.txt" "${CMAKE_BINARY_DIR}/copyright") 20 | 21 | # Configure and install changelog file 22 | file(REMOVE "${CMAKE_BINARY_DIR}/deb/changelog.gz") 23 | execute_process(COMMAND gzip -9 changelog WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/deb") 24 | endif() 25 | -------------------------------------------------------------------------------- /cmake/PackageOverrides.cmake.in: -------------------------------------------------------------------------------- 1 | if(CPACK_GENERATOR STREQUAL "DEB" OR CPACK_GENERATOR STREQUAL "RPM") 2 | set(CPACK_DEB_COMPONENT_INSTALL ON) 3 | set(CPACK_RPM_COMPONENT_INSTALL ON) 4 | elseif(CPACK_GENERATOR STREQUAL "TGZ" AND NOT CPACK_PACKAGE_FILE_NAME MATCHES "-src") 5 | set(CPACK_PACKAGE_FILE_NAME "libaxr-${AXR_VERSION_STRING}-OPERATING_SYSTEM-${CMAKE_TARGET_ARCHITECTURE_CODE}") 6 | else() 7 | # Runtime packages on NSIS/WIX/PackageMaker don't need headers and documentation 8 | set(CPACK_COMPONENTS_ALL libraries) 9 | endif() 10 | -------------------------------------------------------------------------------- /config.in.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef AXR_CONFIG_H 45 | #define AXR_CONFIG_H 46 | 47 | #define AXR_VERSION_MAJOR @AXR_VERSION_MAJOR@ 48 | #define AXR_VERSION_MINOR @AXR_VERSION_MINOR@ 49 | #define AXR_VERSION_PATCH @AXR_VERSION_PATCH@ 50 | #define AXR_VERSION_BUILD @AXR_VERSION_BUILD@ 51 | #define AXR_VERSION_STRING "@AXR_VERSION_STRING@" 52 | 53 | #define AXR_VENDOR "@AXR_VENDOR@" 54 | #define AXR_DOMAIN "@AXR_DOMAIN@" 55 | #define AXR_CONTACT "@AXR_CONTACT@" 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /docs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile ${CMAKE_BINARY_DIR}/Doxyfile) 2 | 3 | file(GLOB_RECURSE docs_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*) 4 | list(APPEND docs_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile) 5 | group_by_folder(${CMAKE_CURRENT_SOURCE_DIR} "${docs_SOURCES}") 6 | 7 | add_custom_target(${TARGET_NAME_DOCUMENTATION} ALL 8 | COMMAND ${DOXYGEN_EXECUTABLE} 9 | WORKING_DIRECTORY ${CMAKE_BINARY_DIR} 10 | COMMENT "Building AXR documentation using Doxygen..." 11 | SOURCES ${docs_SOURCES} 12 | ) 13 | 14 | install(DIRECTORY "${CMAKE_BINARY_DIR}/docs/html" 15 | COMPONENT doc 16 | DESTINATION "share/doc/axr" 17 | ) 18 | -------------------------------------------------------------------------------- /docs/Doxyfile: -------------------------------------------------------------------------------- 1 | PROJECT_NAME = AXR 2 | 3 | RECURSIVE = YES 4 | INPUT = "@PROJECT_SOURCE_DIR@/src/core" "@PROJECT_SOURCE_DIR@/src/cocoa" "@PROJECT_SOURCE_DIR@/src/qt" 5 | OUTPUT_DIRECTORY = "@CMAKE_BINARY_DIR@/docs" 6 | IMAGE_PATH = "@PROJECT_SOURCE_DIR@/docs/images" 7 | 8 | GENERATE_HTML = YES 9 | GENERATE_LATEX = NO 10 | GENERATE_MAN = NO 11 | 12 | GENERATE_BUGLIST = YES 13 | GENERATE_DEPRECATEDLIST = YES 14 | GENERATE_TESTLIST = YES 15 | GENERATE_TODOLIST = YES 16 | 17 | ALPHABETICAL_INDEX = YES 18 | -------------------------------------------------------------------------------- /docs/images/library-structure.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/docs/images/library-structure.jpg -------------------------------------------------------------------------------- /pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | ruby validate.rb --cached 6 | ../common/update-authors.sh 7 | -------------------------------------------------------------------------------- /pre-configure.bat: -------------------------------------------------------------------------------- 1 | echo "Windows support is not yet implemented" 2 | exit 1 3 | -------------------------------------------------------------------------------- /share/icons/hero.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/hero.icns -------------------------------------------------------------------------------- /share/icons/hero.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/hero.ico -------------------------------------------------------------------------------- /share/icons/hero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/hero.png -------------------------------------------------------------------------------- /share/icons/hss.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/hss.icns -------------------------------------------------------------------------------- /share/icons/hss.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/hss.ico -------------------------------------------------------------------------------- /share/icons/hss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/hss.png -------------------------------------------------------------------------------- /share/icons/prototype.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/prototype.icns -------------------------------------------------------------------------------- /share/icons/prototype.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/prototype.ico -------------------------------------------------------------------------------- /share/icons/prototype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/share/icons/prototype.png -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories("${CMAKE_BINARY_DIR}") 2 | include_directories_recursive("${CMAKE_CURRENT_SOURCE_DIR}/core") 3 | add_subdirectory(core) 4 | 5 | if(AXR_BUILD_EXTENSIONS MATCHES "QT") 6 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/qt") 7 | add_subdirectory(qt) 8 | endif() 9 | 10 | if(APPLE AND AXR_BUILD_EXTENSIONS MATCHES "COCOA") 11 | include_directories("${CMAKE_CURRENT_SOURCE_DIR}/cocoa") 12 | add_subdirectory(cocoa) 13 | endif() 14 | 15 | if(QT_QTSCRIPT_FOUND) 16 | add_subdirectory(layout-tests) 17 | endif() 18 | -------------------------------------------------------------------------------- /src/cocoa/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(cocoa_SOURCES 2 | NSAXRDocument.h 3 | NSAXRDocument.mm 4 | NSAXRView.h 5 | NSAXRView.mm 6 | ) 7 | 8 | qt_transform_sources(cocoa_SOURCES "${cocoa_SOURCES}") 9 | 10 | add_library("${TARGET_NAME_LIB_COCOA}" STATIC ${cocoa_SOURCES}) 11 | set_target_properties("${TARGET_NAME_LIB_COCOA}" PROPERTIES OUTPUT_NAME axrcocoa FOLDER Libraries) 12 | 13 | find_library(COCOA_LIBRARY Cocoa) 14 | mark_as_advanced(COCOA_LIBRARY) 15 | target_link_libraries("${TARGET_NAME_LIB_COCOA}" ${COCOA_LIBRARY} ${TARGET_NAME_LIB_CORE} ${QT_QTMACEXTRAS_LIBRARY}) 16 | 17 | install(TARGETS "${TARGET_NAME_LIB_COCOA}" 18 | ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_REL} COMPONENT libraries 19 | ) 20 | -------------------------------------------------------------------------------- /src/cocoa/NSAXRDocument.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #import 45 | 46 | #ifdef __cplusplus 47 | namespace AXR { class AXRDocument; } 48 | using namespace AXR; 49 | #else 50 | struct AXRDocument; typedef struct AXRDocument AXRDocument; 51 | #endif 52 | 53 | @interface NSAXRDocument : NSObject 54 | { 55 | @private 56 | AXRDocument *doc; 57 | } 58 | 59 | - (id)init; 60 | - (id)initWithDocument:(AXRDocument *)document; 61 | - (AXRDocument *)documentObject; 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /src/cocoa/NSAXRDocument.mm: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #import "axr.h" 45 | #import "NSAXRDocument.h" 46 | 47 | @implementation NSAXRDocument 48 | 49 | - (id)init 50 | { 51 | if (self = [super init]) 52 | { 53 | doc = new AXRDocument(); 54 | } 55 | 56 | return self; 57 | } 58 | 59 | - (id)initWithDocument:(AXRDocument *)document 60 | { 61 | if (self = [super init]) 62 | { 63 | doc = document; 64 | } 65 | 66 | return self; 67 | } 68 | 69 | - (void)dealloc 70 | { 71 | delete doc; 72 | [super dealloc]; 73 | } 74 | 75 | - (AXRDocument *)documentObject 76 | { 77 | return doc; 78 | } 79 | 80 | @end 81 | -------------------------------------------------------------------------------- /src/cocoa/cocoa.qbs: -------------------------------------------------------------------------------- 1 | import qbs 1.0 2 | 3 | Product { 4 | name: "axrcocoa" 5 | type: "staticlibrary" 6 | condition: qbs.targetOS.contains("osx") 7 | 8 | destinationDirectory: "lib" 9 | 10 | Group { 11 | fileTagsFilter: product.type 12 | qbs.install: true 13 | qbs.installDir: product.destinationDirectory 14 | } 15 | 16 | Depends { name: "cpp" } 17 | Depends { name: "axrcore" } 18 | Depends { name: "config_header" } 19 | Depends { name: "Qt"; submodules: [ "core", "gui" ] } 20 | 21 | files: [ "*.h", "*.mm" ] 22 | 23 | cpp.frameworks: [ "Cocoa" ] 24 | 25 | Export { 26 | Depends { name: "cpp" } 27 | cpp.includePaths: "." 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/core/AXRGlobal.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "axr-config.h" 46 | #include "AXRGlobal.h" 47 | 48 | const axr_version axrVersion() 49 | { 50 | axr_version version; 51 | version.major = AXR_VERSION_MAJOR; 52 | version.minor = AXR_VERSION_MINOR; 53 | version.patch = AXR_VERSION_PATCH; 54 | version.build = AXR_VERSION_BUILD; 55 | return version; 56 | } 57 | 58 | const char* axrVersionString() 59 | { 60 | return AXR_VERSION_STRING; 61 | } 62 | -------------------------------------------------------------------------------- /src/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if(BUILD_SHARED_LIBS) 2 | add_definitions(-DAXR_EXPORTS) 3 | endif() 4 | 5 | # Find all sources for core library 6 | set(core_SOURCES_PATTERN *.c *.cpp *.h) 7 | if(APPLE) 8 | set(core_SOURCES_PATTERN ${core_SOURCES_PATTERN} *.mm) 9 | 10 | find_library(FOUNDATION_LIBRARY Foundation REQUIRED) 11 | mark_as_advanced(FOUNDATION_LIBRARY) 12 | endif() 13 | 14 | file(GLOB_RECURSE core_SOURCES ${core_SOURCES_PATTERN}) 15 | list(SORT core_SOURCES) 16 | 17 | group_by_folder(${CMAKE_CURRENT_SOURCE_DIR} "${core_SOURCES}") 18 | 19 | add_library(${TARGET_NAME_LIB_CORE} ${core_SOURCES}) 20 | target_link_libraries(${TARGET_NAME_LIB_CORE} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTMACEXTRAS_LIBRARY} ${QT_QTWINEXTRAS_LIBRARY} ${FOUNDATION_LIBRARY}) 21 | 22 | file(GLOB_RECURSE core_HEADERS *.h) 23 | set_target_properties(${TARGET_NAME_LIB_CORE} PROPERTIES 24 | FOLDER Libraries 25 | PUBLIC_HEADER "${core_HEADERS}" 26 | ) 27 | 28 | if(APPLE AND BUILD_SHARED_LIBS AND AXR_BUILD_FRAMEWORKS) 29 | set_target_properties(${TARGET_NAME_LIB_CORE} PROPERTIES FRAMEWORK TRUE) 30 | endif() 31 | 32 | if(APPLE AND AXR_BUILD_FRAMEWORKS) 33 | set_target_properties(${TARGET_NAME_LIB_CORE} PROPERTIES OUTPUT_NAME AXRCore) 34 | else() 35 | set_target_properties(${TARGET_NAME_LIB_CORE} PROPERTIES OUTPUT_NAME axrcore) 36 | endif() 37 | 38 | # Need to use ../Library trick because absolute paths won't work with CPack 39 | install(TARGETS ${TARGET_NAME_LIB_CORE} 40 | RUNTIME DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_REL} COMPONENT libraries 41 | LIBRARY DESTINATION ${CMAKE_LIBRARY_OUTPUT_DIRECTORY_REL} COMPONENT libraries 42 | ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_REL} COMPONENT libraries 43 | FRAMEWORK DESTINATION ../Library/Frameworks COMPONENT libraries 44 | PUBLIC_HEADER DESTINATION include COMPONENT headers 45 | ) 46 | -------------------------------------------------------------------------------- /src/core/axr/AXRExecutionFrame.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "AXRExecutionFrame.h" 46 | 47 | using namespace AXR; 48 | 49 | AXRExecutionFrame::AXRExecutionFrame() 50 | { 51 | this->currentLine = 0; 52 | } 53 | 54 | AXRExecutionFrame::~AXRExecutionFrame() 55 | { 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/core/axr/AXRExecutionFrame.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef AXREXECUTIONFRAME_H 45 | #define AXREXECUTIONFRAME_H 46 | 47 | #include "AXRGlobal.h" 48 | 49 | namespace AXR 50 | { 51 | class AXR_API AXRExecutionFrame 52 | { 53 | public: 54 | AXRExecutionFrame(); 55 | virtual ~AXRExecutionFrame(); 56 | 57 | std::vector > evaluables; 58 | QSharedPointer callee; 59 | long long currentLine; 60 | }; 61 | } 62 | #endif /* AXRSTACKFRAME_H */ 63 | -------------------------------------------------------------------------------- /src/core/axr/AXRExecutionPointer.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "AXRExecutionPointer.h" 46 | 47 | using namespace AXR; 48 | 49 | AXRExecutionPointer::AXRExecutionPointer() 50 | { 51 | this->isPaused = false; 52 | this->stepsOut = false; 53 | this->executesSingleStep = false; 54 | } 55 | 56 | AXRExecutionPointer::~AXRExecutionPointer() 57 | { 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/core/axr/AXRExecutionPointer.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef AXREXECUTIONPOINTER_H 45 | #define AXREXECUTIONPOINTER_H 46 | 47 | #include "AXRGlobal.h" 48 | 49 | namespace AXR 50 | { 51 | class AXR_API AXRExecutionPointer 52 | { 53 | public: 54 | AXRExecutionPointer(); 55 | virtual ~AXRExecutionPointer(); 56 | 57 | HSSParserNode::it iterator; 58 | bool isPaused; 59 | bool stepsOut; 60 | bool executesSingleStep; 61 | }; 62 | } 63 | #endif /* AXRSTACKFRAME_H */ 64 | -------------------------------------------------------------------------------- /src/core/debug/AXRWarning.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "AXRWarning.h" 46 | 47 | using namespace AXR; 48 | 49 | AXRWarning::AXRWarning(const AXRString &origin, const AXRString &message, const AXRString &url, HSSUnit line, HSSUnit column) 50 | : AXRError(origin, message, url, line, column) 51 | { 52 | } 53 | 54 | void AXRWarning::raise() const 55 | { 56 | axr_log(LoggerChannelUserWarning, toString()); 57 | } 58 | 59 | AXRString AXRWarning::toString() const 60 | { 61 | return toProblemString("Warning"); 62 | } 63 | -------------------------------------------------------------------------------- /src/core/hss/input/HSSInputEvent.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSInputEvent.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSInputEventPrivate 52 | { 53 | friend class HSSInputEvent; 54 | HSSEventType type; 55 | }; 56 | } 57 | 58 | HSSInputEvent::HSSInputEvent(HSSEventType type) 59 | : d(new HSSInputEventPrivate) 60 | { 61 | d->type = type; 62 | } 63 | 64 | HSSInputEvent::~HSSInputEvent() 65 | { 66 | delete d; 67 | } 68 | 69 | HSSEventType HSSInputEvent::type() const 70 | { 71 | return d->type; 72 | } 73 | -------------------------------------------------------------------------------- /src/core/hss/input/HSSInputEvent.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSINPUTEVENT_H 45 | #define HSSINPUTEVENT_H 46 | 47 | #include "AXRGlobal.h" 48 | #include "HSSTypeEnums.h" 49 | 50 | namespace AXR 51 | { 52 | class HSSInputEventPrivate; 53 | 54 | class AXR_API HSSInputEvent 55 | { 56 | 57 | public: 58 | HSSInputEvent(HSSEventType type); 59 | virtual ~HSSInputEvent(); 60 | HSSEventType type() const; 61 | 62 | private: 63 | HSSInputEventPrivate *const d; 64 | }; 65 | } 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /src/core/hss/input/HSSKeyboardEvent.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSKeyboardEvent.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSKeyboardEventPrivate 52 | { 53 | public: 54 | HSSKeyboardEventPrivate() 55 | : keyCode() 56 | { 57 | } 58 | 59 | AXRString keyCode; 60 | }; 61 | } 62 | 63 | HSSKeyboardEvent::HSSKeyboardEvent(HSSEventType type, const AXRString &keyCode) 64 | : HSSInputEvent(type), d(new HSSKeyboardEventPrivate) 65 | { 66 | d->keyCode = keyCode; 67 | } 68 | 69 | HSSKeyboardEvent::~HSSKeyboardEvent() 70 | { 71 | delete d; 72 | } 73 | 74 | const AXRString& HSSKeyboardEvent::keyCode() const 75 | { 76 | return d->keyCode; 77 | } 78 | -------------------------------------------------------------------------------- /src/core/hss/input/HSSKeyboardEvent.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSKEYBOARDEVENT_H 45 | #define HSSKEYBOARDEVENT_H 46 | 47 | #include "HSSInputEvent.h" 48 | #include "HSSTypeEnums.h" 49 | 50 | namespace AXR 51 | { 52 | class HSSKeyboardEventPrivate; 53 | class HSSPoint; 54 | 55 | class AXR_API HSSKeyboardEvent : public HSSInputEvent 56 | { 57 | public: 58 | HSSKeyboardEvent(HSSEventType type, const AXRString &keyCode); 59 | virtual ~HSSKeyboardEvent(); 60 | 61 | const AXRString& keyCode() const; 62 | 63 | private: 64 | HSSKeyboardEventPrivate *const d; 65 | }; 66 | } 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /src/core/hss/input/HSSMouseEvent.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSMOUSEEVENT_H 45 | #define HSSMOUSEEVENT_H 46 | 47 | #include "axr.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSMouseEventPrivate; 52 | class HSSPoint; 53 | 54 | class AXR_API HSSMouseEvent : public HSSInputEvent 55 | { 56 | public: 57 | HSSMouseEvent(HSSEventType type, const HSSPoint &position); 58 | virtual ~HSSMouseEvent(); 59 | 60 | const HSSPoint& position() const; 61 | HSSUnit x() const; 62 | HSSUnit y() const; 63 | 64 | private: 65 | HSSMouseEventPrivate *const d; 66 | }; 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/core/hss/objects/HSSTextEnums.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef AXRBrowser_HSSTextEnums_h 45 | #define AXRBrowser_HSSTextEnums_h 46 | 47 | #include "AXRGlobal.h" 48 | 49 | namespace AXR 50 | { 51 | enum AXR_API HSSTextTransformType 52 | { 53 | HSSTextTransformTypeNone = 0, 54 | HSSTextTransformTypeLowercase, 55 | HSSTextTransformTypeUppercase, 56 | HSSTextTransformTypeCapitalize, 57 | HSSTextTransformTypeHumanize 58 | }; 59 | 60 | enum AXR_API HSSTextAlignType 61 | { 62 | HSSTextAlignTypeNone = 0, 63 | HSSTextAlignTypeLeft, 64 | HSSTextAlignTypeRight, 65 | HSSTextAlignTypeCenter, 66 | HSSTextAlignTypeJustify 67 | }; 68 | } 69 | 70 | #endif 71 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathAddEllipse.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSPathAddEllipse.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSPathAddEllipsePrivate 52 | { 53 | friend class HSSPathAddEllipse; 54 | 55 | HSSPathAddEllipsePrivate() 56 | : rect(0, 0, 0, 0) 57 | { 58 | } 59 | HSSRect rect; 60 | }; 61 | } 62 | 63 | HSSPathAddEllipse::HSSPathAddEllipse(HSSRect rect) 64 | : HSSPathCommand(HSSPathCommandTypeAddEllipse) 65 | , d(new HSSPathAddEllipsePrivate) 66 | { 67 | d->rect = rect; 68 | } 69 | 70 | HSSPathAddEllipse::~HSSPathAddEllipse() 71 | { 72 | delete d; 73 | } 74 | 75 | HSSRect HSSPathAddEllipse::getRect() const 76 | { 77 | return d->rect; 78 | } 79 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathAddEllipse.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHADDELLIPSE_H 45 | #define HSSPATHADDELLIPSE_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathAddEllipsePrivate; 52 | 53 | class HSSPathAddEllipse : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathAddEllipse(HSSRect rect); 57 | virtual ~HSSPathAddEllipse(); 58 | 59 | HSSRect getRect() const; 60 | 61 | private: 62 | HSSPathAddEllipsePrivate * d; 63 | }; 64 | } 65 | 66 | 67 | #endif /* HSSPATHADDELLIPSE_H */ 68 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathAddPolygon.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSPathAddPolygon.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSPathAddPolygonPrivate 52 | { 53 | friend class HSSPathAddPolygon; 54 | 55 | HSSPathAddPolygonPrivate() 56 | { 57 | } 58 | std::vector points; 59 | }; 60 | } 61 | 62 | HSSPathAddPolygon::HSSPathAddPolygon(std::vector points) 63 | : HSSPathCommand(HSSPathCommandTypeAddPolygon) 64 | , d(new HSSPathAddPolygonPrivate) 65 | { 66 | d->points = points; 67 | } 68 | 69 | HSSPathAddPolygon::~HSSPathAddPolygon() 70 | { 71 | delete d; 72 | } 73 | 74 | std::vector HSSPathAddPolygon::getPoints() const 75 | { 76 | return d->points; 77 | } 78 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathAddPolygon.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHADDPOLYGON_H 45 | #define HSSPATHADDPOLYGON_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathAddPolygonPrivate; 52 | 53 | class HSSPathAddPolygon : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathAddPolygon(std::vector points); 57 | virtual ~HSSPathAddPolygon(); 58 | 59 | std::vector getPoints() const; 60 | 61 | private: 62 | HSSPathAddPolygonPrivate * d; 63 | }; 64 | } 65 | 66 | 67 | #endif /* HSSPATHADDPOLYGON_H */ 68 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathArcTo.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHARCTO_H 45 | #define HSSPATHARCTO_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathArcToPrivate; 52 | 53 | class HSSPathArcTo : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathArcTo(HSSUnit x, HSSUnit y, HSSUnit width, HSSUnit height, HSSUnit angle, HSSUnit sweepLength); 57 | virtual ~HSSPathArcTo(); 58 | 59 | HSSUnit getX() const; 60 | HSSUnit getY() const; 61 | HSSUnit getWidth() const; 62 | HSSUnit getHeight() const; 63 | HSSUnit getAngle() const; 64 | HSSUnit getSweepLength() const; 65 | 66 | private: 67 | HSSPathArcToPrivate * d; 68 | }; 69 | } 70 | 71 | 72 | #endif /* HSSPATHARCTO_H */ 73 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathCloseSubpath.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSPathCloseSubpath.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSPathCloseSubpathPrivate 52 | { 53 | friend class HSSPathCloseSubpath; 54 | 55 | HSSPathCloseSubpathPrivate() 56 | { 57 | } 58 | }; 59 | } 60 | 61 | HSSPathCloseSubpath::HSSPathCloseSubpath() 62 | : HSSPathCommand(HSSPathCommandTypeCloseSubpath) 63 | , d(new HSSPathCloseSubpathPrivate) 64 | { 65 | 66 | } 67 | 68 | HSSPathCloseSubpath::~HSSPathCloseSubpath() 69 | { 70 | delete d; 71 | } 72 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathCloseSubpath.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHCLOSESUBPATH_H 45 | #define HSSPATHCLOSESUBPATH_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathCloseSubpathPrivate; 52 | 53 | class HSSPathCloseSubpath : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathCloseSubpath(); 57 | virtual ~HSSPathCloseSubpath(); 58 | 59 | private: 60 | HSSPathCloseSubpathPrivate * d; 61 | }; 62 | } 63 | 64 | 65 | #endif /* HSSPATHCLOSESUBPATH_H */ 66 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathCommand.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHCOMMAND_H 45 | #define HSSPATHCOMMAND_H 46 | 47 | namespace AXR 48 | { 49 | class HSSPathCommandPrivate; 50 | 51 | class HSSPathCommand 52 | { 53 | public: 54 | HSSPathCommand(HSSPathCommandType type); 55 | virtual ~HSSPathCommand(); 56 | 57 | HSSPathCommandType getCommandType() const; 58 | bool isA(HSSPathCommandType otherType) const; 59 | 60 | private: 61 | HSSPathCommandPrivate * d; 62 | }; 63 | } 64 | 65 | 66 | #endif /* HSSPATHCOMMAND_H */ 67 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathLineTo.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSPathLineTo.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSPathLineToPrivate 52 | { 53 | friend class HSSPathLineTo; 54 | 55 | HSSPathLineToPrivate() 56 | : x(0) 57 | , y(0) 58 | { 59 | } 60 | HSSUnit x; 61 | HSSUnit y; 62 | }; 63 | } 64 | 65 | HSSPathLineTo::HSSPathLineTo(HSSUnit x, HSSUnit y) 66 | : HSSPathCommand(HSSPathCommandTypeLineTo) 67 | , d(new HSSPathLineToPrivate) 68 | { 69 | d->x = x; 70 | d->y = y; 71 | } 72 | 73 | HSSPathLineTo::~HSSPathLineTo() 74 | { 75 | delete d; 76 | } 77 | 78 | HSSUnit HSSPathLineTo::getX() const 79 | { 80 | return d->x; 81 | } 82 | 83 | HSSUnit HSSPathLineTo::getY() const 84 | { 85 | return d->y; 86 | } 87 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathLineTo.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHLINETO_H 45 | #define HSSPATHLINETO_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathLineToPrivate; 52 | 53 | class HSSPathLineTo : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathLineTo(HSSUnit x, HSSUnit y); 57 | virtual ~HSSPathLineTo(); 58 | 59 | HSSUnit getX() const; 60 | HSSUnit getY() const; 61 | 62 | private: 63 | HSSPathLineToPrivate * d; 64 | }; 65 | } 66 | 67 | 68 | #endif /* HSSPATHLINETO_H */ 69 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathMoveTo.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHMOVETO_H 45 | #define HSSPATHMOVETO_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathMoveToPrivate; 52 | 53 | class HSSPathMoveTo : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathMoveTo(HSSUnit x, HSSUnit y); 57 | virtual ~HSSPathMoveTo(); 58 | 59 | HSSUnit getX() const; 60 | HSSUnit getY() const; 61 | 62 | private: 63 | HSSPathMoveToPrivate * d; 64 | }; 65 | } 66 | 67 | 68 | #endif /* HSSPATHMOVETO_H */ 69 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathSubtract.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSPathSubtract.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class HSSPathSubtractPrivate 52 | { 53 | friend class HSSPathSubtract; 54 | 55 | HSSPathSubtractPrivate() 56 | { 57 | } 58 | QSharedPointer otherPath; 59 | }; 60 | } 61 | 62 | HSSPathSubtract::HSSPathSubtract(QSharedPointer otherPath) 63 | : HSSPathCommand(HSSPathCommandTypeSubtract) 64 | , d(new HSSPathSubtractPrivate) 65 | { 66 | d->otherPath = otherPath; 67 | } 68 | 69 | HSSPathSubtract::~HSSPathSubtract() 70 | { 71 | delete d; 72 | } 73 | 74 | QSharedPointer HSSPathSubtract::getOtherPath() const 75 | { 76 | return d->otherPath; 77 | } 78 | -------------------------------------------------------------------------------- /src/core/hss/rendering/HSSPathSubtract.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSPATHSUBTRACT_H 45 | #define HSSPATHSUBTRACT_H 46 | 47 | #include "HSSPathCommand.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSPathSubtractPrivate; 52 | 53 | class HSSPathSubtract : public HSSPathCommand 54 | { 55 | public: 56 | HSSPathSubtract(QSharedPointer otherPath); 57 | virtual ~HSSPathSubtract(); 58 | 59 | QSharedPointer getOtherPath() const; 60 | 61 | private: 62 | HSSPathSubtractPrivate * d; 63 | }; 64 | } 65 | 66 | 67 | #endif /* HSSPATHSUBTRACT_H */ 68 | -------------------------------------------------------------------------------- /src/core/hss/values/HSSScopedParserNode.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSScopedParserNode.h" 46 | 47 | using namespace AXR; 48 | 49 | HSSScopedParserNode::HSSScopedParserNode(HSSParserNodeType type, AXRController * controller) 50 | : HSSParserNode(type, controller) 51 | { 52 | 53 | } 54 | 55 | HSSScopedParserNode::HSSScopedParserNode(const HSSScopedParserNode & other) 56 | : HSSParserNode(other) 57 | { 58 | this->_scope = other._scope; 59 | } 60 | 61 | void HSSScopedParserNode::setScope(QSharedPointer newScope) 62 | { 63 | this->_scope = newScope; 64 | } 65 | 66 | QSharedPointer HSSScopedParserNode::scope() 67 | { 68 | return this->_scope; 69 | } 70 | -------------------------------------------------------------------------------- /src/core/hss/values/selectors/HSSNegation.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSNegation.h" 46 | 47 | using namespace AXR; 48 | 49 | HSSNegation::HSSNegation(AXRController * controller) 50 | : HSSParserNode(HSSParserNodeTypeNegation, controller) 51 | { 52 | 53 | } 54 | 55 | QSharedPointer HSSNegation::clone() const 56 | { 57 | return qSharedPointerCast (this->cloneImpl()); 58 | } 59 | 60 | HSSNegation::~HSSNegation() 61 | { 62 | 63 | } 64 | 65 | AXRString HSSNegation::toString() 66 | { 67 | return "Negation"; 68 | } 69 | 70 | AXRString HSSNegation::stringRep() 71 | { 72 | return "!"; 73 | } 74 | 75 | QSharedPointer HSSNegation::cloneImpl() const 76 | { 77 | return QSharedPointer(new HSSNegation(*this)); 78 | } 79 | -------------------------------------------------------------------------------- /src/core/hss/various/HSSCallback.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSCallback.h" 46 | 47 | using namespace AXR; 48 | 49 | HSSAbstractStackCallback::HSSAbstractStackCallback() 50 | { 51 | } 52 | 53 | HSSAbstractStackCallback::~HSSAbstractStackCallback() 54 | { 55 | } 56 | 57 | HSSAbstractComputeCallback::HSSAbstractComputeCallback() 58 | { 59 | } 60 | 61 | HSSAbstractComputeCallback::~HSSAbstractComputeCallback() 62 | { 63 | } 64 | 65 | HSSAbstractObserveCallback::HSSAbstractObserveCallback() 66 | { 67 | } 68 | 69 | HSSAbstractObserveCallback::~HSSAbstractObserveCallback() 70 | { 71 | } 72 | 73 | HSSAbstractValueChangedCallback::HSSAbstractValueChangedCallback() 74 | { 75 | } 76 | 77 | HSSAbstractValueChangedCallback::~HSSAbstractValueChangedCallback() 78 | { 79 | } 80 | -------------------------------------------------------------------------------- /src/core/hss/various/HSSClonable.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSClonable.h" 46 | 47 | using namespace AXR; 48 | 49 | HSSClonable::~HSSClonable() 50 | { 51 | } 52 | 53 | QSharedPointer HSSClonable::clone() const 54 | { 55 | return this->cloneImpl(); 56 | } 57 | 58 | QSharedPointer HSSClonable::cloneImpl() const 59 | { 60 | return QSharedPointer(new HSSClonable(*this)); 61 | } 62 | -------------------------------------------------------------------------------- /src/core/hss/various/HSSClonable.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSCLONABLE_H 45 | #define HSSCLONABLE_H 46 | 47 | #include "AXRGlobal.h" 48 | 49 | template class QSharedPointer; 50 | 51 | namespace AXR 52 | { 53 | /** 54 | * @brief Helper class that enables greater control over cloning of objects 55 | */ 56 | class AXR_API HSSClonable 57 | { 58 | public: 59 | virtual ~HSSClonable(); 60 | 61 | /** 62 | * Call this method to clone an instance of a subclass of HSSClonable. 63 | */ 64 | QSharedPointer clone() const; 65 | 66 | private: 67 | virtual QSharedPointer cloneImpl() const; 68 | }; 69 | } 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /src/core/hss/various/HSSObservableMapping.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "HSSObservableMapping.h" 46 | 47 | using namespace AXR; 48 | 49 | HSSObservableMapping::HSSObservableMapping(HSSObservable* obs, HSSAbstractValueChangedCallback* cbk, const AXRString src) 50 | : observer(obs), callback(cbk), source(src) 51 | { 52 | } 53 | 54 | HSSObservableMapping::~HSSObservableMapping() 55 | { 56 | } 57 | -------------------------------------------------------------------------------- /src/core/hss/various/HSSObservableMapping.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef HSSOBSERVABLEMAPPING_H 45 | #define HSSOBSERVABLEMAPPING_H 46 | 47 | #include "HSSObservableProperties.h" 48 | 49 | namespace AXR 50 | { 51 | class HSSAbstractValueChangedCallback; 52 | class HSSObservable; 53 | 54 | /** 55 | * @brief Data structure for handling property observing. 56 | */ 57 | class AXR_API HSSObservableMapping 58 | { 59 | public: 60 | HSSObservableMapping(HSSObservable* obs, HSSAbstractValueChangedCallback* cbk, const HSSString src); 61 | virtual ~HSSObservableMapping(); 62 | 63 | HSSObservable* observer; 64 | HSSAbstractValueChangedCallback* callback; 65 | HSSString source; 66 | }; 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/core/platform/AXRPlatformDriver.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "axr.h" 45 | #include "AXRPlatformDriver.h" 46 | 47 | using namespace AXR; 48 | 49 | namespace AXR 50 | { 51 | class AXRPlatformDriverPrivate 52 | { 53 | friend class AXRPlatformDriver; 54 | 55 | AXRPlatformDriverPrivate() 56 | : document(NULL) 57 | { 58 | } 59 | AXRDocument * document; 60 | }; 61 | } 62 | 63 | AXRPlatformDriver::AXRPlatformDriver() 64 | : d(new AXRPlatformDriverPrivate) 65 | { 66 | 67 | } 68 | 69 | AXRPlatformDriver::~AXRPlatformDriver() 70 | { 71 | delete d; 72 | } 73 | 74 | void AXRPlatformDriver::setDocument(AXRDocument * document) 75 | { 76 | d->document = document; 77 | } 78 | 79 | AXRDocument * AXRPlatformDriver::getDocument() const 80 | { 81 | return d->document; 82 | } 83 | -------------------------------------------------------------------------------- /src/core/platform/axr_platform_config.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2019 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | // 44 | 45 | #ifndef AXR_PLATFORM_CONFIG_H 46 | #define AXR_PLATFORM_CONFIG_H 47 | 48 | //these are the supported platforms 49 | //choose the platform you want to use by uncommenting 50 | 51 | //#define AXR_PLATFORM_MAC 52 | //#define AXR_PLATFORM_IOS 53 | #define AXR_PLATFORM_QT 54 | //#define AXR_PLATFORM_WIN 55 | //#define AXR_PLATFORM_LINUX 56 | //#define AXR_PLATFORM_ANDROID 57 | 58 | #endif /* AXR_PLATFORM_CONFIG_H */ 59 | -------------------------------------------------------------------------------- /src/core/types/HSSPoint.mm: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "HSSPoint.h" 45 | 46 | #ifdef __APPLE__ 47 | #include 48 | #if TARGET_OS_IPHONE 49 | #include 50 | #endif 51 | #endif 52 | 53 | using namespace AXR; 54 | 55 | #ifdef __APPLE__ 56 | #if !__LP64__ && !NS_BUILD_32_LIKE_64 57 | HSSPoint::HSSPoint(const CGPoint &point) : x(point.x), y(point.y) 58 | { 59 | } 60 | #endif 61 | 62 | #if !TARGET_OS_IPHONE 63 | HSSPoint::HSSPoint(const NSPoint &point) : x(point.x), y(point.y) 64 | { 65 | } 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /src/core/types/HSSRect.mm: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "HSSRect.h" 45 | 46 | #ifdef __APPLE__ 47 | #include 48 | #if TARGET_OS_IPHONE 49 | #include 50 | #endif 51 | #endif 52 | 53 | using namespace AXR; 54 | 55 | #ifdef __APPLE__ 56 | #if !__LP64__ && !NS_BUILD_32_LIKE_64 57 | HSSRect::HSSRect(const CGRect &rect) : origin(HSSPoint(rect.origin.x, rect.origin.y)), size(HSSSize(rect.size.width, rect.size.height)) 58 | { 59 | } 60 | #endif 61 | 62 | #if !TARGET_OS_IPHONE 63 | HSSRect::HSSRect(const NSRect &rect) : origin(HSSPoint(rect.origin.x, rect.origin.y)), size(HSSSize(rect.size.width, rect.size.height)) 64 | { 65 | } 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /src/core/types/HSSSize.cpp: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "HSSSize.h" 45 | 46 | template inline T AXRabs(const T &t) { return t >= 0 ? t : -t; } 47 | inline bool AXRFuzzyIsNull(long double d) 48 | { 49 | return AXRabs(d) <= 0.000000000001; 50 | } 51 | 52 | using namespace AXR; 53 | 54 | HSSSize::HSSSize() : width(0), height(0) 55 | { 56 | } 57 | 58 | HSSSize::HSSSize(HSSUnit widthAndHeight) : width(widthAndHeight), height(widthAndHeight) 59 | { 60 | } 61 | 62 | HSSSize::HSSSize(HSSUnit sizeWidth, HSSUnit sizeHeight) : width(sizeWidth), height(sizeHeight) 63 | { 64 | } 65 | 66 | bool HSSSize::operator==(const HSSSize &other) const 67 | { 68 | return AXRFuzzyIsNull(width - other.width) && AXRFuzzyIsNull(height - other.height); 69 | } 70 | 71 | bool HSSSize::operator!=(const HSSSize &other) const 72 | { 73 | return !(*this == other); 74 | } 75 | -------------------------------------------------------------------------------- /src/core/types/HSSSize.mm: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include "HSSSize.h" 45 | 46 | #ifdef __APPLE__ 47 | #include 48 | #if TARGET_OS_IPHONE 49 | #include 50 | #endif 51 | #endif 52 | 53 | using namespace AXR; 54 | 55 | #ifdef __APPLE__ 56 | #if !__LP64__ && !NS_BUILD_32_LIKE_64 57 | HSSSize::HSSSize(const CGSize &size) : width(size.width), height(size.height) 58 | { 59 | } 60 | #endif 61 | 62 | #if !TARGET_OS_IPHONE 63 | HSSSize::HSSSize(const NSSize &size) : width(size.width), height(size.height) 64 | { 65 | } 66 | #endif 67 | #endif 68 | -------------------------------------------------------------------------------- /src/core/utf8/utf8.h: -------------------------------------------------------------------------------- 1 | // Copyright 2006 Nemanja Trifunovic 2 | 3 | /* 4 | Permission is hereby granted, free of charge, to any person or organization 5 | obtaining a copy of the software and accompanying documentation covered by 6 | this license (the "Software") to use, reproduce, display, distribute, 7 | execute, and transmit the Software, and to prepare derivative works of the 8 | Software, and to permit third-parties to whom the Software is furnished to 9 | do so, all subject to the following: 10 | 11 | The copyright notices in the Software and this entire statement, including 12 | the above license grant, this restriction and the following disclaimer, 13 | must be included in all copies of the Software, in whole or in part, and 14 | all derivative works of the Software, unless such copies or derivative 15 | works are solely in the form of machine-executable object code generated by 16 | a source language processor. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 21 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 22 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 23 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | DEALINGS IN THE SOFTWARE. 25 | */ 26 | 27 | 28 | #ifndef UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 29 | #define UTF8_FOR_CPP_2675DCD0_9480_4c0c_B92A_CC14C027B731 30 | 31 | #include "utf8_checked.h" 32 | #include "utf8_unchecked.h" 33 | 34 | #endif // header guard 35 | -------------------------------------------------------------------------------- /src/core/xml/XMLParser.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #ifndef AXR_XMLPARSER_H 45 | #define AXR_XMLPARSER_H 46 | 47 | #include "AXRGlobal.h" 48 | 49 | template class QSharedPointer; 50 | 51 | namespace AXR 52 | { 53 | class AXRController; 54 | class XMLParserPrivate; 55 | 56 | class AXR_API XMLParser 57 | { 58 | public: 59 | XMLParser(AXRController *controller); 60 | virtual ~XMLParser(); 61 | 62 | bool loadFile(QSharedPointer file); 63 | 64 | private: 65 | XMLParserPrivate *const d; 66 | }; 67 | } 68 | 69 | #endif 70 | -------------------------------------------------------------------------------- /src/layout-tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(layout-tests_SOURCES 2 | Json.h 3 | Json.cpp 4 | TestCase.h 5 | TestCase.cpp 6 | TestSuite.h 7 | TestSuite.cpp 8 | main.cpp 9 | ) 10 | 11 | qt_transform_sources(layout-tests_SOURCES "${layout-tests_SOURCES}") 12 | 13 | add_executable(layout-tests ${layout-tests_SOURCES}) 14 | target_link_libraries(layout-tests ${TARGET_NAME_LIB_CORE} ${QT_QTSCRIPT_LIBRARY}) 15 | 16 | set_target_properties(layout-tests PROPERTIES FOLDER Tools) 17 | 18 | # Temporarily disabled on Windows 19 | if(NOT WIN32) 20 | get_property(LAYOUT_TESTS_BIN TARGET layout-tests PROPERTY LOCATION) 21 | get_filename_component(LAYOUT_TESTS_PATH "${LAYOUT_TESTS_BIN}" PATH) 22 | 23 | add_custom_target(run-layout-tests ALL 24 | COMMAND "${LAYOUT_TESTS_BIN}" "${AXR_CORE_SOURCE_DIR}/tests/layout-tests/tests.json" --format plain 25 | DEPENDS layout-tests 26 | WORKING_DIRECTORY "${LAYOUT_TESTS_PATH}" 27 | ) 28 | 29 | set_target_properties(run-layout-tests PROPERTIES FOLDER Tools) 30 | endif() 31 | -------------------------------------------------------------------------------- /src/layout-tests/Json.h: -------------------------------------------------------------------------------- 1 | /******************************************************************** 2 | * a A 3 | * AM\/MA 4 | * (MA:MMD 5 | * :: VD 6 | * :: º 7 | * :: 8 | * :: ** .A$MMMMND AMMMD AMMM6 MMMM MMMM6 9 | + 6::Z. TMMM MMMMMMMMMDA VMMMD AMMM6 MMMMMMMMM6 10 | * 6M:AMMJMMOD V MMMA VMMMD AMMM6 MMMMMMM6 11 | * :: TMMTMC ___MMMM VMMMMMMM6 MMMM 12 | * MMM TMMMTTM, AMMMMMMMM VMMMMM6 MMMM 13 | * :: MM TMMTMMMD MMMMMMMMMM MMMMMM MMMM 14 | * :: MMMTTMMM6 MMMMMMMMMMM AMMMMMMD MMMM 15 | * :. MMMMMM6 MMMM MMMM AMMMMMMMMD MMMM 16 | * TTMMT MMMM MMMM AMMM6 MMMMD MMMM 17 | * TMMMM8 MMMMMMMMMMM AMMM6 MMMMD MMMM 18 | * TMMMMMM$ MMMM6 MMMM AMMM6 MMMMD MMMM 19 | * TMMM MMMM 20 | * TMMM .MMM 21 | * TMM .MMD ARBITRARY·······XML········RENDERING 22 | * TMM MMA ==================================== 23 | * TMN MM 24 | * MN ZM 25 | * MM, 26 | * 27 | * 28 | * AUTHORS: see AUTHORS file 29 | * 30 | * COPYRIGHT: ©2013 - All Rights Reserved 31 | * 32 | * LICENSE: see LICENSE file 33 | * 34 | * WEB: http://axrproject.org 35 | * 36 | * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" 37 | * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 38 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 39 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR 40 | * FITNESS FOR A PARTICULAR PURPOSE. 41 | * 42 | ********************************************************************/ 43 | 44 | #include 45 | #include 46 | 47 | class Json 48 | { 49 | public: 50 | static QString encode(const QMap &map); 51 | static QMap decode(const QString &jsonStr); 52 | static QScriptValue encodeInner(const QMap &map, QScriptEngine* engine); 53 | static QMap decodeInner(QScriptValue object); 54 | static QList decodeInnerToList(QScriptValue arrayValue); 55 | 56 | private: 57 | Json(); 58 | }; 59 | -------------------------------------------------------------------------------- /src/layout-tests/layout-tests.qbs: -------------------------------------------------------------------------------- 1 | import qbs 1.0 2 | 3 | Application { 4 | name: "axrlayouttests" 5 | type: "application" 6 | 7 | destinationDirectory: qbs.targetOS.contains("unix") ? "bin" : undefined 8 | 9 | Group { 10 | fileTagsFilter: product.type 11 | qbs.install: true 12 | qbs.installDir: product.destinationDirectory 13 | } 14 | 15 | Depends { name: "cpp" } 16 | Depends { name: "axrcore" } 17 | Depends { name: "Qt"; submodules: [ "core", "script" ] } 18 | 19 | cpp.includePaths: [ product.buildDirectory ] 20 | 21 | files: [ "*.h", "*.cpp" ] 22 | } 23 | -------------------------------------------------------------------------------- /src/qt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(qt_SOURCES 2 | QAXRWidget.cpp 3 | QAXRWidget.h 4 | ) 5 | 6 | qt_transform_sources(qt_SOURCES "${qt_SOURCES}") 7 | 8 | add_library("${TARGET_NAME_LIB_QT}" STATIC ${qt_SOURCES}) 9 | set_target_properties("${TARGET_NAME_LIB_QT}" PROPERTIES OUTPUT_NAME axrqt FOLDER Libraries) 10 | 11 | # We need not link to Qt directly since core itself does - CMake takes care of that 12 | target_link_libraries("${TARGET_NAME_LIB_QT}" ${TARGET_NAME_LIB_CORE}) 13 | 14 | install(TARGETS "${TARGET_NAME_LIB_QT}" 15 | ARCHIVE DESTINATION ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_REL} COMPONENT libraries 16 | ) 17 | -------------------------------------------------------------------------------- /src/qt/qt.qbs: -------------------------------------------------------------------------------- 1 | import qbs 1.0 2 | 3 | Product { 4 | name: "axrqt" 5 | type: "staticlibrary" 6 | 7 | destinationDirectory: qbs.targetOS.contains("unix") ? "lib" : undefined 8 | 9 | Group { 10 | fileTagsFilter: product.type 11 | qbs.install: true 12 | qbs.installDir: product.destinationDirectory 13 | } 14 | 15 | Depends { name: "cpp" } 16 | Depends { name: "axrcore" } 17 | Depends { name: "config_header" } 18 | Depends { name: "Qt"; submodules: [ "core", "gui", "widgets" ] } 19 | 20 | files: [ 21 | "QAXRWidget.h", 22 | "QAXRWidget.cpp" 23 | ] 24 | 25 | Export { 26 | Depends { name: "cpp" } 27 | cpp.includePaths: "." 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/assorted/README: -------------------------------------------------------------------------------- 1 | These files were created during development and don't represent any particular aspect of 2 | the technology. Also, these files will be changing over time. 3 | -------------------------------------------------------------------------------- /tests/assorted/buttons.hss: -------------------------------------------------------------------------------- 1 | @container hl1px 2 | { 3 | height: 1; 4 | background: #FFF6; 5 | alignY: bottom; 6 | 7 | & sh1px 8 | { 9 | background: #0003; 10 | } 11 | } 12 | 13 | @container button1 14 | { 15 | width: 200; 16 | height: 50; 17 | contentAlignY: middle; 18 | background: @linearGradient{ 19 | startColor: #FF6; 20 | endColor: #FD0; 21 | endY: 100%; 22 | }; 23 | shape: @{4}; 24 | stroke: @ hl{1 #FFF8}, @ sh{1 #EA08 }; 25 | 26 | // @::hover 27 | // { 28 | // background.endColor: #FF6; 29 | // background.startColor: #FD0; 30 | // } 31 | } 32 | 33 | @container button1hover 34 | { 35 | background: @linearGradient{ 36 | startColor: #FD0; 37 | endColor: #FF6; 38 | endY: 100%; 39 | }; 40 | stroke: @ hl{1 #FFFB}, @ sh{1 #EA0 }; 41 | } 42 | 43 | @container button2 44 | { 45 | width: 40; 46 | height: 40; 47 | shape: @circle; 48 | contentAlignY: middle; 49 | textAlign: center; 50 | background: @linearGradient{ 51 | startColor: #FFF; 52 | endColor: #E; 53 | endY: 100%; 54 | }; 55 | stroke: @{1 #FFF}, @{1 #0002 }; 56 | } 57 | 58 | @container button3 59 | { 60 | width: 200; 61 | height: 30; 62 | contentAlignY: middle; 63 | background: @linearGradient{ 64 | startColor: #F; 65 | endColor: #D; 66 | startY: 14; 67 | endY: 100%; 68 | }; 69 | shape: @{15}; 70 | stroke: @{1 #0003 }, @{1 #FFF4}; 71 | } 72 | 73 | root 74 | { 75 | background: #D; 76 | 77 | #new line1 78 | { 79 | height: 150; 80 | contentAlignX: even; 81 | contentAlignY: middle; 82 | 83 | #new button1 84 | { 85 | isA: button1; 86 | content: "sample text"; 87 | } 88 | 89 | button1::hover 90 | { 91 | isA: button1hover; 92 | } 93 | 94 | #new button2 95 | { 96 | isA: button2; 97 | content: "round"; 98 | } 99 | 100 | #new button3 101 | { 102 | isA: button3; 103 | content: "round"; 104 | } 105 | 106 | #new sh { isA: sh1px } 107 | #new hl { isA: hl1px } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /tests/assorted/dark.hss: -------------------------------------------------------------------------------- 1 | #30 mainBg; 2 | 3 | // @container separator 4 | // { 5 | // flow: no; 6 | // height: 100%; 7 | // 8 | // #new hl 9 | // { 10 | // width: 1; 11 | // height: 100%; 12 | // background: @{ 13 | // startColor: #0000; 14 | // colorStops: #0001; 15 | // endColor: #0000; 16 | // } 17 | // } 18 | // } 19 | 20 | @container box 21 | { 22 | width: 100; 23 | height: 100; 24 | background: #FFF4; 25 | } 26 | 27 | @container mainSidebar 28 | { 29 | width: 150; 30 | alignX: left; 31 | 32 | background: #5; 33 | 34 | #new(2) separator; 35 | separator 36 | { 37 | width: 100; 38 | height: 50; 39 | background: #F; 40 | stroke: @{1; #F00}; 41 | } 42 | } 43 | 44 | *{ 45 | background: mainBg; 46 | 47 | #new sidebar 48 | { 49 | isA: mainSidebar; 50 | height: 100%; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /tests/assorted/mess/_test.hss: -------------------------------------------------------------------------------- 1 | @projectedMargin myMargin1 2 | { 3 | size: 12; 4 | } 5 | 6 | 7 | root 8 | { 9 | parent 10 | { 11 | child 12 | { 13 | width: 100%; 14 | margin: myMargin1; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/assorted/mess/features.hss: -------------------------------------------------------------------------------- 1 | #AAE baseColor; 2 | @rgb { 3 | isA: baseColor; 4 | 5 | & demoButtonBase { alpha: 20% } 6 | & demoButtonHL { alpha: 10% } 7 | & demoButtonSH { alpha: 30% } 8 | } 9 | 10 | #FFF5 demoButtonHL2; 11 | 12 | @linearGradient demoButtonBg 13 | { 14 | startColor: demoButtonBase; 15 | colorStops: demoButtonHL, demoButtonSH; 16 | endColor: demoButtonBase; 17 | endY: 100%; 18 | } 19 | 20 | @linearGradient demoButtonBg2 21 | { 22 | startColor: demoButtonHL; 23 | colorStops: @{ demoButtonHL2; 49% }, @{ demoButtonBase; 52% }; 24 | endColor: demoButtonHL; 25 | startX: 50% - 1; 26 | endY: 100%; 27 | endX: 50% + 1; 28 | } 29 | 30 | @stroke demoButtonOuterStroke { 31 | size: 1; 32 | color: demoButtonBase; 33 | 34 | & demoButtonInnerStroke { color: demoButtonHL2 } 35 | } 36 | 37 | @container demoButton 38 | { 39 | background: demoButtonBg; 40 | shape: @roundedRect { corners: 10 }; 41 | stroke: demoButtonInnerStroke, demoButtonOuterStroke; 42 | 43 | @::hover 44 | { 45 | background: demoButtonBg2; 46 | } 47 | } 48 | 49 | *{ 50 | #new menu 51 | { 52 | height: 150; 53 | background: @{baseColor ; #F; 100% }; 54 | } 55 | 56 | #new wrapper 57 | { 58 | contentAlignY: middle; 59 | //flexLines: yes; 60 | //alignMode: distribute; 61 | width: 70%; 62 | alignY: middle; 63 | flow: no; 64 | 65 | #new(5) demo 66 | { 67 | isA: demoButton; 68 | width: 100; 69 | height: 50; 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /tests/assorted/mess/hover_in_objdef.hss: -------------------------------------------------------------------------------- 1 | @container button1 2 | { 3 | width: 100; 4 | height: 50; 5 | shape: @{10}; 6 | stroke: @{ 1 #0 }; 7 | background: #C; 8 | 9 | @:hover 10 | { 11 | background: #F00; 12 | } 13 | } 14 | 15 | root 16 | { 17 | #new test 18 | { 19 | isA: button1; 20 | alignY: middle; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/assorted/mess/polygon.hss: -------------------------------------------------------------------------------- 1 | @ bla 2 | { 3 | width: ref(height); 4 | height: 20%; 5 | background: #C; 6 | alignY: middle; 7 | shape: @polygon { 8 | sides: ref(height) / 10; 9 | angle: ref(height) * 10; 10 | }; 11 | stroke: @{ 1 #F }, @{ 1 #9 }; 12 | 13 | @::hover 14 | { 15 | shape: @polygon { 16 | sides: 3; 17 | angle: 270; 18 | }; 19 | } 20 | } 21 | 22 | * { 23 | #new test 24 | { 25 | isA: bla; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/assorted/mess/speech_bubble.hss: -------------------------------------------------------------------------------- 1 | @ speechBubble 2 | { 3 | width: 120; 4 | height: 80; 5 | shape: @{ 10 }; 6 | background: #CCC0; 7 | anchorY: 100% + ref(height of @this tip); 8 | flow: no; 9 | contained: no; 10 | 11 | #new tip 12 | { 13 | width: 14; 14 | height: 15; 15 | shape: @polygon{ 16 | sides: 3; 17 | angle: 90; 18 | }; 19 | background: #CCC0; 20 | anchorY: ref(height) / 3; 21 | alignY: bottom; 22 | contained: no; 23 | } 24 | } 25 | 26 | * { 27 | #new dot 28 | { 29 | width: 10; 30 | height: 10; 31 | shape: @circle; 32 | alignX: 30%; 33 | alignY: 30%; 34 | background: #0; 35 | } 36 | 37 | #new bb 38 | { 39 | isA: speechBubble; 40 | alignX: ref(alignX of dot); 41 | alignY: ref(alignY of dot); 42 | } 43 | 44 | dot::hover + bb 45 | { 46 | background: #C; 47 | } 48 | dot::hover + bb tip 49 | { 50 | background: #C; 51 | } 52 | 53 | #new dot2 54 | { 55 | width: 10; 56 | height: 10; 57 | shape: @circle; 58 | alignX: middle; 59 | alignY: middle; 60 | background: #F00; 61 | } 62 | 63 | #new bb2 64 | { 65 | isA: speechBubble; 66 | alignX: ref(alignX of dot2); 67 | alignY: ref(alignY of dot2); 68 | } 69 | 70 | dot2::hover + bb2 71 | { 72 | background: #C; 73 | } 74 | dot2::hover + bb2 tip 75 | { 76 | background: #C; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /tests/assorted/mess/style10.hss: -------------------------------------------------------------------------------- 1 | document 2 | { 3 | contentAlignY: 50%; 4 | background: @rgb { red:163; green:180; blue:196 }; 5 | 6 | message 7 | { 8 | width: 80%; 9 | height: 100; 10 | background: @rgb { 11 | red: 255; 12 | green: 255; 13 | blue: 255; 14 | alpha: 50%; 15 | }; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/assorted/mess/style11.hss: -------------------------------------------------------------------------------- 1 | document 2 | { 3 | background: @rgb { alpha: 10%; }; 4 | contentAlignY: 50%; 5 | 6 | container 7 | { 8 | background: @rgb { alpha: 10%; }; 9 | contentAlignY: 50%; 10 | 11 | child 12 | { 13 | background: @rgb { alpha: 10%; }; 14 | width: 100; 15 | height: 100; 16 | } 17 | 18 | child+child 19 | { 20 | background: @rgb { alpha: 20%; }; 21 | height: 220; 22 | alignX: 100%; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/assorted/mess/style12.hss: -------------------------------------------------------------------------------- 1 | @rgb grayColor { red:50%; green: 50%; blue: 50% } 2 | @rgb redColor { red: 100;} 3 | @rgb greenColor { green: 100 } 4 | @rgb blueColor { blue: 100; alpha: 50% } 5 | 6 | 7 | document 8 | { 9 | background: grayColor; 10 | contentAlignY: 50%; 11 | 12 | * 13 | { 14 | width: 150; 15 | height: 50; 16 | background: redColor; 17 | } 18 | test1 19 | { 20 | background: greenColor; 21 | } 22 | test2 23 | { 24 | background: blueColor; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tests/assorted/mess/style13.hss: -------------------------------------------------------------------------------- 1 | @container box 2 | { 3 | background: @rgb { alpha: 50% }; 4 | } 5 | 6 | document 7 | { 8 | background: @rgb { red: 190; green: 234; blue: 190; }; 9 | 10 | message 11 | { 12 | isA: box; 13 | width: 150; 14 | height: 50; 15 | alignY: 50%; 16 | background: @rgb { alpha: 50% }; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tests/assorted/mess/style3.hss: -------------------------------------------------------------------------------- 1 | parent 2 | { 3 | contentAlignY: 50%; 4 | 5 | child 6 | { 7 | width: 50%; 8 | height: 50%; 9 | contentAlignY: 50%; 10 | 11 | subchild 12 | { 13 | width: 100% - 10; 14 | height: 100% - 10; 15 | } 16 | 17 | subchild + subchild 18 | { 19 | width: 90%; 20 | height: 50%; 21 | } 22 | } 23 | 24 | child2 25 | { 26 | width: 10% + 20; 27 | height: 10% + 20; 28 | } 29 | 30 | child3 31 | { 32 | height: 10; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /tests/assorted/mess/style4.hss: -------------------------------------------------------------------------------- 1 | parent 2 | { 3 | left 4 | { 5 | width: 120; 6 | height: 50%; 7 | } 8 | 9 | middle 10 | { 11 | width: 100% - 240; 12 | height: 50%; 13 | } 14 | 15 | right 16 | { 17 | width: 120; 18 | height: 50%; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/assorted/mess/style5.hss: -------------------------------------------------------------------------------- 1 | parent 2 | { 3 | contentAlignX: 50%; 4 | 5 | child 6 | { 7 | width: 50% - 50; 8 | height: 150; 9 | } 10 | child2 11 | { 12 | width: 150; 13 | height: 150; 14 | anchorX: 0 15 | } 16 | child3 17 | { 18 | width: 150; 19 | height: 150; 20 | alignX: 100% - 100; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/assorted/mess/style6.hss: -------------------------------------------------------------------------------- 1 | parent 2 | { 3 | contentAlignX: 100%; 4 | contentAlignY: 100%; 5 | 6 | child 7 | { 8 | width: 250; 9 | height: 150; 10 | } 11 | 12 | child2 13 | { 14 | width: 250; 15 | height: 150; 16 | } 17 | 18 | child3 19 | { 20 | width: 250; 21 | height: 150; 22 | } 23 | 24 | child4 25 | { 26 | width: 250; 27 | height: 150; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/assorted/mess/style7.hss: -------------------------------------------------------------------------------- 1 | parent 2 | { 3 | contentAlignX: 50%; 4 | contentAlignY: 0; 5 | 6 | child1 7 | { 8 | width: 100%; 9 | height: 120; 10 | } 11 | 12 | child2 13 | { 14 | width: 50; 15 | height: 150; 16 | } 17 | 18 | child3 19 | { 20 | width: 250; 21 | height: 150; 22 | } 23 | 24 | child4 25 | { 26 | width: 100%; 27 | height: 120; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/assorted/mess/style8.hss: -------------------------------------------------------------------------------- 1 | document 2 | { 3 | partA 4 | { 5 | width: 50%; 6 | height: 50%; 7 | 8 | contentAlignY: 50%; 9 | 10 | child 11 | { 12 | width: 50; 13 | height: 50; 14 | } 15 | } 16 | 17 | partB 18 | { 19 | width: 50%; 20 | height: 50%; 21 | 22 | child 23 | { 24 | width: 80%; 25 | height: 50% - 30; 26 | } 27 | child2 28 | { 29 | width: 80%; 30 | height: 50% + 30; 31 | } 32 | } 33 | 34 | partC 35 | { 36 | width: 50%; 37 | height: 50%; 38 | 39 | contentAlignY: 50%; 40 | directionPrimary: topToBottom; 41 | 42 | child 43 | { 44 | width: 50; 45 | height: 50; 46 | } 47 | } 48 | 49 | partD 50 | { 51 | width: 50%; 52 | height: 50%; 53 | 54 | directionPrimary: rightToLeft; 55 | 56 | child1 57 | { 58 | width: 120; 59 | height: 50; 60 | } 61 | 62 | child2 63 | { 64 | width: 120; 65 | height: 50; 66 | } 67 | 68 | child3 69 | { 70 | width: 120; 71 | height: 50; 72 | } 73 | 74 | child4 75 | { 76 | width: 120; 77 | height: 50; 78 | } 79 | 80 | child5 81 | { 82 | width: 120; 83 | height: 50; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /tests/assorted/mess/style9.hss: -------------------------------------------------------------------------------- 1 | @rgb pageBg { red:163; green:180; blue:196 } 2 | @rgb logoBg { red: 123; green: 140; blue: 156 } 3 | @rgb softDark { alpha: 5% } 4 | @rgb softWhite { red: 255; green: 255; blue: 255; alpha: 10% } 5 | @rgb strongWhite { red: 255; green: 255; blue: 255; alpha: 50% } 6 | @rgb solidWhite { red: 255; green: 255; blue: 255; } 7 | 8 | document 9 | { 10 | contentAlignY: 50%; 11 | background: pageBg; 12 | 13 | header 14 | { 15 | width: 100% - 40; 16 | height: 100; 17 | contentAlignY: 50%; 18 | background: softDark; 19 | 20 | 21 | logo 22 | { 23 | width: 120; 24 | height: 80; 25 | alignX: 70; 26 | background: logoBg; 27 | } 28 | 29 | navigation 30 | { 31 | width: 100% - 150; 32 | height: 80; 33 | alignX: 100% - 10; 34 | anchorX: 100%; 35 | contentAlignY: 50%; 36 | background: softWhite; 37 | 38 | *{ 39 | width: 100; 40 | height: 40; 41 | background: strongWhite; 42 | } 43 | 44 | home { background: solidWhite } 45 | } 46 | } 47 | 48 | content 49 | { 50 | width: 100% - 40; 51 | background: softDark; 52 | height: 50%; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /tests/assorted/mess/test10.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Hello world! 6 | 7 | -------------------------------------------------------------------------------- /tests/assorted/mess/test11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 1 6 | 2 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/assorted/mess/test12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Red 7 | Green 8 | Blue 9 | 10 | -------------------------------------------------------------------------------- /tests/assorted/mess/test13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Hello world 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/assorted/mess/test2.hss: -------------------------------------------------------------------------------- 1 | #import "axr.hss"; 2 | 3 | note:first message .. subject > * { height: (100% - 30) / 2 } 4 | -------------------------------------------------------------------------------- /tests/assorted/mess/test2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | This is a test element 5 | This is another 6 | This is a child inside its parent 7 | 8 | -------------------------------------------------------------------------------- /tests/assorted/mess/test3.hss: -------------------------------------------------------------------------------- 1 | test { } 2 | 3 | //this is a line comment 4 | /* this is a 5 | block * / /* ** / /* comment */ 6 | 7 | test2{} //hello!!! 8 | test3 { margin: @{ 15 } } /* //comment inside of a comment */ 9 | -------------------------------------------------------------------------------- /tests/assorted/mess/test3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | black 6 | blue 7 | 8 | red 9 | green 10 | 11 | -------------------------------------------------------------------------------- /tests/assorted/mess/test4.hss: -------------------------------------------------------------------------------- 1 | root * * child + child2 subchild { width: 250 } 2 | 3 | root child child2 4 | { 5 | width: 120%; 6 | } 7 | -------------------------------------------------------------------------------- /tests/assorted/mess/test4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | red 5 | green 6 | blue 7 | red 8 | green 9 | blue 10 | 11 | -------------------------------------------------------------------------------- /tests/assorted/mess/test5.hss: -------------------------------------------------------------------------------- 1 | /* FIXME: this crashes the parser */ 2 | 3 | @container 4 | { 5 | contentText: "anonymous container object"; 6 | } 7 | 8 | /*@container myContainer 9 | { 10 | width: 150; 11 | } 12 | 13 | @stroke myStroke 14 | { 15 | color: @rgb { 127, 127, 128, 20% } 16 | }*/ 17 | -------------------------------------------------------------------------------- /tests/assorted/mess/test5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | red 5 | green 6 | white 7 | 8 | -------------------------------------------------------------------------------- /tests/assorted/mess/test6.hss: -------------------------------------------------------------------------------- 1 | @margin margin1 { size: 50 } 2 | 3 | myElement 4 | { 5 | stroke: @stroke{ size: 1 }; 6 | margin: margin1 7 | } 8 | -------------------------------------------------------------------------------- /tests/assorted/mess/test6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | red 5 | green 6 | blue 7 | white 8 | 9 | -------------------------------------------------------------------------------- /tests/assorted/mess/test7.hss: -------------------------------------------------------------------------------- 1 | @value alignment1 { value: 150 } 2 | 3 | element1 4 | { 5 | alignX: alignment1; 6 | alignY: center; 7 | width: 50%; 8 | } 9 | -------------------------------------------------------------------------------- /tests/assorted/mess/test7.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | red 5 | green 6 | blue 7 | 10 | 11 | -------------------------------------------------------------------------------- /tests/assorted/mess/test8.hss: -------------------------------------------------------------------------------- 1 | #import @value { value: "hello" } // this should be a @request 2 | @container { background: #666 } 3 | #new element { } 4 | #ensure element2 { } 5 | -------------------------------------------------------------------------------- /tests/assorted/mess/test8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | red 6 | green 7 | blue 8 | black 9 | 10 | 11 | white 12 | black 13 | 14 | 15 | red 16 | green 17 | blue 18 | black 19 | white 20 | 21 | 22 | red 23 | green 24 | blue 25 | black 26 | white 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/assorted/mess/test9.hss: -------------------------------------------------------------------------------- 1 | parent 2 | { 3 | child { 4 | width: 150; 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/assorted/mess/test9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 | Logo 7 | 8 | Home 9 | About 10 | Features 11 | Contact 12 | 13 |
14 | This is the content 15 |
16 | -------------------------------------------------------------------------------- /tests/assorted/smileys.hss: -------------------------------------------------------------------------------- 1 | @container face 2 | { 3 | width: 100; 4 | height: 100; 5 | stroke: @{ 1; #C }; 6 | alignY: middle; 7 | shape: @circle; 8 | directionPrimary: topToBottom; 9 | 10 | #new(2) eyes 11 | { 12 | width: 20%; 13 | height: ref(width); 14 | background: #D; 15 | alignY: 30%; 16 | shape: @circle; 17 | alignX: 25%; 18 | } 19 | 20 | eyes:last 21 | { 22 | alignX: 75%; 23 | } 24 | 25 | #new mouth 26 | { 27 | width: 80%; 28 | height: 15%; 29 | background: #D; 30 | alignY: 65%; 31 | 32 | shape: @roundedRect { 33 | corners: 5; 34 | }; 35 | } 36 | 37 | @::hover mouth 38 | { 39 | height: 40%; 40 | shape: @roundedRect { 41 | corners: 5; 42 | bottom: 30; 43 | }; 44 | } 45 | } 46 | 47 | * { 48 | contentAlignX: distribute; 49 | 50 | #new(3) face 51 | { 52 | isA: face; 53 | } 54 | 55 | @::hover face eyes 56 | { 57 | height: 25%; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /tests/assorted/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Belgian Waffles 7 | $5.95 8 | two of our famous Belgian Waffles with plenty of real maple syrup 9 | 650 10 | 11 | 12 | Strawberry Belgian Waffles 13 | $7.95 14 | light Belgian waffles covered with strawberries and whipped cream 15 | 900 16 | 17 | 18 | Berry-Berry Belgian Waffles 19 | $8.95 20 | light Belgian waffles covered with an assortment of fresh berries and whipped cream 21 | 900 22 | 23 | 24 | French Toast 25 | $4.50 26 | thick slices made from our homemade sourdough bread 27 | 600 28 | 29 | 30 | Homestyle Breakfast 31 | $6.95 32 | two eggs, bacon or sausage, toast, and our ever-popular hash browns 33 | 950 34 | 35 | 36 | -------------------------------------------------------------------------------- /tests/assorted/triangle.hss: -------------------------------------------------------------------------------- 1 | * { 2 | contentAlignY: middle; 3 | 4 | #new blajd 5 | { 6 | width: 50%; 7 | height: ref(width) / 2; 8 | background: #674; 9 | shape: @polygon 10 | { 11 | sides: 3; 12 | angle: 0; 13 | }; 14 | stroke: @{ 15 #FFF }, @{ 10 #FA3 }; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/README: -------------------------------------------------------------------------------- 1 | In here will live tests that check that every aspect of the HSS parser. Contributions will 2 | be greatly appreciated. Contact us on the mailing list ( http://groups.google.com/group/axr-main/ ) 3 | for any information on how to write the tests. 4 | -------------------------------------------------------------------------------- /tests/hss/basic/b001-blank-document.hss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/axr/core/6c050737b9a5cbd0aff058394ccfbe0645bddd68/tests/hss/basic/b001-blank-document.hss -------------------------------------------------------------------------------- /tests/hss/basic/b001-blank-document.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/hss/basic/b002-blank-document-with-comments.hss: -------------------------------------------------------------------------------- 1 | //this is a line comment 2 | 3 | /* this is a block 4 | comment, consistent 5 | of multiple lines 6 | and tabs 7 | */ 8 | -------------------------------------------------------------------------------- /tests/hss/basic/b002-blank-document-with-comments.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/hss/colors/c001-multi-digit-colors.hss: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | * 4 | { 5 | width: 100; 6 | height: 100; 7 | } 8 | 9 | #new box 10 | { 11 | background: #0; 12 | content: '#0 (pure black)'; 13 | // TODO: white font 14 | } 15 | 16 | #new box 17 | { 18 | background: #ff; 19 | content: '#ff (pure white)'; 20 | } 21 | 22 | #new box 23 | { 24 | background: #f0f; 25 | content: '#f0f (pure purple)'; 26 | } 27 | 28 | #new box 29 | { 30 | background: #f009; 31 | content: '#f009 (transparent red)'; 32 | } 33 | 34 | #new box 35 | { 36 | background: #0f00f; 37 | content: '#0f00f (transparent green)'; 38 | } 39 | 40 | #new box 41 | { 42 | background: #00ffff; 43 | content: '#00ffff (pure cyan)'; 44 | } 45 | 46 | #new box 47 | { 48 | background: #ffff00f; 49 | content: '#ffff00f (pure yellow)'; 50 | } 51 | 52 | #new box 53 | { 54 | background: #ffff0033; 55 | content: '#ffff0033 (transparent yellow)'; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tests/hss/filters/fl001-basic.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test FL001 - Basic 3 | Created by Miro Keller on 2012-02-23. 4 | */ 5 | 6 | #A66 red; 7 | #6A6 green; 8 | #66A blue; 9 | 10 | @container box 11 | { 12 | height: 50; 13 | stroke: @{ 1; #D }; 14 | background: #C; 15 | contentAlignY: middle; 16 | textAlign: center; 17 | } 18 | 19 | test 20 | { 21 | background: #E; 22 | 23 | * { isA: box } 24 | :first 25 | { 26 | background: red; 27 | } 28 | :last 29 | { 30 | background: green; 31 | } 32 | // :even 33 | // { 34 | // background: blue; 35 | // } 36 | } 37 | -------------------------------------------------------------------------------- /tests/hss/filters/fl001-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | (Elem A) This should be red 9 | B 10 | C 11 | D 12 | (Elem E) this should be green 13 | 14 | -------------------------------------------------------------------------------- /tests/hss/fonts/f001-basic.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test F001 - Basic 3 | Created by Miro Keller on 2011-09-26. 4 | */ 5 | 6 | test 7 | { 8 | background: #C; 9 | 10 | hello 11 | { 12 | width: 350; 13 | height: 50%; 14 | alignX: 100% - 15; 15 | alignY: 15; 16 | anchorX: 100%; 17 | anchorY: 0; 18 | 19 | background: @rgb { 20 | red: 255; 21 | green: 250; 22 | blue: 150; 23 | alpha: 50%; 24 | }; 25 | font: @font { 26 | size: 50; 27 | face: "Helvetica"; 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /tests/hss/fonts/f001-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Hello world 9 | 10 | -------------------------------------------------------------------------------- /tests/hss/fonts/f002-named-font.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test F002 - Named font 3 | Created by Miro Keller on 2011-09-26. 4 | */ 5 | 6 | @font impact { 7 | size: 50; 8 | face: "Impact"; 9 | color: #C; 10 | } 11 | 12 | @font helvetica { 13 | size: 54; 14 | face: "Helvetica"; 15 | color: #A; 16 | } 17 | 18 | test 19 | { 20 | background: #C; 21 | 22 | .. * 23 | { 24 | height: 75; //this is needed because of a bug in the prototype 25 | alignY: 50%; 26 | background: #D; 27 | } 28 | 29 | hello { font: impact; } 30 | hello2 { font: helvetica; } 31 | } 32 | -------------------------------------------------------------------------------- /tests/hss/fonts/f002-named-font.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Hello world 9 | Hello again! 10 | 11 | -------------------------------------------------------------------------------- /tests/hss/functions/attr/at001-basic.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | contentAlignX: even; 4 | 5 | value 6 | { 7 | height: attr(val); 8 | width: 20%; 9 | background: #0003; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/hss/functions/attr/at001-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/functions/attr/at002-expressions.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | contentAlignX: even; 4 | 5 | value 6 | { 7 | height: attr(val) * 100; 8 | width: 20%; 9 | background: #0003; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/hss/functions/attr/at002-expressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/functions/attr/at003-decimals-and-percentages.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | contentAlignX: even; 4 | 5 | * 6 | { 7 | width: 20%; 8 | background: #0003; 9 | } 10 | 11 | decimal 12 | { 13 | height: attr(val) * 1%; 14 | } 15 | 16 | percentage 17 | { 18 | height: attr(val); 19 | } 20 | 21 | both 22 | { 23 | height: attr(decimal) * attr(percentage); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /tests/hss/functions/attr/at003-decimals-and-percentages.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r001-basic.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | fixed 4 | { 5 | height: 150; 6 | background: #D; 7 | } 8 | 9 | relative 10 | { 11 | height: ref(height of fixed); 12 | background: #A0; 13 | } 14 | 15 | * { width: 50% } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r001-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | This block is of a certain height 9 | This one is as tall as the previous one 10 | 11 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r002-to-percentage.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | halfHeight 4 | { 5 | height: 50%; 6 | background: #D; 7 | } 8 | 9 | relative 10 | { 11 | height: ref(height of halfHeight); 12 | background: #A0; 13 | } 14 | 15 | * { width: 50% } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r002-to-percentage.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | This block is half as tall as the viewport 9 | This one is as tall as the previous one 10 | 11 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r003-expressions-basic.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | halfHeight 4 | { 5 | height: 50%; 6 | background: #D; 7 | } 8 | 9 | relative 10 | { 11 | height: ref(height of halfHeight) + 50; 12 | background: #A0; 13 | } 14 | 15 | * { width: 50% } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r003-expressions-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | This block is half as tall as the viewport 9 | This one is a bit taller than the previous one 10 | 11 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r004-expressions.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | * 4 | { 5 | width: 50%; 6 | height: 50%; 7 | 8 | master 9 | { 10 | width: 50%; 11 | background: #C; 12 | } 13 | 14 | master2 15 | { 16 | width: 50%; 17 | background: #B; 18 | } 19 | 20 | slave 21 | { 22 | width: 50%; 23 | background: #A; 24 | } 25 | } 26 | 27 | testA 28 | { 29 | master 30 | { 31 | width: 50%; 32 | height: 50%; 33 | } 34 | 35 | master2 36 | { 37 | width: 50%; 38 | height: 50%; 39 | alignX: 0; 40 | alignY: 100%; 41 | } 42 | 43 | slave 44 | { 45 | height: ref(height of master) + ref(height of master2); 46 | } 47 | } 48 | 49 | testB 50 | { 51 | background: #EFE; 52 | 53 | master 54 | { 55 | height: 50%; 56 | } 57 | 58 | slave 59 | { 60 | height: ref(height of master) + 20%; 61 | } 62 | } 63 | 64 | testC 65 | { 66 | background: #EEF; 67 | 68 | master 69 | { 70 | width: 25%; 71 | height: 50%; 72 | } 73 | 74 | slave 75 | { 76 | width: 25%; 77 | height: ref(height of master) + 10; 78 | } 79 | 80 | slave2 81 | { 82 | width: 25%; 83 | height: ref(height of slave) + 10; 84 | background: #9; 85 | } 86 | } 87 | 88 | testD 89 | { 90 | background: #FEE; 91 | 92 | master 93 | { 94 | width: 25%; 95 | height: 50%; 96 | } 97 | 98 | slave 99 | { 100 | width: 25%; 101 | height: (ref(height of master) + 20) + 100; /* FIXME: this fails */ 102 | } 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r004-expressions.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | Master A1 10 | Master A2 11 | Slave A: Master A1 + Master A2 12 | 13 | 14 | Master B 15 | Slave B: Reference to Master B + percentage 16 | 17 | 18 | Master C1 19 | Slave C1: Reference to Master C1 20 | Slave C2: Reference to Slave C1 21 | 22 | 23 | Master D 24 | Slave D: Nested expressions and parentheses 25 | 26 | 27 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r005-cross-property.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | master 4 | { 5 | width: 20%; 6 | height: 20%; 7 | background: #C; 8 | } 9 | 10 | slave 11 | { 12 | width: ref(height of master) * 2; 13 | height: ref(width of master) * 2; 14 | background: #A; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r005-cross-property.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Master 9 | Slave: Cross-property Reference to Master and multiplication 10 | 11 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r006-multiple-elements.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | master 4 | { 5 | width: 150; 6 | height: 150; 7 | background: #C; 8 | } 9 | 10 | master + master 11 | { 12 | height: 200; 13 | background: #B; 14 | } 15 | 16 | slave 17 | { 18 | width: 150; 19 | height: ref(height of master); 20 | background: #A; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r006-multiple-elements.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Master 1: smaller 9 | Master 2: bigger 10 | Slave: Reference to master - should be smaller 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r007-modifiers.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | * { width: 120 } 4 | master 5 | { 6 | height: 150; 7 | background: #E; 8 | } 9 | 10 | master + master 11 | { 12 | height: 200; 13 | background: #D; 14 | } 15 | 16 | refmin 17 | { 18 | height: ref(min height of master); 19 | background: #B; 20 | } 21 | 22 | refmax 23 | { 24 | height: ref(max height of master); 25 | background: #A; 26 | } 27 | 28 | refavg 29 | { 30 | height: ref(avg height of master); 31 | background: #9; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /tests/hss/functions/ref/r007-modifiers.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Master: smaller 9 | Master: bigger 10 | Reference to the smaller Master 11 | Reference to the bigger Master 12 | Reference to the average of both 13 | 14 | -------------------------------------------------------------------------------- /tests/hss/instructions/i001-new-basic.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | #new newElement { 4 | width: 250; 5 | height: 200; 6 | background: #D; 7 | alignX, alignY: 50%; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /tests/hss/instructions/i001-new-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /tests/hss/instructions/i002-wrapping.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | #new content { 4 | width: 600; 5 | height: 300; 6 | background: #E; 7 | alignX, alignY: 50%; 8 | 9 | #move @parent * 10 | { 11 | width: 150; 12 | height: 150; 13 | alignX, alignY: 50%; 14 | background: #D; 15 | } 16 | 17 | child2 { background: #C } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /tests/hss/instructions/i002-wrapping.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/instructions/i003-import-master.hss: -------------------------------------------------------------------------------- 1 | #import "i003-import-slave.hss"; 2 | 3 | test 4 | { 5 | background: background; 6 | 7 | * { isA: box; shape: @{10}; } 8 | :first { background: boxHighlight } 9 | } 10 | -------------------------------------------------------------------------------- /tests/hss/instructions/i003-import-slave.hss: -------------------------------------------------------------------------------- 1 | @container box 2 | { 3 | width: 150; 4 | height: 150; 5 | background: @rgb{ alpha: 20% }; 6 | shape: @{10}; 7 | } 8 | 9 | @rgb background 10 | { 11 | red: 255; 12 | green: 255; 13 | blue: 245; 14 | } 15 | 16 | @rgb boxHighlight 17 | { 18 | red: 255; 19 | alpha: 50%; 20 | } 21 | -------------------------------------------------------------------------------- /tests/hss/instructions/i003-import.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/instructions/i004-delete.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test I004 Delete 3 | Created by Miro Keller on 2011-11-05. 4 | */ 5 | 6 | test 7 | { 8 | 9 | * 10 | { 11 | font: @{ "Helvetica"; 18 }; 12 | } 13 | 14 | error { background: #F00 } 15 | success { background: #9F9 } 16 | #delete :first; 17 | } 18 | -------------------------------------------------------------------------------- /tests/hss/instructions/i004-delete.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | If you see this, this test has failed 9 | Success! 10 | 11 | -------------------------------------------------------------------------------- /tests/hss/instructions/i005-new-quantity.hss: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | #new(8) red 4 | { 5 | width: 100; 6 | height: 100; 7 | background: #C; 8 | stroke: @{ 1 }; 9 | alignX, alignY: middle; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /tests/hss/instructions/i005-new-quantity.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/hss/selectors/s001-simple-selectors.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | background: #66F; 4 | } 5 | -------------------------------------------------------------------------------- /tests/hss/selectors/s001-simple-selectors.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | This should be blue 8 | -------------------------------------------------------------------------------- /tests/hss/selectors/s002-hierarchy.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | element1 4 | { 5 | background: #66F; 6 | } 7 | 8 | element2 9 | { 10 | background: #FF6; 11 | } 12 | 13 | element3 14 | { 15 | background: #6F6; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/hss/selectors/s002-hierarchy.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | (Element 1) This should be blue 9 | (Element 2) This should be yellow 10 | (Element 3) This should be green 11 | 12 | -------------------------------------------------------------------------------- /tests/hss/selectors/s003-child-combinator.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | parent child 4 | { 5 | background: #66F; 6 | } 7 | 8 | parent child subchild 9 | { 10 | background: #FF6; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/hss/selectors/s003-child-combinator.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | (Child) This should be blue 10 | 11 | 12 | 13 | (Subchild) This should be yellow 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/hss/selectors/s004-descendant-combinator.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | .. child 4 | { 5 | background: #66F; 6 | } 7 | 8 | .. subchild 9 | { 10 | background: #6F6; 11 | } 12 | 13 | parent .. subchild 14 | { 15 | background: #FF6; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/hss/selectors/s004-descendant-combinator.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | (Child) This should be blue 10 | 11 | 12 | 13 | (Subchild) This should be yellow 14 | 15 | 16 | 17 | 18 | (Subchild) This should be green 19 | 20 | 21 | 22 | 23 | 24 | (Sub-subchild) This should be green 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/hss/selectors/s005-sibling-combinators.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | child2 - child 4 | { 5 | background: #6FF; 6 | } 7 | 8 | child + child 9 | { 10 | background: #66F; 11 | } 12 | 13 | child = child2 14 | { 15 | background: #FF6; 16 | } 17 | 18 | child2 + child2 19 | { 20 | background: #6F6; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/hss/selectors/s005-sibling-combinators.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | (Child) This should be cyan 9 | (Child) This should be blue 10 | (Child2) This should be yellow 11 | (Child2) This should be green 12 | 13 | -------------------------------------------------------------------------------- /tests/hss/selectors/s006-negations.hss: -------------------------------------------------------------------------------- 1 | #F66 red; 2 | #6F6 green; 3 | #66F blue; 4 | #FF6 yellow; 5 | #F94 orange; 6 | 7 | * 8 | { 9 | * { 10 | height: 50; 11 | background: #E; 12 | } 13 | 14 | //Comment and uncomment these lines as needed to understand what's 15 | //going on. Also, a good idea is to remove filters from the right 16 | //and see how the selection is affected. 17 | !:last { background: red } 18 | !:first { background: blue } 19 | !child { background: green} 20 | !:last!:first:first { background: yellow } 21 | !:first!:first!:first!:last { background: orange } 22 | } 23 | -------------------------------------------------------------------------------- /tests/hss/selectors/s006-negations.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | (Child) This should be red 9 | (Child) This should be yellow 10 | (Child) This should be blue 11 | (Child2) This should be orange 12 | (Child2) this should be green 13 | 14 | -------------------------------------------------------------------------------- /tests/hss/selectors/s007-grouping.hss: -------------------------------------------------------------------------------- 1 | #6F6 green; 2 | #66F blue; 3 | 4 | * 5 | { 6 | child, child3 7 | { 8 | background: blue; 9 | } 10 | 11 | child + child2, 12 | child3 + child4, //the last , is on purpose 13 | { 14 | background: green; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/selectors/s007-grouping.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | (Child) This should be blue 9 | (Child) This should be green 10 | (Child2) This should be blue 11 | (Child2) this should be green 12 | 13 | -------------------------------------------------------------------------------- /tests/hss/selectors/s008-descendant-combinator-2.hss: -------------------------------------------------------------------------------- 1 | //this should match root too 2 | .. * 3 | { 4 | background: #0F0; 5 | padding: 10; 6 | } 7 | 8 | //this matches all except root 9 | * .. * 10 | { 11 | stroke: @{ 1; #0 }; 12 | } 13 | 14 | //so does this 15 | * 16 | { 17 | .. * 18 | { 19 | height: 50%; 20 | } 21 | } 22 | 23 | //this matches only root 24 | .. *:first 25 | { 26 | background: #FF0; 27 | } 28 | -------------------------------------------------------------------------------- /tests/hss/selectors/s008-descendant-combinator-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | The window background should be yellow 4 | This should be green and with a stroke 5 | This should be green and with a stroke 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/hss/selectors/s009-sibling-combinators-2.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | child 4 | { 5 | background: #F00; 6 | } 7 | 8 | child = :last 9 | { 10 | background: #0F0; 11 | } 12 | child + :first 13 | { 14 | background: #00F; 15 | } 16 | 17 | child - :first 18 | { 19 | background: #FF0; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/hss/selectors/s009-sibling-combinators-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | (Child) This should be yellow 5 | (Child2) This should be blue 6 | (Child) This should be red 7 | (Child3) This should be green 8 | 9 | -------------------------------------------------------------------------------- /tests/hss/shapes/sh001-rectangle.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test SH001 Rectangle 3 | Created by Miro Keller on 2011-10-19. 4 | */ 5 | 6 | test 7 | { 8 | shapeElement 9 | { 10 | width: 200; 11 | height: 200; 12 | shape: @rectangle; //default value 13 | background: #C; 14 | alignY: 50%; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/shapes/sh001-rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/hss/shapes/sh002-rounded-rectangle.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test SH002 Rounded Rectangle 3 | Created by Miro Keller on 2011-10-19. 4 | */ 5 | 6 | test 7 | { 8 | shapeElement 9 | { 10 | width: 200; 11 | height: 200; 12 | shape: @roundedRect { corners: 8 }; 13 | background: #C; 14 | alignX: 33%; 15 | alignY: 50%; 16 | } 17 | 18 | #new shorthandNotation 19 | { 20 | width: 200; 21 | height: 200; 22 | shape: @{25}; 23 | background: #C; 24 | alignX: 66%; 25 | alignY: 50%; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/hss/shapes/sh002-rounded-rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/hss/shapes/sh005-custom-path.hss: -------------------------------------------------------------------------------- 1 | //not ready yet 2 | //@path triangle { @line{100% 0}, @line{100% 100%}, @line{0 100%} } 3 | 4 | test 5 | { 6 | .. * { alignY: 50% } 7 | 8 | shapeElement 9 | { 10 | width: 200; 11 | height: 200; 12 | background: #C; 13 | //not ready yet 14 | //shape: triangle; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /tests/hss/shapes/sh005-custom-path.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/hierarchy/test-case.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hierarchy", 3 | "load": "test.xml", 4 | "expect": { 5 | "children": [ 6 | { 7 | "name": "child", 8 | "properties" : [ 9 | { 10 | "name": "contentAlignX", 11 | "value": "200" 12 | } 13 | ] 14 | } 15 | ] 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/hierarchy/test.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | child 4 | { 5 | contentAlignX: 200; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/hierarchy/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/simple/test-case.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Simple selector", 3 | "load": "test.xml", 4 | "expect": { 5 | "properties": [ 6 | { 7 | "name": "contentAlignX", 8 | "value": "200" 9 | } 10 | ] 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/simple/test.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | contentAlignX: 200; 4 | } 5 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/simple/test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/layout-tests/selectors/tests.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Selectors", 3 | "cases": [ 4 | "simple/test-case.json", 5 | "hierarchy/test-case.json" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /tests/layout-tests/tests.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "All tests", 3 | "include": [ 4 | "selectors/tests.json" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /tests/path-handling/dotdot.hss: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | #new file 4 | { 5 | content: 'This file is ../dotdot.hss'; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/path-handling/index.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | This file tests relative and absolute path handling within AXR from both 9 | xml-stylesheet processing instructions in XML, and #import statements in 10 | HSS. 11 | 12 | Each HSS file successfully loaded will create a new element with the content 13 | "This file is {path}" where path is the exact path it was referenced using, 14 | within an xml-stylesheet or #import. 15 | 16 | Note that /root-absolute.hss will need to be symlinked from / for the test 17 | to work properly on local filesystems, and index.xml should be in the root 18 | directory over HTTP. 19 | 20 | The list of files that should get loaded (not necessarily in this order): 21 | * dotdot.hss 22 | * root-absolute.hss 23 | * root-relative.hss 24 | * dot.hss 25 | * relative.hss 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/path-handling/root-absolute.hss: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | #new file 4 | { 5 | content: 'This file is root-absolute.hss'; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/path-handling/root-relative.hss: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | #new file 4 | { 5 | content: 'This file is root-relative.hss'; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/path-handling/subfolder/dot.hss: -------------------------------------------------------------------------------- 1 | * 2 | { 3 | #new file 4 | { 5 | content: 'This file is ./dot.hss'; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/path-handling/subfolder/relative.hss: -------------------------------------------------------------------------------- 1 | #import "./dot.hss"; 2 | #import "../dotdot.hss"; 3 | 4 | root 5 | { 6 | #new file 7 | { 8 | content: 'This file is subfolder/relative.hss'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /tests/regressions/qpointer-crasher.hss: -------------------------------------------------------------------------------- 1 | @container crasher 2 | { 3 | @::hover 4 | { 5 | 6 | } 7 | } 8 | 9 | * 10 | { 11 | #new content 12 | { 13 | isA: crasher; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /tests/rendering/README: -------------------------------------------------------------------------------- 1 | In here will live tests that check that every aspect of the AXR rendering engine. Contributions will 2 | be greatly appreciated. Contact us on the mailing list ( http://groups.google.com/group/axr-main/ ) 3 | for any information on how to write the tests. 4 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh001-common-styles.hss: -------------------------------------------------------------------------------- 1 | @font stdFont{ 2 | face: "Trebuchet MS"; 3 | size: 12; 4 | color: #6; 5 | 6 | & buttonFont 7 | { 8 | size: 14; 9 | color: #F; 10 | } 11 | 12 | & heading1 13 | { 14 | size: 40; 15 | color: #3; 16 | } 17 | } 18 | 19 | @container button 20 | { 21 | background: @linearGradient{ 22 | startColor: #6C6; 23 | endColor: #181; 24 | endY: 100%; 25 | }; 26 | stroke: @{ 1 #FFF5}, @{ 1 #282}; 27 | shape: @{ 10 }; 28 | contentAlignY: middle; 29 | textAlign: center; 30 | font: buttonFont; 31 | 32 | @::hover 33 | { 34 | background: @linearGradient{ 35 | startColor: #181; 36 | endColor: #6C6; 37 | endY: 100%; 38 | }; 39 | } 40 | } 41 | 42 | @linearGradient bgGrad 43 | { 44 | startColor: #E; 45 | endColor: #D; 46 | endY: 50%; 47 | } 48 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh001-load-slave.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BH001 Load slave 3 | Created by Miro Keller on 2011-11-05. 4 | */ 5 | 6 | #import "bh001-common-styles.hss"; 7 | 8 | slave 9 | { 10 | background: bgGrad; 11 | contentAlignY: middle; 12 | 13 | #new wrapper 14 | { 15 | width: 60%; 16 | 17 | #move message 18 | { 19 | font: heading1; 20 | textAlign: center; 21 | } 22 | 23 | #move tip 24 | { 25 | font: stdFont; 26 | height: 60; 27 | textAlign: center; 28 | contentAlignY: middle; 29 | } 30 | 31 | #move button 32 | { 33 | isA: button; 34 | width: 120; 35 | height: 40; 36 | shape: @{5} 37 | on: @click{ 38 | @request { src: "BH001 Load.xml" } 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh001-load-slave.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Success! 9 | Click here to return to the previous page: 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh001-load.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BH001 Load 3 | Created by Miro Keller on 2011-11-05. 4 | */ 5 | 6 | #import "bh001-common-styles.hss"; 7 | 8 | master 9 | { 10 | background: bgGrad; 11 | 12 | #new top 13 | { 14 | height: 50% - 40; 15 | contentAlignX, contentAlignY: middle; 16 | 17 | #move @parent changeLocation 18 | { 19 | isA: button; 20 | width: 250; 21 | height: 100; 22 | on: @click { 23 | action: @request{ src: "bh001-load-slave.xml" } 24 | }; 25 | } 26 | flow: no; 27 | } 28 | 29 | #new highlight 30 | { 31 | height: 1; 32 | background: #F; 33 | alignY: 50% - 30; 34 | flow: no; 35 | } 36 | 37 | #new shadow 38 | { 39 | height: 1; 40 | background: #BE; 41 | alignY: 50% - 30; 42 | flow: no; 43 | } 44 | 45 | #new shadow 46 | { 47 | height: 10; 48 | background: @linearGradient { 49 | startColor: #0002; 50 | endColor: #0000; 51 | endY: 100%; 52 | }; 53 | alignY: 50% - 30; 54 | flow: no; 55 | } 56 | 57 | #new bottom 58 | { 59 | width: 100% - 100; 60 | height: 50% - 50; 61 | stroke: @{ 1 #BE }; 62 | alignX: 50%; 63 | alignY: 73%; 64 | contentAlignX, contentAlignY: 50%; 65 | background: #F; 66 | shape: @{3}; 67 | flow: no; 68 | 69 | 70 | #move @parent loadInto 71 | { 72 | isA: button; 73 | width: 300; 74 | height: 80; 75 | on: @click { 76 | action: @request{ 77 | src: "bh001-load-slave.xml"; 78 | target: sel(@parent); 79 | }; 80 | }; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh001-load.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | Click here to load another page 9 | Click here to load the page into here 10 | 11 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh002-mouse-events.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BH002 Mouse events 3 | Created by Miro Keller on 2011-11-20. 4 | */ 5 | 6 | test 7 | { 8 | .. * 9 | { 10 | width: 150; 11 | height: 150; 12 | background: #D; 13 | shape: @{15}; 14 | alignY: 50%; 15 | } 16 | 17 | mouseDown 18 | { 19 | behavior: @mouseDown { @log { ref(width of mouseUp) } } 20 | } 21 | 22 | mouseUp 23 | { 24 | behavior: @mouseUp { @log { "mouseUp" } } 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /tests/rendering/behavior/bh002-mouse-events.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | mouseDown 9 | mouseUp 10 | mouseOver 11 | mouseOut 12 | click 13 | doubleClick 14 | 15 | -------------------------------------------------------------------------------- /tests/rendering/gradients/gr001-basic.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test GR001 Basic 3 | Created by Miro Keller on 2011-12-26. 4 | */ 5 | 6 | #0 bgColor; 7 | #5 bgColor2; 8 | 9 | master 10 | { 11 | contentAlignY: 50%; 12 | background: #3; 13 | 14 | #new test 15 | { 16 | width: 200; 17 | height: 50%; 18 | shape: @{10}; 19 | stroke: @{ 1 #FFF5 }, @{ 1 #0008 }; 20 | background: @linearGradient blackGrad { 21 | startColor: bgColor; 22 | endColor: bgColor2; 23 | startY: 0; 24 | endY: 100%; 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/rendering/gradients/gr001-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/rendering/gradients/gr002-color-stops.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test GR002 Color stops 3 | Created by Miro Keller on 2011-12-27. 4 | Last modified: 2011-03-08 5 | */ 6 | 7 | #F00 bgColor; 8 | #0F0 bgColor2; 9 | #00F bgColor3; 10 | 11 | @container pane 12 | { 13 | width: 200; 14 | height: 50%; 15 | shape: @{10}; 16 | stroke: @{ 1 #FFF5 }, @{ 1 #0008 }; 17 | } 18 | 19 | @linearGradient glossGradient 20 | { 21 | startColor: #FFF4; 22 | endColor: #FFF0; 23 | endY: 100%; 24 | colorStops: #FFF2, #FFF1; 25 | } 26 | 27 | master 28 | { 29 | contentAlignY: 50%; 30 | background: #3; 31 | 32 | #new test 33 | { 34 | isA: pane; 35 | background: @linearGradient { 36 | startColor: bgColor; 37 | endColor: bgColor3; 38 | startY: 0; 39 | endY: 100%; 40 | colorStops: @colorStop { 41 | color: bgColor2; 42 | position: 50%; 43 | }; 44 | }; 45 | 46 | alignX: 50% - 120; 47 | } 48 | 49 | #new test2 50 | { 51 | isA: pane; 52 | background: glossGradient; 53 | alignX: 50% + 120; 54 | 55 | @::hover 56 | { 57 | background: #0004, glossGradient; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /tests/rendering/gradients/gr002-color-stops.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br001-basic.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BR001 Basic 3 | Created by Miro Keller on 2011-11-05. 4 | */ 5 | 6 | master 7 | { 8 | contentAlignX, contentAlignY: 50%; 9 | background: #3; 10 | 11 | #new test 12 | { 13 | width: 200; 14 | height: 200; 15 | background: #4; 16 | shape: @circle; 17 | stroke: @stroke { 18 | size: 3; 19 | color: #E0FABB30; 20 | }; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br001-basic.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br002-multiple-strokes.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BR002 Multiple Strokes 3 | Created by Miro Keller on 2011-12-15. 4 | */ 5 | 6 | @stroke shadowStroke { 1 #6 } 7 | @stroke highlightStroke { 1 #DF } 8 | 9 | @container test 10 | { 11 | width: 200; 12 | height: 200; 13 | background: #A; 14 | stroke: shadowStroke, highlightStroke; 15 | shape: @{ 10 }; 16 | alignX, alignY: middle; 17 | } 18 | 19 | * 20 | { 21 | background: #C; 22 | 23 | #new test 24 | { 25 | isA: test; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br002-multiple-strokes.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br003-ref-strokes.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BR003 Ref strokes 3 | Created by Miro Keller on 2011-12-20. 4 | */ 5 | 6 | @stroke shadowStroke { 1 #6 } 7 | @stroke highlightStroke { 1 #DF } 8 | 9 | @container test 10 | { 11 | width: 200; 12 | height: 200; 13 | background: #A; 14 | shape: @{ 10 }; 15 | alignY: middle; 16 | } 17 | 18 | * 19 | { 20 | background: #C; 21 | 22 | #new test 23 | { 24 | isA: test; 25 | stroke: shadowStroke, highlightStroke; 26 | alignX: 30%; 27 | } 28 | 29 | #new test2 30 | { 31 | isA: test; 32 | stroke: ref(stroke of test); 33 | alignX: 70%; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br003-ref-strokes.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br004-strokes-ref-size.hss: -------------------------------------------------------------------------------- 1 | /* 2 | Test BR004 Strokes ref size 3 | Created by Miro Keller on 2011-12-20. 4 | */ 5 | 6 | test 7 | { 8 | background: #D; 9 | 10 | contentAlignY: middle; 11 | 12 | #new test 13 | { 14 | width: 200; 15 | height: 50%; 16 | background: #0002; 17 | shape: @{ 50 }; 18 | stroke: @{ ref(height of test)/20 #0 }; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/rendering/strokes/br004-strokes-ref-size.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tests/style.hss: -------------------------------------------------------------------------------- 1 | test 2 | { 3 | test2 4 | { 5 | width: 150; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/test-project/color.hss: -------------------------------------------------------------------------------- 1 | #F mainBGColor; 2 | #C foreground1Color; 3 | #0 foreground2Color; 4 | #F00 highlight1Color; 5 | #FF0 highlight2Color; 6 | 7 | #A darkBarTopColor; 8 | #0 darkBarBottomColor; 9 | 10 | #AE boxTopColor; 11 | #BE boxBottomColor; 12 | 13 | @linearGradient glossColor { 14 | // colorStops: 15 | // @{ @modifier { ref(startColor) @colorBC { 10 0 } } 50% }, 16 | // @{ @modifier { ref(endColor) @colorBC { 5 0 } } 50% }; 17 | } 18 | 19 | @linearGradient darkBarGradient { 20 | startX: 0; 21 | startY: 0; 22 | endX: 0; 23 | endY: 100%; 24 | startColor: darkBarTopColor; 25 | endColor: darkBarBottomColor; 26 | 27 | &@ darkBarGradientGloss { isA: glossColor } 28 | } 29 | 30 | @linearGradient boxGradient { 31 | startX: 0; 32 | startY: 0; 33 | endX: 0; 34 | endY: 100%; 35 | startColor: boxTopColor; 36 | endColor: boxBottomColor; 37 | 38 | &@ boxGradientGloss { isA: glossColor } 39 | } 40 | -------------------------------------------------------------------------------- /tests/test-project/en/strings.hss: -------------------------------------------------------------------------------- 1 | @value searchFormLabel { "Search this site" } 2 | -------------------------------------------------------------------------------- /tests/test-project/foundation.hss: -------------------------------------------------------------------------------- 1 | @container 2 | { 3 | font: fontStyle1; 4 | 5 | &@ button1 6 | { 7 | font: title2Font; 8 | 9 | // @this:hover { 10 | // font: title2FontAcc; 11 | // shape: @roundedRect { 4 }; 12 | // background: boxGradientGloss; 13 | // effects: normalShadow; 14 | // } 15 | } 16 | 17 | &@ textfield 18 | { 19 | contentText: searchFormLabel; 20 | stroke: @{ 1 }; 21 | // effects: @glow { 5 #0 10 inside }; 22 | contentAlignY: 50%; 23 | // editable: yes; 24 | // padding: @{ 10 }; 25 | } 26 | 27 | &@ paragraph 28 | { 29 | font: bodyFont; 30 | // width: max(400, min(150, 80%)); 31 | // margin: @{ 10 top }, @{ 10 bottom }; 32 | } 33 | } 34 | 35 | // @shadow normalShadow 36 | // { 37 | // size: 10; 38 | // color: @rgb { 39 | // isA: foreground1Color; 40 | // alpha: 40%; 41 | // }; 42 | // } 43 | 44 | 45 | * 46 | { 47 | #new menu 48 | { 49 | // height: max(150, min(50, 20%)); 50 | background: darkBarGradientGloss; 51 | alignModePrimary: distribute; 52 | content: @request { "navigation.xml" }; 53 | // padding: @{ 50 left }, @{ 50 right}; 54 | 55 | // #unwrap navigation; 56 | 57 | * { 58 | isA: button1; 59 | behavior: @click { 60 | @request { attr("href") } 61 | }; 62 | } 63 | } 64 | 65 | #new content 66 | { 67 | height: 100% - (ref(height of menu) + ref(height of footer)); 68 | contentAlignY: 50%; 69 | } 70 | 71 | #new footer 72 | { 73 | height: max(150, min(50, 20%)); 74 | } 75 | 76 | * 77 | { 78 | parent: content; 79 | } 80 | 81 | #delete metadata; 82 | } 83 | -------------------------------------------------------------------------------- /tests/test-project/home.hss: -------------------------------------------------------------------------------- 1 | home 2 | { 3 | content 4 | { 5 | #remove metadata; 6 | 7 | about, nextSteps 8 | { 9 | isA: paragraph; 10 | } 11 | } 12 | 13 | #new search 14 | { 15 | isA: textfield; 16 | alignX: 100%; 17 | alignY: 100%; 18 | flow: no; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /tests/test-project/home.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Miro Keller 8 | 2011/06/05 9 | English 10 | 11 | This is a test project, where I try out how it would be to create a simple site using AXR. 12 | Please select where you want to go next from the main menu. 13 | 14 | -------------------------------------------------------------------------------- /tests/test-project/navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Please select one of the following 4 | Home 5 | About 6 | Contact 7 | 8 | -------------------------------------------------------------------------------- /tests/test-project/style.hss: -------------------------------------------------------------------------------- 1 | #import "color.hss"; 2 | #import "typography.hss"; 3 | #import "foundation.hss"; 4 | // #import attr("code" of :root metadata language)~"/strings.hss"; 5 | // #import AXRWidgets; 6 | 7 | //#import ref(elementName of :root)~".hss"; 8 | -------------------------------------------------------------------------------- /tests/test-project/typography.hss: -------------------------------------------------------------------------------- 1 | @font fontStyle1 2 | { 3 | family: "Century Gothic"; 4 | weight: bold; 5 | color: foreground2Color; 6 | kerning: 3; 7 | 8 | fallback: @{ 9 | family: "Futura"; 10 | color: foreground2Color; 11 | }; 12 | } 13 | 14 | @font title1Font 15 | { 16 | isA: fontStyle1; 17 | size: 20; 18 | 19 | &@ title2Font { 20 | size: 16; 21 | &@ title2FontAcc { color: highlight1Color } 22 | } 23 | &@ title3Font { 24 | size: 14; 25 | &@ title3FontAcc { color: highlight1Color } 26 | } 27 | &@ title4Font { 28 | size: 12; 29 | &@ title4FontAcc { color: highlight1Color } 30 | } 31 | } 32 | 33 | @font bodyFont 34 | { 35 | isA: fontStyle1; 36 | size: 12; 37 | 38 | &@ bodyFontAcc { color: highlight1Color } 39 | } 40 | -------------------------------------------------------------------------------- /tests/xml/README.md: -------------------------------------------------------------------------------- 1 | In here will live tests that check that every aspect of the XML parser. Contributions will 2 | be greatly appreciated. Contact us on the [mailing list](http://groups.google.com/group/axr-main/) 3 | for any information on how to write the tests. 4 | 5 | * billion-laughs.xml 6 | 7 | Tests that the parser is not vulnerable to the billion laughs attack. 8 | https://en.wikipedia.org/wiki/Billion_laughs 9 | -------------------------------------------------------------------------------- /tests/xml/billion-laughs.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ]> 14 | &lol9; 15 | -------------------------------------------------------------------------------- /validate.rb: -------------------------------------------------------------------------------- 1 | dir = File.expand_path File.dirname(__FILE__) 2 | require "#{dir}/../common/validator/validator.rb" 3 | 4 | validator = AXRValidator::Validator.new 5 | scanner = AXRValidator::FileScanner.new 6 | 7 | # Default is :fs 8 | scanner.source = :cached if ARGV.include? "--cached" 9 | 10 | scanner.on(/.*\.(h|c|cpp|m|mm)$/) do |file| 11 | generic = AXRValidator::Validators::Generic.new validator, file 12 | generic.validate_encoding_utf8 13 | generic.validate_whitespace 14 | generic.validate_indentation " " 15 | end 16 | 17 | validator.messages.each { |msg| puts "#{msg.to_string}\n\n" } 18 | validator.end 19 | --------------------------------------------------------------------------------