21 #include <gtkmm/label.h>
29 Choice::Choice (
string title,
string prompt, vector<string> choices,
bool center)
33 vector<string>::iterator i;
36 set_position (Gtk::WIN_POS_CENTER);
38 set_position (Gtk::WIN_POS_MOUSE);
41 set_name (
"ChoiceWindow");
43 HBox* dhbox = manage (
new HBox());
44 Image* dimage = manage (
new Gtk::Image(Stock::DIALOG_QUESTION, Gtk::ICON_SIZE_DIALOG));
45 Label* label = manage (
new Label (prompt));
47 dhbox->pack_start (*dimage,
true,
false, 10);
48 dhbox->pack_start (*label,
true,
false, 10);
50 get_vbox()->set_border_width (12);
51 get_vbox()->pack_start (*dhbox,
true,
false);
53 set_has_separator (
false);
54 set_resizable (
false);
57 for (n = 0, i = choices.begin(); i != choices.end(); ++i, ++n) {
65 Gtk::Window::on_realize();
66 get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));