Crazy Eddie's GUI System  0.8.4
Types.h
00001 /***********************************************************************
00002     created:    20th February 2010
00003     author:     Lukas E Meindl
00004 
00005     purpose:    Header of the ColourPicker colour type classes
00006 *************************************************************************/
00007 /***************************************************************************
00008 *   Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
00009 *
00010 *   Permission is hereby granted, free of charge, to any person obtaining
00011 *   a copy of this software and associated documentation files (the
00012 *   "Software"), to deal in the Software without restriction, including
00013 *   without limitation the rights to use, copy, modify, merge, publish,
00014 *   distribute, sublicense, and/or sell copies of the Software, and to
00015 *   permit persons to whom the Software is furnished to do so, subject to
00016 *   the following conditions:
00017 *
00018 *   The above copyright notice and this permission notice shall be
00019 *   included in all copies or substantial portions of the Software.
00020 *
00021 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00022 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00023 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00024 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00025 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00026 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00027 *   OTHER DEALINGS IN THE SOFTWARE.
00028 ***************************************************************************/
00029 #ifndef CEGUI_COLOUR_PICKER_TYPES_H
00030 #define CEGUI_COLOUR_PICKER_TYPES_H
00031 
00032 #include "CEGUI/CommonDialogs/Module.h"
00033 #include "CEGUI/Window.h"
00034 
00035 #if defined(_MSC_VER)
00036 #   pragma warning(push)
00037 #   pragma warning(disable : 4251)
00038 #endif
00039 
00040 
00041 namespace CEGUI
00042 {
00043 
00044 enum ColourPickerSliderMode
00045 {
00046     ColourPickerSliderMode_L,
00047     ColourPickerSliderMode_A,
00048     ColourPickerSliderMode_B
00049 };
00050 
00051 class CEGUI_COMMONDIALOGS_API Lab_Colour;
00052 class CEGUI_COMMONDIALOGS_API RGB_Colour;
00053 class CEGUI_COMMONDIALOGS_API HSV_Colour;
00054 
00055 class CEGUI_COMMONDIALOGS_API RGB_Colour :
00056     public AllocatedObject<RGB_Colour>
00057 {
00058 public:
00059     RGB_Colour(unsigned char red, unsigned char green, unsigned char blue) :
00060         r(red), g(green), b(blue)
00061     {}
00062 
00063     RGB_Colour() :
00064         r(0), g(0), b(0)
00065     {}
00066 
00067     RGB_Colour(const Lab_Colour& colour);
00068     RGB_Colour(const HSV_Colour& colour);
00069     RGB_Colour(const CEGUI::Colour& colour);
00070 
00071     unsigned char   r;
00072     unsigned char   g;
00073     unsigned char   b;
00074 
00075     RGB_Colour operator*(const float& number) const;
00076     RGB_Colour operator+(const RGB_Colour& colour) const;
00077 };
00078 
00079 class CEGUI_COMMONDIALOGS_API Lab_Colour :
00080     public AllocatedObject<Lab_Colour>
00081 {
00082 public:
00083     Lab_Colour(float LValue, float aValue, float bValue) :
00084         L(LValue), a(aValue), b(bValue)
00085     {}
00086 
00087     Lab_Colour() :
00088         L(0.0f), a(0.0f), b(0.0f)
00089     {}
00090 
00091     Lab_Colour(const RGB_Colour& colour);
00092     Lab_Colour(const HSV_Colour& colour);
00093     Lab_Colour(const CEGUI::Colour& colour);
00094 
00095 
00096     float L;
00097     float a;
00098     float b;
00099 };
00100 
00101 class CEGUI_COMMONDIALOGS_API HSV_Colour :
00102     public AllocatedObject<HSV_Colour>
00103 {
00104 public:
00105     HSV_Colour(float HValue, float SValue, float VValue) :
00106         H(HValue), S(SValue), V(VValue)
00107     {}
00108 
00109     HSV_Colour() :
00110         H(0.0f), S(0.0f), V(0.0f)
00111     {}
00112 
00113     HSV_Colour(const RGB_Colour& colour);
00114     HSV_Colour(const Lab_Colour& colour);
00115     HSV_Colour(const CEGUI::Colour& colour);
00116 
00117     float H;
00118     float S;
00119     float V;
00120 };
00121 
00122 }
00123 
00124 #if defined(_MSC_VER)
00125 #   pragma warning(pop)
00126 #endif
00127 
00128 #endif
00129 
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends