var r = new Rectangle(0,0,100,100); var o = new TextMorph(r, "Hello") this.setTarget(o)
lively.morphic.Morph.addMethods({ getMatchingStyleSheetRules: function () { var sizzle = new lively.morphic.Sizzle(), matchingRules = [], morphInLoop = this; // Collect matching rules from ancestors (and self) while (morphInLoop) { var styleSheetRules = morphInLoop.getStyleSheetRules(); if (styleSheetRules) { styleSheetRules.each( function(rule) { if (sizzle.select(rule.selectorText(), morphInLoop, null, [this]).length === 1) { matchingRules.push(rule); } }, this); } morphInLoop = morphInLoop.owner; } return this.sortStyleSheetRules(matchingRules); } });
set target and press CMD+S
select method to show source
### Object ### ### lively.morphic.Morph ### HTML render settings: htmlDispatchTable Morph selection: getAttribute, getAttributeNode, getNextSibling, getPreviousSibling, getSubmorphByStyleId, getSubmorphsByAttribute, getSubmorphsByStyleClassName, getSubmorphsByTagName SVG render settings: svgDispatchTable Style Classes and Ids: prepareDOMForStyleSheetsHTML, setStyleClassNamesHTML, setStyleIdHTML Style classes and ids: addStyleClassName, getStyleClassNames, getStyleId, hasStyleId, isOfStyleClass, makeStyleClassNameRegExp, makeUniqueStyleClassNamesList, removeStyleClassName, setStyleClassNames, setStyleId Style sheet getters and setters: cssIsEnabled, getAppearanceStylingMode, getBorderStylingMode, getParsedStyleSheet, getStyleSheet, getStyleSheetRules, loadStyleSheetFromFile, setAppearanceStylingMode, setBorderStylingMode, setStyleSheet, setStyleSheetRules Style sheet interpretation: clearStyleRulesInSubmorphs, getMatchingStyleSheetRules, getStyleSheetDeclarations, getStyleSheetRuleSpecificity, sortStyleSheetRules Stylesheets: addSelectorPrefixes, appendStyleNodeHTML, compileStyleSheet, setStyleSheetHTML, splitGroupedSelector accessing -- morph properties: adjustOrigin, beClip, getBounds, getClipMode, getHandStyle, getOrigin, getPivotPoint, getPosition, getRotation, getScale, getToolTip, globalBounds, innerBounds, isClip, isVisible, setBounds, setClipMode, setHandStyle, setOrigin, setPivotPoint, setPosition, setRotation, setScale, setToolTip, setVisible accessing -- morphic relationship: addMorph, hand, morphBeneath, morphsContainingPoint, submorphBounds, topMorph, withAllSubmorphsDetect, withAllSubmorphsDo, withAllSubmorphsSelect, world accessing -- shape properties: getBorderColor, getBorderRadius, getBorderStyle, getBorderWidth, getExtent, getFill, getFillOpacity, getMinExtent, getOpacity, getStrokeOpacity, getStrokeWidth, setBorderColor, setBorderRadius, setBorderStyle, setBorderWidth, setExtent, setFill, setFillOpacity, setMinExtent, setOpacity, setStrokeOpacity, setStrokeWidth, setVertices accessing -- shapes: getShape, makeStyleSpec, setShape animations: appear, dissolve bindings: connections canvas render settings: canvasDispatchTable connection points: getConnectionPoints, getTargetConnectionPoints convenience accessing: bounds, getCenter, innerBounds convenience scripting: bounceInBounds, bounceInOwnerBounds, stepAndBounce, stepByVelocities conversion: asHTMLLogo, asLogo, asSVGLogo, logoHTMLString copying: basicCopy, copy, doNotSerialize, duplicate, restoreRenderContextAfterCopy debugging: isAncestorOf, toString default category: activeLayers, addWithLayer, addWithoutLayer, collectWithLayersIn, collectWithoutLayersIn, dynamicLayers, getWithLayers, getWithoutLayers, globalLayers, isTabContainer, removeWithLayer, removeWithoutLayer, setWithLayers, setWithoutLayers, structuralLayers diffing: diffTo, equals, newThreeWayDiff, parseDiffTo, parsePropertiesOfDiffTo, parseScriptsOfDiffTo, showThreeWayDiff drawing: drawOnCANVAS, drawSubmorphsOnCANVAS event handling: dragTriggerDistance, isNativeContextMenuEvt, onContextMenu, onDrag, onDragEnd, onDragStart, onMouseDown, onMouseDownEntry, onMouseMove, onMouseMoveEntry, onMouseOut, onMouseUp, onMouseUpEntry, onMouseWheel, onMouseWheelEntry, registerForFocusAndBlurEvents, registerForKeyboardEvents, registerForMouseEvents, registerForOtherEvents, registerForTouchEvents, triggerEvent event managment: addEventHandler, areEventsIgnoredOrDisabled, disableEventHandler, disableEventHandlerRecursively, disableEvents, enableEventHandler, enableEventHandlerRecursively, enableEvents, getPointerEvents, ignoreEvents, registerForEvent, registerForEvents, relayMouseEventsToMorphBeneath, removeEventHandler, removeEventHandlers, setPointerEvents, unignoreEvents event specific SVG: setHandStyleSVG, setPointerEventsSVG events: blurHTML, focusHTML, isGrabbable, setFocusableHTML, setPointerEventsHTML, takesKeyboardFocus, triggerEventHTML focus and blur: blur, disableFocus, enableFocus, focus, focusedMorph, hasKeyboardFocus, isFocusable, isFocused, onBlur, onFocus fullscreen: clipWorld, enterFullScreen, isInFullScreen, leaveFullScreen, selectAllSubmorphs, unclipWorld geometry: align, centerAt, moveBy, moveForwardBy, resizeBy, rotateBy, scaleBy, translateBy, turnBy grabbing and dragging: isLocked, lock, lockOwner, resetLocking, unlock grabbing and dropping: disableDragging, disableDropping, disableGrabbing, dropOn, dropOnMe, enableDragging, enableDropping, enableGrabbing, getGrabShadow, grabMe, manualDropOnMe, onDropOn halos: disableHalos, enableHalos, getHaloClasses, getHalos, removeHalos, removeHalosWithout, showHalos, showHalosForMorphBeneath, showSelectedHalos, showsHalosOnRightClick, toggleHalos inheritance: existsAlreadyIn, findById, findCommonParentPartVersion, findCurrentPartVersion, findDerivationParent, findDerivationSibling, findParentPartVersion, findSiblingInRelative, isDirectDescendentOf initializing: defaultRenderContext, defaultShape, idCounter, initialize, isMorph, setNewId interaction: edit, show jquery: jQuery, jQueryNode keyboard events: interactiveMoveOrResize, onBackspacePressed, onDelPressed, onDownPressed, onEndPressed, onEnterPressed, onEscPressed, onHomePressed, onKeyDown, onKeyPress, onKeyUp, onLeftPressed, onPageDownPressed, onPageUpPressed, onRightPressed, onTabPressed, onUpPressed layouting: adjustForNewBounds, applyLayout, createPlaceholder, destroyPlaceholder, getLayoutConstraintInfo, getLayoutableSubmorphs, getLayouter, getMaxVisibleWidth, getMinHeight, getMinWidth, getPositionInWorld, insertPlaceholder, isLayoutable, obtainPlaceholder, setLayoutConstraintInfo, setLayouter, setPositionTopLeft, submorphDragged, submorphResized lively bindings: plugTo menu: disableMorphMenu, enableMorphMenu, getWindow, morphMenuItems, openMorphMenuAt, showMorphMenu morph removal: remove, removeMorph morphic relationship: addMorphBack, addMorphFront, bringToFront, indentedListItemsOfMorphNames, isSubmorphOf, ownerChain, sendToBack, topSubmorph, treeItemsOfMorphNames nameing: findAndSetUniqueName, findUniqueNameSimilarTo naming: get, getBreadthFirstUpwards, getMorphNamed, getName, setName opening: correctForDragOffset, getTopmostMorph, isInFrontOf, isInSameWindowAs, isScrollable, isScrollableHTML, isTopmostMorph, openInHand, openInWindow, openInWorld, openInWorldCenter overlay: addOverlay, removeOverlay properties: isMorph, style prototypical scripting: addScript removing: removeAllMorphs, removeAndDropSubmorphs, removeCANVAS, removeHTML, removeMorphHTML, removeSVG rendering: appendCANVAS, appendHTML, appendSVG, initCANVAS, initHTML, initSVG, insertMorphNodeInHTML, isRendered, onRenderFinished, onRenderFinishedHTML, prepareForNewRenderContext, renderAfterUsing, renderUsing, renderWithCANVAS, renderWithHTML, renderWithSVG, replaceRenderContextCANVAS, replaceRenderContextCompletely, replaceRenderContextHTML, replaceRenderContextSVG, replaceRenderContextWith scripting: animatedFollowPath, animatedInterpolateTo, animatedPathStep, removeEqualScripts, resumeStepping, resumeSteppingAll, startStepping, stopScripts, stopStepping, stopSteppingScriptNamed, suspendStepping, suspendSteppingAll scrolling: basicGetScrollableNode, getScrollBarExtent, getScrollableNode, onScroll, showsHorizontalScrollBar, showsVerticalScrollBar serialization: onLoadFromPartsBin, onrestore, onstore, serializeToJSON style: applyCustomStyle, getCustomStyle styling: applyLinkedStyles, applyStyle, applyStyleNamed, getGridPoint, getStyle, getStyleClass, linkToStyles, makeStyleSpec, setPadding, setStyleClass, styleNamed touch events: onTouchEnd, onTouchStart transformation: fullContainsPoint, fullContainsWorldPoint, getGlobalTransform, getTransform, innerBoundsContainsPoint, innerBoundsContainsWorldPoint, localize, localizePointFrom, setTransform, transformForNewOwner, transformToMorph, worldPoint udpating: adjustOriginHTML, getScrollBarExtentHTML, setClipModeHTML, setClipModeHTMLForNode, setExtentHTML, setHandStyleHTML, setPivotPointHTML, setPositionHTML, setRotationHTML, setScaleHTML, setToolTipHTML, setTransformHTML, setVisibleHTML, showsHorizontalScrollBarHTML, showsVerticalScrollBarHTML update & change: changed, layoutChanged updating: attributeChangedCANVAS, setPositionSVG, setRotationSVG visual connectors: addDefaultMagnets, createConnectorTo, getMagnetForPos, getMagnets, getVisualBindingsBuilderFor, hideMagnets, morphsContainingPointInExtendedBounds, removeUnusedMagnets, showMagnets, toggleMagnets ### lively.morphic.Text ### HTML render settings: htmlDispatchTable JavaScript support: varDeclCleaner SVG render settings: svgDispatchTable accessing: appendTextString, getAlign, getDisplay, getFontFamily, getFontSize, getFontStyle, getFontWeight, getPadding, getTextBounds, getTextColor, getTextDecoration, getTextExtent, getTextExtentHTML, getTextNode, getTextString, getTextStringHTML, getVerticalAlign, getWhiteSpaceHandlingHTML, inputAllowed, insertTextStringAt, replaceTextString, setAlign, setAlignHTML, setDisplay, setDisplayHTML, setExtent, setFixedHeight, setFixedWidth, setFontFamily, setFontFamilyHTML, setFontSize, setFontSizeHTML, setFontStyle, setFontStyleHTML, setFontWeight, setFontWeightHTML, setInputAllowed, setInputAllowedHTML, setMaxTextHeight, setMaxTextHeightHTML, setMaxTextWidth, setMaxTextWidthHTML, setMinTextHeight, setMinTextHeightHTML, setMinTextWidth, setMinTextWidthHTML, setPadding, setPaddingHTML, setTextColor, setTextColorHTML, setTextDecoration, setTextDecorationHTML, setTextExtentHTML, setTextString, setVerticalAlign, setVerticalAlignHTML, setWhiteSpaceHandlingHTML, visibleTextBounds accessing SVG: getTextStringSVG, ignoreTextEventsSVG bindings: connections canvas render settings: canvasDispatchTable debugging: showError, textNodeString default category: applyCustomStyle, getCustomStyle deprecated interface: getVerticalScrollPosition, innerMorph, setVerticalScrollPosition, showChangeClue drawing: drawSubmorphsOnCANVAS, drawTextOnCANVAS evaluation: boundEval, evalAll, evalSelection, getDoitContext, tryBoundEval event handling: correctForDragOffset, onBlur, onFocus event management: blurHTML, enableTextEventsHTML, focusHTML, focusMorphHTML, ignoreTextEventsHTML, unignoreTextEventsHTML event managment: enableEvents, ignoreEvents, registerForFocusAndBlurEvents, registerForKeyboardEvents, unignoreEvents event settings: accessibleInInactiveWindow experimentation: getRange, getRichText, getRichTextFromTo, getSelectionBounds, getTextElementAndLocalIndexForGlobalIndex, getTextElements, getTextStyle, getWhiteSpaceHandling, setRichText, setWhiteSpaceHandling focus: requestKeyboardFocus initializing: initialize keyboard event reaction: onBackspacePressed, onDelPressed, onDownPressed, onEndPressed, onEnterPressed, onEscPressed, onHomePressed, onLeftPressed, onPageDownPressed, onPageUpPressed, onRightPressed, onTabPressed, onUpPressed keyboard events: addOrRemoveBrackets, addOrRemoveComment, doAutoIndent, doBrowseClass, doBrowseImplementors, doBrowseSenders, doDebugit, doDoit, doEdit, doExchange, doFind, doFindNext, doInspect, doListProtocol, doMore, doPrintit, doSave, doVarDeclClean, indentSelection, mergeText, modifySelectedLines, onCut, onKeyDown, onKeyPress, onKeyUp, onPaste, outdentSelection, processCommandKeys, rememberSelectionForDoMore, splitText menu: morphMenuItems mouse events: onMouseDown, onMouseUp node creation: createTextNodeHTML, createTextNodeSVG, getTextExtentSVG properties: allowInput, autoAdjustPadding, draggingEnabled, isText, style, suppressDropping rendering: appendHTML, appendSVG, appendTextHTML, appendTextSVG, fit, growOrShrinkToFit, initHTML, initSVG, onRenderFinishedHTML, setMaxTextHeightSVG, setMaxTextWidthSVG, updateTextHTML, updateTextSVG rich text: appendRichText, changeEmphasis, convertSelectionRangeForEmphasis, decreaseFontSizeOfSelection, emphasize, emphasizeAll, emphasizeRanges, emphasizeRegex, emphasizeSelection, getEmphasisAt, increaseFontSizeOfSelection, insertRichTextAt, setFontSizeOfSelectionDo, toggleBoldness, toggleDoit, toggleEmphasisForSelection, toggleFont, toggleItalics, toggleLink, toggleUnderline, unEmphasize, unEmphasizeAll, unEmphasizeSelection rich text 2: getRichText2, setRichText2 scrolling: basicGetScrollableNode, scrollSelectionIntoView searching: searchForFind selection: domSelection, findLine, getGlobalSelectionBounds, getSelectionBounds, getSelectionOrLineString, getSelectionRange, hasNullSelection, hasSelection, insertAtCursor, insertElementAtCursor, insertTextChunksAtCursor, matchBrackets, modifySelection, moveCursorToLineEnd, moveCursorToLineStart, moveCursorToTextEnd, moveCursorToTextStart, removeTextSelection, selectAll, selectCurrentLine, selectWord, selectionString, setNullSelectionAt, setSelectionRange serialization: doNotSerialize, onrestore, onstore, prepareForNewRenderContext settings for syntax highlighting: syntaxHighlighter shape appearance: fitWidth shortcut support: shortcutHandlers status messages: setStatusMessage styling: applyStyle syntax highlighter settings: syntaxHighlighter syntax highlighting: disableSyntaxHighlighting, disableSyntaxHighlightingOnSave, enableSyntaxHighlighting, enableSyntaxHighlightingOnSave, highlightJavaScriptSyntax, highlightSyntax, highlightSyntaxDebounced tab handling: convertTabsToSpaces, isTabAfterCursor, isTabBeforeCursor, isTabBeforeOrAfterCursor, tab, tabspacesForCursorPos testing: hasUnsavedChanges, isFocused text modes: beInputLine, beLabel
ProtocolBrowser
X
M
–