/usr/include/cegui-0.8.4/CEGUI/CommonDialogs/ColourPicker/ColourPicker.h is in libcegui-mk2-dev 0.8.4+dfsg-4ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 | /***********************************************************************
created: 30/10/2010
author: Lukas E Meindl
purpose: Interface to base class for ColourPicker Widget
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2011 Paul D Turner & The CEGUI Development Team
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
***************************************************************************/
#ifndef _CEGUIColourPicker_h_
#define _CEGUIColourPicker_h_
#include "CEGUI/CommonDialogs/Module.h"
#include "CEGUI/CommonDialogs/ColourPicker/Controls.h"
#include "CEGUI/Window.h"
#if defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4251)
#endif
// Start of CEGUI namespace section
namespace CEGUI
{
//!Base class for the ColourPicker widget
class CEGUI_COMMONDIALOGS_API ColourPicker : public Window
{
public:
//! Constructor for ColourPicker class.
ColourPicker(const String& type, const String& name);
//! Destructor for ColourPicker class.
~ColourPicker(void);
//! Namespace for global events
static const String EventNamespace;
//! Window factory name
static const String WidgetTypeName;
// generated internally by Window
/** Event fired when the ColourPickerControls window is opened.
* Handlers are passed a const WindowEventArgs reference with
* WindowEventArgs::window set to the Window that triggered this event.
*/
static const String EventOpenedPicker;
// generated internally by Window
/** Event fired when the ColourPickerControls window is closed.
* Handlers are passed a const WindowEventArgs reference with
* WindowEventArgs::window set to the Window that triggered this event.
*/
static const String EventClosedPicker;
// generated internally by Window
/** Event fired when a new colour is set and accepted by the colour picker.
* Handlers are passed a const WindowEventArgs reference with
* WindowEventArgs::window set to the Window that triggered this event.
*/
static const String EventAcceptedColour;
/*!
\brief
Set the current colour of the colour picker manually and refresh the
ColourPicker elements accordingly.
\param setting
newColour the selected Colour for the ColourPicker
*/
void setColour(const Colour& newColour);
/*!
\brief
Return the current colour of the colour picker.
*/
Colour getColour();
// overridden from Window base class
void initialiseComponents(void);
protected:
//! Widget name for the open button (colour rect) component.
static const String ColourRectName;
/*!\brief
Initialises the properties for the creation of the ColourPickerControls
window and decides if a new window of this type is necessary.
\note
This will be called once during the initialisation of the components.
*/
void initialiseColourPickerControlsWindow();
/*!\brief
Creates the ColourPickerControls window.
\param colourPickerControlsStyle
The window type of the window that will be created.
\note
This will be called once during the initialisation of the components.
*/
void createColourPickerControlsWindow(const String& colourPickerControlsStyle);
/*!
\brief
Return a Window pointer to the ColourRect component widget for this
ColourPicker.
\return
Pointer to a Window object.
\exception UnknownObjectException
Thrown if the colour rectangle component does not exist.
*/
Window* getColourRect(void);
bool colourRect_ColourRectClickedHandler(const EventArgs& e);
virtual void onColourRectClicked(WindowEventArgs& e);
static std::map<Window*, int> s_colourPickerWindows;
bool d_shareColourPickerControlsWindow;
ColourPickerControls* d_colourPickerControlsWindow;
//! selected colour of the ColourPickerControls
Colour d_selectedColour;
};
}
#if defined(_MSC_VER)
# pragma warning(pop)
#endif
#endif
|