12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- // Flexlay - A Generic 2D Game Editor
- // Copyright (C) 2002 Ingo Ruhnke <grumbel@gmx.de>
- //
- // This program is free software: you can redistribute it and/or modify
- // it under the terms of the GNU General Public License as published by
- // the Free Software Foundation, either version 3 of the License, or
- // (at your option) any later version.
- //
- // This program is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- // GNU General Public License for more details.
- //
- // You should have received a copy of the GNU General Public License
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
- #ifndef HEADER_FLEXLAY_COLORPICKER_HPP
- #define HEADER_FLEXLAY_COLORPICKER_HPP
- #include <ClanLib/Display/display.h>
- class ColorPickerHue;
- class ColorPickerAlpha;
- class ColorPickerBrightness;
- class ColorPicker : public CL_Component
- {
- protected:
- ~ColorPicker() {}
- private:
- CL_Signal_v1<CL_Color> on_color_change;
- std::vector<CL_Slot> slots;
- CL_Color color;
- ColorPickerHue* hue;
- ColorPickerBrightness* brightness;
- ColorPickerAlpha* alpha;
- void update_brightness_color(CL_Color color);
- void update_alpha_color(float alpha);
- public:
- ColorPicker(const CL_Rect& rect, CL_Component* parent);
- void draw();
- CL_Signal_v1<CL_Color>& sig_color_change();
- CL_Color get_color();
- void set_color(const CL_Color& color);
- };
- #endif
- /* EOF */
|