Window.js

Inherits from: Content.js

1 ) function: toString
2 ) function: updateCenter
3 ) function: createControls
4 ) function: resetOrientation
5 ) function: resetContentTransform
6 ) function: resetContent
7 ) function: removeContent
8 ) function: rotateContent
9 ) function: reverseControls
10 ) function: close
11 ) function: crossMoveHoriz
12 ) function: crossMoveVert
13 ) function: setHeight
14 ) function: setWidth
15 ) function: setFocus
16 ) function: setScrollVis
17 ) function: setScrollValue
18 ) function: setScrollMinmax
19 ) function: ScrollResize


Object: Window

Object Description:
Example:


Constructor: Window
  • Parameter
    : x - x coordinate relative to the parent
y - y coordinate relative to the parent
width - width of the Window
height - height of the Window


Method: toString
Description: Return a string representation of this Window


Method: updateCenter
Description: update the coordinate box marking the center
of this window.


Notes: if the content has been rotated, then the coordinate needs
to be calculated relative to the new center coordinate.


Method: createControls
Description: create the controls used in this window
  • Parameter
    : ctrl_opts - what controls are needed


Method: resetOrientation
Description: reset the orientation of this content pane


Method: resetContentTransform
Description: reset the content to it's original unscaled/
untranslated state.


Method: resetContent
Description: reset the window to a nice blank content pane.
- remove all content
- reset the content transform
- reset the orientation


Method: removeContent
Description: remove the content from this window


Method: rotateContent
Description: rotate the content
  • Parameter
    : Used to adjust the x coordinate when the content
has been rotated.


Notes:
Ideally, this should allow you to rotate the content to
whatever angle you want. It doesn't. At present this is
a Bioviz specific kludge. You can rotate 180 degrees only.
Anything else results in odd - though amusing - behaviour.
Some day, someone should fix it and make it a generic
rotation...


Method: reverseControls
Description: reverse the controls on this window
up <-> down, left <-> right
Used with the rotate 180 for bioviz


Method: close
Description: close this window


Method: crossMoveHoriz
Description: this function gets the window's left edge and
the content width, using these variables, calls the function
crossMoveH. crossMoveH takes care of crosshair movement on
a horizontal axis


Method: crossMoveVert
Description: this function gets the window's top edge and
the content height, using these variables, calls the function
crossMoveV. crossMoveV takes care of crosshair movement on
a vertical axis


  • Parameter
    :


Method: setHeight
Description: Set the height of this window.
When the height changes we need to update the
windows controls etc...
  • Parameter
    s: height - the new height


Method: setWidth
Description: Set the width of this window.
When the width changes we need to update the
windows controls etc...
  • Parameter
    s: width - the new width

There is documentation/code mismatch

There is documentation/code mismatch

There is documentation/code mismatch

There is documentation/code mismatch

There is documentation/code mismatch