OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ColorPalette.h
Go to the documentation of this file.
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 
14 #ifndef OSGUI_COLORPALETTE
15 #define OSGUI_COLORPALETTE
16 
17 #include <osg/Object>
18 #include <osg/Vec4>
19 #include <osgUI/Export>
20 
21 namespace osgUI
22 {
23 
25 {
26 public:
27  ColorPalette();
30 
31 
32  typedef std::vector<osg::Vec4f> Colors;
33 
34  void setColors(const Colors& colors) { _colors = colors; }
35  Colors& getColors() { return _colors; }
36  const Colors& getColors() const { return _colors; }
37 
38  typedef std::vector<std::string> Names;
39 
40  void setNames(const Names& names) { _names = names; }
41  Names& getNames() { return _names; }
42  const Names& getNames() const { return _names; }
43 
44 
45 protected:
46 
47  virtual ~ColorPalette() {}
48 
49  Colors _colors;
50  Names _names;
51 
52 };
53 
54 }
55 
56 #endif
const Colors & getColors() const
Definition: ColorPalette.h:36
void setNames(const Names &names)
Definition: ColorPalette.h:40
Colors & getColors()
Definition: ColorPalette.h:35
const Names & getNames() const
Definition: ColorPalette.h:42
#define META_Object(library, name)
Definition: Object.h:42
void setColors(const Colors &colors)
Definition: ColorPalette.h:34
virtual ~ColorPalette()
Definition: ColorPalette.h:47
std::vector< std::string > Names
Definition: ColorPalette.h:38
std::vector< osg::Vec4f > Colors
Definition: ColorPalette.h:32
#define OSGUI_EXPORT
Definition: Widget.h:22