16#ifndef OSGWIDGET_WINDOW
17#define OSGWIDGET_WINDOW
46 typedef std::list<osg::observer_ptr<Window> >
WindowList;
163 const std::string& =
"",
422 typedef std::less<point_type>
Less;
424 typedef std::plus<point_type>
Plus;
489 unsigned int c =
begin;
508 if(i->valid()) v = (i->get()->*get)();
512 if(T()(v, val)) val = v;
516 else val = T()(v, val);
523 if((c + add) <
_objects.size()) i += add;
The osgWidget library is a NodeKit that extends the core scene graph to support a 2D (and eventually ...
Definition Box:21
bool OSGWIDGET_EXPORT callbackWindowTabFocus(Event &)
osg::Vec4 Quad
Definition Types:37
Window::WindowList WindowList
Definition Window:658
Point::value_type point_type
Definition Types:33
osg::Vec2 XYCoord
Definition Types:36
bool OSGWIDGET_EXPORT callbackWindowRotate(Event &)
PointArray::value_type Point
Definition Types:29
bool OSGWIDGET_EXPORT callbackWindowScale(Event &)
@ EVENT_MOUSE_DRAG
Definition EventInterface:40
@ EVENT_KEY_DOWN
Definition EventInterface:44
std::list< osg::observer_ptr< Widget > > WidgetList
Definition Widget:513
osg::Matrix::value_type matrix_type
Definition Types:39
bool OSGWIDGET_EXPORT callbackWindowMove(Event &)
Copy Op(erator) used to control whether shallow or deep copy is used during copy construction and clo...
Definition CopyOp:41
Pure virtual base class for drawable geometry.
Definition Drawable:89
A Geode is a "geometry node", that is, a leaf node on the scene graph that can have "renderable thing...
Definition Geode:29
Node * getChild(unsigned int i)
Return child node at position i.
Definition Group:117
MatrixTransform - is a subclass of Transform which has an osg::Matrix which represents a 4x4 transfor...
Definition MatrixTransform:26
Base class for all internal nodes in the scene graph.
Definition Node:72
osg::StateSet * getStateSet()
Return the node's StateSet.
Definition Node:382
Smart pointer for observed objects, that automatically set pointers to them to null when they are del...
Definition observer_ptr:39
Smart pointer for handling referenced counted objects.
Definition ref_ptr:32
Encapsulate OpenGL glScissor.
Definition Scissor:23
@ SCISSOR
Definition StateAttribute:156
value_type & x()
Definition Vec2f:67
value_type & y()
Definition Vec2f:68
Definition EventInterface:61
Definition EventInterface:207
void addCallback(Callback *cb)
Definition EventInterface:322
EventInterface()
Definition EventInterface:270
StyleInterface()
Definition StyleInterface:26
Definition UIObjectParent:26
Iterator end()
Definition UIObjectParent:43
Vector _objects
Definition UIObjectParent:105
Vector::const_iterator ConstIterator
Definition UIObjectParent:33
Iterator begin()
Definition UIObjectParent:35
friend class Window
Definition Widget:459
Widget(const std::string &="", point_type=0.0f, point_type=0.0f)
Layer
Definition Widget:49
@ LAYER_MIDDLE
Definition Widget:52
EmbeddedWindow * embed(const std::string &="", Widget::Layer=Widget::LAYER_MIDDLE, unsigned int=0)
virtual Sizes _getHeightImplementation() const
void setScale(matrix_type s)
Definition Window:353
point_type _getMinWidgetWidthTotal(int=0, int=0, int=1) const
point_type getMinHeight() const
Definition Window:258
void addRotate(matrix_type r)
Definition Window:389
Window * _getTopmostParent() const
HorizontalAnchor _hAnchor
Definition Window:466
point_type _getMinWidgetHeight(int=0, int=0, int=1) const
matrix_type _x
Definition Window:438
matrix_type _y
Definition Window:439
point_type _getMinWidgetWidth(int=0, int=0, int=1) const
point_type _getMinWidgetMinWidth(int=0, int=0, int=1) const
void addX(matrix_type x)
Definition Window:377
point_type _getMaxWidgetPadHorizontal(int=0, int=0, int=1) const
bool show()
Definition Window:176
point_type _forEachAssignOrApply(Getter get, int begin, int end, int add, bool assign) const
Definition Window:481
matrix_type _z
Definition Window:443
virtual bool insertWidget(Widget *, unsigned int)
VerticalAnchor getAnchorVertical() const
Definition Window:262
void attachMoveCallback()
Definition Window:402
Sizes _width
Definition Window:462
const Window * getParent() const
Definition Window:218
const Window * getTopmostParent() const
Definition Window:226
bool isPointerXYWithinVisible(float x, float y) const
Definition Window:184
const Widget * getBackground() const
Definition Window:202
point_type _getMaxWidgetWidth(int=0, int=0, int=1) const
point_type _getMaxWidgetPadVertical(int=0, int=0, int=1) const
bool resizeAdd(point_type=0.0f, point_type=0.0f)
void _setWidthAndHeightUnknownSizeError(const std::string &, point_type)
osg::observer_ptr< Widget > _focused
Definition Window:470
bool getEmbeddedList(WindowList &) const
point_type _getMaxWidgetHeight(int=0, int=0, int=1) const
std::list< osg::observer_ptr< Window > > WindowList
Definition Window:46
void setOrigin(const XYCoord &xy)
Definition Window:345
bool resizePercent(point_type=0.0f, point_type=0.0f)
void setPosition(const Point &p)
Definition Window:336
bool getFocusList(WidgetList &) const
void addOrigin(matrix_type x, matrix_type y)
Definition Window:397
point_type _getMaxWidgetMinHeight(int=0, int=0, int=1) const
Strata _strata
Definition Window:448
void addVisibleArea(int=0, int=0, int=0, int=0)
HorizontalAnchor
Definition Window:118
@ HA_LEFT
Definition Window:121
@ HA_CENTER
Definition Window:120
@ HA_NONE
Definition Window:119
@ HA_RIGHT
Definition Window:122
void setZRange(matrix_type zRange)
Definition Window:326
const Widget * _bg() const
Definition Window:582
virtual bool removeWidget(Widget *)
const osg::Geode * getGeode() const
Definition Window:194
void _positionWidget(Widget *, point_type, point_type)
std::greater< point_type > Greater
Definition Window:423
void attachTabFocusCallback()
Definition Window:414
virtual bool replaceWidget(Widget *, Widget *)
Window * _parent
Definition Window:429
point_type _getMinWidgetPadVertical(int=0, int=0, int=1) const
point_type _getMinWidgetMinHeightTotal(int=0, int=0, int=1) const
bool _setWidget(Widget *, int=-1)
bool hide()
Definition Window:180
virtual bool addWidget(Widget *)
Widget * _bg()
Definition Window:578
matrix_type _zRange
Definition Window:444
Window * getParent()
Definition Window:214
void setScaleDenominator(matrix_type sd)
Definition Window:357
WindowManager * getWindowManager()
Definition Window:206
Point getPosition() const
Definition Window:298
unsigned int _index
Definition Window:435
virtual Sizes _getWidthImplementation() const
bool setFocused(const std::string &)
Widget * _getBackground() const
VisibilityMode _vis
Definition Window:452
VisibilityMode getVisibilityMode() const
Definition Window:294
Widget * getFocused()
Definition Window:168
point_type _getMinWidgetMinHeight(int=0, int=0, int=1) const
void _setFocused(Widget *)
point_type _getNumFill(int=0, int=0, int=1) const
void addScale(matrix_type s)
Definition Window:393
unsigned int getIndex() const
Definition Window:230
void addZ(matrix_type z)
Definition Window:385
void _setParented(Widget *, bool=false)
point_type getMinWidth() const
Definition Window:254
Window(const Window &, const osg::CopyOp &)
osg::Scissor * _scissor()
Definition Window:586
friend class WindowManager
Definition Window:426
Window * getTopmostParent()
Definition Window:222
matrix_type getScaleDenominator() const
Definition Window:310
void setAnchorVertical(VerticalAnchor va)
Definition Window:361
void setY(matrix_type y)
Definition Window:318
bool isXYWithinVisible(float, float) const
XYCoord getOrigin() const
Definition Window:270
point_type _compare(Getter get, int begin=0, int end=0, int add=1) const
Definition Window:547
const osg::Geode * _geode() const
Definition Window:574
matrix_type getY() const
Definition Window:238
void setX(matrix_type x)
Definition Window:314
XYCoord getAbsoluteOrigin() const
XYCoord getSize() const
Definition Window:274
WindowManager * _wm
Definition Window:432
HorizontalAnchor getAnchorHorizontal() const
Definition Window:266
void setAnchorHorizontal(HorizontalAnchor ha)
Definition Window:365
unsigned int addChildAndGetIndex(osg::Node *)
matrix_type getZRange() const
Definition Window:282
point_type _getMaxWidgetMinHeightTotal(int=0, int=0, int=1) const
point_type(Widget::* Getter)() const
Definition Window:418
void attachRotateCallback()
Definition Window:406
point_type getHeight() const
Definition Window:250
XYCoord localXY(double, double) const
point_type _getMinWidgetPadHorizontal(int=0, int=0, int=1) const
bool resize(point_type=0.0f, point_type=0.0f)
osg::Geode * _geode()
Definition Window:570
VerticalAnchor
Definition Window:111
@ VA_NONE
Definition Window:112
@ VA_CENTER
Definition Window:113
@ VA_BOTTOM
Definition Window:115
@ VA_TOP
Definition Window:114
void setOrigin(matrix_type x, matrix_type y)
Definition Window:340
Window(const std::string &="")
VerticalAnchor _vAnchor
Definition Window:465
void attachScaleCallback()
Definition Window:410
void _setWidthAndHeightNotPAError(const std::string &, point_type)
const Quad & getVisibleArea() const
Definition Window:290
matrix_type getRotate() const
Definition Window:302
void _setWidthAndHeight()
virtual void managed(WindowManager *)
point_type _getMaxWidgetHeightTotal(int=0, int=0, int=1) const
matrix_type _s
Definition Window:458
void _setManaged(Widget *, bool=false)
unsigned int addDrawableAndGetIndex(osg::Drawable *)
point_type _getMaxWidgetMinWidthTotal(int=0, int=0, int=1) const
point_type _getMaxWidgetWidthTotal(int=0, int=0, int=1) const
const WindowManager * getWindowManager() const
Definition Window:210
std::less< point_type > Less
Definition Window:422
void _setStyled(Widget *)
point_type _getMaxWidgetMinWidth(int=0, int=0, int=1) const
void setRotate(matrix_type r)
Definition Window:349
matrix_type getZ() const
Definition Window:242
void addY(matrix_type y)
Definition Window:381
point_type _getMinWidgetHeightTotal(int=0, int=0, int=1) const
Strata getStrata() const
Definition Window:286
Quad _visibleArea
Definition Window:475
void setStrata(Strata s)
Definition Window:369
matrix_type _scaleDenom
Definition Window:460
matrix_type getScale() const
Definition Window:306
const Widget * getFocused() const
Definition Window:172
Widget * getBackground()
Definition Window:198
void setVisibleArea(int=0, int=0, int=0, int=0)
void setZ(matrix_type z)
Definition Window:322
Sizes _height
Definition Window:463
XYCoord getMinSize() const
Definition Window:278
virtual void _resizeImplementation(point_type, point_type)=0
void getParentList(WindowList &) const
bool setFocused(const Widget *)
std::plus< point_type > Plus
Definition Window:424
void setPosition(matrix_type x, matrix_type y, matrix_type z)
Definition Window:330
Strata
Definition Window:90
@ STRATA_NONE
Definition Window:91
@ STRATA_BACKGROUND
Definition Window:92
@ STRATA_FOREGROUND
Definition Window:93
virtual void unmanaged(WindowManager *)
point_type _getMinWidgetMinWidthTotal(int=0, int=0, int=1) const
void setVisibilityMode(VisibilityMode v)
Definition Window:373
point_type _accumulate(Getter get, int begin=0, int end=0, int add=1) const
Definition Window:561
matrix_type getX() const
Definition Window:234
osg::Geode * getGeode()
Definition Window:190
void _removeFromGeode(Widget *)
matrix_type _r
Definition Window:455
point_type getWidth() const
Definition Window:246
VisibilityMode
Definition Window:101
@ VM_ENTIRE
Definition Window:104
@ VM_PARTIAL
Definition Window:103
@ VM_FULL
Definition Window:102
point_type minimum
Definition Window:51
point_type current
Definition Window:50
Sizes(point_type c=-1.0f, point_type m=-1.0f)
Definition Window:53
Window * getWindow()
Definition Window:78
virtual void parented(Window *)
void updateSizeFromWindow()
virtual void unparented(Window *)
EmbeddedWindow(const EmbeddedWindow &, const osg::CopyOp &)
EmbeddedWindow(const std::string &="", point_type=0.0f, point_type=0.0f)
virtual void unmanaged(WindowManager *)
virtual void managed(WindowManager *)
const Window * getWindow() const
Definition Window:82
META_Object(osgWidget::Window, EmbeddedWindow)
virtual void positioned()
#define OSGWIDGET_EXPORT
Definition Export:42