OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Widget.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2008 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 // Code by: Jeremy Moles (cubicool) 2007-2008
15 
16 #ifndef OSGWIDGET_WIDGET
17 #define OSGWIDGET_WIDGET
18 
19 #include <osg/Texture2D>
20 #include <osgWidget/EventInterface>
21 #include <osgWidget/StyleInterface>
22 #include <osgWidget/UIObjectParent>
23 #include <osgWidget/Types>
24 
25 namespace osgWidget {
26 
27 class Window;
28 class WindowManager;
29 
30 // A Widget is a rectangular region that receives events about the state of various input
31 // devices such as the pointer and keyboard. It is aware of it's width, height, and origin but
32 // nothing else. It is the job of higher-level container objects to organize layouts and
33 // the like, and to contextualize the meaning of the widgets "origin" (whether it is absolute
34 // or relative).
36 public:
37  enum Corner {
38  LOWER_LEFT = 0,
39  LOWER_RIGHT = 1,
40  UPPER_RIGHT = 2,
41  UPPER_LEFT = 3,
42  LL = LOWER_LEFT,
43  LR = LOWER_RIGHT,
44  UR = UPPER_RIGHT,
45  UL = UPPER_LEFT,
46  ALL_CORNERS = 4
47  };
48 
49  enum Layer {
50  LAYER_TOP = 100,
51  LAYER_HIGH = 75,
52  LAYER_MIDDLE = 50,
53  LAYER_LOW = 25,
54  LAYER_BG = 0
55  };
56 
60  VA_BOTTOM
61  };
62 
66  HA_RIGHT
67  };
68 
71  CM_RELATIVE
72  };
73 
74 
75  Widget (const std::string& = "", point_type = 0.0f, point_type = 0.0f);
76  Widget (const Widget&, const osg::CopyOp&);
77 
79 
80  virtual ~Widget() {
81  }
82 
83  // This method is called when the widget is added to a Window; this is useful
84  // when the widget needs to do something advanced (like a Label). The parent
85  // is passed as the first argument, although _parent should already be set.
86  virtual void parented(Window*) {
87  }
88 
89  virtual void unparented(Window*) {
90  }
91 
92  // This method is called when the widget's parent Window is added to a
93  // WindowManager object. The base managed method (WHICH YOU MUST REMEMBER
94  // TO CALL IN YOUR DERIVED METHODS!) sets the TexMat properly depending
95  // on what coordinate system you're using.
96  virtual void managed(WindowManager*) {
97  }
98 
99  virtual void unmanaged(WindowManager*) {
100  }
101 
102  // This method is called when the widget is resized or reallocated in any
103  // way. This is useful when the widget manages some internal Drawables that need
104  // to be modified in some way.
105  virtual void positioned() {
106  }
107 
108  void setDimensions(
109  point_type = -1.0f,
110  point_type = -1.0f,
111  point_type = -1.0f,
112  point_type = -1.0f,
113  point_type = -1.0f
114  );
115 
116  void setPadding (point_type);
117  void setColor (color_type, color_type, color_type, color_type, Corner = ALL_CORNERS);
118  void addColor (color_type, color_type, color_type, color_type, Corner = ALL_CORNERS);
119  void setTexCoord (texcoord_type, texcoord_type, Corner = ALL_CORNERS);
120  void setLayer (Layer l, unsigned int offset = 0);
121 
122  // These are additional texture coordinate setting methods.
123  // This method will use a given origin as the LOWER_LEFT point and texture the
124  // remaining area based on some width and height values.
125  void setTexCoordRegion(point_type, point_type, point_type, point_type);
126 
127  // These are convenience methods for setting up wrapping modes.
128  void setTexCoordWrapHorizontal ();
129  void setTexCoordWrapVertical ();
130 
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);
134 
135  void addX (point_type);
136  void addY (point_type);
137  void addWidth (point_type);
138  void addHeight (point_type);
139  void addOrigin (point_type, point_type);
140  void addSize (point_type, point_type);
141 
142  point_type getWidth () const;
143  point_type getHeight () const;
144  point_type getX () const;
145  point_type getY () const;
146  point_type getZ () const;
147  point_type getPadHorizontal () const;
148  point_type getPadVertical () const;
149 
150  const Point& getPoint (Corner = ALL_CORNERS) const;
151  const Color& getColor (Corner = ALL_CORNERS) const;
152  const TexCoord& getTexCoord (Corner = ALL_CORNERS) const;
153 
154  Color getImageColorAtXY (point_type x, point_type y) const;
155  XYCoord localXY (double, double) const;
156 
157  bool isPaddingUniform() const;
158 
159  bool isManaged() const {
160  return _isManaged;
161  }
162 
163  bool isStyled() const {
164  return _isStyled;
165  }
166 
167  void setDimensions(const Quad& q, point_type z = -1.0f) {
168  setDimensions(q[0], q[1], q[2], q[3], z);
169  }
170 
171  void setX(point_type x) {
172  setDimensions(x);
173  }
174 
175  void setY(point_type y) {
176  setDimensions(-1.0f, y);
177  }
178 
179  // This method should be use with extreme caution.
180  void setZ(point_type z) {
181  setDimensions(-1.0f, -1.0f, -1.0f, -1.0f, z);
182  }
183 
185  setDimensions(-1.0f, -1.0f, w);
186  }
187 
189  setDimensions(-1.0f, -1.0f, -1.0f, h);
190  }
191 
193  setDimensions(x, y);
194  }
195 
196  void setOrigin(const XYCoord& xy) {
197  setOrigin(xy.x(), xy.y());
198  }
199 
201  setDimensions(-1.0f, -1.0f, w, h);
202  }
203 
204  void setSize(const XYCoord& xy) {
205  setSize(xy.x(), xy.y());
206  }
207 
208  void setColor(const Color& col, Corner p = ALL_CORNERS) {
209  setColor(col.r(), col.g(), col.b(), col.a(), p);
210  }
211 
212  void setTexCoord(const XYCoord& xy, Corner p = ALL_CORNERS) {
213  setTexCoord(xy.x(), xy.y(), p);
214  }
215 
217  setTexCoordRegion(xy.x(), xy.y(), w, h);
218  }
219 
221  setTexCoordRegion(x, y, wh.x(), wh.y());
222  }
223 
224  void setTexCoordRegion(const XYCoord& xy, const XYCoord& wh) {
225  setTexCoordRegion(xy.x(), xy.y(), wh.x(), wh.y());
226  }
227 
228  void addColor(const Color& col, Corner p = ALL_CORNERS) {
229  addColor(col.r(), col.g(), col.b(), col.a(), p);
230  }
231 
232  void addOrigin(const XYCoord& xy) {
233  addOrigin(xy.x(), xy.y());
234  }
235 
236  void addSize(const XYCoord& xy) {
237  addSize(xy.x(), xy.y());
238  }
239 
241  _minWidth = width;
242  _minHeight = height;
243  }
244 
245  void setMinimumSize(const XYCoord& xy) {
246  setMinimumSize(xy.x(), xy.y());
247  }
248 
250  _padLeft = p;
251  }
252 
254  _padRight = p;
255  }
256 
258  _padTop = p;
259  }
260 
262  _padBottom = p;
263  }
264 
266  _halign = h;
267  }
268 
270  _valign = v;
271  }
272 
274  _coordMode = cm;
275  }
276 
277  void setCanFill(bool f) {
278  _canFill = f;
279  }
280 
281  void setCanClone(bool c) {
282  _canClone = c;
283  }
284 
286  return _getWindowManager();
287  }
288 
290  return _getWindowManager();
291  }
292 
294  return _parent;
295  }
296 
297  const Window* getParent() const {
298  return _parent;
299  }
300 
301  unsigned int getIndex() const {
302  return _index;
303  }
304 
305  XYCoord getOrigin() const {
306  return XYCoord(getX(), getY());
307  }
308 
309  Color getImageColorAtXY(const XYCoord& xy) const {
310  return getImageColorAtXY(xy.x(), xy.y());
311  }
312 
313  Color getImageColorAtPointerXY(double x, double y) const {
314  return getImageColorAtXY(localXY(x, y));
315  }
316 
317  Point getPosition() const {
318  return Point(getX(), getY(), getZ());
319  }
320 
321  XYCoord getSize() const {
322  return XYCoord(getWidth(), getHeight());
323  }
324 
325  Quad getDimensions() const {
326  return Quad(getX(), getY(), getWidth(), getHeight());
327  }
328 
330  return _padLeft;
331  }
332 
334  return _padRight;
335  }
336 
338  return _padTop;
339  }
340 
342  return _padBottom;
343  }
344 
346  return _halign;
347  }
348 
350  return _valign;
351  }
352 
354  return _coordMode;
355  }
356 
357  bool canFill() const {
358  return _canFill;
359  }
360 
361  bool canClone() const {
362  return _canClone;
363  }
364 
365  // This casts the bool _fill variable to be used in iteratively in functions such
366  // as Window::_accumulate and whatnot.
368  return static_cast<point_type>(_canFill);
369  }
370 
372  return getWidth() + getPadHorizontal();
373  }
374 
376  return getHeight() + getPadVertical();
377  }
378 
380  return _minWidth;
381  }
382 
384  return _minHeight;
385  }
386 
388  return _minWidth + getPadHorizontal();
389  }
390 
392  return _minHeight + getPadVertical();
393  }
394 
395  unsigned int getLayer() const {
396  return _layer;
397  }
398 
399  protected:
400 
401  point_type _calculateZ(unsigned int) const;
402 
404  return dynamic_cast<PointArray*>(getVertexArray());
405  }
406 
407  const PointArray* _verts() const {
408  return dynamic_cast<const PointArray*>(getVertexArray());
409  }
410 
412  return dynamic_cast<ColorArray*>(getColorArray());
413  }
414 
415  const ColorArray* _cols() const {
416  return dynamic_cast<const ColorArray*>(getColorArray());
417  }
418 
420  return dynamic_cast<TexCoordArray*>(getTexCoordArray(0));
421  }
422 
423  const TexCoordArray* _texs() const {
424  return dynamic_cast<const TexCoordArray*>(getTexCoordArray(0));
425  }
426 
428  osg::StateSet* ss = getStateSet();
429 
430  if(!ss) return 0;
431 
432  return dynamic_cast<osg::Texture2D*>(
434  );
435  }
436 
437  const osg::Texture* _texture() const {
438  const osg::StateSet* ss = getStateSet();
439 
440  if(!ss) return 0;
441 
442  return dynamic_cast<const osg::Texture2D*>(
444  );
445  }
446 
448  return _getImage();
449  }
450 
451  const osg::Image* _image() const {
452  return _getImage();
453  }
454 
455  friend class Window;
456 
457  // TODO: Because of the current class design, I don't think it's possible to
458  // have a ref_ptr here. :(
460 
461  unsigned int _index;
462  unsigned int _layer;
463 
464  // Padding is the value of pixels of space between whatever the widget is "contianed"
465  // in and the point at which it starts getting placed.
470 
471  // The alignments are used in conjunction when the widget is NOT set to fill.
474 
475  // This flag determines how sizing values are interpretted by setDimensions().
477 
478  // These are the relative values, which are not stored directly in our verts
479  // array but kept around for calculation later.
481 
482  // This fill flag determines whether or not the widget will resize itself to fill
483  // all available space.
484  bool _canFill;
485 
486  // Set this to false in an implementation to prevent copying.
487  bool _canClone;
488 
489  // This variable is only used by the Window object to determine if it's necessary
490  // to call managed().
492 
493  // This variable is like _isManaged; it is used to store whether the Widget has
494  // been styled yet.
495  bool _isStyled;
496 
497  // Set these variables to be the minimum size of a Widget so that it cannot be
498  // resized any smaller than this.
501 
503 
504  WindowManager* _getWindowManager () const;
505  osg::Image* _getImage () const;
506 
507 };
508 
509 typedef std::list<osg::observer_ptr<Widget> > WidgetList;
510 
511 // A Widget subclass that prints stuff using osg::notify(). :)
512 struct NotifyWidget: public Widget {
514 
515  NotifyWidget(const std::string& n = "", point_type w = 0.0f, point_type h = 0.0f):
516  Widget(n, w, h) {
518  }
519 
520  NotifyWidget(const NotifyWidget& widget, const osg::CopyOp& co):
521  Widget(widget, co) {
522  }
523 
524  bool focus(const WindowManager*) {
525  osg::notify(osg::NOTICE) << _name << " > focus called" << std::endl;
526 
527  return false;
528  }
529 
530  bool unfocus(const WindowManager*) {
531  osg::notify(osg::NOTICE) << _name << " > unfocus called" << std::endl;
532 
533  return false;
534  }
535 
536  bool mouseEnter(double, double, const WindowManager*) {
537  osg::notify(osg::NOTICE) << _name << " > mouseEnter called" << std::endl;
538 
539  return false;
540  }
541 
542  bool mouseOver(double, double, const WindowManager*) {
543  osg::notify(osg::NOTICE) << _name << " > mouseOver called" << std::endl;
544 
545  return false;
546  }
547 
548  bool mouseLeave(double, double, const WindowManager*) {
549  osg::notify(osg::NOTICE) << _name << " > mouseLeave called" << std::endl;
550 
551  return false;
552  }
553 
554  bool mouseDrag(double, double, const WindowManager*) {
555  osg::notify(osg::NOTICE) << _name << " > mouseDrag called" << std::endl;
556 
557  return false;
558  }
559 
560  bool mousePush(double, double, const WindowManager*) {
561  osg::notify(osg::NOTICE) << _name << " > mousePush called" << std::endl;
562 
563  return false;
564  }
565 
566  bool mouseRelease(double, double, const WindowManager*) {
567  osg::notify(osg::NOTICE) << _name << " > mouseRelease called" << std::endl;
568 
569  return false;
570  }
571 
572  bool mouseScroll(double, double, const WindowManager*) {
573  osg::notify(osg::NOTICE) << _name << " > mouseScroll called" << std::endl;
574 
575  return false;
576  }
577 
578  bool keyPress(int, int, const WindowManager*) {
579  osg::notify(osg::NOTICE) << _name << " > keyPress called" << std::endl;
580 
581  return false;
582  }
583 
584  bool keyRelease(int, int, const WindowManager*) {
585  osg::notify(osg::NOTICE) << _name << " > keyRelease called" << std::endl;
586 
587  return false;
588  }
589 };
590 
591 // A Widget that eats all events and returns true.
592 struct NullWidget: public Widget {
594 
595  NullWidget(const std::string& n = "", point_type w = 0.0f, point_type h = 0.0f):
596  Widget(n, w, h) {
598  }
599 
600  NullWidget(const NullWidget& widget, const osg::CopyOp& co):
601  Widget(widget, co) {
602  }
603 
604  bool focus(const WindowManager*) {
605  return true;
606  }
607 
608  bool unfocus(const WindowManager*) {
609  return true;
610  }
611 
612  bool mouseEnter(double, double, const WindowManager*) {
613  return true;
614  }
615 
616  bool mouseOver(double, double, const WindowManager*) {
617  return true;
618  }
619 
620  bool mouseLeave(double, double, const WindowManager*) {
621  return true;
622  }
623 
624  bool mouseDrag(double, double, const WindowManager*) {
625  return true;
626  }
627 
628  bool mousePush(double, double, const WindowManager*) {
629  return true;
630  }
631 
632  bool mouseRelease(double, double, const WindowManager*) {
633  return true;
634  }
635 
636  bool mouseScroll(double, double, const WindowManager*) {
637  return true;
638  }
639 
640  bool keyPress(int, int, const WindowManager*) {
641  return true;
642  }
643 
644  bool keyRelease(int, int, const WindowManager*) {
645  return true;
646  }
647 };
648 
649 }
650 
651 #endif
const ColorArray * _cols() const
Definition: Widget.h:415
osg::Vec4 Quad
Definition: Types.h:37
void setWidth(point_type w)
Definition: Widget.h:184
Window * getParent()
Definition: Widget.h:293
void setMinimumSize(const XYCoord &xy)
Definition: Widget.h:245
bool mouseLeave(double, double, const WindowManager *)
Definition: Widget.h:548
virtual void positioned()
Definition: Widget.h:105
ColorArray * _cols()
Definition: Widget.h:411
void addOrigin(const XYCoord &xy)
Definition: Widget.h:232
void setPadLeft(point_type p)
Definition: Widget.h:249
META_Object(osgWidget, NotifyWidget)
void setTexCoordRegion(const XYCoord &xy, point_type w, point_type h)
Definition: Widget.h:216
void setColor(const Color &col, Corner p=ALL_CORNERS)
Definition: Widget.h:208
point_type getMinWidthTotal() const
Definition: Widget.h:387
bool mouseOver(double, double, const WindowManager *)
Definition: Widget.h:542
unsigned int _index
Definition: Widget.h:461
point_type _minWidth
Definition: Widget.h:499
bool mouseRelease(double, double, const WindowManager *)
Definition: Widget.h:632
value_type & y()
Definition: Vec2f.h:68
void setZ(point_type z)
Definition: Widget.h:180
void setSize(const XYCoord &xy)
Definition: Widget.h:204
void setPadRight(point_type p)
Definition: Widget.h:253
TexCoord::value_type texcoord_type
Definition: Types.h:32
point_type getMinHeight() const
Definition: Widget.h:383
bool mousePush(double, double, const WindowManager *)
Definition: Widget.h:560
Point getPosition() const
Definition: Widget.h:317
bool focus(const WindowManager *)
Definition: Widget.h:524
Definition: Box.h:21
#define OSGWIDGET_EXPORT
Definition: Export.h:42
osg::Vec2 XYCoord
Definition: Types.h:36
const WindowManager * getWindowManager() const
Definition: Widget.h:289
void setTexCoord(const XYCoord &xy, Corner p=ALL_CORNERS)
Definition: Widget.h:212
NotifyWidget(const std::string &n="", point_type w=0.0f, point_type h=0.0f)
Definition: Widget.h:515
NullWidget(const NullWidget &widget, const osg::CopyOp &co)
Definition: Widget.h:600
virtual void managed(WindowManager *)
Definition: Widget.h:96
bool mouseEnter(double, double, const WindowManager *)
Definition: Widget.h:536
void setAlignHorizontal(HorizontalAlignment h)
Definition: Widget.h:265
point_type getPadTop() const
Definition: Widget.h:337
Color getImageColorAtPointerXY(double x, double y) const
Definition: Widget.h:313
Color getImageColorAtXY(const XYCoord &xy) const
Definition: Widget.h:309
point_type getMinWidth() const
Definition: Widget.h:379
void setTexCoordRegion(const XYCoord &xy, const XYCoord &wh)
Definition: Widget.h:224
unsigned int getLayer() const
Definition: Widget.h:395
HorizontalAlignment _halign
Definition: Widget.h:473
void addColor(const Color &col, Corner p=ALL_CORNERS)
Definition: Widget.h:228
bool mouseRelease(double, double, const WindowManager *)
Definition: Widget.h:566
TexCoordArray * _texs()
Definition: Widget.h:419
bool keyPress(int, int, const WindowManager *)
Definition: Widget.h:640
bool isManaged() const
Definition: Widget.h:159
point_type getFillAsNumeric() const
Definition: Widget.h:367
VerticalAlignment _valign
Definition: Widget.h:472
point_type getWidthTotal() const
Definition: Widget.h:371
Point::value_type point_type
Definition: Types.h:33
osg::Texture * _texture()
Definition: Widget.h:427
value_type & x()
Definition: Vec2f.h:67
ColorArray::value_type Color
Definition: Types.h:30
bool unfocus(const WindowManager *)
Definition: Widget.h:530
StateAttribute * getTextureAttribute(unsigned int unit, StateAttribute::Type type)
virtual ~Widget()
Definition: Widget.h:80
bool isStyled() const
Definition: Widget.h:163
bool mouseDrag(double, double, const WindowManager *)
Definition: Widget.h:624
NullWidget(const std::string &n="", point_type w=0.0f, point_type h=0.0f)
Definition: Widget.h:595
void setCoordinateMode(CoordinateMode cm)
Definition: Widget.h:273
point_type _padLeft
Definition: Widget.h:466
PointArray * _verts()
Definition: Widget.h:403
std::string _name
Definition: Object.h:230
bool keyPress(int, int, const WindowManager *)
Definition: Widget.h:578
const Window * getParent() const
Definition: Widget.h:297
bool mousePush(double, double, const WindowManager *)
Definition: Widget.h:628
point_type getPadLeft() const
Definition: Widget.h:329
void setDimensions(const Quad &q, point_type z=-1.0f)
Definition: Widget.h:167
#define META_Object(library, name)
Definition: Object.h:42
GLint GLenum GLsizei width
Definition: GLU.h:71
bool focus(const WindowManager *)
Definition: Widget.h:604
bool mouseScroll(double, double, const WindowManager *)
Definition: Widget.h:572
CoordinateMode _coordMode
Definition: Widget.h:476
std::list< osg::observer_ptr< Widget > > WidgetList
Definition: Widget.h:509
void setHeight(point_type h)
Definition: Widget.h:188
void setPadTop(point_type p)
Definition: Widget.h:257
unsigned int _layer
Definition: Widget.h:462
void setTexCoordRegion(point_type x, point_type y, const XYCoord &wh)
Definition: Widget.h:220
void setMinimumSize(point_type width, point_type height)
Definition: Widget.h:240
bool mouseScroll(double, double, const WindowManager *)
Definition: Widget.h:636
void setCanClone(bool c)
Definition: Widget.h:281
virtual void parented(Window *)
Definition: Widget.h:86
virtual void unparented(Window *)
Definition: Widget.h:89
point_type _padBottom
Definition: Widget.h:469
point_type _minHeight
Definition: Widget.h:500
void setAlignVertical(VerticalAlignment v)
Definition: Widget.h:269
void setCanFill(bool f)
Definition: Widget.h:277
void setEventMask(unsigned int mask)
point_type getHeightTotal() const
Definition: Widget.h:375
bool canClone() const
Definition: Widget.h:361
bool keyRelease(int, int, const WindowManager *)
Definition: Widget.h:644
GLint GLenum GLsizei GLsizei height
Definition: GLU.h:71
Quad getDimensions() const
Definition: Widget.h:325
const TexCoordArray * _texs() const
Definition: Widget.h:423
PointArray::value_type Point
Definition: Types.h:29
WindowManager * getWindowManager()
Definition: Widget.h:285
META_Object(osgWidget, NullWidget)
NotifyWidget(const NotifyWidget &widget, const osg::CopyOp &co)
Definition: Widget.h:520
bool unfocus(const WindowManager *)
Definition: Widget.h:608
Window * _parent
Definition: Widget.h:459
CoordinateMode getCoordinateMode() const
Definition: Widget.h:353
void setSize(point_type w, point_type h)
Definition: Widget.h:200
point_type getMinHeightTotal() const
Definition: Widget.h:391
bool mouseOver(double, double, const WindowManager *)
Definition: Widget.h:616
point_type getPadBottom() const
Definition: Widget.h:341
TexCoordArray::value_type TexCoord
Definition: Types.h:28
OSG_EXPORT std::ostream & notify(const NotifySeverity severity)
const PointArray * _verts() const
Definition: Widget.h:407
void setX(point_type x)
Definition: Widget.h:171
HorizontalAlignment getAlignHorizontal() const
Definition: Widget.h:345
void setPadBottom(point_type p)
Definition: Widget.h:261
const osg::Texture * _texture() const
Definition: Widget.h:437
VerticalAlignment getAlignVertical() const
Definition: Widget.h:349
bool mouseEnter(double, double, const WindowManager *)
Definition: Widget.h:612
void addSize(const XYCoord &xy)
Definition: Widget.h:236
bool keyRelease(int, int, const WindowManager *)
Definition: Widget.h:584
Color::value_type color_type
Definition: Types.h:34
XYCoord getSize() const
Definition: Widget.h:321
void setOrigin(const XYCoord &xy)
Definition: Widget.h:196
virtual void unmanaged(WindowManager *)
Definition: Widget.h:99
point_type _padRight
Definition: Widget.h:467
unsigned int getIndex() const
Definition: Widget.h:301
osg::Image * _image()
Definition: Widget.h:447
bool mouseLeave(double, double, const WindowManager *)
Definition: Widget.h:620
XYCoord getOrigin() const
Definition: Widget.h:305
void setOrigin(point_type x, point_type y)
Definition: Widget.h:192
bool mouseDrag(double, double, const WindowManager *)
Definition: Widget.h:554
void setY(point_type y)
Definition: Widget.h:175
bool canFill() const
Definition: Widget.h:357
static osg::ref_ptr< PointArray > _norms
Definition: Widget.h:502
point_type getPadRight() const
Definition: Widget.h:333
const osg::Image * _image() const
Definition: Widget.h:451
point_type _padTop
Definition: Widget.h:468