FrameSettings 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2014 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. #ifndef OSGUI_FRAMESETTINGS
  14. #define OSGUI_FRAMESETTINGS
  15. #include <osg/Object>
  16. #include <osg/BoundingBox>
  17. #include <osg/Vec4>
  18. #include <osgUI/Export>
  19. namespace osgUI
  20. {
  21. class OSGUI_EXPORT FrameSettings : public osg::Object
  22. {
  23. public:
  24. FrameSettings();
  25. FrameSettings(const FrameSettings& frameSettings, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
  26. META_Object(osgUI, FrameSettings);
  27. enum Shape
  28. {
  29. NO_FRAME,
  30. BOX,
  31. PANEL
  32. };
  33. void setShape(Shape shape) { _shape = shape; }
  34. Shape getShape() const { return _shape; }
  35. enum Shadow
  36. {
  37. PLAIN,
  38. SUNKEN,
  39. RAISED
  40. };
  41. void setShadow(Shadow shadow) { _shadow = shadow; }
  42. Shadow getShadow() const { return _shadow; }
  43. void setLineWidth(float width) { _lineWidth = width; }
  44. float getLineWidth() const { return _lineWidth; }
  45. protected:
  46. virtual ~FrameSettings() {}
  47. Shape _shape;
  48. Shadow _shadow;
  49. float _lineWidth;
  50. };
  51. }
  52. #endif