/* @license Copyright (C) Exontrol. All rights reserved. */ /////////////////////////////////////////////////////////// (exontrol.Surface) // // The exontrol.Surface class provides the following fields (public): // // Listeners {object}, holds a reference to exontrol.Lts which defines the events of the control. // Shortcuts {object}, holds a reference to exontrol.Sts which defines the shortcuts of the control. // // The exontrol.Surface class provides the following methods (public): // // Refresh(), refreshes the control // Smooth(callback, thisArg), performs a smooth-transition from a layout to another. The smooth-transition goes from the current layout to the new layout generated by the callback. // Smoothless(callback, thisArg), performs the callback with no smooth-transition (@since 2.0) // Update(callback, thisArg), locks the control's paint during the callback, and invalidates the control once the method ends // Home(), zooms to 100% and scrolls the control to origin (0,0) // FitToClient(rtLayout), ensures that the entire (null/undefined) or giving layout fits the control's client area // EnsureVisibleClient(clientA, bAllowChangeScale), ensures that the giving client fits the control's client area. // Selection/GetSelection()/SetSelection(value), gets or sets the control's selected-elements. // SelectAll, selects all elements within the control. // UnselectAll, clears the selection. // RemoveSelection(), deletes the selected-elements. // EnsureVisibleSelection(), scrolls the control's content to ensure that the control's selection fits the control's client area // Elements/GetElements() {exontrol.Surface.Elements}, returns the control's elements. // Links/GetLinks() {exontrol.Surface.Links}, returns the control's links. // Layout/GetLayout()/SetLayout(value) {string}, saves or loads the control's UI layout (@since 1.8) // Statistics/GetStatistics() {string}, gives statistics data of objects being hold by the control // Element(id) {Element}, gets the element giving its index, identifier/key or reference // Link(id) {Element}, gets the link giving its index, identifier/key or reference // Clear(), clears the elements and links of the surface (@since 2.0) // Cut(), moves the selection to the Clipboard // Copy(), copies the selection to the Clipboard // Paste(), pastes the contents of the Clipboard onto the surface. // // Options/GetOptions()/SetOptions(value) {exontrol.Def.Surface}, gets or sets the options of the exontrol.Surface control // Tfi/GetTfi()/SetTfi(value) {object}, specifies an object of {bold,italic,...}/exontrol.TFI type that defines font attributes to display the captions within the control. // Locked/GetLocked()/SetLocked(value) {boolean}, specifies whether the control is locked(protected) or unlocked // ReadOnly/GetReadOnly()/SetReadOnly(value) {boolean}, specifies whether the control is read-only // WheelChange/GetWheelChange()/SetWheelChange(value) {number}, defines the amount the control scrolls when the user rolls the mouse wheel. // Smooth/GetSmooth()/SetSmooth(value) {number}, defines the time in ms the control goes from one layout to another. // Margins/GetMargins()/SetMargins(value) {object}, specifies the control's margins // Zoom/GetZoom()/SetZoom(value) {number}, defines the zoom factor of the control's content. // ZoomLevels/GetZoomLevels()/SetZoomLevels(value) {string}, defines the zoom-levels the user can magnify the control's content // ScrollBarsHome/GetScrollBarsHome()/SetScrollBarsHome(value) {any}, defines the color to highlight the position of the origin (0,0) on the control's scroll bars // ScrollBarsLayout/GetScrollBarsLayout()/SetScrollBarsLayout(value) {any}, defines the color to highlight the position of current layout within the control's scrollbars // SingleSel/GetSingleSel()/SetSingleSel(value) {exontrol.Surface.SingleSelEnum}, specifies whether the control supports single, multiple, toggle selection. // Selection/GetSelection()/SetSelection(value) {any}, gets or sets the control's selected-elements. // FormatText/GetFormatText()/SetFormatText(value) {exontrol.DrawTextFormatEnum}, defines the global format to display the element's caption. // Pad/GetPad()/SetPad(value) {(number|string|array)}, defines the global format to display the element's caption. // ImageSize/GetImageSize()/SetImageSize(value) {any}, defines the global size of the element's image. The image can be added using the exontrol.HTMLPicture.Add() method // ImageAlign/GetImageAlign()/SetImageAlign(value) {number}, defines the global-alignment of the element's image relative to its caption. // Shapes/GetShapes()/SetShapes(value) {string}, defines the shapes each part of the control can display. The shapes field customizes the control's visual appearance. // Cursors/GetCursors()/SetCursors(value) {string}, defines the mouse cursor to display when pointing over different parts of the control. // ShowLinks/GetShowLinks()/SetShowLinks(value) {exontrol.ShowLinksEnum}, shows or hides the links between elements // ShowLinksOnCollapse/GetShowLinksOnCollapse()/SetShowLinksOnCollapse(value) {boolean}, shows or hides the links between collapsed elements // Link/GetLink()/SetLink(value) {object}, defines the appearance of the links between elements. // CollapsedLink/GetCollapsedLink()/SetCollapsedLink(value) {object}, defines the appearance of the links between collapsed elements. // LinkStartFrom/GetLinkStartFrom()/SetLinkStartFrom(value) {object}, specifies the appearance of the link that starts from any selected-element (outgoing links) // LinkEndTo/GetLinkEndTo()/SetLinkEndTo(value) {object}, specifies the appearance of the link that ends to any selected-element (incoming links) // LinkUnselected/GetLinkUnselected()/SetLinkUnselected(value) {object}, specifies the appearance of the link not related to any selected-element (unselected links) // AllowActions/GetAllowActions()/SetAllowActions(value) {string}, customizes the actions the user can perform once the control is clicked or touched. // ExpandGlyphSize/GetExpandGlyphSize()/SetExpandGlyphSize(value) {number}, defines the size to show the element's expand/collapse glyphs. // AllowChangeParent/GetAllowChangeParent()/SetAllowChangeParent(value) {boolean}, indicates whether the user can change the element's position or parent at runtime by drag and drop // Selements/GetSelements()/SetSelements(value) {string}, defines the elements from a string-representation. // Slinks/GetSlinks()/SetSlinks(value) {string}, defines the links between elements of the control from a string-representation. // AllowLinkControlPoint/GetAllowLinkControlPoint()/SetAllowLinkControlPoint(value) {exontrol.Surface.LinkControlPointEnum}, indicates the control points of the link, the user can use to customize the link's path. // Coord/GetCoord()/SetCoord(value) {exontrol.Surface.CoordEnum}, specifies the type of coordinates the elements of the surface display in. // ShowOrigin/GetShowOrigin()/SetShowOrigin(value) {boolean}, specifies whether the control shows or hides the origin. // Origin/GetOrigin()/SetOrigin(value) {object}, defines the appearance to draw the origin of the surface, as an object of {size, width, color, style, cap} type // ShowGridLines/GetShowGridLines()/SetShowGridLines(value) {boolean}, specifies whether the control shows or hides the grid-lines (minor and major grid-lines) // MinorGridLines/GetMinorGridLines()/SetMinorGridLines(value) {object}, defines the appearance of the surface's minor grid-lines, as an object of {step, width, color, style, cap} type // MajorGridLines/GetMajorGridLines()/SetMajorGridLines(value) {object}, defines the appearance of the surface's major grid-lines, as an object of {step, width, color, style, cap} type // ShowAxes/GetShowAxes()/SetShowAxes(value) {boolean}, specifies whether the control shows or hides the axes (horizonal and vertical axes) // Axes/GetAxes()/SetAxes(value) {object}, defines the appearance to draw the axes of the surface, as an object of {width, color, style, cap} type // AlignObjectsToGridLines/GetAlignObjectsToGridLines()/SetAlignObjectsToGridLines(value) {number}, specifies whether the objects are aligned to minor or major grid lines // AllowUndoRedo/GetAllowUndoRedo()/SetAllowUndoRedo(value) {boolean}, enables or disables the Undo/Redo feature (@since 2.0) // UndoRedoQueueLength/GetUndoRedoQueueLength()/SetUndoRedoQueueLength(value) {number}, gets or sets the maximum number of Undo/Redo actions that may be stored to the control's queue (@since 2.0) // CanUndo() {boolean}, indicates whether the control can perform an Undo operation (@since 2.0) // CanRedo() {boolean}, indicates whether the control can perform a Redo operation (@since 2.0) // StartBlockUndoRedo(), records all next Undo/Redo operations into a block until the EndBlockUndoRedo method is called. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block (@since 2.0) // EndBlockUndoRedo(), ends recording the Undo/Redo operations as a block (@since 2.0) // BlockUndoRedo(callback, thisArg), records the Undo/Redo operations as a block. The BlockUndoRedo() method calls StartBlockUndoRedo / EndBlockUndoRedo methods (@since 2.0) // Undo(), undoes the last action or a sequence of actions. For instance, if an element has been moved, Undo means moves back the element to its position before move. The Undo and Redo features let you remove or repeat single or multiple UI actions, but all actions must be undone or redone in the order you did or undid them – you can't skip actions (@since 2.0) // Redo(), redoes the last action that was undone (reverses the Undo method). The Undo and Redo features let you remove or repeat single or multiple UI actions, but all actions must be undone or redone in the order you did or undid them – you can't skip actions (@since 2.0) // // Arrange(id, oDefArrange), arranges the elements based on their links. // Home(), zooms to 100% and scrolls the control to origin (0,0) // FitToClient(rtLayout), ensures that the entire (null/undefined) or giving layout fits the control's client area // Soom(zoomTo, oPointAbs, rgrOrigin), zooms or/and scrolls the control's content. // SelectAll, selects all elements within the control. // UnselectAll, clears the selection. // RemoveSelection(), removes/deletes the selected-elements. // EnsureVisibleSelection(), scrolls the control's content to ensure that the control's selection fits the control's client area // EnsureVisibleClient(clientA, bAllowChangeScale, bNearestFit), ensures that the giving client fits the control's client area. // // bU(), locks invalidating the control until the eU() method is called // eU(), invalidates the control // // The exontrol.Surface class provides the following events (through oLts): // // "onselchange", notifies your application that the control's selection has been changed. The onselchange's parameter could be any of the following: // // oEvent {null}, indicates that the control has no selected elements // oEvent {object}, indicates an object of exontrol.Surface.Element type that defines the control's single-element selected. // oEvent {array}, specifies an array of [exontrol.Surface.Element] type that holds all selected elements within the control // // "onclick", occurs once the user clicks or double-clicks an element. The onclick's parameter is: // // oEvent {object}, specifies an object of {element,link,dblClick,button,modifiers} type, that holds information about the element being clicked. // // oEvent.element {object}, specifies null or an object of exontrol.Surface.Element type that indicates the element being clicked // oEvent.link {object}, specifies null or an object of exontrol.Surface.Link type that indicates the link being clicked // oEvent.dblClick {boolean}, indicates whether the user clicks or double-clicks the element // oEvent.button {number}, indicates which button is pressed while clicking the element as 1 (left), 2 (right) or 4 (middle) // oEvent.modifiers {number}, specifies a combination of 1, 2, 4 and 16 according with modifier keys (ALT, CTRL, META and SHIFT), or 0 if no modifier keys // // "onanchorclick", (@since 2.2) occurs once the user clicks an anchor element (the ex-HTML part marks an anchor or hyperlink element). The onanchorclick's parameter is: // // oEvent {object}, specifies an object of {id,options} type, that holds information about the anchor being clicked. // // oEvent.id {string}, specifies null or the identifier of the anchor being clicked // oEvent.options {string}, specifies null or the options of the anchor being clicked // // "onchange", notifies your application that an element, or more has been changed (create, move/resize, link or expand/collapse). The onchange's parameter is: // // oEvent {object}, specifies an object of {element,action} type, that holds information about the element being changed. // // oEvent.element {object}, specifies an object of exontrol.Surface.Element type that indicates the element being changed // oEvent.action {string}, specifies the action such as "create", "move", "link" or "expand" the element is suffer // // "onscroll", (@since 1.8) notifies your application once the control's view is scrolled. The onscroll's parameter is: // // oEvent {object}, specifies an object of {view,type,value} type, that holds information about the view's scroll that has been changed as explained: // // oEvent.view {object}, specifies the view, where the scroll occurs // oEvent.type {exontrol.SB.ModeEnum}, specifies the view's scroll that has changed as 0(vertical), 1(horizontal) // oEvent.value {number}, specifies the scroll's value // /////////////////////////////////////////////////////////// (exontrol.Surface) /////////////////////////////////////////////////////////// (exontrol.Surface.Elements) // // The exontrol.Surface.Elements object holds a collection of exontrol.Surface.Element type (element of the control) // // The exontrol.Surface.Elements object provides the following methods: // // Add(oElementOpts) {exontrol.Surface.Element}, creates and adds a new element into the control // Create(client) {exontrol.Surface.Element}, creates and adds a new element by drag at specified position // OnCreate(oCreateOpts), customizes the options to create a new element, by drag. // Count/GetCount() {number}, returns the number of elements within the collection. // Item(id) {exontrol.Surface.Element}, gets the element giving its index, identifier/key or reference // Remove(id), removes the element giving its index, identifier/key or reference // Clear(), removes all elements of the control // Save() {string}, saves the control's elements to a string-representation. // Load(value) {string}, loads the control's elements from a string-representation. // /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// (exontrol.Surface.ElementOptions) // // The exontrol.Surface.ElementOptions class holds all options an element can display or own // // The exontrol.Surface.ElementOptions class defines the following fields: // // visible {boolean}, indicates whether the element is visible or hidden // enabled {boolean}, indicates whether the element is enabled or disabled // selectable {boolean}, indicates whether the user can select, move or resize the element // key {string}, specifies the key associated with the element // caption {string}, defines the element's caption // formatText {exontrol.DrawTextFormatEnum}, specifies the format to display the element's caption // pad {(number|string|array)}, defines the element's padding (space between the element's content and its border) // image {string}, specifies the name of the image/picture the element displays. The image can be added using the exontrol.HTMLPicture.Add() method // imageSize {any}, defines the size of the element's image // imageAlign {number}, defines the alignment of the image within the element // shape {any}, defines the shape for individual element // cursor {string}, defines the mouse-cursor for individual element // client {array}, defines the element's client area as an array of [x,y,width,height] type. // parent {any}, indicates the element's parent // expand {boolean}, specifies whether the element is expanded or collapsed // position {number}, specifies the element's position (an element with a 0-position is displayed on the background, while an element with a greater position is displayed on top) // autoSize {boolean}, auto-resizes the element to fit its content // resizable {boolean}, specifies whether the user can resize the element, by drag and drop // movable {boolean}, specifies whether the user can move the element, by drag and drop // /////////////////////////////////////////////////////////// exontrol.Surface.ElementOptions = { /** * @description The visible field indicates whether the element is visible or hidden. * @type {boolean} Specifies whether the element is visible or hidden. * @example * * false {boolean}, hides the element * true {boolean}, shows the element */ visible: true, /** * @description The enabled field indicates whether the element is enabled or disabled * @type {boolean} Specifies whether the element is enabled or disabled * @example * * false {boolean}, disables the element * true {boolean}, enables the element */ enabled: true, /** * @description The selectable field indicates whether the user can select, move or resize the element * @type {boolean} * @example * * false {boolean}, the user can't select, resize or move the element * true {boolean}, the user can select, resize or move the element */ selectable: true, /** * @description The key field specifies the key associated with the element. * @type {string} Specifies the key associated with the element. If no key is provided, the element's plain-caption can be used to request an item. The plain-caption includes no ex-HTML tags, such as , and so on * @example * * "logo" {string}, defines the element with the giving key (logo). You can use the Root.Item("logo") method to request the element giving its key. */ key: null, /** * @description The caption field defines the element's caption. * @type {string} Specifies the ex-HTML caption an element displays. * @example * * null {null}, indicates no caption * "caption" {string}, declares a plain-caption * "text" {string}, displays the text in bold * "logo" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add() method */ caption: null, /** * @description The formatText field specifies the format to display the element's caption. * @type {exontrol.DrawTextFormatEnum} A exontrol.DrawTextFormatEnum value that defines the format to show the element's caption. */ formatText: null, /** * @description The pad field defines the element's padding (space between the element's content and its border) * @type {(number|string|array)} A value that could be a numeric value, to pad horizontal and vertical size with the same value, or a "x,y" or [x,y] type to specify the padding on h/v size */ pad: null, /** * @description The image field specifies the name of the image/picture the element displays. The image can be added using the exontrol.HTMLPicture.Add() method * @type {string} Indicates the name of the image/picture the element displays. */ image: null, /** * @description The imageSize field defines the size of the element's image. * @type {undefined}, Indicates that the control's imageSize option is considered, so the element's image is measured according to the control's imageSize option. * @type {null}, Indicates that the element's image is displayed as it is (full-sized). * @type {numeric}, Specifies that the element's image is displayed into a square of giving size (same width and height). If 0 the element displays no image, if negative the element's image is stretched to giving square, else the element's picture is scaled to fit the giving rectangle. * @type {array}, Specifies an array of [aspect-width,aspect-height] type that defines the limits for width or/and height. The aspect-width and aspect-height define the width/height of the element's picture to scale or stretch to. */ imageSize: undefined, /** * @description The imageAlign field defines the alignment of the image within the element. * @type {number} Indicates the alignment of the image within the element as 0 (left, default), 1(right), 2(top) or 3(bottom). */ imageAlign: null, /** * @description The shape field defines the shape for individual element. * @type {any} A string expression that defines the shape for the element itself or an object of {normal,hover,click,disabled} type. The normal,hover,click and disabled are objects of exontrol.Def.Shape type. */ shape: null, /** * @description The cursor field defines the mouse-cursor for individual element. * @type {string} A string expression that defines the mouse-cursor for individual element. */ cursor: null, /** * @description The client field defines the element's client area as an array of [x,y,width,height] type. * @type {array} Defines the element's client area as an array of [x,y,width,height] type. * @example * * null {null}, defines an element quivalent with [0,0,32,32] * [0,0,128,128] {array}, defines the element at the center of the control of 128 x 128 pixels size */ client: null, /** * @description The parent field defines the element's parent. * @type {any} The parent field can be one of the following: * * parent {number}, indicates a numeric value that defines the index of the parent's element (0-based) * parent {string}, specifies a string expression that defines the identifier/key/plain-caption of the parent's element * parent {exontrol.Surface.Element}, specifies the object reference to the parent's element * * @example * * 0 {number}, indicates that the element with the index 0 is the parent of the current element * "key" {string}, specifies that the parent of the current element is the element with the giving key * */ parent: null, /** * @description The expand field indicates whether the element is expanded or collapsed. * @type {boolean} Indicates whether the element's children are shown(expanded) or hidden(collapsed) * @example * * false {boolean}, collapses the element * */ expand: true, /** * @description The position field specifies the element's position. An element with a 0-position is displayed on the background, while an element with a greater position is displayed on top. * @type {number} * @example * * 0 {number}, indicates the first-child of the parent element, or an element displayed on the background * * @since 2.0 */ position: null, /** * @description The autoSize field indicates whether the element's size is automatically computed based on its content * @type {boolean} Indicates whether the element is resized to fit its content * @example * * true {boolean}, the element is automatically resized to fit its content * * @since 2.2 */ autoSize: false, /** * @description The resizable field specifies whether the user can resize the element, by drag and drop * @type {boolean} Indicates whether the user element is resizable or fixed * @example * * false {boolean}, the user can not resize the element * * @since 2.2 */ resizable: true, /** * @description The movable field specifies whether the user can move the element, by drag and drop * @type {boolean} Indicates whether the user element is movable or fixed * @example * * false {boolean}, the user can not move the element (by drag and drop) * * @since 2.2 */ movable: true }; /////////////////////////////////////////////////////////// (exontrol.Surface.Element) // // The exontrol.Surface.Element object holds information(options) about an element within the control. // // The Add(oElementOpts) method of exontrol.Surface.Elements creates and adds a new element into the control. // // The exontrol.Surface.Element object provides the following methods: // // Options/GetOptions()/SetOptions(value) {exontrol.Surface.ElementOptions}, indicates the element's options (at once) such as visibility, caption and so on // Remove(), removes the element itself from elements collection ( equivalent of Elements.Remove(oElement) method ) // Index/GetIndex() {number}, returns the index of the element (0-based) // Position/GetPosition()/SetPosition(value) {number}, specifies the element's position (0-based) // BringToFront() {number}, moves the element to the top of the stacking order, so that it is in front of other elements (returns the element's previously position) // BringForward() {number}, moves the element up one level, so that it is closer to top of the stacking order (returns the element's previously position) // SendToBack() {number}, moves the element to the bottom of the stacking order, so that it is behind the other elements (returns the element's previously position) // SendBackward() {number}, moves the element down one level, so that it is closer to the bottom of the stacking order. // Key/GetKey()/SetKey(value) {boolean}, specifies the element's key (the Elements.Item(key) requests an element by its index, identifier/key or reference) // Visible/GetVisible()/SetVisible(value) {boolean}, shows or hides the element // Enabled/GetEnabled()/SetEnabled(value) {boolean}, enables or disables the element // Caption/GetCaption()/SetCaption(value) {string}, specifies the element's caption (ex-HTML format) // FormatText/GetFormatText()/SetFormatText(value) {exontrol.DrawTextFormatEnum}, defines the format to display the element's caption. // Pad/GetPad()/SetPad(value) {(number|string|array)}, defines the format to display the element's caption. // Image/GetImage()/SetImage(value) {string}, defines the element's image. The image can be added using the exontrol.HTMLPicture.Add() method // ImageSize/GetImageSize()/SetImageSize(value) {any}, defines the size of the element's image. The image can be added using the exontrol.HTMLPicture.Add() method // ImageAlign/GetImageAlign()/SetImageAlign(value) {number}, defines the alignment of the element's image relative to its caption. // Shape/GetShape()/SetShape(value) {any}, indicates the shape for the element itself. // Cursor/GetCursor()/SetCursor(value) {any}, the mouse cursor for the element itself. // Client/GetClient()/SetClient(value) {array}, specifies the element's client area. // Parent/GetParent()/SetParent(value) {any}, specifies the parent's element. // Expand/GetExpand()/SetExpand(value) {any}, expands or collapses the element // ToggleExpand(), toggles the element's expand state. For instance, if the element is expanded, the ToggleExpand() method collapses the element. // EnsureVisible(), expands the parent-elements and scrolls the control's content so the element fits the control's client area (@since 2.0) // AutoSize/GetAutoSize()/SetAutoSize(value) {boolean}, resizes the element to fit its content // Resizable/GetResizable()/SetResizable(value) {boolean}, specifies whether the user can resize the element, by drag and drop // Movable/GetMovable()/SetMovable(value) {boolean}, specifies whether the user can move the element, by drag and drop // /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// (exontrol.Surface.Links) // // The exontrol.Surface.Links object holds a collection of exontrol.Surface.Link type (link of the control) // // The exontrol.Surface.Links object provides the following methods: // // Add(oLinkOpts) {exontrol.Surface.Link}, creates and adds a new link into the control // Create(oFrom, oTo) {exontrol.Surface.Link}, creates and adds a link between from and to elements // OnCreate(oCreateOpts) {exontrol.Surface.Link}, customizes the options for the newly created link by drag // Count/GetCount() {number}, returns the number of links within the collection. // Item(id) {exontrol.Surface.Link}, gets the link giving its index, identifier/key or reference // Remove(id), removes the link giving its index, identifier/key or reference // Clear(), removes all links of the control // Save() {string}, saves the links between elements of the control to a string-representation. // Load(value) {string}, loads links between elements of the control from a string-representation. // /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// (exontrol.Surface.LinkOptions) // // The exontrol.Surface.LinkOptions class holds all options a link can display or own // // The exontrol.Surface.LinkOptions class defines the following fields: // // visible {boolean}, indicates whether the link is visible or hidden // key {string}, specifies the key associated with the link // caption {string}, defines the link's caption // from {any}, indicates the index, identifier/key or reference of the element the link starts from (in-element) // to {any}, indicates the index, identifier/key or reference of the element the link ends to (out-element) // link {object}, specifies the appearance of the link between elements // collapsedLink {object}, specifies the appearance of the link between collapsed elements // allowControlPoint {exontrol.Surface.LinkControlPointEnum}, defines the control points for an individual link, the user can use to customize the link // customPath {any}, specifies the link's custom path, as a string of x,y proportions separated by comma. // /////////////////////////////////////////////////////////// exontrol.Surface.LinkOptions = { /** * @description The visible field indicates whether the link is visible or hidden. * @type {boolean} Specifies whether the link is visible or hidden. * @example * * false {boolean}, hides the link * true {boolean}, shows the link */ visible: true, /** * @description The key field specifies the key associated with the link. * @type {string} Specifies the key associated with the link. If no key is provided, the link's plain-caption can be used to request an item. The plain-caption includes no ex-HTML tags, such as , and so on * @example * * "logo" {string}, defines the link with the giving key (logo). You can use the Root.Item("logo") method to request the link giving its key. */ key: null, /** * @description The caption field defines the link's caption. * @type {string} Specifies the ex-HTML caption a link displays. * @example * * null {null}, indicates no caption * "caption" {string}, declares a plain-caption * "text" {string}, displays the text in bold * "logo" {string}, displays the "logo" image. The image can be added using the exontrol.HTMLPicture.Add() method */ caption: null, /** * @description The from field indicates the index, identifier/key or reference of the element the link starts from (in-element) * @type {any} The from field could be any of the following: * * from {number}, indicates a numeric value that defines the index of the element * from {string}, specifies a string expression that defines the identifier/key/plain-caption of the element * from {exontrol.Surface.Element}, specifies the object reference to the element */ from: null, /** * @description The to field indicates the index, identifier/key or reference of the element the link ends to (out-element) * @type {any} The to field could be any of the following: * * to {number}, indicates a numeric value that defines the index of the element * to {string}, specifies a string expression that defines the identifier/key/plain-caption of the element * to {exontrol.Surface.Element}, specifies the object reference to the element */ to: null, /** * @description The link field specifies the appearance of the link between elements. * @type {object} Specifies the appearance of the link between elements. The link object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2) * arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to * */ link: null, /** * @description The collapsedLink field specifies the appearance of the link between collapsed elements. * @type {object} Specifies the appearance of the link between elements. The link object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2) * arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to * */ collapsedLink: null, /** * @description The allowControlPoint field defines the control points for an individual link, the user can use to customize the link. * @type {exontrol.Surface.LinkControlPointEnum} A combination of one or more exontrol.Surface.LinkControlPointEnum flags that determines the control points for an individual link, the user can use to customize the link. * * The exontrol.Surface.LinkControlPointEnum type defines the following flags: * * exNoControlPoint(0), the link displays no control points * exStartControlPoint(1), the link shows control point that changes the link's StartPos property (the exStartControlPoint point is marked with black squares) * exEndControlPoint(2), the link shows control point that changes the link's EndPos property (the exEndControlPoint point is marked with black squares) * exControlPoint(4), defines the corners of the link's path. You can remove a exControlPoint points by dragging to another, so intermediate exControlPoint points are removed. You can move all control points of the link at once, if SHIFT key is pressed (the exControlPoint points are marked black circles) * exMiddleControlPoint(8), defines the link's middle control points that are displayed between two exControlPoint points, to let the use add new exControlPoint points, to redefine the link's path (The exMiddleControlPoint points are marked with gray circles) * exOrthoArrange(0x10), specifies that the lines of the link are orthogonal arranged when the user drags and drops the middle or control-points of the path (excludes the start/end control-points) * * @example * * 0 or exontrol.Surface.LinkControlPointEnum.exNoControlPoint {number}, displays no link's control points * 3 or exontrol.Surface.LinkControlPointEnum.exStartControlPoint | exontrol.Surface.LinkControlPointEnum.exEndControlPoint {number}, displays link's start and end control points only * */ allowControlPoint: null, /** * @description The customPath field defines the link's custom path, as a string of x,y proportions separated by comma. Specifies the proportions of link's control-points, as a "x,y,x,y,x,y,...". The x, y are proportions of link's control-points relative to the start/end points of the link. The 0,0 indicates the link's start point, while 1,1 indicates the link's end point. * @type {string} * @example * * "0.5,0,0.5,1" defines the link to go from start (0,0) to (0.5,0), then (0.5,1), and finally to the end (1,1) * */ customPath: undefined }; /////////////////////////////////////////////////////////// (exontrol.Surface.Link) // // The exontrol.Surface.Link object holds information(options) about a link within the control. // // The Add(oLinkOpts) method of exontrol.Surface.Links creates and adds a new link into the control. // // The exontrol.Surface.Link object provides the following methods: // // Options/GetOptions()/SetOptions(value) {exontrol.Surface.LinkOptions}, indicates the link's options (at once) such as visibility, caption and so on // Remove(), removes the link itself from links collection ( equivalent of Links.Remove(oLink) method ) // EnsureVisible(), scrolls the control's content to ensure that the link fits the control's visible area (expands its from/to elements if case) (@since 2.0) // Index/GetIndex() {number}, returns the index of the link (0-based) // Key/GetKey()/SetKey(value) {boolean}, specifies the link's key (the Links.Item(key) requests a link by its index, identifier/key or reference) // Visible/GetVisible()/SetVisible(value) {boolean}, shows or hides the link // Caption/GetCaption()/SetCaption(value) {string}, specifies the link's caption (ex-HTML format) // FormatText/GetFormatText()/SetFormatText(value) {exontrol.DrawTextFormatEnum}, defines the format to display the link's caption. // From/GetFrom()/SetFrom(value) {any}, indicates the index, identifier/key or reference of the element the link starts from (in-element) // To/GetTo()/SetTo(value) {any}, indicates the index, identifier/key or reference of the element the link ends to (out-element) // Link/GetLink()/SetLink(value) {object}, defines the link's appearance as an object of {type,dir,width,color,arrow,arrowSize,arrowShape,style,startPos,endPos} type // CollapsedLink/GetCollapsedLink()/SetCollapsedLink(value) {object}, defines the link's appearance as an object of {type,dir,width,color,arrow,arrowSize,arrowShape,style,startPos,endPos} type, between collapsed elements // AllowControlPoint/GetAllowControlPoint()/SetAllowControlPoint(value) {exontrol.Surface.LinkControlPointEnum}, defines the control points for an individual link, the user can use to customize the link // CustomPath/GetCustomPath()/SetCustomPath(value) {any}, specifies the link's custom path, as a string of x,y proportions separated by comma // /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// (exontrol.Def.Surface) // // The exontrol.Def.Surface namespace provides definitions for different objects, primitives, objects of exontrol.Surface object // // The exontrol.Def.Surface namespace provides the following fields: // // scrollBars {exontrol.ScrollBarsEnum}, determines whether the control has horizontal and/or vertical scroll bars // scrollBarsHome {string}, specifies the color to highlight the position of the origin (0,0) on the control's scroll bars. // scrollBarsLayout {string}, specifies the color to highlight the position of the current layout within the control's scroll bars. // tfi {(string|object)}, holds the font attributes for captions within the control. The tfi field can be defined using a string representation such as "b monospace 16" or as an object such as {bold: true, fontName: "monospace", fontSize: 16}. // locked {boolean}, indicates whether the control is locked(protected) or unlocked // wheelChange {number}, specifies the amount the control scrolls when the user rolls the mouse wheel. // smooth {number}, defines the time in ms the control goes from one layout to another. // margins {object}, specifies control's margins. // shapes {string}, defines the shapes each part of the control can display. The shapes field customizes the control's visual appearance. // cursors {string}, specifies the mouse cursor to be displayed when pointing over a part of the control. // singleSel {exontrol.Surface.SingleSelEnum}, specifies whether the control supports single, multiple, toggle selection. // zoom {number}, defines the zoom factor of the control's content. The zoomLevels field defines the margins of the zoom-factor the control is allowed to magnify. // zoomLevels {string}, defines the zoom-levels the user can magnify the control's content // formatText {exontrol.DrawTextFormatEnum}, specifies the format to display the element's caption. // pad {(number|string|array)}, defines the element's padding (space between the element's content and its border) // imageSize {(null|number|array)}, defines the size of the element's image. // imageAlign {number}, defines the alignment of the image within the element. // showLinks {exontrol.ShowLinksEnum}, indicates whether the control shows or hides the links between elements. // showLinksOnCollapse {boolean}, specifies whether links between collapsed elements are visible or hidden. // collapsedLink {object}, specifies the appearance of the link between collapsed elements. // link {object}, specifies the appearance of the link between elements. // linkStartFrom {object}, specifies the appearance of the link that starts from any selected-element (outgoing links) // linkEndTo {object}, specifies the appearance of the link that ends to any selected-element (incoming links) // linkUnselected {object}, specifies the appearance of the link not related to any selected-element (unselected links) // allowActions {string}, customizes the actions the user can perform once the user clicks or touches the control. // expandGlyphSize {number}, specifies the size to show the element's expand/collapse glyphs. // allowChangeParent {boolean}, specifies whether the element's position or parent can be changed at runtime by drag and drop. // selements {string}, defines the elements of the control from a string-representation. // slinks {string}, defines the links between elements of the control from a string-representation. // defArrange {object}, holds different options to auto-arrange the elements using the Arrange method // allowLinkControlPoint {exontrol.Surface.LinkControlPointEnum}, indicates the control points of the link, the user can use to customize the link's path // coord {exontrol.Surface.CoordEnum}, specifies the type of coordinates the elements of the surface display in // showOrigin {boolean}, specifies whether the control shows or hides the origin // origin {object}, specifies the appearance to draw the origin of the surface, as an object of {size, width, color, style, cap} type // showGridLines {boolean}, specifies whether the control shows or hides the grid-lines (minor and major grid-lines) // minorGridLines {object}, defines the appearance of the surface's minor grid-lines, as an object of {step, width, color, style, cap} type // majorGridLines {object}, defines the appearance of the surface's major grid-lines, as an object of {step, width, color, style, cap} type // showAxes {boolean}, specifies whether the control shows or hides the axes (horizonal and vertical axes) // axes {object}, specifies the appearance to draw the axes of the surface, as an object of {width, color, style, cap} type // alignObjectsToGridLines {number}, specifies whether the objects are aligned to minor or major grid lines // selection {any}, defines the control's selection (@since 1.8) // allowUndoRedo {boolean}, enables or disables the Undo/Redo feature (@since 2.0) // undoRedoQueueLength {number}, gets or sets the maximum number of Undo/Redo actions that may be stored to the control's Undo/Redo queue (@since 2.0) /////////////////////////////////////////////////////////// /** * @description The exontrol.Def.Surface namespace provides definitions for different objects, primitives, objects of exontrol.Surface object */ exontrol.Def.Surface = { /** * @description The scrollBars field determines whether the control has horizontal and/or vertical scroll bars * @type {exontrol.ScrollBarsEnum} A combination of one or more exontrol.ScrollBarsEnum flags that determines whether the control has horizontal and/or vertical scroll bars. * * The exontrol.ScrollBarsEnum type defines the following flags: * * exNoScroll (0), specifies that no scroll bars are shown (scroll is not allowed) * exHorizontal (1), specifies that only horizontal scroll bars is shown * exVertical (2), specifies that only vertical scroll bars is shown * exBoth (3), specifies that both horizontal and vertical scroll bars are shown * exDisableNoHorizontal (5), specifies that the horizontal scroll bar is always shown, it is disabled if it is unnecessary * exDisableNoVertical (10), specifies that the vertical scroll bar is always shown, it is disabled if it is unnecessary * exDisableBoth (15), specifies that both horizontal and vertical scroll bars are always shown, disabled if they are unnecessary * exHScrollOnThumbRelease (0x100), specifies that the control's content is horizontally scrolled as soon as the user releases the thumb of the horizontal scroll bar (use this option to specify that the user scrolls the control's content when the thumb of the scroll box is released) * exVScrollOnThumbRelease (0x200), specifies that the control's content is vertically scrolled as soon as the user releases the thumb of the vertical scroll bar (use this option to specify that the user scrolls the control's content when the thumb of the scroll box is released) * exScrollOnThumbRelease (0x300), specifies that the control's content is scrolled as soon as the user releases the thumb of the horizontal scroll bar (use this option to specify that the user scrolls the control's content when the thumb of the scroll box is released) * exHScrollEmptySpace (0x400), allows empty space, when the control's content is horizontally scrolled to the end * exVScrollEmptySpace (0x800), allows empty space, when the control's content is vertically scrolled to the end * exScrollEmptySpace (0xC00), allows empty space, when the control's content is scrolled to the end * exExtendSBS (0x3000), specifies that the control's scroll-bars are visible only when cursor hovers the window. Also, the control's client area is extended on the scroll bars portion * exMinSBS (0xC000), specifies that the control's scroll-bars are shown as minimized * exHideSBS (0x10000), specifies that no scroll bars are shown (scroll is allowed) * * @example * * 0 or exontrol.ScrollBarsEnum.exNoScroll {number}, removes the control's scroll bars, so scroll is not allowed * 15 or exontrol.ScrollBarsEnum.exDisableBoth {number}, the control always displays the scroll bars, and they are active only if scroll is possible * 12291 or exontrol.ScrollBarsEnum.exBoth | exontrol.ScrollBarsEnum.exExtendSBS {number}, the control shows the scroll bars only if the cursor hovers the control, and the control scroll bars are hidden as soon as the cursor leaves the control */ scrollBars: exontrol.ScrollBarsEnum.exBoth, /** * @description The scrollBarsHome field specifies the color to highlight the position of the origin (0,0) on the control's scroll bars. * @type {string} Indicates null, to prevent showing the position of origin (0,0) on the control's scroll bars, or a CSS color * @example * * null {null}, hides the origin (0,0) on the control's scroll bar * "black" {string}, shows the origin (0,0) on the control's scroll bar in black */ scrollBarsHome: "black", /** * @description The scrollBarsLayout field specifies the color to highlight the position of the current layout within the control's scroll bars. * @type {string} Specifies null, to hide the position of the current layout within the control's scroll bars, or a CSS color * @example * * null {null}, hides the position of the current layout within the control's scroll bars. * "black" {string}, shows in black the position of the current layout within the control's scroll bars. */ scrollBarsLayout: "black", /** * @description The tfi field applies font attributes to captions within the control. The tfi field can be defined using a string representation such as "b monospace 16" or as an object such as {bold: true, fontName: "monospace", fontSize: 16}. * * The tfi field as string supports any of the following keywords (each keyword can be specified using first letters only such as "b" for "bold) separated by space characters: * * bold, displays the text in bold (equivalent of tag) * italic, displays the text in italics (equivalent of tag) * underline, underlines the text (equivalent of tag) * strikeout, specifies whether the text is strike-through (equivalent of tag) * , specifies the font's family (equivalent of tag) * , specifies the size of the font (equivalent of tag) * , specifies the text's foreground color (equivalent of tag) * , specifies the text's background color (equivalent of tag) * , defines the text's shadow (equivalent of tag) * , shows the text with outlined characters (CSScolor) (equivalent of tag) * , defines a gradient text (equivalent of tag) * * Any other word within the tfi field that's not recognized as a keyword is interpreted as: * * name of the font (not a number), specifies the font's family (equivalent of tag) * size of the font (number), specifies the size of the font (equivalent of tag) * * The tfi field as object supports any of the following fields: * * bold {boolean}, displays the text in bold (equivalent of tag) * italic {boolean}, displays the text in italics (equivalent of tag) * underline {boolean}, underlines the text (equivalent of tag) * strikeout {boolean}, specifies whether the text is strike-through (equivalent of tag) * fontName {string}, specifies the font's family (equivalent of tag) * fontSize {number}, specifies the size of the font (equivalent of tag) * fgColor {string}, specifies the text's foreground color (CSScolor) (equivalent of tag) * bgColor {string}, specifies the text's background color (CSScolor) (equivalent of tag) * shaColor {object}, specifies an object of {color, width, offset} type that defines the text's shadow (equivalent of tag), where: * color {string}, defines the color of the text's shadow (CSScolor) * width {number}, defines the size of the text's shadow * offset {number}, defines the offset to show the text's shadow relative to the text * outColor {string}, shows the text with outlined characters (CSScolor) (equivalent of tag) * graColor {object}, specifies an object of {color, mode, blend} type that defines a gradient text (equivalent of tag), where: * color {string}, defines the gradient-color (CSScolor) * mode {number}, defines the gradient mode as a value between 0 and 4 * blend {number}, defines the gradient blend as a value between 0 and 1 * * CSSColor or CSS legal color values can be specified by the following methods: * * Hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF. For example, #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00. * Hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF. For example, #0000ff80 defines a semi-transparent blue. * RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255. For example, rgb(0,0,255) defines the blue color. * RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, rgba(0,0,255,0.5) defines a semi-transparent blue. * HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors. For example, hsl(240, 100%, 50%) defines the blue color. * HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, hsla(240, 100%, 50%,0.5) defines a semi-transparent blue. * Predefined/Cross-browser color names, 140 color names are predefined in the HTML and CSS color specification. For example, blue defines the blue color. * * @type {(string|object)} * @example * * null {null}, the tfi field is ignored * "bold monospace 16" {string}, defines Monospace font of 16px height, bold * {bold: true, fontName: "monospace", fontSize: 16} {object}, defines Monospace font of 16px height, bold */ tfi: null, /** * @description The locked field indicates whether the control is locked(protected) or unlocked * @type {boolean} Specifies whether the control is protected. * @example * * false {boolean}, unlocks the control (can select any element) * true {boolean}, locks the control (can't select any element) */ locked: false, /** * @description The readOnly field indicates whether the control is read-only * @type {boolean} Specifies whether the control is read-only. * @example * * false {boolean}, the user can create, resize or move any element * true {boolean}, the user can not create, resize or move any element. */ readOnly: false, /** * @description The wheelChange field specifies the amount the control scrolls when the user rolls the mouse wheel. * @type {number} Specifies the amount the control scrolls when the user rolls the mouse wheel. * @example * * 0 {number}, locks any action the mouse's wheel performs * 18 {number}, scrolls the control by 18-pixels when mouse's wheel is rotated (CTRL + wheel scrolls horizontally) */ wheelChange: 18, /** * @description The smooth field defines the time in ms the control goes from one layout to another. * @type {number} Indicates the time in ms the control goes from one layout to another (125, by default). * @example * * 0 {number}, no smooth changes once the control goes from a layout to another * 125 {number}, specifies that a smooth-transition is performed from a layout to another for 125 ms. */ smooth: 125, /** * @description The margins field specifies control's margins. * @type {object} Indicates an object of {x,y,indent,border} type that horizontal, vertical and indent distance between elements. */ margins: { /** * @description The x field defines the horizontal distance between two visible neighbor elements. * @type {number} Specifies the horizontal distance between two visible neighbor elements. * @example * * 0 {number}, defines no horizontal distance between two visible neighbor elements * 16 {number}, defines 16-pixels horizontal distance between two visible neighbor elements */ x: 2, /** * @description The y field defines the vertical distance between two visible neighbor elements. * @type {number} Specifies the vertical distance between two visible neighbor elements. * @example * * 0 {number}, defines no vertical distance between two visible neighbor elements * 16 {number}, defines 16-pixels vertical distance between two visible neighbor elements */ y: 2, /** * @description The indent field defines the distance between a child element and its parent, while the elements are arranged as a tree. * @type {number} Specifies the distance between a child element and its parent, while the elements are arranged as a tree. * @example * * 0 {number}, defines no indention * 16 {number}, defines 16-pixels indention */ indent: 16, /** * @description The border field defines the distance between the elements and the border of the control. * @type {number} Specifies the distance between the elements and the border of the control. * @example * * 0 {number}, defines no space between control's borders and elements * 16 {number}, defines 16-pixels distance between the elements and the border of the control */ border: 16 }, /** * @description The shapes field defines the shapes each part of the control can display. The shapes field customizes the control's visual appearance. * @type {string} A string expression that defines the shapes each part of the control can display. * * The format of shapes property is: * * "shape(part),shape(part),..." * * where: * * "shape", defines the shape to apply on the UI part as one of the following: * * any of 140 color names any browser supports (such as red, blue, green, ...) * hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background) * hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background) * RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background) * RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background) * HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background) * HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background) * a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}') * specifies the name of the field within the exontrol.Shapes.Surface object (while it starts with a lowercase letter, such as element which refers to exontrol.Shapes.Surface.element shape) * specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape) * * "part", defines the name of the part the shape is applied on (as defined bellow) * * The shapes property supports any of the following parts: * * "element", defines the visual-appearance of all elements within the control * "link-bs", defines the visual-appearance of the link's start control-point (it changes the start-position of the link) * "link-be", defines the visual-appearance of the link's end control-point (it changes the end-position of the link) * "link-p", defines the visual-appearance of the link's intermediate control-point * "link-m", defines the visual-appearance of the link's middle control-point * "select", defines the visual-appearance of selected-element * "frameFit", defines the visual-appearance to display the frame while fitting objects into the control's client area by drag * "frameSel", defines the visual appearance to display a frame while selecting objects by drag * "frameDrag", specifies the visual appearance to display the frame while dragging the objects * "expand", specifies the visual appearance for expand/collapse glyphs * "multiSel", specifies the visual appearance to show the count of multiple-selected items * * @example * * null {null}, specifies the default visual appearance * "" {string}, no shape (no visual appearance is applied to any part of the control) * "red(element)", "#FF0000(element)", "rgb(255,0,0)(element)", "rgba(255,0,0,1)(element)" {string}, shows all-elements in red * '{"hover":{"frameColor":"black","pad":-0.5}}(element)' {string}, draws a black-frame arround the element being hovered * "xxx(d),yyy(d,m),zzz(y)" {string}, specifies that the exontrol.Shapes.Surface.xxx combined with exontrol.Shapes.Surface.yyy object defines the visual appearance of "d" part of the control, exontrol.Shapes.Surface.yyy object defines the visual appearance of "m" part of the control and exontrol.Shapes.Surface.zzz object defines the visual appearance of "y" part of the control */ shapes: "element(element),Expand(expand),FrameFit(frameFit),FrameSel(frameSel,select),shmulti(multiSel)", /** * @description The cursors field specifies the mouse cursor to be displayed when pointing over a part of the control. * @type {string} Specifies the mouse cursor to be displayed when pointing over a part of the control. * * The format of cursors property is: * * "cursor(part),cursor(part),..." * * where: * * "cursor", defines the CSS mouse cursor to display while cursor hovers the part * "part", defines the name of the part the cursor is applied on (as defined bellow) * * The cursors property supports any of the following parts: * * "element", defines the mouse-cursor when the mouse pointer hovers any element * "expand" (expand/collapse), defines the mouse-cursor when the mouse pointer hovers the element's expand/collapse glyphs * "anchor" (hyperlink), defines the mouse-cursor when the mouse pointer hovers the anchor (the ex-HTML part marks an anchor or hyperlink element) (@since 2.2) * "link-cp" (link-control-point), defines the mouse-cursor when the mouse pointer hovers any link's control point * "link-cp-all" (link-control-point-all), defines the mouse-cursor when the mouse pointer hovers any link's control point (while the link is orthogonally arranged by drag and drop ~ exOrthoArrange) * "link-cp-h" (link-control-point-horizontal), defines the mouse-cursor when the mouse pointer hovers a horizontal line (while the link is orthogonally arranged by drag and drop ~ exOrthoArrange) * "link-cp-v" (link-control-point-vertical), defines the mouse-cursor when the mouse pointer hovers a vertical line (while the link is orthogonally arranged by drag and drop ~ exOrthoArrange) * "drag-drop", defines the cursor while the node is being dragged using the "drag-drop" action * * @example * * "pointer(xxx,yy)" {string}, indicates that the "pointer" mouse cursor is shown while cursor hovers any "xxx" or "yyy" part of the control */ cursors: "pointer(element,link-cp,expand,drag-drop,anchor),all-scroll(link-cp-all),row-resize(link-cp-h),col-resize(link-cp-v)", /** * @description The singleSel field specifies whether the control supports single, multiple, toggle selection. * @type {exontrol.Surface.SingleSelEnum} Indicates whether the control supports single or multiple selection. * * The exontrol.Surface.SingleSelEnum type defines the following flags: * * exDisableSel(0), specifies that the control's selection is disabled (can not be combined with any other flags) * exEnableSel(1), specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set ) * exSingleSel(2), specifies that the user can select a element only * exToggleSel(4), specifies that the element's selection state is toggled once the user clicks a element. * exDisableCtrlSel(8), disables toggling the element's selection state when user clicks a element, while CTRL modifier key is pressed. * exDisableShiftSel(16), disables selecting elements using the SHIFT key. * exDisableDrag(32), disables selecting elements by drag. * * @example * * 0 or exontrol.Surface.SingleSelEnum.exDisableSel {number}, disables selecting any element * 3 or exontrol.Surface.SingleSelEnum.exSingleSel | exontrol.Surface.SingleSelEnum.exEnableSel {number}, enables control's single selection, so only a single element can be selected * 6 or exontrol.Surface.SingleSelEnum.exToggleSel | exontrol.Surface.SingleSelEnum.exSingleSel {number}, enables control's single and toggle selection, which means that once a element is selected it gets unselected once it is clicked, or reverse, and only a single-element can be selected at once. */ singleSel: exontrol.Surface.SingleSelEnum.exEnableSel, /** * @description The zoom field defines the zoom factor of the control's content. The zoomLevels field defines the margins of the zoom-factor the control is allowed to magnify. * @type {number} Indicates the content's zoom factor in percent. The zoom field can be any value between 10 (10%) and 1000 (1000%) * @example * * null {null}, Specifies normal-view (100%) * 150 {number}, Indicates that the control's content is magnfied to 150% */ zoom: 100, /** * @description The zoomLevels field defines the zoom-levels the user can magnify the control's content * @type {string} Specifies a list of numbers separated by comma that indicates the zoom-levels/zoom-margins the control's content is allowed to zoom * @example * * null {null}, Specifies that the control's zoom factor is always 100% * 150 {number}, Specifies that the control's zoom factor is always 150% * "50,100,200,350" {string}, Indicates that the zoom-factor can be any of selected values, and the margins of zoom-factor is 50% to 350% */ zoomLevels: "25,35,50,65,75,80,90,100,110,125,150,175,200,250,300,400,500", /** * @description The formatText field specifies the format to display the element's caption. * @type {exontrol.DrawTextFormatEnum} A combination of one or more exontrol.DrawTextFormatEnum flags that defines the format to show the element's caption. * * The exontrol.DrawTextFormatEnum type support the following flags: * * exTextAlignTop (0x00), justifies the text to the top of the rectangle * exTextAlignLeft (0x00), aligns text to the left * exTextAlignCenter (0x01), centers text horizontally in the rectangle * exTextAlignRight (0x02), aligns text to the right * exTextAlignVCenter (0x04), centers text vertically * exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle. * exTextAlignMask (0x0F), specifies the mask for text's alignment. * exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line. * exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line. * exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight. * exPlainText (0x80), treats the text as plain text. * exTextNoClip (0x0100), draws without clipping. * exHTMLTextNoColors (0x0200), ignores the and tags. * exTextCalcRect (0x0400), determines the width and height of the text. * exHTMLTextNoTags (0x0800), ignores all HTML tags. * exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash. * exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses. * exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses. * * @example * * null {null}, centers the caption * 32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line caption * 0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line caption right/bottom-aligned */ formatText: exontrol.DrawTextFormatEnum.exTextAlignCenter | exontrol.DrawTextFormatEnum.exTextAlignVCenter | exontrol.DrawTextFormatEnum.exTextWordBreak | exontrol.DrawTextFormatEnum.exTextWordEllipsis, /** * @description The pad field defines the element's padding (space between the element's content and its border) * @type {(number|string|array)} A value that could be a numeric value, to pad horizontal and vertical size with the same value, or a "x,y" or [x,y] type to specify the padding on h/v size * @example * * null {null}, indicates that the default-padding field is used ([4,4]) * 0 {number}, indicates no padding * "8,4" {string}, increases the element's width with 2 * 8-pixels and element's height with 2 * 4-pixels * [8,4] {array}, increases the element's width with 2 * 8-pixels and element's height with 2 * 4-pixels */ pad: [4,4], /** * @description The imageSize field defines the size of the element's image. * @type {(null|number|array)} Indicates the size of the element's image. * * The imageSize could be of one of the following types: * * {null}, Indicates that the element's image is displayed as it is (full-sized). * {number}, Specifies that the element's image is displayed into a square of giving size (same width and height). If 0 the element displays no image, if negative the element's image is stretched to giving square, else the element's picture is scaled to fit the giving rectangle. * {array}, Specifies an array of [aspect-width,aspect-height] type that defines the limits for width or/and height. The aspect-width and aspect-height define the width/height of the element's picture to scale or stretch to. * * @example * * null {null}, Indicates that the element's image is displayed as it is (full-sized). * 0 {number}, no image is displayed * 64 {number}, the image is scaled to fit a 64 x 64 rectangle * -64 {number}, the image is strected to a 64 x 64 rectangle * [32,64] {array}, scales the image to the largest ratio-rectangle (32 x 64) that fits the client * [-32,-64] {array}, stretches the image to a 32 x 64 rectangle */ imageSize: null, /** * @description The imageAlign field defines the alignment of the image within the element. * @type {number} Indicates the alignment of the image within the element. as 0 (left, default), 1(right), 2(top) or 3(bottom). * * The imageAlign propery can be any of the following: * * 0, the image is on the left of the element's caption * 1, the image is on the right of the element's caption * 2, the image is on the top of the element's caption * 3, the image is on the bottom of the element's caption * * @example * * null {null}, the image is on top of the element's cation (default value) * 1 {number}, the image is displayed to the right of the element's caption */ imageAlign: 2, /** * @description The showLinks field indicates whether the control shows or hides the links between elements. * @type {exontrol.ShowLinksEnum} Indicates a combination of one or more exontrol.ShowLinksEnum that defines whether the links between elements are visible or hidden * * The exontrol.ShowLinksEnum type supports the following flags: * * exHide (0), specifies that no links are visible * exExtended (0x01), specifies that links are shown as extended * exShow (0x02), specifies that links are visible (the links are always shown while not exHide) * exFront (0x10), specifies that links are shown in front (by default, the control are shown on the background) * exCrossRect (0x20), shows rectangular cross-links * exCrossTriangle (0x20), shows triangular cross-links * exCrossMixt (0x60), shows mixt cross-links * * @example * * 0 or exontrol.ShowLinksEnum.exHide {number}, hides the links * 1 or exontrol.ShowLinksEnum.exShow {number}, shows the links (on the background) * 33 or exontrol.ShowLinksEnum.exExtended | exontrol.ShowLinksEnum.exCrossRect {number}, shows "extended" and "cross" links */ showLinks: exontrol.ShowLinksEnum.exExtended | exontrol.ShowLinksEnum.exCrossRect, /** * @description The collapsedLink field specifies the appearance of the link between collapsed elements. * @type {object} Specifies the appearance of the link between collapsed elements. * * The link object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2) * arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to */ collapsedLink: { /** * @description The type field specifies the type of the link. * @type {exontrol.LinkTypeEnum} Indicates a value of exontrol.LinkTypeEnum type that defines the type of the link. * * The exontrol.LinkTypeEnum type defines the following values: * * exRect (0), defines a rectangular-link * exDirect (1), defines a direct-link * exStraight (2), defines a straight-link * exRound (3), defines a round-link * * @example * * null {null}, indicates the default type of link, which is similar with rectangular-link (equivalent of 0) * 0 or exontrol.LinkTypeEnum.exRect {null}, shows rectangular-links * 2 or exontrol.LinkTypeEnum.exStraight {null}, shows straight-links */ type: undefined, /** * @description The dir field specifies whether the link's direction is shown or hidden * @type {number} Indicates a numeric value that defines whether the link's direction is shown or hidden. * * The dir field can be any of the following values: * * 0, specifies that no direction for the link is shown * 1, shows the direction/arrow where the link begins * 2, shows the direction/arrow where the link ends * 3, shows the arrows on both sides * * If not specified, the option 2 is used by default. * * @example * * null {null}, shows the direction/arrow where the link ends (equivalent of 2) * 0 {number}, hides the link's direction * 3 {number}, shows the arrows on both sides */ dir: undefined, /** * @description The width field defines the size/width of the link. * @type {number} Specifies the size/width of the link. * @example * * null {null}, indicates links of 1-pixel wide * 2 {number}, indicates links of 2-pixels wide */ width: undefined, /** * @description The color field specifies the color to show the link * @type {string} Defines the color of the link as a CSS color format * @example * * null {null}, indicates a black link * "transparent" {string}, specifies a transparent link * "red" {string}, specifies a red link * "#00FF00" {string}, specifies a green link * "rgba(255,0,0,0.5)" {string}, indicates 50% red link */ color: "rgb(196,196,196)", /** * @description The arrow field indicates the arrow's color. * @type {string} Defines the color to show the link's arrow/direction into CSS color format * * If it is missing or not specified the arrow is shown using the link's color. * * @example * * null {null}, indicates that the link's color defines the color of the link's arrow * "transparent" {string}, specifies a transparent arrow * "red" {string}, specifies a red arrow * "#00FF00" {string}, specifies a green arrow * "rgba(255,0,0,0.5)" {string}, indicates 50% red arrow */ arrow: undefined, /** * @description The style field defines the style of the link * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null}, defines a solid grid-lines * [] {array}, indicates a solid grid-lines * 2 {number}, will become [2, 2, ...] * [5, 15, 25] {array}, will become [5, 15, 25, 5, 15, 25, ...] */ style: 2, /** * @description The startPos field defines the in-element's corners, the link can start from. * @type {any} Indicates a numeric or string value that defines the in-element's corners, the link can start from, as explained bellow: * * The startPos field can be: * * startPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element. * startPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * startPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element * exontrol.CT.TC {number}, indicates that the link always starts from the top-center point of the in-element * exontrol.CT.TL | exontrol.CT.TC | exontrol.CT.TR {number}, indicates that the link starts from the in-element's top side (the closest to out-element) * "MR" {string}, specifies that the link always starts from the middle-right point of the in-element * "TR,MR,BR" {string}, specifies that the link starts from the in-element's right side (the closest to out-element) */ startPos: undefined, /** * @description The endPos field defines the out-element's corners, the link can end into. * @type {any} Indicates a numeric or string value that defines the out-element's corners, the link can end into, as explained bellow: * * The endPos field can be: * * endPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the in-element's closest point to in-element * endPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * endPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the out-element's closest point to in-element * exontrol.CT.BC {number}, indicates that the link always ends into the bottom-center point of the out-element * exontrol.CT.BL | exontrol.CT.BC | exontrol.CT.BR {number}, indicates that the link ends into the out-element's bottom side (the closest to in-element) * "ML" {string}, specifies that the link always ends to the middle-left point of the out-element * "TL,ML,BL" {string}, specifies that the link ends into the out-element's left side (the closest to in-element) */ endPos: undefined }, /** * @description The link field specifies the appearance of the link between elements. * @type {object} Specifies the appearance of the link between elements. * * The link object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2) * arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to */ link: { /** * @description The type field specifies the type of the link. * @type {exontrol.LinkTypeEnum} Indicates a value of exontrol.LinkTypeEnum type that defines the type of the link. * * The exontrol.LinkTypeEnum type defines the following values: * * exRect (0), defines a rectangular-link * exDirect (1), defines a direct-link * exStraight (2), defines a straight-link * exRound (3), defines a round-link * * @example * * null {null}, indicates the default type of link, which is similar with rectangular-link (equivalent of 0) * 0 or exontrol.LinkTypeEnum.exRect {null}, shows rectangular-links * 2 or exontrol.LinkTypeEnum.exStraight {null}, shows straight-links */ type: undefined, /** * @description The dir field specifies whether the link's direction is shown or hidden * @type {number} Indicates a numeric value that defines whether the link's direction is shown or hidden. * * The dir field can be any of the following values: * * 0, specifies that no direction for the link is shown * 1, shows the direction/arrow where the link begins * 2, shows the direction/arrow where the link ends * 3, shows the arrows on both sides * * If not specified, the option 2 is used by default. * * @example * * null {null}, shows the direction/arrow where the link ends (equivalent of 2) * 0 {number}, hides the link's direction * 3 {number}, shows the arrows on both sides */ dir: undefined, /** * @description The width field defines the size/width of the link. * @type {number} Specifies the size/width of the link. * @example * * null {null}, indicates links of 1-pixel wide * 2 {number}, indicates links of 2-pixels wide */ width: undefined, /** * @description The color field specifies the color to show the link * @type {string} Defines the color of the link as a CSS color format * @example * * null {null}, indicates a black link * "transparent" {string}, specifies a transparent link * "red" {string}, specifies a red link * "#00FF00" {string}, specifies a green link * "rgba(255,0,0,0.5)" {string}, indicates 50% red link */ color: "rgb(128,128,128)", /** * @description The arrow field indicates the arrow's color. * @type {string} Defines the color to show the link's arrow/direction into CSS color format * * If it is missing or not specified the arrow is shown using the link's color. * * @example * * null {null}, indicates that the link's color defines the color of the link's arrow * "transparent" {string}, specifies a transparent arrow * "red" {string}, specifies a red arrow * "#00FF00" {string}, specifies a green arrow * "rgba(255,0,0,0.5)" {string}, indicates 50% red arrow */ arrow: undefined, /** * @description The style field defines the style of the link * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null}, defines a solid grid-lines * [] {array}, indicates a solid grid-lines * 2 {number}, will become [2, 2, ...] * [5, 15, 25] {array}, will become [5, 15, 25, 5, 15, 25, ...] */ style: undefined, /** * @description The startPos field defines the in-element's corners, the link can start from. * @type {any} Indicates a numeric or string value that defines the in-element's corners, the link can start from, as explained bellow: * * The startPos field can be: * * startPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element. * startPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * startPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element * exontrol.CT.TC {number}, indicates that the link always starts from the top-center point of the in-element * exontrol.CT.TL | exontrol.CT.TC | exontrol.CT.TR {number}, indicates that the link starts from the in-element's top side (the closest to out-element) * "MR" {string}, specifies that the link always starts from the middle-right point of the in-element * "TR,MR,BR" {string}, specifies that the link starts from the in-element's right side (the closest to out-element) */ startPos: undefined, /** * @description The endPos field defines the out-element's corners, the link can end into. * @type {any} Indicates a numeric or string value that defines the out-element's corners, the link can end into, as explained bellow: * * The endPos field can be: * * endPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the in-element's closest point to in-element * endPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * endPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the out-element's closest point to in-element * exontrol.CT.BC {number}, indicates that the link always ends into the bottom-center point of the out-element * exontrol.CT.BL | exontrol.CT.BC | exontrol.CT.BR {number}, indicates that the link ends into the out-element's bottom side (the closest to in-element) * "ML" {string}, specifies that the link always ends to the middle-left point of the out-element * "TL,ML,BL" {string}, specifies that the link ends into the out-element's left side (the closest to in-element) */ endPos: undefined }, /** * @description The linkStartFrom field specifies the appearance of the link that starts from any selected-bar (outgoing links) * @type {object} Specifies the appearance of the link that starts from any selected-bar (outgoing links). * * The linkStartFrom object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2) * arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to */ linkStartFrom: { /** * @description The type field specifies the type of the link. * @type {exontrol.LinkTypeEnum} Indicates a value of exontrol.LinkTypeEnum type that defines the type of the link. * * The exontrol.LinkTypeEnum type defines the following values: * * exRect (0), defines a rectangular-link * exDirect (1), defines a direct-link * exStraight (2), defines a straight-link * exRound (3), defines a round-link * * @example * * null {null}, indicates the default type of link, which is similar with rectangular-link (equivalent of 0) * 0 or exontrol.LinkTypeEnum.exRect {null}, shows rectangular-links * 2 or exontrol.LinkTypeEnum.exStraight {null}, shows straight-links */ type: undefined, /** * @description The dir field specifies whether the link's direction is shown or hidden * @type {number} Indicates a numeric value that defines whether the link's direction is shown or hidden. * * The dir field can be any of the following values: * * 0, specifies that no direction for the link is shown * 1, shows the direction/arrow where the link begins * 2, shows the direction/arrow where the link ends * 3, shows the arrows on both sides * * If not specified, the option 2 is used by default. * * @example * * null {null}, shows the direction/arrow where the link ends (equivalent of 2) * 0 {number}, hides the link's direction * 3 {number}, shows the arrows on both sides */ dir: undefined, /** * @description The width field defines the size/width of the link. * @type {number} Specifies the size/width of the link. * @example * * null {null}, indicates links of 1-pixel wide * 2 {number}, indicates links of 2-pixels wide */ width: undefined, /** * @description The color field specifies the color to show the link * @type {string} Defines the color of the link as a CSS color format * @example * * null {null}, indicates a black link * "transparent" {string}, specifies a transparent link * "red" {string}, specifies a red link * "#00FF00" {string}, specifies a green link * "rgba(255,0,0,0.5)" {string}, indicates 50% red link */ color: undefined, /** * @description The arrow field indicates the arrow's color. * @type {string} Defines the color to show the link's arrow/direction into CSS color format * * If it is missing or not specified the arrow is shown using the link's color. * * @example * * null {null}, indicates that the link's color defines the color of the link's arrow * "transparent" {string}, specifies a transparent arrow * "red" {string}, specifies a red arrow * "#00FF00" {string}, specifies a green arrow * "rgba(255,0,0,0.5)" {string}, indicates 50% red arrow */ arrow: undefined, /** * @description The style field defines the style of the link * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null}, defines a solid grid-lines * [] {array}, indicates a solid grid-lines * 2 {number}, will become [2, 2, ...] * [5, 15, 25] {array}, will become [5, 15, 25, 5, 15, 25, ...] */ style: undefined, /** * @description The startPos field defines the in-element's corners, the link can start from. * @type {any} Indicates a numeric or string value that defines the in-element's corners, the link can start from, as explained bellow: * * The startPos field can be: * * startPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element. * startPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * startPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element * exontrol.CT.TC {number}, indicates that the link always starts from the top-center point of the in-element * exontrol.CT.TL | exontrol.CT.TC | exontrol.CT.TR {number}, indicates that the link starts from the in-element's top side (the closest to out-element) * "MR" {string}, specifies that the link always starts from the middle-right point of the in-element * "TR,MR,BR" {string}, specifies that the link starts from the in-element's right side (the closest to out-element) */ startPos: undefined, /** * @description The endPos field defines the out-element's corners, the link can end into. * @type {any} Indicates a numeric or string value that defines the out-element's corners, the link can end into, as explained bellow: * * The endPos field can be: * * endPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the in-element's closest point to in-element * endPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * endPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the out-element's closest point to in-element * exontrol.CT.BC {number}, indicates that the link always ends into the bottom-center point of the out-element * exontrol.CT.BL | exontrol.CT.BC | exontrol.CT.BR {number}, indicates that the link ends into the out-element's bottom side (the closest to in-element) * "ML" {string}, specifies that the link always ends to the middle-left point of the out-element * "TL,ML,BL" {string}, specifies that the link ends into the out-element's left side (the closest to in-element) */ endPos: undefined }, /** * @description The linkEndTo field specifies the appearance of the link that ends to any selected-bar (incoming links) * @type {object} Specifies the appearance of the link that ends to any selected-bar (incoming links). * * The linkEndTo object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * arrowSize {number}, indicates the arrow's size. If it is missing or not specified the arrow's size is defined by link's width (1 by default) (@since 2.2) * arrowShape {object}, defines an object of exontrol.Def.Shape type to customize the shape of the link's arrow (for instance shows the link's arrow as a circle instead of a triangle) (@since 2.2) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to */ linkEndTo: { /** * @description The type field specifies the type of the link. * @type {exontrol.LinkTypeEnum} Indicates a value of exontrol.LinkTypeEnum type that defines the type of the link. * * The exontrol.LinkTypeEnum type defines the following values: * * exRect (0), defines a rectangular-link * exDirect (1), defines a direct-link * exStraight (2), defines a straight-link * exRound (3), defines a round-link * * @example * * null {null}, indicates the default type of link, which is similar with rectangular-link (equivalent of 0) * 0 or exontrol.LinkTypeEnum.exRect {null}, shows rectangular-links * 2 or exontrol.LinkTypeEnum.exStraight {null}, shows straight-links */ type: undefined, /** * @description The dir field specifies whether the link's direction is shown or hidden * @type {number} Indicates a numeric value that defines whether the link's direction is shown or hidden. * * The dir field can be any of the following values: * * 0, specifies that no direction for the link is shown * 1, shows the direction/arrow where the link begins * 2, shows the direction/arrow where the link ends * 3, shows the arrows on both sides * * If not specified, the option 2 is used by default. * * @example * * null {null}, shows the direction/arrow where the link ends (equivalent of 2) * 0 {number}, hides the link's direction * 3 {number}, shows the arrows on both sides */ dir: undefined, /** * @description The width field defines the size/width of the link. * @type {number} Specifies the size/width of the link. * @example * * null {null}, indicates links of 1-pixel wide * 2 {number}, indicates links of 2-pixels wide */ width: undefined, /** * @description The color field specifies the color to show the link * @type {string} Defines the color of the link as a CSS color format * @example * * null {null}, indicates a black link * "transparent" {string}, specifies a transparent link * "red" {string}, specifies a red link * "#00FF00" {string}, specifies a green link * "rgba(255,0,0,0.5)" {string}, indicates 50% red link */ color: undefined, /** * @description The arrow field indicates the arrow's color. * @type {string} Defines the color to show the link's arrow/direction into CSS color format * * If it is missing or not specified the arrow is shown using the link's color. * * @example * * null {null}, indicates that the link's color defines the color of the link's arrow * "transparent" {string}, specifies a transparent arrow * "red" {string}, specifies a red arrow * "#00FF00" {string}, specifies a green arrow * "rgba(255,0,0,0.5)" {string}, indicates 50% red arrow */ arrow: undefined, /** * @description The style field defines the style of the link * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null}, defines a solid grid-lines * [] {array}, indicates a solid grid-lines * 2 {number}, will become [2, 2, ...] * [5, 15, 25] {array}, will become [5, 15, 25, 5, 15, 25, ...] */ style: undefined, /** * @description The startPos field defines the in-element's corners, the link can start from. * @type {any} Indicates a numeric or string value that defines the in-element's corners, the link can start from, as explained bellow: * * The startPos field can be: * * startPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element. * startPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * startPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element * exontrol.CT.TC {number}, indicates that the link always starts from the top-center point of the in-element * exontrol.CT.TL | exontrol.CT.TC | exontrol.CT.TR {number}, indicates that the link starts from the in-element's top side (the closest to out-element) * "MR" {string}, specifies that the link always starts from the middle-right point of the in-element * "TR,MR,BR" {string}, specifies that the link starts from the in-element's right side (the closest to out-element) */ startPos: undefined, /** * @description The endPos field defines the out-element's corners, the link can end into. * @type {any} Indicates a numeric or string value that defines the out-element's corners, the link can end into, as explained bellow: * * The endPos field can be: * * endPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the in-element's closest point to in-element * endPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * endPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the out-element's closest point to in-element * exontrol.CT.BC {number}, indicates that the link always ends into the bottom-center point of the out-element * exontrol.CT.BL | exontrol.CT.BC | exontrol.CT.BR {number}, indicates that the link ends into the out-element's bottom side (the closest to in-element) * "ML" {string}, specifies that the link always ends to the middle-left point of the out-element * "TL,ML,BL" {string}, specifies that the link ends into the out-element's left side (the closest to in-element) */ endPos: undefined }, /** * @description The linkUnselected field specifies the appearance of the link not related to any selected-bar (unselected links) * @type {object} Specifies the appearance of the link not related to any selected-bar (unselected links). * * The linkUnselected object includes any of the following: * * type {exontrol.LinkTypeEnum}, specifies the type of the link as 0 (rectangular), 1 (direct), 2(straight) or 3(round) * dir {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides * width {number}, specifies the link's width or size (1 by default) * color {string}, indicates the link's color (partial-black by default) * arrow {string}, indicates the arrow's color. If it is missing or not specified the arrow is shown using the link's color (gray by default) * style {array}, specifies the link's dash pattern to show the lines (solid by default) * startPos {any}, indicates the list of corners of in-element, the link can start from * endPos {any}, indicates the list of corners of out-element, the link can end to */ linkUnselected: { /** * @description The type field specifies the type of the link. * @type {exontrol.LinkTypeEnum} Indicates a value of exontrol.LinkTypeEnum type that defines the type of the link. * * The exontrol.LinkTypeEnum type defines the following values: * * exRect (0), defines a rectangular-link * exDirect (1), defines a direct-link * exStraight (2), defines a straight-link * exRound (3), defines a round-link * * @example * * null {null}, indicates the default type of link, which is similar with rectangular-link (equivalent of 0) * 0 or exontrol.LinkTypeEnum.exRect {null}, shows rectangular-links * 2 or exontrol.LinkTypeEnum.exStraight {null}, shows straight-links */ type: undefined, /** * @description The dir field specifies whether the link's direction is shown or hidden * @type {number} Indicates a numeric value that defines whether the link's direction is shown or hidden. * * The dir field can be any of the following values: * * 0, specifies that no direction for the link is shown * 1, shows the direction/arrow where the link begins * 2, shows the direction/arrow where the link ends * 3, shows the arrows on both sides * * If not specified, the option 2 is used by default. * * @example * * null {null}, shows the direction/arrow where the link ends (equivalent of 2) * 0 {number}, hides the link's direction * 3 {number}, shows the arrows on both sides */ dir: undefined, /** * @description The width field defines the size/width of the link. * @type {number} Specifies the size/width of the link. * @example * * null {null}, indicates links of 1-pixel wide * 2 {number}, indicates links of 2-pixels wide */ width: undefined, /** * @description The color field specifies the color to show the link * @type {string} Defines the color of the link as a CSS color format * @example * * null {null}, indicates a black link * "transparent" {string}, specifies a transparent link * "red" {string}, specifies a red link * "#00FF00" {string}, specifies a green link * "rgba(255,0,0,0.5)" {string}, indicates 50% red link */ color: undefined, /** * @description The arrow field indicates the arrow's color. * @type {string} Defines the color to show the link's arrow/direction into CSS color format * * If it is missing or not specified the arrow is shown using the link's color. * * @example * * null {null}, indicates that the link's color defines the color of the link's arrow * "transparent" {string}, specifies a transparent arrow * "red" {string}, specifies a red arrow * "#00FF00" {string}, specifies a green arrow * "rgba(255,0,0,0.5)" {string}, indicates 50% red arrow */ arrow: undefined, /** * @description The style field defines the style of the link * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap (in coordinate space units). If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null}, defines a solid grid-lines * [] {array}, indicates a solid grid-lines * 2 {number}, will become [2, 2, ...] * [5, 15, 25] {array}, will become [5, 15, 25, 5, 15, 25, ...] */ style: undefined, /** * @description The startPos field defines the in-element's corners, the link can start from. * @type {any} Indicates a numeric or string value that defines the in-element's corners, the link can start from, as explained bellow: * * The startPos field can be: * * startPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element. * startPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * startPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link starts from the in-element's closest point to out-element * exontrol.CT.TC {number}, indicates that the link always starts from the top-center point of the in-element * exontrol.CT.TL | exontrol.CT.TC | exontrol.CT.TR {number}, indicates that the link starts from the in-element's top side (the closest to out-element) * "MR" {string}, specifies that the link always starts from the middle-right point of the in-element * "TR,MR,BR" {string}, specifies that the link starts from the in-element's right side (the closest to out-element) */ startPos: undefined, /** * @description The endPos field defines the out-element's corners, the link can end into. * @type {any} Indicates a numeric or string value that defines the out-element's corners, the link can end into, as explained bellow: * * The endPos field can be: * * endPos {undefined//null/0/false}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the in-element's closest point to in-element * endPos {number}, indicates an OR combination of one or more values of exontrol.CT type. * endPos {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" * * The exontrol.CT type defines the following values: * * TL (17 or 0x11), indicates the top-left corner, equivalent of "TL" * TC (18 or 0x12), indicates the top-center point, equivalent of "TC" * TR (20 or 0x14), indicates the top-right corner, equivalent of "TR" * ML (33 or 0x21), indicates the middle-left point, equivalent of "ML" * C (34 or 0x22), indicates the center of the object, equivalent of "C" * MR (36 or 0x24), indicates the middle-right point, equivalent of "MR" * BL (65 or 0x41), indicates the bottom-left corner, equivalent of "BL" * BC (66 or 0x42), indicates the bottom-center point, equivalent of "BC" * BR (68 or 0x44), Indicates the bottom-right corner, equivalent of "BR" * * @example * * null {null}, equivalent of ["TC","ML","BC","MR"], specifies that the link ends into the out-element's closest point to in-element * exontrol.CT.BC {number}, indicates that the link always ends into the bottom-center point of the out-element * exontrol.CT.BL | exontrol.CT.BC | exontrol.CT.BR {number}, indicates that the link ends into the out-element's bottom side (the closest to in-element) * "ML" {string}, specifies that the link always ends to the middle-left point of the out-element * "TL,ML,BL" {string}, specifies that the link ends into the out-element's left side (the closest to in-element) */ endPos: undefined }, /** * @description The showLinksOnCollapse field specifies whether links between collapsed elements are visible or hidden. * @type {boolean} Determines whether links between collapsed elements are visible or hidden. * * @example * * null {null}, shows links between collapsed elements * false {boolean}, hides the links between collapsed elements */ showLinksOnCollapse: true, /** * @description The allowActions field customizes the actions the user can perform once the user clicks or touches the control. * @type {string} Specifies the list and order of the actions the user can perform once the user clicks or touches the control. * * The format of allowActions field is: * * "action(shortcut,shortcut,...),action(shortcut,shortcut,...)..." * * where * * "action", indicates the name of the action. The "action" can have any of the following values: * * "scroll", scrolls the control's content by drag * "zoom", zooms the control's content at dragging-point * "fit", fits the drag-area into the control's client area * "select", selects elements by drag * "drag-drop", carries out the drag and drop of the element (the element can be dropped inside or outside of the control). The ExDrop(event, data) method of the target HTML element is invoked once the user drops the element. The event parameter holds information about the mouse/touch event once the element has been dropped. The data parameter holds information about the source-object that initiated the drag and drop operation, as an object of {object,source,client,shape} type. * "create", creates element by drag (not available if the control is read-only) * "move", moves or resizes elements by drag (not available if the control is read-only) * "link", links elements by drag (not available if the control is read-only). The "link" action allows flags such as: * [toggle], the link is removed if the linked-elements has already a link between * "link-cp", allows customization the link's path by drag (not available if the control is read-only). The "link-cp" action is not required and it has effect only if the control's allowLinkControlPoint property is not zero. For instance, is allowLinkControlPoint property is zero, the "link-cp" does nothing. * * "shortcut", defines the event's button or/and the modifier-keys that are required to perform the action. The "shortcut" is a combination of none, one or more of the following values: * * "Shift", indicates that the SHIFT key is pressed * "Ctrl" or "Control", indicates that the CTRL key is pressed * "Alt" or "Menu", indicates that the ALT key is pressed * "Meta" , indicates that the META key is pressed * "LButton", specifies that the mouse's left-button is pressed * "RButton", specifies that the mouse's right-button is pressed * "MButton", specifies that the mouse's middle/wheel-button is pressed * "Long", specifies that the action requires a "long" click/touch before run * "+", indicates AND between values * * @example * * null {null}, indicates the control's default allowActions value * "" {string}, specifies that no operation is allowed once the user clicks or touches the control * "scroll" {string}, specifies that only "scroll" operation is allowed, no matter of the event's button or modifier-keys is pressed. * "create(Alt+LButton),move,scroll" {string}, indicates that creating-elements is possible only if the user presses the mouse's left-button while ALT key is pressed, and "move" or "scroll" is possible no matter of the event's button or modifier-keys in this order. Also, if no "create"-operation is possible, do "move"-operation, if no "move"-operation is possible, do "scroll"-operation * */ allowActions: "fit(Shift+MButton,Ctrl+MButton,Alt+MButton),zoom(MButton),select(Shift,Ctrl),link(Alt)[toggle],create(Alt),move,scroll", /** * @description The expandGlyphSize field specifies the size to show the element's expand/collapse glyphs * @type {number} Indicates the size to show the element's expand/collapse glyphs * @example * * 0 {number}, displays no node's expand/collapse glyphs * 24 {number}, specifies a size of 24x24 to display the node's expand/collapse glyphs */ expandGlyphSize: 16, /** * @description The allowChangeParent field specifies whether the element's position or parent can be changed at runtime by drag and drop. * @type {boolean} Indicates whether the element's position or parent can be changed at runtime by drag and drop. * @example * * null {null}, allows element's parent or position to be changed at runtime by drag and drop. * false {boolean}, prevents changing the element's position or parent at runtime by drag and drop. */ allowChangeParent: true, /** * @description The selements field defines the elements of the control from a string-representation. * @type {string} Indicates the elements of the control. * * The format of the elements'string representation is (everything between () refers to children, and everything between [] refers to flags): * * "element1[flag=value]...[flag=value](sub-element1[flag=value]...[flag=value],...,sub-elementn[flag=value]...[flag=value]),...,elementn[flag=value]...[flag=value](sub-element1[flag=value]...[flag=value],...,sub-elementn[flag=value]...[flag=value])" * * The element1, sub-element1 ... elementn defines the caption for each element. * * The string representation supports the following flags: * * [key] {string}, specifies the element's key (Key/GetKey()/SetKey(value) methods of exontrol.Surface.Element). For instance, [key=root], specifies that the element's key is "root" * [vis]/[hid] {number}, shows or hides the element (Visible/GetVisible()/SetVisible(value) methods of exontrol.Surface.Element). For instance, [hid] or [vis=0], hides the element, while [vis=1] shows the element * [dis] {number}, enables or disables the element (Enabled/GetEnabled()/SetEnabled(value) methods of exontrol.Surface.Element). For instance, [dis] or [dis=0], disables the element, while [dis=1] enables the element * [nsel] {number}, indicates whether the user can select, resize or move the element (Selectable/GetSelectable()/SetSelectable(value) methods of exontrol.Surface.Element). For instance, [nsel] or [nsel=0], forces the element to be unselectable, while [nsel=1] makes the element selectable * [pos] {number}, changes the element's position (0-based) (Position/GetPosition()/SetPosition(value) methods of exontrol.Surface.Element). For instance, [pos=0] indicates that the element should be displayed first * [img] {string}, assigns a image/picture to the element (Image/GetImage()/SetImage(value) methods of exontrol.Surface.Element). For instance, [img=logo] assigns the "logo" picture to the element. The image can be added using the exontrol.HTMLPicture.Add() method. You can use the [simg] flag to define the element's image to be displayed on the "sub-items" portion of the control. * [imgs] {string}, defines the size of the element's image as a string of "aspect-width,aspect-height" type (without quotes) (ImageSize/GetImageSize()/SetImageSize(value) methods of exontrol.Surface.Element). For instance, [imgs=-32] stretches the element's image into a square of 32x32 size, while [imgs=32,32] fits the element's image into a square of 32x32 size. * [imga] {number}, specifies the alignment of the image within the element relative to its caption. The value of "imga" flag can be 0(left), 1(right), 2(top) or 3(bottom). (ImageAlign/GetImageAlign()/SetImageAlign(value) methods of exontrol.Surface.Element). For instance, [imga=3] aligns the element's image at the bottom of its box * [client] {string}, specifies the element's client-rectangle as a string of "x,y,width,height" type (without quotes) (Client/GetClient()/SetClient(value) methods of exontrol.Surface.Element). For instance, [client=0,0,128,128] specifies the element's client are to [0,0,128,128] * [coll] {string}, indicates a collapsed-element (Expand/GetExpand()/SetExpand(value) methods of exontrol.Surface.Element). For instance, [coll] or [coll=0], collapses the element, while [c=1] expands the element * [ft] {number}, specifies the format to display the element's caption. The value of "ft" flag can be a combination of one or more values of exontrol.DrawTextFormatEnum type (FormatText/GetFormatText()/SetFormatText(value) methods of exontrol.Surface.Element). For instance, [ft=32] displays the element's caption on a single line only. Carriage returns and line feeds do not break the line (32 indicates the value of exontrol.DrawTextFormatEnum.exTextSingleLine) * [pad] {string}, defines the element's padding (space between the element's content and its border) (Pad/GetPad()/SetPad(value) methods of exontrol.Surface.Element). For instance, [pad=4] defines a 4-pixels padding for all edges * [shape] {string}, defines the shape for individual element (Shape/GetShape()/SetShape(value) methods of exontrol.Surface.Element). For instance, [shape=Button] specifies that the element is shown as a "button". * [cursor] {string}, defines the mouse-cursor for individual element (Cursor/GetCursor()/SetCursor(value) methods of exontrol.Surface.Element). For instance, [cursor=wait] indicates that the "wait" mouse-cursor is displayed while the cursor hovers the element * [auto] {number}, resizes the element to fit its content (AutoSize/GetAutoSize()/SetAutoSize(value) methods of Surface.Element). For instance, [auto] resizes the element to fit its content * [nres] {number}, defines a non-resizable element (Resizable/GetResizable()/SetResizable(value) methods of Surface.Element). For instance, [nres] indicates that the user can not resize the element by drag and drop * [nmov] {number}, defines a non-movable element (Movable/GetMovable()/SetMovable(value) methods of Surface.Element). For instance, [nmov] indicates that the user can not move the element by drag and drop * * @example * * "" {string}, clears the elements collection * "A(A1,A2,A3),B[client=128,128,32,32](B1,B2(B2.1,B2.2),B3)" {string}, defines the element "A" with three child-elements "A1", "A2" and "A2", and element "B" with child-elements "B1", "B2", and "B3", also defines the "B2.1" and "B2.2" as children of element "B2" * "A[img=logo][hid],B[client=128,128,32,32][dis]" {string}, defines the element "A" hidden and with the image "logo" and element "B" as disabled. */ selements: null, /** * @description The slinks field defines the links between elements of the control from a string-representation. * @type {string} Indicates the links between elements of the control. * * The format of the links'string representation is (everything between () refers to children, and everything between [] refers to flags): * * "link1[flag=value]...[flag=value],...,linkn[flag=value]...[flag=value]" * * The link1, ... linkn defines the caption for each link. * * The string representation supports the following flags: * * [link] {string} (required), indicates the link's in-out elements in "from-to" format, where from/to indicates the element's key, plain-caption or index (0-based). For instance, [link=11-1], links the elements with index 11 and 1, or [link=root-1] links the element with the key "root" or plain-caption "root" with the element of index 1. * [key] {string}, specifies the link's key (Key/GetKey()/SetKey(value) methods of exontrol.Surface.Link). For instance, [key=root], specifies that the link's key is "root" * [vis]/[hid] {number}, shows or hides the link (Visible/GetVisible()/SetVisible(value) methods of exontrol.Surface.Link). For instance, [hid] or [vis=0], hides the link, while [vis=1] shows the link * [type] {number}, specifies the type of the link as a value of 0 (rectangular), 1 (direct), 2(straight) or 3(round). For instance, [type=3] defines a round-link * [dir] {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides. For instance, [dir=3] shows the arrows in both-directions of the link. * [width] {number}, specifies the link's width or size. For instance, [width=4] shows a wider link. * [color] {string}, indicates the link's color. For instance, [color=red] specifies a red-link. * [arrow] {string}, indicates the arrow's color. For instance, [arrow=#808080] shows the link's arrow in gray. * [style] {number}, specifies the link's dash pattern to show the lines. For instance, [style=2] shows a dotted-link * [startPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of in-element, where the link can start from. For instance, [startPos=TR,MR,BR] specifies that the link can start anywhere on the in-element's right-side * [endPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of out-element, where the link can end into. For instance, [endPos=TL,ML,BL] specifies that the link can end anywhere on the out-element's left-side * * The following flags have effect only when the link is shown between collapsed-elements * * [coll-type] {number}, specifies the type of the link as a value of 0 (rectangular), 1 (direct), 2(straight) or 3(round). For instance, [coll-type=3] defines a round-link * [coll-dir] {number}, specifies whether the link's direction is shown or hidden as 0 (hidden), 1(shows the direction/arrow where the link begins), 2(shows the direction where the link ends, default) or 3 shows the arrows in both sides. For instance, [coll-dir=3] shows the arrows in both-directions of the link. * [coll-width] {number}, specifies the link's width or size. For instance, [coll-width=4] shows a wider link. * [coll-color] {string}, indicates the link's color. For instance, [coll-color=red] specifies a red-link. * [coll-arrow] {string}, indicates the arrow's color. For instance, [coll-arrow=#808080] shows the link's arrow in gray. * [coll-style] {number}, specifies the link's dash pattern to show the lines. For instance, [coll-style=2] shows a dotted-link * [coll-startPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of in-element, where the link can start from. For instance, [coll-startPos=TR,MR,BR] specifies that the link can start anywhere on the in-element's right-side * [coll-endPos] {string}, indicates a list of corners separated by comma(,) which can be any of "TL", "TC", "TR", "ML", "MR", "BL", "BC" or "BR" of out-element, where the link can end into. For instance, [coll-endPos=TL,ML,BL] specifies that the link can end anywhere on the out-element's left-side * * @example * * "" {string}, clears all the links * "L1[link=A-B]" {string}, defines a link between elements with the key "A" and "B" with the caption "L1" * "L1[link=A-L],L2[link=A-0]" {string}, defines two links, one between "A" and "L" with the caption "L1", and another between "A" and element with the index 0, with the caption "L2" */ slinks: null, /** * @description The defArrange type holds different options as an object of {dir, dx, dy, align. compact} type to auto-arrange the elements using the Arrange method. * @type {object}, */ defArrange: { /** * @description The dir property specifies the direction to auto-arrange the elements. * @type {number} Specifies a numeric value as follows: * * 0 {number}, specifies horizontal arrangement, which indicates that the out-elements are arranged to the right. * 1 {number}, specifies vertical arrangement, which indicates that the out-elements are arranged to the bottom. * * Currently, any other value has no effect */ dir: 0, /** * @description The dx property specifies the distance between two auto-arranged elements on horizontal axis. You can use the dx field to increase or decrease the distance of the arranged elements. * @type {number} Specifies the distance between two auto-arranged elements on horizontal axis. */ dx: 36, /** * @description The dy property specifies the distance between two auto-arranged elements on vertical axis. You can use the dx field to increase or decrease the distance of the arranged elements. * @type {number} Specifies the distance between two auto-arranged elements on vertical axis. */ dy: 36, /** * @description The align property specifies the alignment of the elements relative to incoming/outgoing elements during the Arrange operation. * @type {number} Indicates a numeric value as follows: * * 0 {number}, indicates left/top alignment * 1 {number}, indicates center alignment * 2 {number}, specifies right/bottom alignment * */ align: 1, /** * @description The compact property compacts the layout during the Arrange method. * @type {boolean} Specifies whether the layout of elements is compacted during the Arrange method. */ compact: true }, /** * @description The allowLinkControlPoint field indicates the control points of the link, the user can use to customize the link's path. The property is applied to all links (unless the allowControlPoint property of the link indicates a different value) * @type {exontrol.Surface.LinkControlPointEnum} A combination of one or more exontrol.Surface.LinkControlPointEnum flags that determines the control points for an individual link, the user can use to customize the link. * * The exontrol.Surface.LinkControlPointEnum type defines the following flags: * * exNoControlPoint(0), the link displays no control points * exStartControlPoint(1), the link shows control point that changes the link's StartPos property (the exStartControlPoint point is marked with black squares) * exEndControlPoint(2), the link shows control point that changes the link's EndPos property (the exEndControlPoint point is marked with black squares) * exControlPoint(4), defines the corners of the link's path. You can remove a exControlPoint points by dragging to another, so intermediate exControlPoint points are removed. You can move all control points of the link at once, if SHIFT key is pressed (the exControlPoint points are marked black circles) * exMiddleControlPoint(8), defines the link's middle control points that are displayed between two exControlPoint points, to let the use add new exControlPoint points, to redefine the link's path (The exMiddleControlPoint points are marked with gray circles) * exOrthoArrange(0x10), specifies that the lines of the link are orthogonal arranged when the user drags and drops the middle or control-points of the path (excludes the start/end control-points) * * @example * * 0 or exontrol.Surface.LinkControlPointEnum.exNoControlPoint {number}, displays no link's control points (unless the link's allowControlPoint property is different) * 3 or exontrol.Surface.LinkControlPointEnum.exStartControlPoint | exontrol.Surface.LinkControlPointEnum.exEndControlPoint {number}, displays link's start and end control points only, for all links (unless the link's allowControlPoint property is different) * */ allowLinkControlPoint: exontrol.Surface.LinkControlPointEnum.exNoControlPoint, /** * @description The coord field specifies the type of coordinates the elements of the surface display in. * A combination of one or more Surface.CoordEnum flags that determines the type of coordinates the elements of the surface display in. * * The Surface.CoordEnum type defines the following flags: * * exDefCoord(0), the positive coordinates are shown right-down to origin of the surface. * exCartesian(1), the elements show in Cartesian coordinates. The positive coordinates are shown right-up to origin of the surface. * exAllowPositiveOnly(0x10), only the positive panel of the surface is shown. The exAllowPositiveOnly flag can be combined with exDefCoord or exCartesian value. For instance, the exCartesian + exAllowPositiveOnly indicates that surface displays only the positive coordinates in Cartesian system. * * @type {Surface.CoordEnum} * @example * * 0 or Surface.CoordEnum.exDefCoord {number}, displays elements as the positive coordinates are shown right-down to origin of the surface. * 17 or Surface.CoordEnum.exCartesian | Surface.CoordEnum.exAllowPositiveOnly {number}, indicates that surface displays only the positive coordinates in Cartesian system * */ coord: exontrol.Surface.CoordEnum.exDefCoord, /** * @description The showOrigin field specifies whether the control shows or hides the origin * @type {boolean} * @example * * false {boolean}, the control hides the origin * null {null} or true {boolean}, the control shows the origin * * @since 1.7 */ showOrigin: true, /** * @description The origin field specifies the appearance to draw the origin of the surface, as an object of {size, width, color, style, cap} type as explained: * * size {number}, indicates the size of the origin (the size of the cross) * width {number}, specifies the line's width or size (1 by default) (if 0 no origin is shown) * color {string}, indicates the line's color (black by default) * style {array}, specifies the dash pattern to show the lines (solid by default) * cap {string}, determines the shape used to draw the end points of lines. One of the following: "butt", "round" or "square" ("butt" by default) * * @type {object} * @example * * null {null}, the control's origin is black, 1-pixel wide and solid * {color: "gray", width: 2} {object}, the control's origin is gray, solid and 2-pixel wide * * @since 1.7 */ origin: { /** * @description The size field defines the size of the origin (the size of the cross) * @type {number} Specifies the size of the origin. * @example * * null {null}, defines an 8-pixels wide cross (default size) * 16 {number}, defines a 16-pixels wide cross */ size: null, /** * @description The width field defines the size/width of the line. * @type {number} Specifies the size/width of the line. * @example * * null {null}, indicates line of 1-pixel wide * 2 {number}, indicates line of 2-pixels wide */ width: null, /** * @description The color field specifies the color to show the line * @type {string} Defines the color of the line as a CSS color format * @example * * null {null}, indicates a black line * "transparent" {string}, specifies a transparent line * "red" {string}, specifies a red line * "#00FF00" {string}, specifies a green line * "rgba(255,0,0,0.5)" {string}, indicates 50% red line */ color: null, /** * @description The style field defines the style of the line * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null} or [] {array}, defines solid grid-lines * 2 {number}, becomes [2, 2, ...] * [5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] */ style: null, /** * @description The cap field determines the shape used to draw the end points of lines * @type {string} Determines the shape used to draw the end points of lines, as one of the following: * * "butt" {string}, the ends of lines are squared off at the endpoints. Default value. * "round" {string}, the ends of lines are rounded * "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness * * @example * * null {null}, "butt" ends * "round" {string}, the ends of lines are rounded */ cap: null }, /** * @description The showGridLines field specifies whether the control shows or hides the grid-lines (minor and major grid-lines) * @type {boolean} * @example * * null {null} or false {boolean}, the control hides the grid-lines (minor and major grid-lines) * true {boolean}, the control shows the grid-lines (minor and major grid-lines) * * @since 1.7 */ showGridLines: false, /** * @description The minorGridLines field defines the appearance of the surface's minor grid-lines, as an object of {step, width, color, style, cap} type as explained: * * step {number}, specifies the distance between two consecutive minor grid-lines (10 by default) (if 0 the minor grid-lines are ignored) * width {number}, specifies the line's width or size (1 by default) (if 0 no minor grid-lines are shown) * color {string}, indicates the line's color ("#F8F8F8" by default) * style {array}, specifies the dash pattern to show the lines (solid by default) * cap {string}, determines the shape used to draw the end points of lines. One of the following: "butt", "round" or "square" ("butt" by default) * * @type {object} * @example * * null {null}, the minor grid-lines are shown from 10 to 10 * {step: 0} {object}, the minor grid-lines are ignored * {color: "gray"} {object}, the minor grid-lines are shown in gray * * @since 1.7 */ minorGridLines: { /** * @description The step field specifies the distance between two consecutive minor grid-lines * @type {number} Specifies the distance between two consecutive minor grid-lines * @example * * null {null}, the distance between two consecutive minor grid-lines is 10 * 0 {number}, the minor grid-lines are ignored * 5 {number}, show the minor grid-lines from 5 to 5 * */ step: 10, /** * @description The width field defines the size/width of the line. * @type {number} Specifies the size/width of the line. * @example * * null {null}, indicates line of 1-pixel wide * 2 {number}, indicates line of 2-pixels wide */ width: null, /** * @description The color field specifies the color to show the line * @type {string} Defines the color of the line as a CSS color format * @example * * null {null}, shows the minor grid-lines in "#F8F8F8" * "transparent" {string}, specifies a transparent line * "red" {string}, specifies a red line * "#00FF00" {string}, specifies a green line * "rgba(255,0,0,0.5)" {string}, indicates 50% red line */ color: "#F8F8F8", /** * @description The style field defines the style of the line * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null} or [] {array}, defines solid grid-lines * 2 {number}, becomes [2, 2, ...] * [5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] */ style: null, /** * @description The cap field determines the shape used to draw the end points of lines * @type {string} Determines the shape used to draw the end points of lines, as one of the following: * * "butt" {string}, the ends of lines are squared off at the endpoints. Default value. * "round" {string}, the ends of lines are rounded * "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness * * @example * * null {null}, "butt" ends * "round" {string}, the ends of lines are rounded */ cap: null }, /** * @description The majorGridLines field defines the appearance of the surface's major grid-lines, as an object of {step, width, color, style, cap} type as explained: * * step {number}, specifies the distance between two consecutive major grid-lines (100 by default) (if 0 the major grid-lines are ignored) * width {number}, specifies the line's width or size (1 by default) (if 0 no major grid-lines are shown) * color {string}, indicates the line's color ("#E8E8E8" by default) * style {array}, specifies the dash pattern to show the lines (solid by default) * cap {string}, determines the shape used to draw the end points of lines. One of the following: "butt", "round" or "square" ("butt" by default) * * @type {object} * @example * * null {null}, the major grid-lines are shown from 100 to 100 * {step: 0} {object}, the major grid-lines are ignored * {color: "gray"} {object}, the major grid-lines are shown in gray * * @since 1.7 */ majorGridLines: { /** * @description The step field specifies the distance between two consecutive major grid-lines * @type {number} Specifies the distance between two consecutive major grid-lines * @example * * null {null}, the distance between two consecutive major grid-lines is 100 * 0 {number}, the major grid-lines are ignored * 5 {number}, show the major grid-lines from 5 to 5 * */ step: 100, /** * @description The width field defines the size/width of the line. * @type {number} Specifies the size/width of the line. * @example * * null {null}, indicates line of 1-pixel wide * 2 {number}, indicates line of 2-pixels wide */ width: null, /** * @description The color field specifies the color to show the line * @type {string} Defines the color of the line as a CSS color format * @example * * null {null}, shows the major grid-lines in "#E8E8E8" * "transparent" {string}, specifies a transparent line * "red" {string}, specifies a red line * "#00FF00" {string}, specifies a green line * "rgba(255,0,0,0.5)" {string}, indicates 50% red line */ color: "#E8E8E8", /** * @description The style field defines the style of the line * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null} or [] {array}, defines solid grid-lines * 2 {number}, becomes [2, 2, ...] * [5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] */ style: null, /** * @description The cap field determines the shape used to draw the end points of lines * @type {string} Determines the shape used to draw the end points of lines, as one of the following: * * "butt" {string}, the ends of lines are squared off at the endpoints. Default value. * "round" {string}, the ends of lines are rounded * "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness * * @example * * null {null}, "butt" ends * "round" {string}, the ends of lines are rounded */ cap: null }, /** * @description The showAxes field specifies whether the control shows or hides the axes (horizontal and vertical axes) * @type {boolean} * @example * * null {null} or false {boolean}, the control hides the axes (by default) * true {boolean}, the control shows the axes * * @since 1.7 */ showAxes: false, /** * @description The axes field specifies the appearance to draw the axes of the surface, as an object of {width, color, style, cap} type as explained: * * width {number}, specifies the line's width or size (1 by default) (if 0 no axes is shown) * color {string}, indicates the line's color ("#B8B8B8" by default) * style {array}, specifies the dash pattern to show the lines (solid by default) * cap {string}, determines the shape used to draw the end points of lines. One of the following: "butt", "round" or "square" ("butt" by default) * * @type {object} * @example * * null {null}, the control's axes is gray, 1-pixel wide and solid * {color: "gray", width: 2} {object}, the control's axes is gray, solid and 2-pixel wide * * @since 1.7 */ axes: { /** * @description The width field defines the size/width of the line. * @type {number} Specifies the size/width of the line. * @example * * null {null}, indicates line of 1-pixel wide * 2 {number}, indicates line of 2-pixels wide */ width: null, /** * @description The color field specifies the color to show the line * @type {string} Defines the color of the line as a CSS color format * @example * * null {null}, indicates a black line * "transparent" {string}, specifies a transparent line * "red" {string}, specifies a red line * "#00FF00" {string}, specifies a green line * "rgba(255,0,0,0.5)" {string}, indicates 50% red line */ color: "#B8B8B8", /** * @description The style field defines the style of the line * @type {array} An Array of numbers which specify distances to alternately draw a line and a gap. If the number of elements in the array is odd, the elements of the array get copied and concatenated. * @example * * null {null} or [] {array}, defines solid grid-lines * 2 {number}, becomes [2, 2, ...] * [5, 15, 25] {array}, becomes [5, 15, 25, 5, 15, 25, ...] */ style: null, /** * @description The cap field determines the shape used to draw the end points of lines * @type {string} Determines the shape used to draw the end points of lines, as one of the following: * * "butt" {string}, the ends of lines are squared off at the endpoints. Default value. * "round" {string}, the ends of lines are rounded * "square" {string}, the ends of lines are squared off by adding a box with an equal width and half the height of the line's thickness * * @example * * null {null}, "butt" ends * "round" {string}, the ends of lines are rounded */ cap: null }, /** * @description The alignObjectsToGridLines field specifies whether the objects are aligned to minor or major grid lines, as explained: * * 0 {number}, no alignment is performed * -1 {number}, the objects are aligned to minor grid lines * 1 {number}, the objects are aligned to major grid lines * * @type {number} * @example * * null {null} or 0 {number}, the property has no effect (by default) * -1 {number}, the objects on the surface are aligned to the minor grid lines * 1 {number}, the objects on the surface are aligned to the major grid lines * * @since 1.7 */ alignObjectsToGridLines: 0, /** * @description The selection field defines the control's selection, as one of the following: * * value {null}, clears the entire selection (unselect all) * value {number}, selects an element giving index within the elements collection * value {string}, selects an element giving its identifier/key/plain-caption * value {Element}, selects an element giving its reference * value {Elements}, selects all elements within the control * value {array}, specifies an array of [type] type, where type could be any number, string or Element type * * @type {any} * @example: * * null {null}, removes the control's selection * "aka" {string}, select the element with the 'aka' key * * @since 1.8 */ selection: null, /** * @description The allowUndoRedo field enables or disables the Undo/Redo feature. The Undo and Redo features let you remove or repeat single or multiple actions, but all actions must be undone or redone in the order you did or undid them – you can’t skip actions. For example, if you added three elements and then decide you want to undo the first change you made, you must undo all three changes. To undo an action you need to press Ctrl+Z, while for to redo something you've undone, press Ctrl+Y. * @type {boolean} * @example * * false {boolean}, the Undo/Redo feature is disabled (by default) * true {boolean}, enables the Undo/Redo feature. * * @since 2.0 */ allowUndoRedo: false, /** * @description The undoRedoQueueLength field gets or sets the maximum number of Undo/Redo actions that may be stored to the control's Undo/Redo queue as explained: * * negative {number}, no limit for the control's Undo/Redo queue * 0 {number}, the control's Undo/Redo feature is disabled * positive {number}, specifies the maximum number of Undo/Redo actions that may be stored to the control's Undo/Redo queue * * @type {number} * @example * * -1 {number}, the Undo/Redo queue is limitless * 1 {number}, the Undo/Redo queue limits the number of actions to store to 1 (one action or one block of actions) * * @since 2.0 */ undoRedoQueueLength: -1 } /////////////////////////////////////////////////////////// (exontrol.Shapes.Surface) // // The exontrol.Shapes.Surface namespace provides support to customize the visual appearance of different parts of the exontrol.Surface object. // /////////////////////////////////////////////////////////// /** * @description The exontrol.Shapes.Surface namespace provides support to customize the visual appearance of different parts of the exontrol.Surface object. */ exontrol.Shapes.Surface = { /** * @description The element field specifies the visual appearance to display the elements * @type {object} Indicates an object of {normal, disabled,hover,click} type */ element: { /** * @description The normal field includes definitions to draw the object in normal state. * @type {object} An object of exontrol.Def.Shape type to be applied on the part's background on normal state. */ normal: { primitive: "RoundRect", fillColor: "rgb(240,240,240)", frameColor: "rgb(128,128,128)" }, /** * @description The hover field includes definitions to draw the object while cursor hovers it. * @type {object} An object of exontrol.Def.Shape type to be applied on the part's background while cursor hovers it. */ hover: { fillColor: "rgb(200,200,200)", }, /** * @description The disabled field includes definitions to draw the object in disabled state. * @type {object} An object of exontrol.Def.Shape type to be applied on the part's background on disabled state. */ disabled: { opacity: 0.5 } }, /** * @description The shmulti field specifies the visual appearance to show the count of dragged items * @type {object} Indicates an object of exontrol.Def.Shape type */ shmulti: { primitive: "RoundRect", fillColor: "black", tfi: { fgColor: "white" } } }