1
// Copyright (C) 2008 Ben Asselstine
3
// This program is free software; you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation; either version 2 of the License, or
6
// (at your option) any later version.
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU Library General Public License for more details.
13
// You should have received a copy of the GNU General Public License
14
// along with this program; if not, write to the Free Software
15
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
#ifndef TILE_PREVIEW_DIALOG_H
19
#define TILE_PREVIEW_DIALOG_H
22
#include <sigc++/trackable.h>
23
#include <gtkmm/dialog.h>
24
#include <gtkmm/button.h>
25
#include <gtkmm/image.h>
26
#include <gtkmm/label.h>
27
#include <gtkmm/table.h>
29
#include "tile-preview-scene.h"
32
//! Tile Preview Dialog. Shows completeness and correctness of tilesets.
33
class TilePreviewDialog: public sigc::trackable
36
TilePreviewDialog(Tile *tile, Uint32 tileSize);
38
void set_parent_window(Gtk::Window &parent);
44
std::auto_ptr<Gtk::Dialog> dialog;
45
Gtk::Button *next_button;
46
Gtk::Button *previous_button;
47
Gtk::Button *refresh_button;
49
Gtk::Table *scene_table;
51
std::vector<Glib::RefPtr<Gdk::Pixbuf> > tilestyle_images;
53
void on_next_clicked();
54
void on_previous_clicked();
55
void on_refresh_clicked();
56
void update_buttons();
57
void update_scene(TilePreviewScene *scene);
58
std::list<TilePreviewScene*> scenes;
59
std::list<TilePreviewScene*>::iterator current_scene;