2 * Copyright (C) 2012 by CenterIM developers
4 * This file is part of CenterIM.
6 * CenterIM is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * CenterIM is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 * ColorPickerPalette class.
28 #ifndef __COLORPICKERPALETTE_H__
29 #define __COLORPICKERPALETTE_H__
32 #include "Container.h"
37 class ColorPickerPalette
42 FLAG_HIDE_ANSI
= 1 << 0,
43 FLAG_HIDE_GRAYSCALE
= 1 << 1,
44 FLAG_HIDE_COLORCUBE
= 1 << 2
47 ColorPickerPalette(int defaultcolor
, int flags
= 0);
48 virtual ~ColorPickerPalette() {};
51 * Emited signal when a color is selected
53 sigc::signal
<void, ColorPickerPalette
&, int> signal_color_selected
;
56 class ColorPickerPaletteButton
59 friend class ColorPickerPalette
;
62 ColorPickerPaletteButton(int color
);
63 virtual ~ColorPickerPaletteButton() {};
71 ColorPickerPaletteButton(const ColorPickerPaletteButton
&);
72 ColorPickerPaletteButton
& operator=(const ColorPickerPaletteButton
&);
75 virtual void OnSelectColor(Button
& activator
);
77 virtual void AddButton(int x
, int y
, int color
, int defaultcolor
);
79 virtual void AddAnsi(int defaultcolor
);
80 virtual void AddGrayscale(int defaultcolor
);
81 virtual void AddColorCube(int defaultcolor
);
84 ColorPickerPalette(const ColorPickerPalette
&);
85 ColorPickerPalette
& operator=(const ColorPickerPalette
&);
88 } // namespace CppConsUI
90 #endif // __COLORPICKERPALETTE_H__
92 /* vim: set tabstop=2 shiftwidth=2 textwidth=78 expandtab : */