AlignmentSettings 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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_ALIGNMENTSETTINGS
  14. #define OSGUI_ALIGNMENTSETTINGS
  15. #include <osg/Object>
  16. #include <osg/BoundingBox>
  17. #include <osg/Vec4>
  18. #include <osgUI/Export>
  19. namespace osgUI
  20. {
  21. class OSGUI_EXPORT AlignmentSettings : public osg::Object
  22. {
  23. public:
  24. enum Alignment
  25. {
  26. LEFT_TOP,
  27. LEFT_CENTER,
  28. LEFT_BOTTOM,
  29. CENTER_TOP,
  30. CENTER_CENTER,
  31. CENTER_BOTTOM,
  32. RIGHT_TOP,
  33. RIGHT_CENTER,
  34. RIGHT_BOTTOM,
  35. LEFT_BASE_LINE,
  36. CENTER_BASE_LINE,
  37. RIGHT_BASE_LINE,
  38. LEFT_BOTTOM_BASE_LINE,
  39. CENTER_BOTTOM_BASE_LINE,
  40. RIGHT_BOTTOM_BASE_LINE
  41. };
  42. AlignmentSettings(Alignment alignment=AlignmentSettings::LEFT_BOTTOM);
  43. AlignmentSettings(const AlignmentSettings& as, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY);
  44. META_Object(osgUI, AlignmentSettings);
  45. void setAlignment(Alignment alignment) { _alignment = alignment; }
  46. Alignment getAlignment() const { return _alignment; }
  47. protected:
  48. virtual ~AlignmentSettings() {}
  49. Alignment _alignment;
  50. };
  51. }
  52. #endif