ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/RenegadeMapSelector/MapSelector.h
Revision: 88
Committed: 2003-03-15T20:18:13-08:00 (22 years, 3 months ago) by douglas
Content type: text/x-c
File size: 1287 byte(s)
Log Message:
Did good stuff like adding the list box widgets.

File Contents

# Content
1 // 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 <sys/types.h>
13 #include <sys/param.h>
14 #include <unistd.h>
15 #include <dirent.h>
16 #include <gtk/gtk.h>
17
18 extern RenegadeConfig* config;
19
20 inline void message(GtkWindow* parent, const string& text, const string& title,
21 GtkMessageType type)
22 {
23 GtkWidget* box = gtk_message_dialog_new(parent, GTK_DIALOG_MODAL, type,
24 GTK_BUTTONS_OK, text.c_str());
25
26 gtk_window_set_title(GTK_WINDOW(box), title.c_str());
27
28 gtk_dialog_run(GTK_DIALOG(box));
29 gtk_widget_destroy(box);
30 }
31
32 class MapSelector
33 {
34 private:
35 GtkWidget* window;
36 GtkWidget* available;
37 GtkWidget* selected;
38 GtkWidget* add;
39 GtkWidget* remove;
40 GtkWidget* up;
41 GtkWidget* down;
42 void setupAvailable();
43 void setupSelected();
44 public:
45 MapSelector();
46 ~MapSelector() {}
47 // friends:
48 friend void destruct(GtkWidget* widget, MapSelector* data);
49 friend void done(GtkWidget* widget, MapSelector* data);
50 friend void mapAdd(GtkWidget* widget, MapSelector* data);
51 friend void mapRemove(GtkWidget* widget, MapSelector* data);
52 friend void mapUp(GtkWidget* widget, MapSelector* data);
53 friend void mapDown(GtkWidget* widget, MapSelector* data);
54 };
55
56 #endif _MapSelector_h_
57 #endif