osgWidget::Widget Class Reference

Inheritance diagram for osgWidget::Widget:

Inheritance graph
[legend]
List of all members.

Public Types

 LOWER_LEFT = 0
 LOWER_RIGHT = 1
 UPPER_RIGHT = 2
 UPPER_LEFT = 3
 LL = LOWER_LEFT
 LR = LOWER_RIGHT
 UR = UPPER_RIGHT
 UL = UPPER_LEFT
 ALL_CORNERS = 4
 LAYER_TOP = 20
 LAYER_HIGH = 15
 LAYER_MIDDLE = 10
 LAYER_LOW = 5
 LAYER_BG = 0
 VA_CENTER
 VA_TOP
 VA_BOTTOM
 HA_CENTER
 HA_LEFT
 HA_RIGHT
 CM_ABSOLUTE
 CM_RELATIVE
enum  Corner {
  LOWER_LEFT = 0, LOWER_RIGHT = 1, UPPER_RIGHT = 2, UPPER_LEFT = 3,
  LL = LOWER_LEFT, LR = LOWER_RIGHT, UR = UPPER_RIGHT, UL = UPPER_LEFT,
  ALL_CORNERS = 4
}
enum  Layer {
  LAYER_TOP = 20, LAYER_HIGH = 15, LAYER_MIDDLE = 10, LAYER_LOW = 5,
  LAYER_BG = 0
}
enum  VerticalAlignment { VA_CENTER, VA_TOP, VA_BOTTOM }
enum  HorizontalAlignment { HA_CENTER, HA_LEFT, HA_RIGHT }
enum  CoordinateMode { CM_ABSOLUTE, CM_RELATIVE }

Public Member Functions

 Widget (const std::string &="", point_type=0.0f, point_type=0.0f)
 Widget (const Widget &, const osg::CopyOp &)
 META_Object (osgWidget, Widget)
 META_UIObject (Widget)
virtual ~Widget ()
virtual void parented (Window *)
virtual void unparented (Window *)
virtual void managed (WindowManager *)
virtual void unmanaged (WindowManager *)
virtual void positioned ()
void setDimensions (point_type=-1.0f, point_type=-1.0f, point_type=-1.0f, point_type=-1.0f, point_type=-1.0f)
void setPadding (point_type)
void setColor (color_type, color_type, color_type, color_type, Corner=ALL_CORNERS)
void addColor (color_type, color_type, color_type, color_type, Corner=ALL_CORNERS)
void setTexCoord (texcoord_type, texcoord_type, Corner=ALL_CORNERS)
void setTexCoordRegion (point_type, point_type, point_type, point_type)
void setTexCoordWrapHorizontal ()
void setTexCoordWrapVertical ()
bool setImage (osg::Image *, bool=false)
bool setImage (const std::string &, bool=false)
void addX (point_type)
void addY (point_type)
void addWidth (point_type)
void addHeight (point_type)
void addOrigin (point_type, point_type)
void addSize (point_type, point_type)
point_type getWidth () const
point_type getHeight () const
point_type getX () const
point_type getY () const
point_type getZ () const
point_type getPadHorizontal () const
point_type getPadVertical () const
const PointgetPoint (Corner=ALL_CORNERS) const
const ColorgetColor (Corner=ALL_CORNERS) const
const TexCoordgetTexCoord (Corner=ALL_CORNERS) const
Corner convertCorner (Corner) const
Color getImageColorAtXY (point_type x, point_type y) const
XYCoord localXY (double, double) const
bool isPaddingUniform () const
bool isManaged () const
bool isStyled () const
void setDimensions (const Quad &q, point_type z=-1.0f)
void setX (point_type x)
void setY (point_type y)
void setZ (point_type z)
void setWidth (point_type w)
void setHeight (point_type h)
void setOrigin (point_type x, point_type y)
void setOrigin (const XYCoord &xy)
void setSize (point_type w, point_type h)
void setSize (const XYCoord &xy)
void setColor (const Color &col, Corner p=ALL_CORNERS)
void setTexCoord (const XYCoord &xy, Corner p=ALL_CORNERS)
void setTexCoordRegion (const XYCoord &xy, point_type w, point_type h)
void addColor (const Color &col, Corner p=ALL_CORNERS)
void addOrigin (const XYCoord &xy)
void addSize (const XYCoord &xy)
void setMinimumSize (point_type width, point_type height)
void setMinimumSize (const XYCoord &xy)
void setLayer (Layer l, unsigned int offset=0)
void setPadLeft (point_type p)
void setPadRight (point_type p)
void setPadTop (point_type p)
void setPadBottom (point_type p)
void setAlignHorizontal (HorizontalAlignment h)
void setAlignVertical (VerticalAlignment v)
void setCoordinateMode (CoordinateMode cm)
void setCanFill (bool f)
void setCanClone (bool c)
WindowManagergetWindowManager ()
const WindowManagergetWindowManager () const
WindowgetParent ()
const WindowgetParent () const
unsigned int getIndex () const
XYCoord getOrigin () const
Color getImageColorAtXY (const XYCoord &xy) const
Color getImageColorAtPointerXY (double x, double y) const
Point getPosition () const
XYCoord getSize () const
Quad getDimensions () const
point_type getPadLeft () const
point_type getPadRight () const
point_type getPadTop () const
point_type getPadBottom () const
HorizontalAlignment getAlignHorizontal () const
VerticalAlignment getAlignVertical () const
CoordinateMode getCoordinateMode () const
bool canFill () const
bool canClone () const
point_type getFillAsNumeric () const
point_type getWidthTotal () const
point_type getHeightTotal () const
point_type getMinWidth () const
point_type getMinHeight () const
point_type getMinWidthTotal () const
point_type getMinHeightTotal () const
unsigned int getLayer () const

Protected Member Functions

point_type _calculateZ (unsigned int) const
PointArray_verts ()
const PointArray_verts () const
ColorArray_cols ()
const ColorArray_cols () const
TexCoordArray_texs ()
const TexCoordArray_texs () const
osg::Texture2D_texture ()
const osg::Texture2D_texture () const
osg::Image_image ()
const osg::Image_image () const
WindowManager_getWindowManager () const
osg::Image_getImage () const

Protected Attributes

Window_parent
unsigned int _index
unsigned int _layer
point_type _padLeft
point_type _padRight
point_type _padTop
point_type _padBottom
VerticalAlignment _valign
HorizontalAlignment _halign
CoordinateMode _coordMode
Quad _relCoords
bool _canFill
bool _canClone
bool _isManaged
bool _isStyled
point_type _minWidth
point_type _minHeight

Static Protected Attributes

static osg::ref_ptr< PointArray_norms

Friends

class Window

Member Enumeration Documentation

enum osgWidget::Widget::CoordinateMode

Enumerator:
CM_ABSOLUTE 
CM_RELATIVE 

enum osgWidget::Widget::Corner

Enumerator:
LOWER_LEFT 
LOWER_RIGHT 
UPPER_RIGHT 
UPPER_LEFT 
LL 
LR 
UR 
UL 
ALL_CORNERS 

enum osgWidget::Widget::HorizontalAlignment

Enumerator:
HA_CENTER 
HA_LEFT 
HA_RIGHT 

enum osgWidget::Widget::Layer

Enumerator:
LAYER_TOP 
LAYER_HIGH 
LAYER_MIDDLE 
LAYER_LOW 
LAYER_BG 

enum osgWidget::Widget::VerticalAlignment

Enumerator:
VA_CENTER 
VA_TOP 
VA_BOTTOM 


Constructor & Destructor Documentation

osgWidget::Widget::Widget ( const std::string &  = "",
point_type  = 0.0f,
point_type  = 0.0f 
)

osgWidget::Widget::Widget ( const Widget ,
const osg::CopyOp  
)

virtual osgWidget::Widget::~Widget (  )  [inline, virtual]


Member Function Documentation

point_type osgWidget::Widget::_calculateZ ( unsigned  int  )  const [protected]

const ColorArray* osgWidget::Widget::_cols (  )  const [inline, protected]

ColorArray* osgWidget::Widget::_cols (  )  [inline, protected]

osg::Image* osgWidget::Widget::_getImage (  )  const [protected]

WindowManager* osgWidget::Widget::_getWindowManager (  )  const [protected]

const osg::Image* osgWidget::Widget::_image (  )  const [inline, protected]

osg::Image* osgWidget::Widget::_image (  )  [inline, protected]

const TexCoordArray* osgWidget::Widget::_texs (  )  const [inline, protected]

TexCoordArray* osgWidget::Widget::_texs (  )  [inline, protected]

const osg::Texture2D* osgWidget::Widget::_texture (  )  const [inline, protected]

osg::Texture2D* osgWidget::Widget::_texture (  )  [inline, protected]

const PointArray* osgWidget::Widget::_verts (  )  const [inline, protected]

PointArray* osgWidget::Widget::_verts (  )  [inline, protected]

void osgWidget::Widget::addColor ( const Color col,
Corner  p = ALL_CORNERS 
) [inline]

void osgWidget::Widget::addColor ( color_type  ,
color_type  ,
color_type  ,
color_type  ,
Corner  = ALL_CORNERS 
)

void osgWidget::Widget::addHeight ( point_type   ) 

void osgWidget::Widget::addOrigin ( const XYCoord xy  )  [inline]

void osgWidget::Widget::addOrigin ( point_type  ,
point_type   
)

void osgWidget::Widget::addSize ( const XYCoord xy  )  [inline]

void osgWidget::Widget::addSize ( point_type  ,
point_type   
)

void osgWidget::Widget::addWidth ( point_type   ) 

void osgWidget::Widget::addX ( point_type   ) 

void osgWidget::Widget::addY ( point_type   ) 

bool osgWidget::Widget::canClone (  )  const [inline]

bool osgWidget::Widget::canFill (  )  const [inline]

Corner osgWidget::Widget::convertCorner ( Corner   )  const

HorizontalAlignment osgWidget::Widget::getAlignHorizontal (  )  const [inline]

VerticalAlignment osgWidget::Widget::getAlignVertical (  )  const [inline]

const Color& osgWidget::Widget::getColor ( Corner  = ALL_CORNERS  )  const

CoordinateMode osgWidget::Widget::getCoordinateMode (  )  const [inline]

Quad osgWidget::Widget::getDimensions (  )  const [inline]

point_type osgWidget::Widget::getFillAsNumeric (  )  const [inline]

point_type osgWidget::Widget::getHeight (  )  const

point_type osgWidget::Widget::getHeightTotal (  )  const [inline]

Color osgWidget::Widget::getImageColorAtPointerXY ( double  x,
double  y 
) const [inline]

Color osgWidget::Widget::getImageColorAtXY ( const XYCoord xy  )  const [inline]

Color osgWidget::Widget::getImageColorAtXY ( point_type  x,
point_type  y 
) const

unsigned int osgWidget::Widget::getIndex (  )  const [inline]

unsigned int osgWidget::Widget::getLayer (  )  const [inline]

point_type osgWidget::Widget::getMinHeight (  )  const [inline]

point_type osgWidget::Widget::getMinHeightTotal (  )  const [inline]

point_type osgWidget::Widget::getMinWidth (  )  const [inline]

point_type osgWidget::Widget::getMinWidthTotal (  )  const [inline]

XYCoord osgWidget::Widget::getOrigin (  )  const [inline]

point_type osgWidget::Widget::getPadBottom (  )  const [inline]

point_type osgWidget::Widget::getPadHorizontal (  )  const

point_type osgWidget::Widget::getPadLeft (  )  const [inline]

point_type osgWidget::Widget::getPadRight (  )  const [inline]

point_type osgWidget::Widget::getPadTop (  )  const [inline]

point_type osgWidget::Widget::getPadVertical (  )  const

const Window* osgWidget::Widget::getParent (  )  const [inline]

Window* osgWidget::Widget::getParent (  )  [inline]

const Point& osgWidget::Widget::getPoint ( Corner  = ALL_CORNERS  )  const

Point osgWidget::Widget::getPosition (  )  const [inline]

XYCoord osgWidget::Widget::getSize (  )  const [inline]

const TexCoord& osgWidget::Widget::getTexCoord ( Corner  = ALL_CORNERS  )  const

point_type osgWidget::Widget::getWidth (  )  const

point_type osgWidget::Widget::getWidthTotal (  )  const [inline]

const WindowManager* osgWidget::Widget::getWindowManager (  )  const [inline]

WindowManager* osgWidget::Widget::getWindowManager (  )  [inline]

point_type osgWidget::Widget::getX (  )  const

point_type osgWidget::Widget::getY (  )  const

point_type osgWidget::Widget::getZ (  )  const

bool osgWidget::Widget::isManaged (  )  const [inline]

bool osgWidget::Widget::isPaddingUniform (  )  const

bool osgWidget::Widget::isStyled (  )  const [inline]

XYCoord osgWidget::Widget::localXY ( double  ,
double   
) const

virtual void osgWidget::Widget::managed ( WindowManager  )  [virtual]

Reimplemented in osgWidget::Label, and osgWidget::Window::EmbeddedWindow.

osgWidget::Widget::META_Object ( osgWidget  ,
Widget   
)

osgWidget::Widget::META_UIObject ( Widget   ) 

virtual void osgWidget::Widget::parented ( Window  )  [inline, virtual]

Reimplemented in osgWidget::Input, osgWidget::Label, and osgWidget::Window::EmbeddedWindow.

virtual void osgWidget::Widget::positioned (  )  [inline, virtual]

Reimplemented in osgWidget::Input, osgWidget::Label, and osgWidget::Window::EmbeddedWindow.

void osgWidget::Widget::setAlignHorizontal ( HorizontalAlignment  h  )  [inline]

void osgWidget::Widget::setAlignVertical ( VerticalAlignment  v  )  [inline]

void osgWidget::Widget::setCanClone ( bool  c  )  [inline]

void osgWidget::Widget::setCanFill ( bool  f  )  [inline]

void osgWidget::Widget::setColor ( const Color col,
Corner  p = ALL_CORNERS 
) [inline]

void osgWidget::Widget::setColor ( color_type  ,
color_type  ,
color_type  ,
color_type  ,
Corner  = ALL_CORNERS 
)

void osgWidget::Widget::setCoordinateMode ( CoordinateMode  cm  )  [inline]

void osgWidget::Widget::setDimensions ( const Quad q,
point_type  z = -1.0f 
) [inline]

void osgWidget::Widget::setDimensions ( point_type  = -1.0f,
point_type  = -1.0f,
point_type  = -1.0f,
point_type  = -1.0f,
point_type  = -1.0f 
)

void osgWidget::Widget::setHeight ( point_type  h  )  [inline]

bool osgWidget::Widget::setImage ( const std::string &  ,
bool  = false 
)

bool osgWidget::Widget::setImage ( osg::Image ,
bool  = false 
)

void osgWidget::Widget::setLayer ( Layer  l,
unsigned int  offset = 0 
) [inline]

void osgWidget::Widget::setMinimumSize ( const XYCoord xy  )  [inline]

void osgWidget::Widget::setMinimumSize ( point_type  width,
point_type  height 
) [inline]

void osgWidget::Widget::setOrigin ( const XYCoord xy  )  [inline]

void osgWidget::Widget::setOrigin ( point_type  x,
point_type