ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/RenegadeMapSelector/MapSelector.h
Revision: 87
Committed: 2003-03-15T17:19:37-08:00 (22 years, 3 months ago) by douglas
Content type: text/x-c
Original Path: trunk/RenegadeMapSelector/MapSelector.h
File size: 1113 byte(s)
Log Message:
Fixed objectification!

File Contents

# User Rev Content
1 douglas 86 // Renegade Map Selector
2     //
3     // Douglas Thrift
4     //
5     // MapSelector.h
6    
7     #ifndef _WIN32
8     #ifndef _MapSelector_h_
9     #define _MapSelector_h_
10    
11     #include "RenegadeConfig.h"
12     #include <gtk/gtk.h>
13    
14 douglas 87 extern RenegadeConfig* config;
15    
16 douglas 86 inline void message(GtkWindow* parent, const string& text, const string& title,
17     GtkMessageType type)
18     {
19     GtkWidget* box = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, type,
20     GTK_BUTTONS_OK, text.c_str());
21    
22     gtk_window_set_title(GTK_WINDOW(box), title.c_str());
23    
24     gtk_dialog_run(GTK_DIALOG(box));
25     gtk_widget_destroy(box);
26     }
27    
28     class MapSelector
29     {
30     private:
31     GtkWidget* window;
32     GtkWidget* add;
33     GtkWidget* remove;
34     GtkWidget* up;
35     GtkWidget* down;
36     //
37     public:
38     MapSelector();
39 douglas 87 ~MapSelector() {}
40     // friends:
41     friend void destruct(GtkWidget* widget, MapSelector* data);
42     friend void done(GtkWidget* widget, MapSelector* data);
43     friend void mapAdd(GtkWidget* widget, MapSelector* data);
44     friend void mapRemove(GtkWidget* widget, MapSelector* data);
45     friend void mapUp(GtkWidget* widget, MapSelector* data);
46     friend void mapDown(GtkWidget* widget, MapSelector* data);
47 douglas 86 };
48    
49     #endif _MapSelector_h_
50     #endif