Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

osgWidget::Widget Class Reference

Inheritance diagram for osgWidget::Widget:
osg::Geometry osgWidget::EventInterface osgWidget::StyleInterface osg::Drawable osg::Object osg::Referenced osgWidget::Frame::Border osgWidget::Frame::Corner osgWidget::Label osgWidget::NotifyWidget osgWidget::NullWidget osgWidget::Window::EmbeddedWindow osgWidget::Input

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 = 100, LAYER_HIGH = 75, LAYER_MIDDLE = 50, LAYER_LOW = 25,
  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)
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 setLayer (Layer l, unsigned int offset=0)
void setTexCoordRegion (point_type, point_type, point_type, point_type)
void setTexCoordWrapHorizontal ()
void setTexCoordWrapVertical ()
bool setImage (osg::Image *, bool=false, bool=false)
bool setImage (const std::string &, bool=false, bool=false)
bool setTexture (osg::Texture *, bool=false, 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 Point & getPoint (Corner=ALL_CORNERS) const
const Color & getColor (Corner=ALL_CORNERS) const
const TexCoord & getTexCoord (Corner=ALL_CORNERS) 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 setTexCoordRegion (point_type x, point_type y, const XYCoord &wh)
void setTexCoordRegion (const XYCoord &xy, const XYCoord &wh)
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 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)
WindowManager * getWindowManager ()
const WindowManager * getWindowManager () const
Window * getParent ()
const Window * getParent () 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::Texture * _texture ()
const osg::Texture * _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:
CM_ABSOLUTE 
CM_RELATIVE 
Enumerator:
LOWER_LEFT 
LOWER_RIGHT 
UPPER_RIGHT 
UPPER_LEFT 
LL 
LR 
UR 
UL 
ALL_CORNERS 
Enumerator:
HA_CENTER 
HA_LEFT 
HA_RIGHT 
Enumerator:
LAYER_TOP 
LAYER_HIGH 
LAYER_MIDDLE 
LAYER_LOW 
LAYER_BG 
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]
ColorArray* osgWidget::Widget::_cols (  )  [inline, protected]
const ColorArray* osgWidget::Widget::_cols (  )  const [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]
TexCoordArray* osgWidget::Widget::_texs (  )  [inline, protected]
const TexCoordArray* osgWidget::Widget::_texs (  )  const [inline, protected]
osg::Texture* osgWidget::Widget::_texture (  )  [inline, protected]
const osg::Texture* osgWidget::Widget::_texture (  )  const [inline, protected]
PointArray* osgWidget::Widget::_verts (  )  [inline, protected]
const PointArray* osgWidget::Widget::_verts (  )  const [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 ( point_type  ,
point_type   
)
void osgWidget::Widget::addOrigin ( const XYCoord &  xy  )  [inline]

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

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

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

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]
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 ( point_type  x,
point_type  y 
) const
Color osgWidget::Widget::getImageColorAtXY ( const XYCoord &  xy  )  const [inline]

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

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
Window* osgWidget::Widget::getParent (  )  [inline]
const Window* osgWidget::Widget::getParent (  )  const [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]
WindowManager* osgWidget::Widget::getWindowManager (  )  [inline]
const WindowManager* osgWidget::Widget::getWindowManager (  )  const [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 *   )  [inline, virtual]
osgWidget::Widget::META_Object ( osgWidget  ,
Widget   
)
virtual void osgWidget::Widget::parented ( Window *   )  [inline, virtual]
virtual void osgWidget::Widget::positioned (  )  [inline, virtual]
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 ( color_type  ,
color_type  ,
color_type  ,
color_type  ,
Corner  = ALL_CORNERS 
)
void osgWidget::Widget::setColor ( const Color &  col,
Corner  p = ALL_CORNERS 
) [inline]
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  = false 
)
bool osgWidget::Widget::setImage ( osg::Image *  ,
bool  = false,
bool  = false 
)
void osgWidget::Widget::setLayer ( Layer  l,
unsigned int  offset = 0 
)
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::setOrigin ( const XYCoord &  xy  )  [inline]

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

void osgWidget::Widget::setOrigin ( point_type  x,
point_type  y 
) [inline]
void osgWidget::Widget::setPadBottom ( point_type  p  )  [inline]
void osgWidget::Widget::setPadding ( point_type   ) 
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::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::setTexCoord ( texcoord_type  ,
texcoord_type  ,
Corner  = ALL_CORNERS 
)
void osgWidget::Widget::setTexCoord ( const XYCoord &  xy,
Corner  p = ALL_CORNERS 
) [inline]

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

void osgWidget::Widget::setTexCoordRegion ( point_type  x,
point_type  y,
const XYCoord &  wh 
) [inline]

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

void osgWidget::Widget::setTexCoordRegion ( point_type  ,
point_type  ,
point_type  ,
point_type   
)
void osgWidget::Widget::setTexCoordRegion ( const XYCoord &  xy,
const XYCoord &  wh 
) [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::setTexCoordWrapHorizontal (  ) 
void osgWidget::Widget::setTexCoordWrapVertical (  ) 
bool osgWidget::Widget::setTexture ( osg::Texture *  ,
bool  = false,
bool  = false 
)
void osgWidget::Widget::setWidth ( point_type  w  )  [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]
virtual void osgWidget::Widget::unmanaged ( WindowManager *   )  [inline, virtual]
virtual void osgWidget::Widget::unparented ( Window *   )  [inline, virtual]

Friends And Related Function Documentation

friend class Window [friend]

Member Data Documentation

bool osgWidget::Widget::_canClone [protected]
bool osgWidget::Widget::_canFill [protected]
unsigned int osgWidget::Widget::_index [protected]

Reimplemented in osgWidget::Input.

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

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