{ name = "Window", description = "The base class for any Window, and many Controls as well. Contains many methods and properties that are inherited and used by these other Windows and Classes.", fields = [ { "sbh", { description = "This is the instance of the horizontal ScrollBar. Generally only used internally by eC." } }, { "sbv", { description = "This is the instance of the vertical ScrollBar. Generally only used internally by eC." } } ], properties = [ { "alphaBlend", { description = "When true, applies Alpha Blending to the background of the Window. Used for transparency effects." } }, { "anchor", { description = "Very similar to position, only with more versatility. Anchor allows you to set the top, left, bottom, and right settings relative to the top, left, bottom and right of the Window/Controls parent's clientArea." } }, { "background", { description = "The Color of the Client Area.\n" "Example: background = { r = 53, g = 100, b = 203 };" } }, { "borderStyle", { description = "The type of Window frame your Window has." } }, { "clickThrough", { description = "When true, this Window/Control redirects mouse clicks to its parent rather than processing the mouse clicks itself. Essentially, the mouse becomes invisible to this item." } }, { "clientSize", { description = "Sets the size of the interior of the Window; the Client Area.\n" "Example: clientSize = { 190, 290 };" } }, { "closeButton", { description = "This is the control for the CloseButton at the top right of the Window." } }, { "disabled", { description = "Greys out ALL controls within the Window making them unusable, including the controls on the TitleBar. When applied to an individual control, rather than an entire Window, then only that control is greyed out an unusable." } }, { "dontHideScroll", { description = "When true, the Horizontal and Vertical Scroll Bars are not hidden when all the contents are within the viewspace." } }, { "drawBehind", { description = "When true(default), then the contents of the screen behind the Window are still redrawn. If false, then the screen behind is not redrawn, which can leave \"ghosts\" of the Window on the screen when it is moved or resized." } }, { "font", { } }, { "foreground", { description = "The Color of the text in the Client Area.\n" "Example: foreground = { r = 0, g = 0, b = 0 };" } }, { "hasClose", { description = "When true, the Window will contain a Close button on the top right side of the Title Bar." } }, { "hasHorzScroll", { description = "When true, the Window has a Horizontal Scroll bar across its bottom. When the contents of the Window exceeds its horizontal borders." } }, { "hasMaximize", { description = "When true, the Window will contain a Maximize button on the right side of the Title Bar." } }, { "hasMenuBar", { description = "When true, the Window will contain a Menu Bar immediately below the Title Bar." } }, { "hasMinimize", { description = "When true, the Window will contain a Minimize button on the right side of the Title Bar." } }, { "hasStatusBar", { description = "When true, the Window will contain a Status Bar at the bottom." } }, { "hasVertScroll", { description = "When true, the Window has a Vertical Scroll bar along the right hand side. When the contents of the Window exceeds its vertical borders." } }, { "hotKey", { description = "The key associated with a particular Window or Control. Pressing this key, or key combination will automatically activate the associated Window or Control.\n" "Note: If the tabCycle property of the parent is not true, then hotKey will not work unless the parent is active." } }, { "isDocument", { description = "When true, this Window/Control would be treated as a document, enabling things like having the path show up in the Title Bar. \n" "Note: For best results, set this property true on a Window rather than on a Control." } }, { "master", { description = "Typically, the Master is the Controlling Window of the application. The Master receives all the messages.\n" "Example: master = this;" } }, { "maxClientSize", { description = "The Maximum allowable size for the Client Area within the window.\n" "Example: maxClientSize = { 120, 400 };" } }, { "maximizeButton", { description = "This is the control for the MaximizeButton at the top right of the Window." } }, { "menu", { description = "The Menu portion of the Window." } }, { "minClientSize", { description = "The Minimum allowable size for the Client Area within the window.\n" "Example: minClientSize = { 50, 50 };" } }, { "minimizeButton", { description = "This is the control for the MinimizeButton at the top right of the Window." } }, { "name", { description = "This is the name of the instantiation. Typically this is only adjusted in the property editor.\n" "Example: name = \"editBox1\";\n" "or: EditBox editBox1;" } }, { "noCycle", { description = "When true, then the particular control which this is set on becomes exempt from the Tab cycling normally available from it's parents tabCycle property." } }, { "nonClient", { description = "When true, enables the Window/Control to inhabit a region outside of the clientArea, but still constrained to the Parent. Normally this is used for system controls like the buttons in the Title Bar." } }, { "normalAnchor", { description = "The anchor of the Window in its normal state, that is not minimized or maximized." } }, { "opacity", { description = "A real number between 0 and 1, setting how translucent a control is. 0 is completely transparent, and 1 is completely opaque.\n" "Example: opacity = 0.45;" } }, { "parent", { description = "The Window which the current Window/Control belongs to.\n" "Example: parent = this;" } }, { "position", { description = "The position of a Window/Control relative to the top left client area of the Parent. \n" "Example: position = { 10, 10 };" } }, { "size", { description = "Sets the size of the Window, including all the decorations.\n" "Example: size = { 200, 300 };" } }, { "state", { description = "Sets the state of the Window, either Normal, Minimized, or Maximized.\n" "state = Normal;" } }, { "stayOnTop", { description = "When true, the Window will stay on top of all other windows. Does not apply to controls." } }, { "tabCycle", { description = "When true, then it becomes possible to use the tab key to cycle through all of the children of this Window/Control. The order of cycling is determined by the order of instantiation.\n" "Note: If tabCycle is not true on the parent, then children with hotKeys set, will not be activated by pressing the hotKey, unless the parent is currently active." } }, { "text", { description = "The title bar text for the Window. For other controls such as a Label or a Button, text is the descriptive text that the user sees.\n" "Example: text = \"This is a Window\";" } }, { "visible", { description = "When true, the Window/Control is actually visible on the screen." } } ], methods = [ { "Destroy", { description = "Destroys the current Window/Control.", usage = "Used in the statement section of the source code.", example = "Window\n" "{\n" " text = \"Destroy Example\";\n" " Button \n" " {\n" " text = \"Destroy this Window!\";", parameters = [ { "code", { description = "0", position = 1 } } ] } }, { "OnCreate", { description = "Called any time a Window is created. And can be overridden to perform actions at the time that a window is created.", returnValue = "When true, the Window creation was successful." } }, { "OnRedraw", { description = "This method is called anytime the Window is redrawn. Usually when it is resized or moved, however can also be called manually by calling Update() to redraw the contents of the window.", usage = "Use this method by overriding it in your own code, within the Window class that it belongs to.", example = "class Form1 : Window\n" "{\n" " void OnRedraw(Surface surface)\n" " {\n" " surface.blit( image, xdest, ydest, sourceX, sourceY, sourceW, sourceH );\n" " }\n" "}", remarks = "Typically this method is responsible for the actual drawing of all the graphics for your program.", also = "OnApplyGraphics(), OnLoadGraphics(), OnResize(), OnResizing(), Update(), Window", parameters = [ { "surface", { description = "The graphical context which is obtained for this window, which will be drawn to.", position = 1 } } ] } }, { "Update", { description = "Causes the OnRedraw() method of the Window to be called.", usage = "Used in the statement section of the code.", example = "class Form1 : Window\n" "{\n" " Update( null ); // update the entire window\n" " Update( { 0, 0, 50, 50 } ); // update the region from 0 to 50 on the x axis, and 0 to 50 on the y axis.\n" "} ", remarks = "One should only update the necessary areas when possible, as updating the entire window indiscriminately can hog precious CPU cycles.", also = "UpdateDisplay(), OnRedraw()", parameters = [ { "region", { description = "Defines the area of the Window to be updated. If null is specified, then the entire window is updated.", position = 1 } } ] } } ] }