📄 canvas.js
字号:
// @group scrolling // @visibility external // @see getScrollbarSize() //< scrollbarSize:16, // NOTE: the following properties only apply when showCustomScrollbars is true //> @attr canvas.scrollbarConstructor (Class : "Scrollbar" : [IA]) // The class that will be used to create custom scrollbars for this component. Set this // attribute to a Scrollbar subclass with e.g. a different skinImgDir, to customize scrollbar // appearance for this component only. // @group scrolling //< scrollbarConstructor:"Scrollbar", //> @attr canvas.scrollLeft (number : 0 : IRWA) // number of pixels that this canvas is shifted leftwards due to scrolling. // @group scrolling //< scrollLeft:0, //> @attr canvas.scrollTop (number : 0 : IRWA) // number of pixels that this canvas is shifted upwards due to scrolling. // @group scrolling //< scrollTop:0, //> @attr canvas.scrollDelta (number : 20 : RWA) // Amount to scroll when the scroll button is pressed // @group scrolling //< scrollDelta:20, // Disabling // -------------------------------------------------------------------------------------------- //> @attr canvas.disabled (boolean : false : IRWA) // If set to true, the widget will be disabled. A widget is only considered enabled // if it is individually enabled and all parents above it in the containment hierarchy // are enabled. This allows you to enable or disable all components of a complex // nested widget by enabling or disabling the top-level parent only. // @getter isDisabled // @setter enable, disable // @visibility external // @group enable //< //disabled:false, //> @attr canvas.enabled (boolean : "unset" : IRWA) // If set to true, this widget will be enabled, if set to false, or null, this // widget will be disabled. // @visibility external // @group enable // @deprecated As of SmartClient version 5.5 this property has been deprecated. The // +link{canvas.disabled} property will be used to govern enabled/disabled state instead // if <code>this.enabled</code> has not been changed from its default value. //< _$unset:"unset", enabled:"unset", //> @attr canvas.redrawOnDisable (boolean : false : IRWA) // do we redraw when the disabled state changes ? // @group drawing, enable //< redrawOnDisable:false, //> @attr canvas.redrawOnEnable (boolean : false : IRWA) // do we redraw when the enabled state changes ? // @group drawing, enable // @deprecated As of SmartClient 5.5 use +link{canvas.redrawOnDisable} instead //< // Peers: for which actions should we mimic what the master does? // -------------------------------------------------------------------------------------------- //> @attr canvas._redrawWithMaster (boolean : true : IRWA) // For a peer, should we redraw automatically when our masterElement is redrawn? // @group drawing, containment //< _redrawWithMaster:true, //> @attr canvas._resizeWithMaster (boolean : true : IRWA) // For a peer, should we resize automatically when our masterElement is resized? // @group drawing, containment //< _resizeWithMaster:true, //> @attr canvas._moveWithMaster (boolean : true : IRWA) // For a peer, should we move automatically when our masterElement moves? // @group drawing, containment //< _moveWithMaster:true, //> @attr canvas._setOpacityWithMaster (boolean : true : IRWA) // For a peer, should our opacity be automatically updated to match that of our // masterElement that changes? // @group drawing, containment //< _setOpacityWithMaster:true, //> @attr canvas.redrawOnResize (boolean : true : IRWA) // Should this element be redrawn in response to a resize? // <P> // Should be set to true for components whose +link{getInnerHTML,inner HTML} will not // automatically reflow to fit the component's new size. // // @group drawing // @visibility external //< //> @attr canvas._showWithMaster (boolean : true : IRWA) // For a peer, should we be shown automatically when our master is shown? // @group drawing, containment //< _showWithMaster:true, // -------------------------------------------------------------------------------------------- //> @attr canvas._redrawWithParent (boolean : true : IRWA) // Should we redraw automatically when our parentElement is redrawn? // Turn this off ONLY if you're completely committed to redrawing an element // manually yourself. // @group drawing, containment //< _redrawWithParent:true, // Focus // -------------------------------------------------------------------------------------------- //> @attr canvas.hasFocus (boolean : false : IRWA) // Do we have the focus? // @group focus //< //> @attr canvas.canFocus (boolean : null : IRWA) // Can this widget be allowed to become the target of keyboard events? // <P> // If canFocus is unset (the default), only scrollable widgets with visible scrollbars are // focusable, to allow for keyboard scrolling. // <P> // A widget normally receives focus by being clicked on or tabbed to. // // @group focus, events // @setter setCanFocus() // @visibility external // @example focus //< //> @attr canvas.showeFocusOutline (boolean : true : IRWA) // For focusable widgets, should the native dotted focus outline be shown, where supported? // @visibility internal //< showFocusOutline:true, //> @attr canvas.redrawOnFocus (boolean : false : IRWA) // should we redraw automatically when this object accepts the focus? // @group drawing, focus //< //> @attr canvas.tabIndex (number : null : IRWA) // If specified this governs the tabIndex of the widget in the page's tab order. // Note that by default SmartClient auto-assigns tab-indices, ensuring focusable widgets // are reachable by tabbing in the order in which they are drawn on the page. // <code>canvas.tabIndex</code> cannot be set to greater than // +link{classAttr:Canvas.TAB_INDEX_FLOOR} - as we reserve the values above this range for // auto-assigned tab-indices. // @group focus // @visibility external //< // Some comments on manual assignment of tabIndex: // - useful for inserting into native tab order: // - setting tabIndex to 0 to allow an ISC widget to be inserted into the native, automatic // tab order of a series of native elements which surround it and which have no tabIndex // assigned (where the ISC widget would be drawn either relpos or via Canvas.drawContext) // - setting explicit tabIndex to allow an ISC widget to be inserted into a series of // native elements with explicit tab indices // - NOTE: with both of the above use cases, if a compound widget is inserted, all // focuseable children will need an explicit tabIndex. In some cases this works // automatically, eg, in a ListGrid, the body and header recieve the same tabIndex by // default // - Cannot be used to slot a widget into the middle of the ISC auto-assigned tab loop, // as we enforce the TAB_INDEX_FLOOR upper limit on manually assigne tabindices _useNativeTabIndex:(isc.Browser.isIE && isc.Browser.version >= 5) || (isc.Browser.isMoz && isc.Browser.geckoVersion >= 20051111), _useFocusProxy:(isc.Browser.isMoz && isc.Browser.geckoVersion < 20051111) || isc.Browser.isSafari || isc.Browser.isOpera, //> @attr canvas.accessKey (string : null : IRWA) // If specified this governs the accessKey for the widget. // This should be set to a character - when a user hits Alt+[accessKey], or in Mozilla // Firefox 2.0 and above, Shift+Alt+[accessKey], focus will be given to the widget in // question. // @group focus // @visibility external //< // Context Menu // -------------------------------------------------------------------------------------------- //> @attr canvas.contextMenu (Menu : null : IRWA) // Context menu to show for this object, an instance of the Menu widget. // @group cues // @see canvas.showContextMenu() // @visibility external // @example contextMenus //< //> @attr canvas.contextMenuProperties (object : object : IRW) // Default properties for automatically generated context menus //< contextMenuProperties:{ autoDraw:false, width:200, showIcons:true }, //>CornerClips // ----------------------------------------------------------------------------------------- //> @attr canvas.clipCorners (boolean : false : [IR]) // Whether to clip corners // @visibility cornerClips //< //clipCorners:false, //> @attr canvas.clippedCorners (Array : ["TL", "TR", "BL", "BR"] : [IR]) // List of corners that should be clipped // @visibility cornerClips //< clippedCorners:["TL","TR","BL","BR"], //> @attr canvas.noCornerClipImages (boolean : false : [IR]) // For development purposes, create corner clips without requiring images. Only works for // corners where width and height are equal. // <P> // Highly experimental and IE specific. // // @visibility cornerClips //< //noCornerClipImages:false, //> @attr canvas.cornerClipColor (cssColor : "FFFFFF" : [IR]) // HEX color code (WITHOUT #) to match the background. // // @visibility cornerClips //< cornerClipColor:"FFFFFF", //> @attr canvas.cornerClipImage (SCImgURL : "[SKIN]roundcorner.gif" : [IR]) // Base name of image to use for corner clipping images. // <P> // The full name of each corner image is (base + color + corner name), eg, // "roundcorner_FFFFFF_TL.gif" // // @visibility cornerClips //< cornerClipImage:"[SKIN]corner.gif", //> @attr canvas.cornerClipSize (number of pixels : 10 : [IR]) // Size in pixels for corner clips // @visibility cornerClips //< cornerClipSize:10, //> @attr canvas.cornerClipWidth (number of pixels : null : [IR]) // Width in pixels for corner clips. Defaults to cornerClipSize when unset. // @visibility cornerClips //< //> @attr canvas.cornerClipHeight (number of pixels : null : [IR]) // Height in pixels for corner clips. Defaults to cornerClipSize when unset. // @visibility cornerClips //< //_cornerClips:null, // refs to the generated corner cap elements _cornerProperties:{ _generated:true, overflow:"hidden", _redrawWithMaster:false, _resizeWithMaster:false, autoDraw:false, skinImgDir:"images/corners/", // scroll cornercap contents to appropriate position after drawing // (should only apply to no-image corners) draw : function () { this.Super("draw",arguments); } }, //<CornerClips // -------------------------------------------------------------------------------------------- //> @attr canvas.prompt (string: null : IRW) // Prompt displayed in hover canvas if +link{canvas.showHover,showHover} is true. // @visibility external // @group hovers // @example customHovers //< // Drag and Drop // -------------------------------------------------------------------------------------------- //> @attr canvas.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -