16 #ifndef OSGWIDGET_WIDGET
17 #define OSGWIDGET_WIDGET
19 #include <osg/Texture2D>
20 #include <osgWidget/EventInterface>
21 #include <osgWidget/StyleInterface>
22 #include <osgWidget/UIObjectParent>
23 #include <osgWidget/Types>
120 void setLayer (Layer l,
unsigned int offset = 0);
128 void setTexCoordWrapHorizontal ();
129 void setTexCoordWrapVertical ();
131 bool setImage (
osg::Image*,
bool =
false,
bool =
false);
132 bool setImage (
const std::string&,
bool =
false,
bool =
false);
133 bool setTexture (
osg::Texture*,
bool =
false,
bool =
false);
150 const Point& getPoint (Corner = ALL_CORNERS)
const;
151 const Color& getColor (Corner = ALL_CORNERS)
const;
152 const TexCoord& getTexCoord (Corner = ALL_CORNERS)
const;
155 XYCoord localXY (
double,
double)
const;
157 bool isPaddingUniform()
const;
168 setDimensions(q[0], q[1], q[2], q[3], z);
176 setDimensions(-1.0f, y);
181 setDimensions(-1.0f, -1.0f, -1.0f, -1.0f, z);
185 setDimensions(-1.0f, -1.0f, w);
189 setDimensions(-1.0f, -1.0f, -1.0f, h);
197 setOrigin(xy.
x(), xy.
y());
201 setDimensions(-1.0f, -1.0f, w, h);
205 setSize(xy.
x(), xy.
y());
209 setColor(col.r(), col.g(), col.b(), col.a(), p);
213 setTexCoord(xy.
x(), xy.
y(), p);
217 setTexCoordRegion(xy.
x(), xy.
y(), w, h);
221 setTexCoordRegion(x, y, wh.
x(), wh.
y());
225 setTexCoordRegion(xy.
x(), xy.
y(), wh.
x(), wh.
y());
229 addColor(col.r(), col.g(), col.b(), col.a(), p);
233 addOrigin(xy.
x(), xy.
y());
237 addSize(xy.
x(), xy.
y());
246 setMinimumSize(xy.
x(), xy.
y());
286 return _getWindowManager();
290 return _getWindowManager();
306 return XYCoord(getX(), getY());
310 return getImageColorAtXY(xy.
x(), xy.
y());
314 return getImageColorAtXY(localXY(x, y));
318 return Point(getX(), getY(), getZ());
322 return XYCoord(getWidth(), getHeight());
326 return Quad(getX(), getY(), getWidth(), getHeight());
372 return getWidth() + getPadHorizontal();
376 return getHeight() + getPadVertical();
388 return _minWidth + getPadHorizontal();
392 return _minHeight + getPadVertical();
404 return dynamic_cast<PointArray*
>(getVertexArray());
408 return dynamic_cast<const PointArray*
>(getVertexArray());
412 return dynamic_cast<ColorArray*
>(getColorArray());
416 return dynamic_cast<const ColorArray*
>(getColorArray());
424 return dynamic_cast<const TexCoordArray*
>(getTexCoordArray(0));
StateAttribute * getTextureAttribute(unsigned int unit, StateAttribute::Type type)
#define META_Object(library, name)
GLint GLenum GLsizei width
GLint GLenum GLsizei GLsizei height
OSG_EXPORT std::ostream & notify(const NotifySeverity severity)