1
) function: toString 2
) function: checkReset 3
) function: adjustAnchor 4
) function: reverseControls 5
) function: reverseLeftRight 6
) function: reverseUpDown 7
) function: addCenterBox 8
) function: crossMoveH 9
) function: crossMoveV 10
) function: cross_resetH 11
) function: cross_resizeH 12
) function: cross_resetV 13
) function: cross_resizeV 14
) function: markCenterH 15
) function: markCenterV 16
) function: transLeft 17
) function: transRight 18
) function: transUp 19
) function: transDown 20
) function: lock_aspect 21
) function: scaleUpH 22
) function: scaleUpV 23
) function: scaleDownH 24
) function: scaleDownV 25
) function: createButton 26
) function: setScrollVis 27
) function: setScrollValue 28
) function: setScrollMinmax 29
) function: ScrollResize
Object : ControlBox
Object Description:
Example:
Inherits from: Nothing
Notes: Each Window object has an associated ControlBox
Originally, the control box was, indeed a box. Now it is a
collection of buttons, and it might be more appropriate to have
rewrite it as a ControlGroup, and inherit from a generic Group
class.
This class is highly coupled to the Window class
| Constructor: ControlBox
Parameter : parent - parent GUI object that will contain this ControlBox
target - GUI object (Content) which this ControlBox will control
ctrl_opts - one of:
ControlBox.ALL_CTRLS || 0x1FF
ControlBox.SCROLLV || 0x001
ControlBox.SCROLLH || 0x002
ControlBox.SCALEH || 0x004
ControlBox.SCALEV || 0x008
ControlBox.XCOORD_DISP || 0x010
ControlBox.YCOORD_DISP || 0x020
ControlBox.CROSSV || 0x040
ControlBox.CROSSH || 0x080
ControlBox.RESET || 0X100
or a bit mask formed from above options:
i.e. ControlBox.SCROLLV|ControlBox.SCROLLH
There is documentation/code mismatch
Method: checkReset
Description: used by Window to check if crosshair RESET is enabled
Returns: boolean
Added: Nishan Sothilingam
Method: adjustAnchor
Description:
- adjust the anchor of any controls that exist
- this is primarily used when resizing a window.
Method: reverseControls
Description: swap up/down and left/right
Method: reverseLeftRight
Description: swap left/right
Method: reverseUpDown
Description: swap up/down
Method: addCenterBox
Description: Add a box to the top/center of the parent which
displays the center coordinate of the parents
content.
Parameter : vert - which vertex this box will monitor (X, Y)
Method: crossMoveH
Description: Keeps track of the cross hairs on the horizontal
access and adjusts it according to the mouse position
parameter: posy - this is the y position
parameter: posx - this is the x position
content-height: A numerical value representing the window height in pixels
Added:Nishan Sothilingam
Method: crossMoveV
Description: Keeps track of the cross hairs on the vertical
access and adjusts it according to the mouse position
parameter: posy - this is the y position
parameter: posx - this is the x position
content-width: A numerical value representing the window width in pixels
Added: Nishan Sothilingam
Method: cross_resetH
Description: resets the horizontal cross hair position to the center of the
content pane.
parameter: content_width: used for calculating the center for crosshair
reset
Added: Nishan Sothilingam
There is documentation/code mismatch
Method: cross_resetV
Description: resets the vertical cross hair position to the center of the
content pane.
parameter: content_height, used in calculating crosshair reset
Added: Nishan Sothilingam
There is documentation/code mismatch
Method: markCenterH
Description:
CenterMarkH refers to the bar down the middle marking the
Horizontal center of the display. This function creates it.
Method: markCenterV
Description:
CenterMarkV refers to the bar down the middle marking the
Verticle center of the display. This function creates it.
Method: transLeft
Description: translate the content left
Parameter : evt - the event triggering this request
Quirk: slider integration with dynamic scale is not correct,
though there are several solutions, none of the ones
I had could do it perfectly
Method: transRight
Description: translate the content right
Parameter : evt - the event triggering this request
Quirk: slider integration with dynamic scale is not correct,
though there are several solutions, none of the ones
I had could do it perfectly
Method: setAnchor
Description: Set this anchor.
Parameter : target - the object to anchor to.
Parameter : ax - "left" "center" "right", the horizontal anchor position
Parameter : offsetx - the offset ('+':right '-':left) from the ax position
Parameter : ay - "top" "center" "bottom", the vertical anchor position
Parameter : offsety - the offset ('+':down '-':up) from the ay position
Example:
Continuing the setAnchor (frame, "left", "15", "bottom", "-15")
would anchor the object(the button)
Added - Chris Peto
Method: setAnchor
Description: Set this anchor.
Parameter : target - the object to anchor to.
Parameter : ax - "left" "center" "right", the horizontal anchor position
Parameter : offsetx - the offset ('+':right '-':left) from the ax position
Parameter : ay - "top" "center" "bottom", the vertical anchor position
Parameter : offsety - the offset ('+':down '-':up) from the ay position
Example:
Continuing the setAnchor (frame, "left", "15", "bottom", "-15")
would anchor the object(the button)
@ added - Chris Peto
Method: transUp
Description: translate the content up
Parameter : evt - the event triggering this request
Method: transDown
Description: translate the content down
Parameter : evt - the event triggering this request
Method: lock
Description: Tell the content to scale down in the vertical dir
Parameter : evt - event causing this scaling
There is documentation/code mismatch
Method: scaleUpH
Description: Tell the content to scale in the horizontal direction
Parameter : evt - event causing this scaling
Method: scaleUpV
Description: Tell the content to scale in the vertical direction
Parameter : evt - event causing this scaling
Method: scaleDownH
Description: Tell the content to scale down in the horizontal dir
Parameter : evt - event causing this scaling
Method: scaleDownV
Description: Tell the content to scale down in the vertical dir
Parameter : evt - event causing this scaling
Method: createButton
Description: creates the buttons available in the control box.
Parameter : c - the button to create
options are: ^ - up
v - down
< - left
> - right
+ - zoomin horizontal
- - zoomout horizontal
i - zoomin verticle
o - zoomout verticle
Notes: Behaviour of the buttons
mousedown event calls
^ - transUp(evt)
> - transRight(evt)
< - transLeft(evt)
v - transDown(evt)
+ - scaleUpH(evt)
- - scaleDownH(evt)
i - scaleUpV(evt)
o - scaleDownV(evt)
the mousedown events set a timer which will call them again
after x seconds if the mouse is still down & in the button.
mouseOut - clears timeout - preventing additional calls
mouseUp - clears timeout - preventing additional calls
Method: clearTimeout
Description: clear the timer being used to allow scrolling to
occur while the mouse button is held down.
Parameter : evt - the event causing the timer to clear
There is documentation/code mismatchThere is documentation/code mismatchThere is documentation/code mismatchThere is documentation/code mismatch |
|