Module vrMenu :: Class vrMenu
[frames] | no frames]

Class vrMenu

   object --+        
            |        
  ??.instance --+    
                |    
vrAEBase.vrAEBase --+
                    |
                   vrMenu

Creates 3d menues and windows.

Examples:

       See also example menu.py
Instance Methods
 
__init__(scale, n, d)
The constructor of the vrMenu class.
 
addCheckBox(text, o, text, o, style)
Adds a checkbox to the menu.
 
addLabel(text, text, style)
Adds a label to the menu.
 
addPushButton(text, o, text, o, style)
Adds a push button to the menu.
 
addSeparator()
Adds a separator to the menu.
 
click()
Clicks on the widget with the current focus.
 
getClickThroughAlphaThreshold()
Return click through alpha range value
 
getImage()
Return last clicked image
 
getUrl()
Return last clicked image
 
hide()
Hides the menu.
 
nextFocus()
Finds the next widget to give the keyboard focus on.
 
prevFocus()
Finds the previous widget to give the keyboard focus on.
 
setAlpha(alpha)
Sets the transparency of the menu.
 
setAutoResize(factor)
Scales the menu dependend on the current render window size.
 
setClickThroughAlphaThreshold(alpha)
Sets the click through alpha threshold of the menu.
 
setHtml(url, url, width, height)
Shows a web browser window with the provided html code instead of a user defined menu.
 
setMaterial(mat)
Maps the menu on to a material.
 
setNode(node)
Maps the menu on to a geometry node.
 
setPosition2D(x, y, x, y, back)
Sets the menu at a 2D position on the screen.
 
setScale(scale)
Scales the menu.
 
setText(id, text, id, text, style)
Changes the text.
 
setTransform(tx, ty, tz, rx, ry, rz)
Sets the translation and rotation of the menu.
 
setUrl(url, url, width, height)
Shows a web browser window with the provided url instead of a user defined menu.
 
setWindow(name)
Shows a module window with the provided name instead of a user defined menu.
 
setWindowResize(name, width, height)
Shows a module window with the provided name resizing it to width times height.
 
show()
Shows the menu.
 
toggleShow()
Toggles the menu.
 
update()
Updates the menu.

Inherited from vrAEBase.vrAEBase: __reduce__, addLoop, callAllConnected, connect, connectSignal, emitSignal, getModuleName, isActive, loop, recEvent, removeConnections, setActive, setUpdateGUIEnabled, subLoop

Inherited from unreachable.instance: __new__

Class Variables
  __instance_size__ = 1208
Method Details

__init__(scale, n, d)
(Constructor)

 

The constructor of the vrMenu class.

Parameters:
  • scale (float) - The scale.
  • n (int) - The number of columns in a row.
  • d (float) - The layout direction: 0 = vertical, 1 = horizontal.
Overrides: vrAEBase.vrAEBase.__init__

addCheckBox(text, o, text, o, style)

 

Adds a checkbox to the menu.

Parameters:
  • text (string) - The label of the checkbox.
  • o (boost::python::object

    Adds a checkbox to the menu.

    ) - The Python Object.
  • text (string) - The label of the checkbox.
  • o (boost::python::object

    Adds a checkbox to the menu.

    ) - The Python Object.
  • style (string) - style sheet.

addLabel(text, text, style)

 

Adds a label to the menu.

Parameters:
  • text (string

    Adds a label to the menu.

    ) - The label text.
  • text (string

    Adds a label to the menu.

    ) - The label text.
  • style (string) - style sheet.

addPushButton(text, o, text, o, style)

 

Adds a push button to the menu.

Parameters:
  • text (string) - The label of the button.
  • o (boost::python::object

    Adds a push button to the menu.

    ) - The Python Object.
  • text (string) - The label of the button.
  • o (boost::python::object

    Adds a push button to the menu.

    ) - The Python Object.
  • style (string) - style sheet.

setAlpha(alpha)

 

Sets the transparency of the menu.

Parameters:
  • alpha (float) - The alpha value in [0.0, 1.0]. 0.0 is fully transparent, 1.0 is fully opaque.

setAutoResize(factor)

 

Scales the menu dependend on the current render window size.

Parameters:
  • factor (float) - 0 means don't resize. > 0 multiplies the factor with the current render window width.

setClickThroughAlphaThreshold(alpha)

 

Sets the click through alpha threshold of the menu. The default is 1.0 this means for alpha values between smaller than 1.0 it will click through the menu and navigate the scene.

Parameters:
  • alpha (float) - 0.0 - 1.0.

setHtml(url, url, width, height)

 

Shows a web browser window with the provided html code instead of a user defined menu.

Parameters:
  • url (string

    Shows a web browser window with the provided html code instead of a user defined menu.

    ) - url.
  • url (string

    Shows a web browser window with the provided html code instead of a user defined menu.

    ) - url.
  • width (integer) - width of the web view.
  • height (integer) - height of the web view.

setMaterial(mat)

 

Maps the menu on to a material.

Parameters:
  • mat (vrMaterialPtr) - material.

setNode(node)

 

Maps the menu on to a geometry node.

Parameters:
  • node (vrNodePtr) - geometry node.

setPosition2D(x, y, x, y, back)

 

Sets the menu at a 2D position on the screen.

Parameters:
  • x (integer) - The horizontal position.
  • y (integer

    Sets the menu at a 2D position on the screen.

    ) - The vertical position.
  • x (integer) - The horizontal position.
  • y (integer

    Sets the menu at a 2D position on the screen.

    ) - The vertical position.
  • back (boolean) - use as a back plate.

setScale(scale)

 

Scales the menu.

Parameters:
  • scale (float) - The scale factor.

setText(id, text, id, text, style)

 

Changes the text.

Parameters:
  • id (integer) - id of the item.
  • text (string

    Adds a label to the menu.

    ) - text.
  • id (integer) - id of the item.
  • text (string

    Adds a label to the menu.

    ) - text.
  • style (string) - style sheet.

setTransform(tx, ty, tz, rx, ry, rz)

 

Sets the translation and rotation of the menu.

Parameters:
  • tx (float) - The x translation.
  • ty (float) - The y translation.
  • tz (float) - The z translation.
  • rx (float) - The x rotation.
  • ry (float) - The y rotation.
  • rz (float) - The z rotation.

setUrl(url, url, width, height)

 

Shows a web browser window with the provided url instead of a user defined menu.

Parameters:
  • url (string

    Shows a web browser window with the provided url instead of a user defined menu.

    ) - url.
  • url (string

    Shows a web browser window with the provided url instead of a user defined menu.

    ) - url.
  • width (integer) - width of the web view.
  • height (integer) - height of the web view.

setWindow(name)

 

Shows a module window with the provided name instead of a user defined menu.

Parameters:
  • name (string) - The name of the module.

setWindowResize(name, width, height)

 

Shows a module window with the provided name resizing it to width times height.

Parameters:
  • name (string) - The name of the module.
  • width (int) - The width of the window.
  • height (int) - The height of the window.