📄 window.js
字号:
//> @attr window.autoSize (boolean : false : [IRW]) // If true, the window is resize automatically to accommodate the contents // of the body, if they would otherwise require scrolling. // @visibility external // @group appearance // @example windowAutosize //< autoSize:false, // Header and Header Components // ---------------------------------------------------------------------------------------------- //> @attr window.header (AutoChild : null : R) // Header for the Window, based on an HLayout // @visibility external //< //> @attr window.showHeader (boolean : true : IRWA) // If true, show a header for this Window, including title, closebox, etc. // @visibility external // @group appearance, header //< showHeader:true, headerConstructor:"HLayout", //> @attr window.headerBackground (AutoChild : null : R) // Img background component for the header, for gradient or image-based display // @visibility external //< //>@attr window.showHeaderBackground (boolean : varies : IRA) // Should the window header show a background image? Default value is true for all browsers // except for Internet Explorer.<br> // If set to true the image source is derived from +link{window.headerSrc} and // +link{window.hiliteHeaderSrc}, otherwise the background will be styled according to // +link{window.headerStyle} / +link{window.hiliteHeaderStyle}. // @group appearance, header // @visibility external //< // By default, we assume CSS will be used in recent IE, and media otherwise, since the // typical presentation is a gradient. showHeaderBackground : !(isc.Browser.isIE && !isc.Browser.isStrict && isc.Browser.minorVersion >= 5.5), headerBackgroundConstructor: "Img", headerBackgroundDefaults : { width:"100%", height:"100%", // background is a non-member child of the header, which is a Layout addAsChild:true, // applicable to StretchImgs only vertical:false, capSize:10 }, //> @attr window.headerStyle (CSSStyleName : "WindowHeader" : [IRWA]) // Style for the Window header. // @visibility external // @group appearance, header //< headerStyle:"windowHeader", //> @attr window.headerSrc (SCImgURL : "[SKIN]Window/headerGradient.gif" | null : [IRWA]) // If +link{window.showHeaderBackground} is <code>true</code>, this property provides // the URL of the background image for the header. // @group appearance, header // @visibility external //< headerSrc:(!(isc.Browser.isIE && !isc.Browser.isStrict && isc.Browser.minorVersion >= 5.5) ? "[SKIN]Window/headerGradient.gif" : null), headerDefaults:{ // Note - other defaults applied in Window.makeHeader() height:18, layoutMargin:1, membersMargin:2, overflow:isc.Canvas.HIDDEN }, //> @attr window.headerControls (Array of String : (see below) : IR) // Array of members to show in the Window header. // <P> // The default value of <code>headerControls</code> is an Array of Strings listing the // standard header controls in their default order: // <pre> // headerControls : ["headerIcon", "headerLabel", // "minimizeButton", "maximizeButton", "closeButton"] // </pre> // You can override <code>headerControls</code> to change the order of standard controls in // the header. You can also omit standard controls this way, although it more efficient to // use the related "show" property if available (eg +link{showMinimizeButton}). // <P> // By embedding a Canvas directly in this list you can add arbitrary additional controls to // the header, for example, an additional button (eg return to dock) or a DynamicForm with // various kinds of input controls. Tip: custom controls need to set layoutAlign:"center" // to appear vertically centered. // // @visibility external // @example windowHeaderControls //< headerControls : ["headerIcon", "headerLabel", "minimizeButton", "maximizeButton", "closeButton"], // Flashing // --------------------------------------------------------------------------------------- //> @attr window.hiliteHeaderStyle (CSSStyleName : "WindowHeader" : [IRWA]) // Highlight style for the Window header. Displayed when a window // is +link{window.flash(), flashed} // @group appearance, header // @visibility external //< hiliteHeaderStyle:"windowHeaderHilite", //> @attr window.hiliteHeaderSrc (SCImgURL : "[SKIN]Window/headerGradient_hilite.gif" | null : [IRWA]) // If +link{Window.showHeaderBackground} is true, this governs the URL of the image to // use in the header's highlighted state when the window is +link{window.flash(), flashed} // @group appearance, header // @visibility external //< hiliteHeaderSrc:(!(isc.Browser.isIE && isc.Browser.minorVersion >= 5.5) ? "[SKIN]Window/headerGradient_hilite.gif" : null), // HeaderLabel settings // -------------------------------------------------------------------------------------------- //> @attr window.headerLabel (AutoChild : null : R) // Label that shows Window title in header. // @visibility external //< //> @attr window.showTitle (boolean : true : [IRW]) // Show a title (typically just text) on the header for this window. // @visibility external // @group appearance, headerLabel //< showTitle:true, //> @attr window.title (string : "Untitled Window" : [IRW]) // title for this Window, shown in the header (if drawn) // @visibility external // @group appearance, headerLabel, i18nMessages //< title:"Untitled Window", //> @attr window.headerLabelConstructor (Class : Label : IRWA) // The headerLabel for a Window, if shown, will be an instance of this class. // @group appearance, headerLabel //< headerLabelConstructor:"Label", //> @attr window.headerLabelDefaults (Object : see below : IRWA) // // This is an object literal property block specifying various properties of the header // label that displays the +link{Window.title}. Overrideable defaults are as follows: // <ul> // <li>styleName- defaults to <code>"windowHeaderText"</code> and specifies the css style // that is used to render the +link{Window.title} text. // </ul> // You can override the the above propertites by calling +link{Class.changeDefaults()}. // // @group appearance, headerLabel // @visibility external //< // // Default properties for the headerLabel of the Window you can change the class-level // headerLabelDefaults for all Windows by changing this item or set instance.headerLabel to be // another object of properties to override for your instance only headerLabelDefaults:{ wrap:false, align:isc.Canvas.LEFT, styleName:"windowHeaderText", width:10, inherentWidth:true }, // Header icon // -------------------------------------------------------------------------------------------- //> @attr window.headerIcon (AutoChild : null : R) // Header icon shown at left end of header by default. // @visibility external //< //> @attr window.showHeaderIcon (boolean : true : [IRW]) // If true, we show an icon on the left in the header. // @visibility external // @group appearance, header //< showHeaderIcon:true, //> @attr window.headerIconConstructor (Class : Img : IRWA) // The headerIcon for a Window, if shown, // will be an instance of this class. // @group appearance, header //< headerIconConstructor:"Img", //> @attr window.headerIconDefaults (object : ... : IRWA) // // This is an object literal property block specifying the various properties of the // headerIcon - the icon that appears at the top left of the window and is by default the // Isomorphic logo. Overrideable defaults are as follows: // <ul> // <li>width - default to <code>16</code> and specifies the width of the headerIcon. // <li>height - default to <code>14</code> and specifies the height of the headerIcon. // <li>src - defaults to <code>"[SKIN]/Window/minimize.gif"</code> and specifies the image // for the headerIcon. // </ul> // You can override the the above propertites by calling +link{Class.changeDefaults()}. // // @group appearance, header // @visibility external //< headerIconDefaults:{ width:16, height:16, layoutAlign:"center", src:"[SKIN]/Window/headerIcon.gif" }, // Header buttons // -------------------------------------------------------------------------------------------- //> @attr window.canFocusInHeaderButtons (boolean : false : [IRWA]) // If true, the user can give the header buttons keyboard focus (by clicking on // them and including them in the tabOrder) // @visibility external // @group focus, header //< // Note: this property is applied to the header buttons when they are initialized. canFocusInHeaderButtons:false, // Close button // -------------------------------------------------------------------------------------------- //> @attr window.closeButton (AutoChild : null : R) // Button show in the header that will close this Window by calling +link{closeClick()}. // @visibility external //< //> @attr window.showCloseButton (boolean : true : [IRW]) // If true, show a close button in the header, which will dismiss this window by // calling +link{closeClick()}. // @group appearance, header // @visibility external //< showCloseButton:true, closeButtonConstructor:"ImgButton", closeButtonDefaults:{ width:16, height:14, layoutAlign:"center", src:"[SKIN]/Window/close.gif", click: function () {return this.creator._closeButtonClick()} }, // MinimizeButton (same button as for restoring) // -------------------------------------------------------------------------------------------- //> @attr window.minimizeButton (AutoChild : null : R) // ImgButton shown in the header that will minimize this Window by calling +link{minimize()}. // @visibility external //< //> @attr window.showMinimizeButton (boolean : true : [IRW]) // If true, show a minimize button in the header--clicking it minimizes the Window. // @visibility external // @group appearance, header //< showMinimizeButton:true, minimizeButtonConstructor:"ImgButton", minimizeButtonDefaults:{ width:16, height:14, layoutAlign:"center", src:"[SKIN]/Window/minimize.gif", click:function () { this.creator.minimize();return false } }, //> @attr window.minimized (boolean : false : [IRW]) // Is this window minimized. If true at init time, the window will be drawn minimized. // To set this property at runtime use +link{Window.minimize()} or +link{Window.restore()}. // @visibility external // @group appearance, header //< minimized:false, //> @attr window.defaultMinimizeHeight (number : 16 : [IRWA]) // If +link{window.minimizeHeight} is unset, by the window will shrink to the height of the // header when minimized. // <BR> // If there is no header, the <code>defaultMinimizeHeight</code> will be used instead. // @visibility external // @group appearance, header //< defaultMinimizeHeight:16, //> @attr window.minimizeHeight (number : null : [IRWA]) // Height for the window when minimized. // If unset the window will shrink to the height of the header, if present, otherwise // +link{window.defaultMinimizeHeight,this.defaultMinimizeHeight} // @visibility external // @group appearance, minimize //< //>Animation //> @attr window.animateMinimize (boolean: null : [IRWA]) // Should this window minimize, maximize, and restore as an animation, or as a // simple 1-step transition? // @visibility animation // @group appearance, header, animation // @example windowMinimize //< //animateMinimize:false, //> @attr window.minimizeTime (number : null : [IRWA]) // If this window is minimizeable, and animateMinimize is true, what should the duration of // the minize / maximize be (in ms)? If unset defaults to <code>canvas.animationTime</code>. // @visibility animation // @group appearance, header, animation // @example windowMinimize //< //minimizeTime : null, //> @attr window.minimizeAcceleration (AnimationAcceleration : null : IRWA) // Default acceleration function for performing an animated minimize / maximize. If unset, // <code>this.animateAcceleration</code> will be used by default instead // @visibility animation // @group appearance, header, animation //< //<Animation // RestoreButton - properties to make the minimize button a restore button. // -------------------------------------------------------------------------------------------- //> @attr window.restoreButton (AutoChild : null : R) // ImgButton that restores the Window via +link{restore()}. // @visibility external //< // Note: we currently actually apply these to the minimizeButton to change it on the fly, // we should probably just create both and hide/show restoreButtonDefaults:{ width:16, height:14, src:"[SKIN]/Window/restore.gif", layoutAlign:"center", click:function () { this.creator.restore();return false } }, // MaximizeButton // -------------------------------------------------------------------------------------------- //> @attr window.maximized (boolean : false : [IRW]) // Is this window maximized. If true at init time, the window will be drawn maximized. // To set this property at runtime use +link{window.maximize()} or +link{window.restore()}. // @visibility external // @group appearance, header //< minimized:false,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -