Global Variables |
---|
sgx_llStackOfIteratorStacks.sgx_llS_IteratorStack() - a stack of stacks of type sgx_llS_IteratorStack used by sgx_llIteratorRecursive.
sgx_llStackOfIteratorStacks()\iteratorStack() is a list (stack) of sgx_llS_elem elements which get pushed and popped during a recursive iteration. sgx_llStackOfIteratorStacks() itself is a wrapper stack for the latter and gets pushed and popped with the beginning and end of each such a recursive iteration block (for example in case within the block a function gets called which uses a recursive iterator itself). see sgx_llS_elem for an overview of the tree list.
|
sgx_LIMIT_STATIC_GADGETS = #sgxMaxStaticGagdets - static IDs can range from 1 to sgx_LIMIT_STATIC_GADGETS. see also the notes on #sgxMaxStaticGagdets.
|
sgx_CURRENT_MAX_STATIC_GADGETS = 0 - highest static ID that has ever been used for element creation. used to shorten traversal through the elements array. note that this doesn't tell anything about validity of this ID or of lower IDs.
|
sgx_CURRENT_MAX_DYNAMIC_GADGETS = sgx_LIMIT_STATIC_GADGETS - same as sgx_CURRENT_MAX_STATIC_GADGETS but for dynamic IDs instead of static ones.
|
*sgxID.sgxS_GADGET(sgx_CURRENT_MAX_DYNAMIC_GADGETS) - the actual array of pointers to all sgx elements (sgxS_GADGET). the element IDs are used as indices here. this array is accessed via macro sgx() which includes some error checking when debugger is used.
|
sgx.sgxS_GADGET(0) - empty dummy array only to support autocompletion for fields of the sgx element structure sgxS_GADGET. the PB-IDE uses this for autocompletion of fields, but sgx(id) is actually a macro and not an array. no other use of this one and it could also be commented out. also remember that when using this the debugger the tooltip in the editor will say 'index out of bounds' if you mark 'sgx(id)' in the IDE because it does not evaluate the macro.
|
sgxCell.sgxS_GADGET(0, 0, 0) - empty dummy array only to support autocompletion for macro sgxCell(). see documentation of the dummy array sgx().
|
*sgxLayeredView.sgx_llnew - the root parent node. basically a list of top the level list elements (the sgx element id is part of the list element structure). the root node of the element tree. this an sgx_llS_list, not an sgx element and it is analog to the child list \treeElem\node of an sgx element. sgx_llnew is the list constructor macro
|
sgxGroups.sgxS_groupElem() - list of radio group elements
|
sgxDesign.sgxS_Design() - list of loaded designs
|
sgx_m.sgxS_Mouse - stores various mouse states like position, buttons and also the current sgxCursor element id.
|
sgx_vec.sgx_S_Point - stores the position the mouse has inside the titlebar for proper positioning while moving windows. also being used in a similar way while resizing elements with the mouse.
|
sgx_textCursorClippingOffset.sgx_S_Point - stores the current clipping offset applied to the textcursor sprite of sgxEdit elements for proper textcursor positioning.
|
sgx_dimensions.sgx_S_Size - w\h values defining the screen size. can be set via sgxSetDimensions.
|
sgx_focusCatchedBy = -1 - -1 if no element has currently catched the focused, otherwise an element ID. focus is catched on leftclick and released with a leftup, so that down/hold events and knob dragging etc. can be directed to the according element even if the mouse is not hovering it as well as preventing other elements from receiving events during that time.
|
sgxActiveWin = -1 - the currently active (foreground) window id or -1 if no window is active.
|
sgx_resizing = -1 - ID of the element currently being resized with the mouse or -1 if no element is currently being resized.
|
sgx_moving = -1 - ID of the (window) element currently being moved manually via mouse or -1 if no element is currently being moved manually.
|
sgx_editing = -1 - ID of the edit element currently being active for text editing or -1 if no edit element is active.
|
sgx_resizeGadgetSize = 15 - size of the resize handle at the bottom right corner of resizable elements. must be at least 1 because it's also used as minimum size during manual resize (via mouse).
|
sgxStdFont = LoadFont(#PB_Any, "Arial", 8) - font used for caption of minimized windows and as a default for the current font.
|
sgx_fontMonoSmall = LoadFont(#PB_Any, "Courier", 8) - font used by 'sgx_debugInfos' for example.
|
sgx_CurrentFontID = FontID(sgxStdFont) - the font being assign during element creation. can be set via sgxSetFont
|
*sgx_CurrentDesign.sgxS_Design - can be set via sgxSetDesign and is also set by sgxLoadDesign
|
sgx_CurrentParent = -1 - the sgx element id of the current parent, or -1 if there is no current parent.
|
*sgx_CurrentParent.sgx_llS_list = *sgxLayeredView - the current parent node. basically a list of list elements (the sgx element id is part of the list element structure). this an sgx_llS_list, not an sgx element. if an element becomes the current parent, this points to the element's \treeElem\node, which might still be 0 if it doesn't have any childs.
|
sgx_defaultAlpha = 255 - can be set via sgxSetAlpha
|
sgx_xMinimizedWins = 2 - the x-position for the possibly next coming taskbar button in pixels.
|
sgx_debugInfos = 0 - 0 per default. you can set it to 1 to display debug informations about sgx elements and also display current mouse position. set it to 2 to display frames for all elements. for simplicity this uses a StartDrawing()/StopDrawing() block and is very slow, especially if value is 2 (one drawing block per element).
|
sgxTopID = -1 - ID of the element currently under the mouse or -1 if no element is there.
|
sgx_ems - holds the current value of EllapsedMilliseconds(), or as set via sgxSetEmsContainer. used for animations, intervals etc.
|
sgx_mouseWheelDelta - gets sum up in sgx_windowCallback and used and reset in sgxExamine.
|
*sgx_emsContainer.Integer - can be set via sgxSetEmsContainer.
|
sgxTipDelay = 500 - delay for tip popup in milliseconds
|
sgxHoldDelay = 400 - delay for first hold event in milliseconds
|
sgxHoldInterval = 30 - interval of hold events in milliseconds
|
sgxRightclickUnset = #sgxRightclickUnsetAll - per default (#sgxRightclickUnsetAll) rightclick on checkboxes and togglebuttons changes their state to unchecked / not pushed. if set to #sgxRightclickUnsetNoGroup then this will only be applied to elements that are not part of a radiogroup. #sgxRightclickUnsetNone completely disables this behaviour.
|
sgxAnimTime = 400 - duration of window animations in milliseconds. you can set this to 0 to effectively disable animations.
|
sgx_animations.sgxS_Animation() - this map contains animation data objects temporarily created and used while animating windows.
|
sgxWinCloseEnabled = 1 - (bool) adjusts if windows can be closed by rightclick
|
sgx_BuildRefresh = 1 - usually set to 1 to refresh elements after finishing creation/building. set to 0 while creating elements should not refresh them but only initialize them. temporarily deactivated (0) by tables to avoid double refreshes of table childs.
|
sgx_BuildRefreshStack() - used to push/pop values for sgx_BuildRefresh
|
sgx_pendingEvents.sgxS_pendingEvents() - list of pending events that will be triggered with the next call of sgxExamine
|
sgxNumberOfElements = 0 - number of currently existing and valid sgx elements
|
sgx_animStyle_minimizing - the animation styles used for minimizing windows
|
sgx_animStyle_restoring - the animation styles used for restoring windows
|
sgx_animStyle_closing - the animation styles used for closing windows
|
sgx_animStyle_presenting - the animation styles used for presenting windows
|
sgx_textcursorType = #sgxTextcursorTypeLine - text cursor type used by sgxEdit elements. can be set via sgxSetTextcursorType.
|
sgx_lowbudgetDistortion.f = 0.2 - distortion applied to backgrounds of design "lowbudget", a float value in the range 0..1 (both inclusive)
|
sgx_lowbudgetDistortColors = #True - #True if variable sgx_lowbudgetDistorstion should be applied to brightness as well as color component distribution. #False to only distort brightness.
|
sgx_disabledColor1 = RGBA(255, 255, 255, 5) - the first color applied to the final gadget sprites if the element is disabled (a thin white for desaturation).
|
sgx_disabledColor2 = RGBA(50, 50, 50, 80) - the second color applied to the final gadget sprites if the element is disabled (a thin black for darkening).
|
sgx_drawTextLF_EndX - x-position where the last call of sgx_drawTextLF has finished (right edge of drawn text).
|
sgx_drawTextLF_EndY - y-position where the last call of sgx_drawTextLF has finished (top edge of drawn text).
|
sgx_keyLay.sgx_S_keyboardLayout(1) - array of keyboard layouts
|
sgx_keyLayout = 0 - currently used keyboard layout. can be set via sgxSetKeyboardLayout
|
sgx_keystrokeDelay_1 = 280 - the keystroke delay after a first key-push. can be set via sgxSetKeyboardLayout
|
sgx_keystrokeDelay_2 = 40 - the keystroke delay for continuous key-push. can be set via sgxSetKeyboardLayout
|
sgx_keyboardEdit_lastTextPos - see sgx_keyboardEdit
|
sgx_keyboardEdit_TextModified - see sgx_keyboardEdit
|
Functions and Macros |
---|
sgx_llnew - constructor macro for creation of sgx_llS_list lists.
|
sgx_llIterator(it, List ) - flat iterator macro (without recursion) to iterate over all list elements.
|
sgx_llNext(it) - the 'Next' command for an sgx_llIterator block.
|
sgx_llIteratorReverse(it, List ) - flat reverse iterator macro (without recursion) to iterate over all list elements backwards.
|
sgx_llPrev(it) - the 'Next' (previous) command for an sgx_llIteratorReverse block.
|
sgx_llIteratorRecursive(it, List ) - recusrive iterator macro to iterate over all list elements including the elements child nodes.
|
sgx_llNextRecursive(it, skipNode = #False) - the 'Next' command for an sgx_llIteratorRecursive block.
|
sgx_llNextRecursive_proc(*it.sgx_llS_elem, skipNode = #False) - used by the sgx_llNextRecursive macro for recursion.
|
sgx_llAdd(*list.sgx_llS_list, id) - creates a new element at the end of the list and sets its data field to 'id'.
|
sgx_llClearList(*list.sgx_llS_list) - removes all elements from the list which will remove sublevels too.
|
sgx_llDelElem(*elem.sgx_llS_elem, returnNode = #False) - remove the element from its list and free it and its childs.
|
sgx_llReplaceElemNode(*elem.sgx_llS_elem, *newNode.sgx_llS_list) - remove and replace the node (list of childs) of a list element.
|
sgx_llMoveEnd(*elem.sgx_llS_elem) - move the element to the end of its list.
|
sgx_llDebug(*list.sgx_llS_list) - prints the list/tree hierarchy recursively to the debug output window (directly, not return a string).
|
sgx_cb(index) - wrapper used in the macro sgx if compiled with debugger.
|
sgx(index) - use this macro to access the structure of your sgx elements.
|
sgx_err(_message_) - used to throw sgx errors when compiled with debugger.
|
sgxNew(id) - create a new sgx object.
|
sgx_isInElement(id, x, y) - checks if the specified absolute screen position is within the element's dimensions.
|
sgx_MousehoverClosebutton(id) - checks if the mouse position is within the dimensions of the element's close button (windows only).
|
sgx_MousehoverResize(id) - checks if the mouse position is within the dimensions of the element's resize button in hte bottom right corner.
|
sgx_FreeImageChecked(img) - frees the image with the passed number if it's a valid PB image.
|
sgx_FreeSpriteChecked(spr) - frees the sprite with the passed number if it's a valid PB sprite.
|
sgx_SkipUnused(iterator) - skips the gap of irrelevant IDs between the currently highest used static ID and the first dynamic one.
|
sgxInBounds(index) - returns #True if 'index' is within bounds of the basic sgx element array, otherwise it returns #False.
|
sgx_SetParentList(id) - used in sgxSetCurrentParent to keep *sgx_CurrentParent (the current parent tree node) in sync with sgx_CurrentParent (the current parent ID).
|
sgxSetCurrentParent(id) - set the parent for coming creations of new sgx elements.
|
sgxSetParent(id, parent) - sets or changes the parent of an sgx element.
|
sgxEach(it) - use this macro to iterate through the elements.
|
sgxMoveOnTop(id) - make an sgx window (#sgxTypeWin) active and foreground or move an element above its siblings.
|
sgx_PushBuildRefresh(state) - temporarily changes the value of sgx_BuildRefresh.
|
sgx_PopBuildRefresh() - restores sgx_BuildRefresh to the previous value.
|
sgxGetElementAt(x, y) - returns the ID of the topmost sgx element at the given position on screen, or -1 if no sgx element is found there.
|
sgxGetTopLevel(id) - returns the ID of the topmost parent.
|
sgxMove(id, x, y, relative = #True) - change the position of an sgx element.
|
sgx_updateToParentPos(id) - updates the element's to-parent-position if it's absolute screen position has been modified.
|
sgxSetDisabled(id, disabled = #True) - disable or enable an sgx element.
|
sgxResize(id, w, h) - change the size of an sgx element.
|
sgx_MoveChildsOf(id) - updates the position of child elements if their parent element has moved, keeping their to-parent-position.
|
sgx_GetGadgetX(id) - returns (and is used to update) the elements absolute position on screen (x, y) together with sgx_GetGadgetY by summarizing all to-parent-positions up the parent hierarchy.
|
sgx_GetGadgetY(id) - returns (and is used to update) the elements absolute position on screen (x, y) together with sgx_GetGadgetX by summarizing all to-parent-positions up the parent hierarchy.
|
sgxCloseLevel(closeAllLevels = #False) - call this function when you finished the creation of a window or table and it's childs.
|
sgx_IsParentage(parent, child) - returns #True if 'parent' is found anywhere up the parent hierarchy of 'child', otherwise returns #False.
|
sgx_getTypeString.s(id) - returns a string informing about the type of an sgx element for debugging purposes.
|
sgxDebugElem.s(id, multiline = #False) - returns a string with information about the element's attributes.
|
sgxDebugTree.s(id = -1) - returns a string with information about the elements attributes and their hierarchy.
|
sgxSetFont(font) - set the font for coming creations of new sgx elements.
|
sgxSetGroup(id, groupID) - add an sgx element to a radio group.
|
sgxGetGroup(id) - returns the groupID of an sgx element, or -1 if the element does not belong to a radio group.
|
sgxSetDimensions(width, height) - tell sgx about the screen dimensions you use.
|
sgxFree(id) - free / delete an sgx element, including childs.
|
sgxFreeChildsOf(parent) - free / delete all childs of an sgx element, including their own childs.
|
sgx_HideChildsOf(parent, show = #False, ignoreWindows = #True) - hides or shows all childs of an element (but not the element itself) recursively but ignores child windows (per default).
|
sgxSetShow(id, show, recursively = #True, ignoreWindows = #True) - shows or hides an element.
|
sgx_addAnimation(id, animationType) - add an animation data object to the animation list.
|
sgxMinimizeWin(id) - initializes minimizing of window.
|
sgxRestoreWin(id) - initializes restoring of window.
|
sgxCloseWin(id) - initializes closing of a window and it's child windows.
|
sgxPresentWin(id) - initializes presenting of a window and it's child windows.
|
sgx_RefreshWinBar() - determines visible minimized windows and repositions them as buttons in the taskbar.
|
sgx_animate(id, *animation.sgxS_Animation) - animate an element, that is to say, update its attributes according to the currently reach animation progress.
|
sgxSetWinAnimStyle(winState, winAnimStyle) - configures window animations.
|
sgxSetTextcursorType(textcursorType) - changes the type of the textcursor used by sgxEdit elements.
|
sgxSetText(id, text.s) - changes the text of an sgx element and refreshes it.
|
sgxSetResizable(id, resizable = #True) - make an element resizeable via the mouse.
|
sgxSetMinSize(id, minWidth, minHeight) - set the minimum size allowed for manually resizing elements via mouse.
|
sgxSetScrollMax(id, max) - change the range of a scrollbar/trackbar.
|
sgx_SetScrollPos(id, scrollpos) - translates a pixel position on scrollbar/trackbar into its state and updates the knob position and the 'state' and 'changed' fields (directly without using pending events, so it should only be called during sgxExamine).
|
sgxSetState(id, state, handleRadioGroups = #True, *changed.sgxS_ListWrapper = 0) - changes the state of an sgx element and refreshes it if necessary.
|
sgx_setParentWindowHovered(id)
|
sgxSetEmsContainer(*emsContainer.Integer) - tell sgx about your 'ems' variable.
|
sgxSetDesign(*design.sgxS_Design, id = -1) - set the design for coming creations of new sgx elements, or change the design of an sgx element.
|
sgxSetAlpha(alpha, id = -1, recursive = #False) - set the alpha value for coming creations of new sgx elements (default alpha is 255, no transparency), or change the alpha value of an sgx element.
|
sgxCell(table, i, k) - use this macro to access the structure of your sgx elements if they are cells of a table and you want to access them via their position in the table.
|
sgxCellId(table, i, k) - returns the ID of a table-cell, or 0 for empty cells or if it fails, which happens if table is not a valid sgx table element or if the coordinates are out of the table's dimensions.
|
sgxCellAssign(i, k, id, table = -1) - assigns an sgx element to a cell of a table or removes it.
|
sgx_ArrangeTable(id) - scans the cells of a table to calculate size of columns, rows as well as the final table's size and may overwrite cell element positions and sizes according to the table style but does not refresh elements.
|
sgx_textWidthLF(text.s) - returns the width of the longest line in the text, that is to say the width of the complete textblock.
|
sgx_drawTextLF(x, y, text.s, color, xWrapTo = -1, lineSeperator$ = #LF$, textAlign = #sgxAlignTextLeft) - draws multiline text to the current drawing output.
|
sgx_max(a, b) - returns 'a' if its greater that 'b', otherwise returns 'b'.
|
sgx_fade(color, fade) - returns a new color with different brightness derived from 'color' according to the value of 'fade'.
|
sgxSetKeyboardLayout(layout = #sgxKeyLayQwerty, keystrokeDelay_1 = 280, keystrokeDelay_2 = 40) - configure keyboard layout and keystroke delay used by sgxEdit elements (via sgx_keyboardEdit).
|
sgx_keyboardEdit.s(text.s, textpos = -1, maxLines = -1) - defines string operations on keyboard data.
|
sgx_RemakeDesignImage(_img, _w, _h) - frees an design image (in case it is a valid one) and recreates it with the specified dimensions
|
sgx_MakePalette(*design.sgxS_Design, basecolor) - creates a color pallete for the design derived from a basecolor.
|
sgxLoadDesign(design.s = "lowbudget", basecolor = -1) - loads a design.
|
sgxRefreshDesign(*design.sgxS_Design) - refresh the design.
|
sgx_PassStandardValues() - macro to initalize element property default for most element type during creation.
|
sgx_infoTail() - used to add debug information to the text of sgx elements (must be activated in the code)
|
sgxCursor(id) - creates an sgx cursor element and returns it's ID.
|
sgxButton(id, x, y, w, h, text.s, toggle = #sgxStateNone, sprNr = -1, x2 = 5, y2 = 5) - creates an sgx button element and returns it's ID.
|
sgxCheckbox(id, x, y, w, h, checked = #sgxStateOff, text.s = "", align = #sgxAlignCheckboxTextRight) - creates an sgx checkbox element and returns it's ID.
|
sgxScrollbar(id, x, y, w, h, w2, h2, max, state = 0, style = 0) - creates an sgx scrollbar element and returns it's ID.
|
sgxTrackbar(id, x, y, w, h, w2, h2, max, state = 0, style = #sgxStyleGrid) - creates an sgx trackbar element and returns it's ID.
|
sgxEdit(id, x, y, w, h, text.s = "", maxLines = -1) - creates an sgx edit element and returns it's ID.
|
sgxWin(id, x, y, w, h, text.s = "", style = 0) - creates an sgx window element and returns it's ID.
|
sgxSpriteGadget(id, x, y, sprNr) - creates an sgx sprite container and returns it's ID.
|
sgxArea(id, x, y, w, h) - creates an sgx area container and returns it's ID.
|
sgxTip(id, text.s) - creates a tooltip for an sgx element.
|
sgxCombo(id, x, y, w, h, text.s = "") - creates an sgx combo element and returns it's ID.
|
sgxText(id, x, y, w = -1, h = -1, text.s = "", style = 0, margin = 3, textalign = #sgxAlignTextLeft, wordwrap = #False) - creates an sgx text element and returns it's ID.
|
sgxTable(id, x, y, columns, lines, margin, style = #sgxStyleGrid) - creates an sgx table element and returns it's ID.
|
sgx_prepareSprite(spr, w, h, id) - creates an element sprite it not done yet or frees and recreates the sprite if the size is different.
|
sgxRefreshAll() - refresh all existing sgx elements, if you modified the design for instance.
|
sgxRefresh(id, mode = #sgx_refreshNormalWithTip) - refresh an sgx element.
|
sgx_Fill(*design.sgxS_Design, x, y, w, h, appearance) - draws a background to the current drawing output using the design's background image (will be tiled to fill specified area).
|
sgx_BorderLine(*design.sgxS_Design, x, y, V, appearance, side) - draws a straight part (a line, as opposed to some corner part) of a border to the current drawing output using the design's border images.
|
sgx_Borderbox(*design.sgxS_Design, x, y, w, h, appearance) - draws a box to the current drawing output using the design's border images.
|
sgx_CopyImageToSprite(imgNr, onBeginDraw.sgx_onBeginDraw = 0, onEndDraw.sgx_onEndDraw = 0, id = 0, sprType = 0) - creates and returns a sprite duplicated from an image (for example the mouse sprite from a loaded mouse design image, or the window's close buttons).
|
sgx_DrawCursor(id, sprType) - redraws a particular state sprite of an sgxCursor element (called by sgxRefresh).
|
sgx_DrawButton(id, sprType) - redraws a particular state sprite of an sgxButton element (called by sgxRefresh).
|
sgx_DrawCheckbox(id, sprType) - redraws a particular state sprite of an sgxCheckbox element (called by sgxRefresh).
|
sgx_DrawScrollbar(id, sprType) - redraws a particular state sprite of an sgxScrollbar/sgxTrackbar element (called by sgxRefresh).
|
sgx_DrawEdit(id, sprType, updateMetricsOnly = #False, moveTextpos = #False, scrollToCursor = #True) - redraws a particular state sprite of an sgxEdit element (called by sgxRefresh).
|
sgx_DrawWin(id, sprType) - redraws a particular state sprite of an sgxWin/sgxTable element (called by sgxRefresh).
|
sgx_DrawTip(id) - redraws the tooltip sprite of an sgx element (called by sgxRefresh).
|
sgx_DrawResizeGadget(id) - creates the resize gadget sprite of an sgxWin element if it does not exist yet.
|
sgx_DrawCombo(id, sprType) - redraws a particular state sprite of an sgxCombo element (called by sgxRefresh).
|
sgx_DrawText(id, sprType) - redraws a particular state sprite of an sgxText element (called by sgxRefresh).
|
sgx_DrawDisabled(id, sprType) - modifies a particular state sprite of an sgx element to visually represent a 'disabled' state (called by sgxRefresh).
|
sgxExamine(mousex = -1, mousey = -1) - process actions / events and update the field data of all sgx element.
|
sgxDisplay() - display all sgx element on screen.
|
sgxDisplayCursor() - display the sgx mouse cursor on screen.
|
sgxDisplayID(id) - display an sgx element on screen.
|