25#ifndef TGUI_COLOR_PICKER_HPP 
   26#define TGUI_COLOR_PICKER_HPP 
   29#include <TGUI/Widgets/ChildWindow.hpp> 
   30#include <TGUI/Widgets/Slider.hpp> 
   31#include <TGUI/Widgets/Canvas.hpp> 
   32#include <TGUI/Widgets/Panel.hpp> 
   33#include <TGUI/Renderers/ColorPickerRenderer.hpp> 
   48        typedef std::shared_ptr<ColorPicker> 
Ptr; 
 
   49        typedef std::shared_ptr<const ColorPicker> 
ConstPtr; 
 
  143        void leftMousePressed(
Vector2f pos) 
override;
 
  148        void leftMouseButtonNoLongerDown() 
override;
 
  153        void mouseMoved(
Vector2f pos) 
override;
 
  189        std::unique_ptr<DataIO::Node> 
save(SavingRenderersMap &renderers) 
const override;
 
  195        void load(
const std::unique_ptr<DataIO::Node> &node, 
const LoadingRenderersMap &renderers) 
override;
 
  203            return std::make_shared<ColorPicker>(*
this);
 
  213        void identifyButtonsAndConnect();
 
  219        SignalColor onColorChange = {
"ColorChanged"}; 
 
  220        SignalColor onOkPressed = {
"OkPressed"}; 
 
  225        std::shared_ptr<sf::Shader> m_HSV;
 
  239        bool m_colorRead = 
false;
 
static Canvas::Ptr create(Layout2d size={"100%", "100%"})
Creates a new canvas widget.
 
std::shared_ptr< Canvas > Ptr
Shared widget pointer.
Definition: Canvas.hpp:44
 
Child window widget.
Definition: ChildWindow.hpp:44
 
Definition: ColorPickerRenderer.hpp:37
 
Color picker widget.
Definition: ColorPicker.hpp:45
 
static ColorPicker::Ptr create(sf::String title="", Color color=Color::Black)
Creates a new color picker widget.
 
Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
Definition: ColorPicker.hpp:201
 
ColorPicker & operator=(ColorPicker &&right)
Overload of move assignment operator.
 
ColorPickerRenderer * getRenderer()
Returns the renderer, which gives access to functions that determine how the widget is displayed.
 
std::shared_ptr< ColorPicker > Ptr
Shared widget pointer.
Definition: ColorPicker.hpp:48
 
void load(const std::unique_ptr< DataIO::Node > &node, const LoadingRenderersMap &renderers) override
Loads the widget from a tree of nodes.
 
ColorPicker(ColorPicker &©)
Move constructor.
 
ColorPickerRenderer * getSharedRenderer()
Returns the renderer, which gives access to functions that determine how the widget is displayed.
 
Color getColor() const
Returns the picked color.
 
void rendererChanged(const std::string &property) override
Function called when one of the properties of the renderer is changed.
 
static ColorPicker::Ptr copy(ColorPicker::ConstPtr colorPicker)
Makes a copy of another color picker.
 
ColorPicker(const ColorPicker ©)
Copy constructor.
 
void setColor(const Color &color)
Changes the color of Color Picker.
 
Signal & getSignal(std::string signalName) override
Retrieves a signal based on its name.
 
ColorPicker & operator=(const ColorPicker &right)
Overload of copy assignment operator.
 
std::shared_ptr< const ColorPicker > ConstPtr
Shared constant widget pointer.
Definition: ColorPicker.hpp:49
 
std::unique_ptr< DataIO::Node > save(SavingRenderersMap &renderers) const override
Saves the widget as a tree node in order to save it to a file.
 
Wrapper for colors.
Definition: Color.hpp:49
 
static const Color Black
Black predefined color.
Definition: Color.hpp:206
 
std::shared_ptr< Panel > Ptr
Shared widget pointer.
Definition: Panel.hpp:44
 
static Panel::Ptr create(Layout2d size={"100%", "100%"})
Creates a new panel widget.
 
Signal to which the user can subscribe to get callbacks from.
Definition: Signal.hpp:231
 
std::shared_ptr< Slider > Ptr
Shared widget pointer.
Definition: Slider.hpp:44
 
static Slider::Ptr create(float minimum=0, float maximum=10)
Creates a new slider widget.
 
Definition: Vector2f.hpp:39
 
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:37