20#ifndef CO_UI_ELEMENT_H
21#define CO_UI_ELEMENT_H
24#define coMax(v1, v2) ((v1) > (v2) ? (v1) : (v2))
27#include <util/coTypes.h>
30#include <util/coTypes.h>
40class vruiTransformNode;
41class vruiUIElementProvider;
58 std::string Unique_Name;
114 virtual void setPos(
float,
float,
float) = 0;
128 return uiElementProvider;
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coUIContainer.h:24
Definition: coUIElement.h:53
virtual void setPos(float, float, float)=0
bool visible
true if UI element is visible, false if not visible but still present in scene tree
Definition: coUIElement.h:166
float zScaleFactor
UI element z axis scale factor.
Definition: coUIElement.h:163
virtual void setParent(coUIContainer *)
virtual coUIContainer * getParent()
virtual void shrinkToMin()
Set element location in space.
float yScaleFactor
UI element y axis scale factor.
Definition: coUIElement.h:162
virtual void setUserData(coUIUserData *)
bool highlighted
true if highlighted
Definition: coUIElement.h:165
virtual void createGeometry()
float xScaleFactor
UI element x axis scale factor.
Definition: coUIElement.h:161
virtual float getHeight() const =0
Returns element height.
void setUniqueName(const char *)
virtual void childResized(bool shrink=true)
virtual float getDepth() const
virtual void setAttachment(int)
sets the attachment border
Definition: coUIElement.h:142
Material
Color definitions, to be used whenever a material is needed.
Definition: coUIElement.h:66
@ HANDLE_BACKGROUND_HIGHLIGHTED
Definition: coUIElement.h:80
@ ITEM_BACKGROUND_NORMAL
Definition: coUIElement.h:76
@ BACKGROUND
Definition: coUIElement.h:82
@ BLUE
Definition: coUIElement.h:69
@ WHITE
Definition: coUIElement.h:72
@ WHITE_NL
self illuminated white (NL = no lighting)
Definition: coUIElement.h:75
@ ITEM_BACKGROUND_DISABLED
Definition: coUIElement.h:78
@ YELLOW
Definition: coUIElement.h:70
@ ITEM_BACKGROUND_HIGHLIGHTED
Definition: coUIElement.h:77
@ HANDLE_BACKGROUND_NORMAL
Definition: coUIElement.h:79
@ BLACK
Definition: coUIElement.h:73
@ HANDLE_BACKGROUND_DISABLED
Definition: coUIElement.h:81
@ GREY
Definition: coUIElement.h:71
@ GREEN
Definition: coUIElement.h:68
@ DARK_YELLOW
Definition: coUIElement.h:74
virtual bool isEnabled() const
virtual float getZpos() const
static vruiMatrix * getMatrixFromPositionHprScale(float x, float y, float z, float h, float p, float r, float scale)
virtual void setSize(float)
virtual const vruiMatrix * getTransformMatrix()
virtual void setHighlighted(bool highlighted)
virtual bool isVisible() const
virtual coUIUserData * getUserData() const
virtual int getAttachment() const
returns the attachment border
Definition: coUIElement.h:145
virtual float getXpos() const =0
Returns element x position.
virtual float getWidth() const =0
Returns element width.
virtual vruiTransformNode * getDCS()
virtual bool isOfClassName(const char *) const
check if the Element or any ancestor is this classname
virtual float getYpos() const =0
Returns element y position.
virtual vruiUIElementProvider * getUIElementProvider() const
Definition: coUIElement.h:126
bool enabled
true if UI element is enabled, false if UI element cannot be used
Definition: coUIElement.h:164
const char * getUniqueName() const
virtual void setVisible(bool visible)
virtual void resizeToParent(float, float, float, bool shrink=true)
virtual bool isHighlighted() const
virtual float getResizePref()
Definition: coUIElement.h:117
vruiUIElementProvider * uiElementProvider
Definition: coUIElement.h:170
virtual void setEnabled(bool enabled)
virtual void setSize(float, float, float)
virtual void resizeGeometry()
virtual const char * getClassName() const
get the Element's classname
@ RIGHT
Definition: coUIElement.h:137
@ BOTTOM
Definition: coUIElement.h:138
@ TOP
Definition: coUIElement.h:136
Definition: coUIUserData.h:18
Definition: vruiMatrix.h:20
Definition: vruiTransformNode.h:18
Definition: vruiUIElementProvider.h:23