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 * ColorPickerDialog class implementation.
28 #include "ColorPickerDialog.h"
35 ColorPickerDialog::ColorPickerDialog(const char *title
, int /*defaultvalue*/,
37 : AbstractDialog(title
)
39 AddButton(OK_BUTTON_TEXT
, RESPONSE_OK
);
41 pick
= new ColorPickerPalette(0, flags
);
42 pick
->signal_color_selected
.connect(sigc::mem_fun(this,
43 &ColorPickerDialog::OnColorSelected
));
44 layout
->InsertWidget(0, *pick
);
46 Resize(pick
->GetWidth() + 2, pick
->GetHeight() + 4);
49 void ColorPickerDialog::OnColorSelected(ColorPickerPalette
& /*activator*/,
53 Response(RESPONSE_OK
);
56 void ColorPickerDialog::EmitResponse(ResponseType response
)
58 signal_response(*this, response
, color
);
61 } // namespace CppConsUI
63 /* vim: set tabstop=2 shiftwidth=2 textwidth=78 expandtab : */