osgWidget::Widget Class Reference

Inheritance diagram for osgWidget::Widget:

Inheritance graph
[legend]

List of all members.

Public Types

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

Enumerator:
LOWER_LEFT 
LOWER_RIGHT 
UPPER_RIGHT 
UPPER_LEFT 
LL 
LR 
UR 
UL 
ALL_CORNERS 

Enumerator:
LAYER_TOP 
LAYER_HIGH 
LAYER_MIDDLE 
LAYER_LOW 
LAYER_BG 

Enumerator:
VA_CENTER 
VA_TOP 
VA_BOTTOM 

Enumerator:
HA_CENTER 
HA_LEFT 
HA_RIGHT 

Enumerator:
CM_ABSOLUTE 
CM_RELATIVE 


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

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

osgWidget::Widget::META_UIObject ( Widget   ) 

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

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

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

virtual void osgWidget::Widget::unmanaged ( WindowManager  )  [inline, virtual]

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

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::setPadding ( point_type   ) 

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

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

void osgWidget::Widget::setTexCoord ( texcoord_type  ,
texcoord_type  ,
Corner  = ALL_CORNERS 
)

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

void osgWidget::Widget::setTexCoordWrapHorizontal (  ) 

void osgWidget::Widget::setTexCoordWrapVertical (  ) 

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

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

void osgWidget::Widget::addX ( point_type   ) 

void osgWidget::Widget::addY ( point_type   ) 

void osgWidget::Widget::addWidth ( point_type   ) 

void osgWidget::Widget::addHeight ( point_type   ) 

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

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

point_type osgWidget::Widget::getWidth (  )  const

point_type osgWidget::Widget::getHeight (  )  const

point_type osgWidget::Widget::getX (  )  const

point_type osgWidget::Widget::getY (  )  const

point_type osgWidget::Widget::getZ (  )  const

point_type osgWidget::Widget::getPadHorizontal (  )  const

point_type osgWidget::Widget::getPadVertical (  )  const

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

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

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

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

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

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

bool osgWidget::Widget::isPaddingUniform (  )  const

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

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

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

void osgWidget::Widget::setX ( point_type  x  )  [inline]

void osgWidget::Widget::setY ( point_type  y  )  [inline]

void osgWidget::Widget::setZ ( point_type  z  )  [inline]

void osgWidget::Widget::setWidth ( point_type  w  )  [inline]

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

void osgWidget::Widget::setOrigin ( point_type  x,
point_type  y 
) [inline]

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

References osg::Vec2f::x(), and osg::Vec2f::y().

void osgWidget::Widget::setSize ( point_type  w,
point_type  h 
) [inline]

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

References osg::Vec2f::x(), and osg::Vec2f::y().

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

void osgWidget::Widget::setTexCoord ( const XYCoord xy,
Corner  p = ALL_CORNERS 
) [inline]

References osg::Vec2f::x(), and osg::Vec2f::y().

void osgWidget::Widget::setTexCoordRegion ( const XYCoord xy,
point_type  w,
point_type  h 
) [inline]

References osg::Vec2f::x(), and osg::Vec2f::y().

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

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

References osg::Vec2f::x(), and osg::Vec2f::y().

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

References osg::Vec2f::x(), and osg::Vec2f::y().

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

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

References osg::Vec2f::x(), and osg::Vec2f::y().

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

void osgWidget::Widget::setPadLeft ( point_type  p  )  [inline]

void osgWidget::Widget::setPadRight ( point_type  p  )  [inline]

void osgWidget::Widget::setPadTop ( point_type  p  )  [inline]

void osgWidget::Widget::setPadBottom ( point_type  p  )  [inline]

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

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

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

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

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

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

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

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

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

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

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

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

References osg::Vec2f::x(), and osg::Vec2f::y().

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

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

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

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

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::getPadBottom (  )  const [inline]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


Friends And Related Function Documentation

friend class Window [friend]


Member Data Documentation

unsigned int osgWidget::Widget::_index [protected]

Reimplemented in osgWidget::Input.

unsigned int osgWidget::Widget::_layer [protected]

bool osgWidget::Widget::_canFill [protected]

bool osgWidget::Widget::_canClone [protected]

bool osgWidget::Widget::_isStyled [protected]


The documentation for this class was generated from the following file:

Generated at Thu Aug 14 05:01:13 2008 for the OpenSceneGraph by doxygen 1.5.6.