~ubuntu-branches/ubuntu/trusty/lordsawar/trusty

« back to all changes in this revision

Viewing changes to src/editor/tile-preview-dialog.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2008-06-17 16:07:00 UTC
  • mto: (5.1.1 lenny) (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20080617160700-6d8ofoz0qkasxlnw
ImportĀ upstreamĀ versionĀ 0.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  Copyright (C) 2008 Ben Asselstine
 
2
//
 
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.
 
7
//
 
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.
 
12
//
 
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 
 
16
//  02110-1301, USA.
 
17
 
 
18
#ifndef TILE_PREVIEW_DIALOG_H
 
19
#define TILE_PREVIEW_DIALOG_H
 
20
 
 
21
#include <memory>
 
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>
 
28
#include "../Tile.h"
 
29
#include "tile-preview-scene.h"
 
30
 
 
31
 
 
32
//! Tile Preview Dialog.  Shows completeness and correctness of tilesets.
 
33
class TilePreviewDialog: public sigc::trackable
 
34
{
 
35
 public:
 
36
    TilePreviewDialog(Tile *tile, Uint32 tileSize);
 
37
 
 
38
    void set_parent_window(Gtk::Window &parent);
 
39
 
 
40
    void run();
 
41
    
 
42
 private:
 
43
    Tile *d_tile;
 
44
    std::auto_ptr<Gtk::Dialog> dialog;
 
45
    Gtk::Button *next_button;
 
46
    Gtk::Button *previous_button;
 
47
    Gtk::Button *refresh_button;
 
48
    Gtk::HBox *scene_box;
 
49
    Gtk::Table *scene_table;
 
50
 
 
51
    std::vector<Glib::RefPtr<Gdk::Pixbuf> > tilestyle_images;
 
52
 
 
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;
 
60
    Uint32 d_tileSize;
 
61
};
 
62
 
 
63
#endif