24#include <gdk/gdkkeysyms.h>
117 GtkWidget *tb = NULL;
134 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb), i == etm);
145 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(tb),
TRUE);
161 etm = GPOINTER_TO_INT(userdata);
166 active = gtk_toggle_button_get_active(tb);
185 dialog = gtk_message_dialog_new(GTK_WINDOW(
toplevel),
186 GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
187 GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE,
"%s",
188 _(
"The current ruleset does not define any "
189 "objects corresponding to this editor tool."));
191 gtk_dialog_run(GTK_DIALOG(dialog));
192 gtk_widget_destroy(dialog);
207 active = gtk_toggle_button_get_active(tb);
208 ett = GPOINTER_TO_INT(userdata);
236 gtk_list_store_clear(store);
238 gtk_list_store_append(store, &iter);
239 gtk_list_store_set(store, &iter,
PPV_COL_NAME,
_(
"Global Observer"),
244 gtk_list_store_append(store, &iter);
252 gtk_list_store_set(store, &iter,
PPV_COL_FLAG, flag, -1);
253 g_object_unref(flag);
267 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), index);
280 struct editbar *eb = user_data;
286 if (eb == NULL || eb->
widget == NULL
287 || !gtk_widget_get_visible(eb->
widget)) {
291 if (!gtk_combo_box_get_active_iter(combo, &iter)) {
295 model = gtk_combo_box_get_model(combo);
310 if (pplayer != NULL) {
323 GtkTreeSelection *sel;
333 res = gtk_dialog_run(GTK_DIALOG(dialog));
334 gtk_widget_hide(dialog);
336 if (res != GTK_RESPONSE_ACCEPT) {
340 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tvs->
view));
341 if (!gtk_tree_selection_get_selected(sel, &model, &iter)) {
345 gtk_tree_model_get(model, &iter,
TVS_COL_ID, &
id, -1);
395 if (ev->button != 3) {
399 ett = GPOINTER_TO_INT(userdata);
411 GtkWidget *image, *button, *hbox;
412 GtkRadioButton *parent = NULL;
427 if (parent == NULL) {
428 button = gtk_radio_button_new(NULL);
430 button = gtk_radio_button_new_from_widget(parent);
436 image = gtk_image_new_from_pixbuf(pixbuf);
437 g_object_unref(G_OBJECT(pixbuf));
439 gtk_container_add(GTK_CONTAINER(button), image);
440 gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button),
FALSE);
442 gtk_size_group_add_widget(eb->
size_group, button);
443 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
444 gtk_button_set_focus_on_click(GTK_BUTTON(button),
FALSE);
446 g_signal_connect(button,
"toggled",
448 g_signal_connect(button,
"button_press_event",
452 gtk_container_add(GTK_CONTAINER(hbox), button);
482 GtkWidget *image, *button, *hbox;
490 button = gtk_toggle_button_new();
495 image = gtk_image_new_from_pixbuf(pixbuf);
496 g_object_unref(G_OBJECT(pixbuf));
498 gtk_container_add(GTK_CONTAINER(button), image);
499 gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(button),
FALSE);
502 gtk_widget_set_tooltip_text(button,
tooltip);
504 gtk_size_group_add_widget(eb->
size_group, button);
505 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
506 gtk_button_set_focus_on_click(GTK_BUTTON(button),
FALSE);
508 g_signal_connect(button,
"toggled",
512 gtk_container_add(GTK_CONTAINER(hbox), button);
522 GtkWidget *hbox, *button, *combo, *image, *separator, *vbox;
524 GtkCellRenderer *cell;
530 hbox = gtk_grid_new();
531 gtk_grid_set_column_spacing(GTK_GRID(hbox), 4);
533 eb->
size_group = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
539 separator = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
540 gtk_container_add(GTK_CONTAINER(hbox), separator);
553 separator = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
554 gtk_container_add(GTK_CONTAINER(hbox), separator);
557 vbox = gtk_grid_new();
558 gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox),
559 GTK_ORIENTATION_VERTICAL);
560 gtk_container_add(GTK_CONTAINER(hbox), vbox);
568 combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
570 cell = gtk_cell_renderer_pixbuf_new();
571 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell,
FALSE);
572 gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo),
575 cell = gtk_cell_renderer_text_new();
576 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell,
TRUE);
577 gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo),
580 gtk_widget_set_size_request(combo, 140, -1);
581 g_signal_connect(combo,
"changed",
584 gtk_widget_set_tooltip_text(combo,
585 _(
"Switch player point-of-view. Use this to edit "
586 "from the perspective of different players, or "
587 "even as a global observer."));
588 gtk_container_add(GTK_CONTAINER(vbox), combo);
592 button = gtk_button_new();
594 image = gtk_image_new_from_pixbuf(pixbuf);
595 g_object_unref(G_OBJECT(pixbuf));
596 gtk_container_add(GTK_CONTAINER(button), image);
597 gtk_widget_set_tooltip_text(button,
_(
"Show the property editor."));
598 gtk_size_group_add_widget(eb->
size_group, button);
599 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
600 gtk_button_set_focus_on_click(GTK_BUTTON(button),
FALSE);
601 g_signal_connect(button,
"clicked",
603 gtk_container_add(GTK_CONTAINER(hbox), button);
615 GtkTreeSelection *sel;
618 int value, store_value;
632 model = GTK_TREE_MODEL(tvs->
store);
633 if (!gtk_tree_model_get_iter_first(model, &iter)) {
638 gtk_tree_model_get(model, &iter,
TVS_COL_ID, &store_value, -1);
639 if (value == store_value) {
640 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tvs->
view));
641 gtk_tree_selection_select_iter(sel, &iter);
644 }
while (gtk_tree_model_iter_next(model, &iter));
671 if (eb == NULL || eb->
widget == NULL) {
676 gtk_widget_hide(eb->
widget);
684 gtk_widget_show_all(eb->
widget);
706 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, w, h);
709 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
713 for (i = 0; i < 3; i++) {
733 GtkTreeModel *model = GTK_TREE_MODEL(store);
735 if (gtk_tree_model_get_iter_first(model, &iter)) {
739 gtk_tree_model_get(model, &iter,
TVS_COL_IMAGE, &pixbuf, -1);
740 if (pixbuf != NULL) {
741 g_object_unref(pixbuf);
743 }
while (gtk_tree_model_iter_next(model, &iter));
746 gtk_list_store_clear(store);
773 if (eb == NULL ||
tileset == NULL) {
785 gtk_list_store_append(
store, &iter);
786 gtk_list_store_set(
store, &iter,
791 if (pixbuf != NULL) {
793 g_object_unref(pixbuf);
804 gtk_list_store_append(
store, &iter);
805 gtk_list_store_set(
store, &iter,
810 if (pixbuf != NULL) {
812 g_object_unref(pixbuf);
822 gtk_list_store_append(
store, &iter);
823 gtk_list_store_set(
store, &iter,
828 if (pixbuf != NULL) {
830 g_object_unref(pixbuf);
840 gtk_list_store_append(
store, &iter);
841 gtk_list_store_set(
store, &iter,
846 if (pixbuf != NULL) {
848 g_object_unref(pixbuf);
858 gtk_list_store_append(
store, &iter);
859 gtk_list_store_set(
store, &iter,
864 if (pixbuf != NULL) {
866 g_object_unref(pixbuf);
877 gtk_list_store_append(
store, &iter);
878 gtk_list_store_set(
store, &iter,
887 if (pixbuf != NULL) {
889 g_object_unref(G_OBJECT(pixbuf));
901 if (gdk_event_state & GDK_SHIFT_MASK) {
904 if (gdk_event_state & GDK_CONTROL_MASK) {
907 if (gdk_event_state & GDK_MOD1_MASK) {
919 switch (gdk_mouse_button) {
941 if (ev->type != GDK_BUTTON_PRESS) {
957 if (ev->type != GDK_BUTTON_RELEASE) {
981 GtkTreeViewColumn *col,
986 gtk_dialog_response(GTK_DIALOG(tvs->
dialog), GTK_RESPONSE_ACCEPT);
997 GtkWidget *vbox, *
view, *scrollwin;
998 GtkCellRenderer *cell;
1000 GtkTreeViewColumn *col;
1001 GtkTreeSelection *sel;
1007 tvs->
dialog = gtk_dialog_new_with_buttons(
_(
"Select Tool Value"),
1008 GTK_WINDOW(
toplevel), GTK_DIALOG_MODAL,
1009 GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
1010 GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT,
1012 vbox = gtk_dialog_get_content_area(GTK_DIALOG(tvs->
dialog));
1020 scrollwin = gtk_scrolled_window_new(NULL, NULL);
1021 gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin),
1022 GTK_SHADOW_ETCHED_IN);
1023 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollwin),
1025 GTK_POLICY_AUTOMATIC);
1026 gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(scrollwin),
1028 gtk_box_pack_start(GTK_BOX(vbox), scrollwin,
TRUE,
TRUE, 0);
1030 view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(tvs->
store));
1032 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(
view),
TRUE);
1034 g_signal_connect(
view,
"row-activated",
1037 sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(
view));
1038 gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE);
1040 cell = gtk_cell_renderer_pixbuf_new();
1044 gtk_tree_view_column_set_resizable(col,
FALSE);
1045 gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
1046 gtk_tree_view_column_set_reorderable(col,
FALSE);
1047 gtk_tree_view_column_set_clickable(col,
FALSE);
1048 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
1050 cell = gtk_cell_renderer_text_new();
1051 col = gtk_tree_view_column_new_with_attributes(
"ID", cell,
1053 gtk_tree_view_column_set_resizable(col,
FALSE);
1054 gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
1055 gtk_tree_view_column_set_reorderable(col,
FALSE);
1056 gtk_tree_view_column_set_clickable(col,
FALSE);
1057 gtk_tree_view_column_set_sort_column_id(col,
TVS_COL_ID);
1058 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
1060 cell = gtk_cell_renderer_text_new();
1061 col = gtk_tree_view_column_new_with_attributes(
"Name", cell,
1063 gtk_tree_view_column_set_resizable(col,
FALSE);
1064 gtk_tree_view_column_set_sizing(col, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
1065 gtk_tree_view_column_set_reorderable(col,
FALSE);
1066 gtk_tree_view_column_set_clickable(col,
FALSE);
1067 gtk_tree_view_column_set_sort_column_id(col,
TVS_COL_NAME);
1068 gtk_tree_view_append_column(GTK_TREE_VIEW(
view), col);
1070 gtk_container_add(GTK_CONTAINER(scrollwin),
view);
1074 gtk_widget_show_all(vbox);
1119 value = gtk_spin_button_get_value_as_int(spinbutton);
1120 which = GPOINTER_TO_INT(userdata);
1147 GtkTreeModel *model;
1154 if (!gtk_combo_box_get_active_iter(combo, &iter)) {
1158 model = gtk_combo_box_get_model(combo);
1169 GtkWidget *label, *vbox, *frame, *hbox, *vbox2, *image, *evbox;
1170 GtkWidget *spin, *combo;
1171 GtkListStore *store;
1172 GtkCellRenderer *cell;
1178 frame = gtk_frame_new(
_(
"Editor Tool"));
1179 gtk_container_set_border_width(GTK_CONTAINER(frame), 4);
1182 vbox = gtk_grid_new();
1183 gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox),
1184 GTK_ORIENTATION_VERTICAL);
1185 gtk_grid_set_row_spacing(GTK_GRID(vbox), 8);
1186 gtk_container_set_border_width(GTK_CONTAINER(vbox), 4);
1187 gtk_container_add(GTK_CONTAINER(frame), vbox);
1190 hbox = gtk_grid_new();
1191 gtk_grid_set_column_spacing(GTK_GRID(hbox), 8);
1192 gtk_container_add(GTK_CONTAINER(vbox), hbox);
1194 evbox = gtk_event_box_new();
1195 gtk_widget_set_tooltip_text(evbox,
_(
"Click to change value if applicable."));
1196 g_signal_connect(evbox,
"button_press_event",
1198 gtk_container_add(GTK_CONTAINER(hbox), evbox);
1200 image = gtk_image_new();
1201 gtk_container_add(GTK_CONTAINER(evbox), image);
1204 vbox2 = gtk_grid_new();
1205 gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox2),
1206 GTK_ORIENTATION_VERTICAL);
1207 gtk_grid_set_row_spacing(GTK_GRID(vbox2), 4);
1208 gtk_container_add(GTK_CONTAINER(hbox), vbox2);
1210 label = gtk_label_new(NULL);
1211 gtk_widget_set_halign(label, GTK_ALIGN_START);
1212 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
1213 gtk_container_add(GTK_CONTAINER(vbox2), label);
1216 label = gtk_label_new(NULL);
1217 gtk_widget_set_halign(label, GTK_ALIGN_START);
1218 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
1219 gtk_container_add(GTK_CONTAINER(vbox2), label);
1223 hbox = gtk_grid_new();
1224 gtk_grid_set_column_spacing(GTK_GRID(hbox), 8);
1225 gtk_container_add(GTK_CONTAINER(vbox), hbox);
1227 evbox = gtk_event_box_new();
1228 gtk_widget_set_tooltip_text(evbox,
_(
"Click to change tool mode."));
1229 g_signal_connect(evbox,
"button_press_event",
1231 gtk_container_add(GTK_CONTAINER(hbox), evbox);
1233 image = gtk_image_new();
1234 gtk_container_add(GTK_CONTAINER(evbox), image);
1237 vbox2 = gtk_grid_new();
1238 gtk_orientable_set_orientation(GTK_ORIENTABLE(vbox2),
1239 GTK_ORIENTATION_VERTICAL);
1240 gtk_grid_set_row_spacing(GTK_GRID(vbox2), 4);
1241 gtk_container_add(GTK_CONTAINER(hbox), vbox2);
1243 label = gtk_label_new(NULL);
1244 fc_snprintf(buf,
sizeof(buf),
"<span weight=\"bold\">%s</span>",
1246 gtk_label_set_markup(GTK_LABEL(label), buf);
1247 gtk_widget_set_halign(label, GTK_ALIGN_START);
1248 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
1249 gtk_container_add(GTK_CONTAINER(vbox2), label);
1251 label = gtk_label_new(NULL);
1252 gtk_widget_set_halign(label, GTK_ALIGN_START);
1253 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
1254 gtk_container_add(GTK_CONTAINER(vbox2), label);
1258 hbox = gtk_grid_new();
1259 gtk_grid_set_column_spacing(GTK_GRID(hbox), 8);
1260 gtk_container_add(GTK_CONTAINER(vbox), hbox);
1262 spin = gtk_spin_button_new_with_range(1, 255, 1);
1263 gtk_widget_set_tooltip_text(spin,
1264 _(
"Use this to change the \"size\" parameter for the tool. "
1265 "This parameter controls for example the half-width "
1266 "of the square of tiles that will be affected by the "
1267 "tool, or the size of a created city."));
1268 g_signal_connect(spin,
"value-changed",
1271 gtk_container_add(GTK_CONTAINER(hbox), spin);
1273 label = gtk_label_new(
_(
"Size"));
1274 gtk_container_add(GTK_CONTAINER(hbox), label);
1276 hbox = gtk_grid_new();
1277 gtk_grid_set_column_spacing(GTK_GRID(hbox), 8);
1278 gtk_container_add(GTK_CONTAINER(vbox), hbox);
1280 spin = gtk_spin_button_new_with_range(1, 255, 1);
1281 gtk_widget_set_tooltip_text(spin,
1282 _(
"Use this to change the tool's \"count\" parameter. "
1283 "This controls for example how many units are placed "
1284 "at once with the unit tool."));
1285 g_signal_connect(spin,
"value-changed",
1288 gtk_container_add(GTK_CONTAINER(hbox), spin);
1290 label = gtk_label_new(
_(
"Count"));
1291 gtk_container_add(GTK_CONTAINER(hbox), label);
1299 combo = gtk_combo_box_new_with_model(GTK_TREE_MODEL(store));
1301 cell = gtk_cell_renderer_pixbuf_new();
1302 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell,
FALSE);
1303 gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo),
1306 cell = gtk_cell_renderer_text_new();
1307 gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell,
TRUE);
1308 gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(combo),
1311 gtk_widget_set_size_request(combo, 132, -1);
1312 g_signal_connect(combo,
"changed",
1315 gtk_widget_set_tooltip_text(combo,
1316 _(
"Use this to change the \"applied player\" tool parameter. "
1317 "This controls for example under which player units and cities "
1319 gtk_container_add(GTK_CONTAINER(vbox), combo);
1325 g_object_ref(ei->
widget);
1329 gtk_widget_show_all(ei->
widget);
1341 GtkListStore *store;
1355 if (!combo || !store) {
1360 gtk_widget_hide(combo);
1364 gtk_list_store_clear(store);
1371 gtk_list_store_append(store, &iter);
1372 gtk_list_store_set(store, &iter,
1380 gtk_list_store_set(store, &iter,
TAP_COL_FLAG, flag, -1);
1381 g_object_unref(flag);
1396 gtk_combo_box_set_active(GTK_COMBO_BOX(combo), index);
1397 gtk_widget_show(combo);
1410 GdkPixbuf *pixbuf = NULL;
1479 GdkPixbuf *pixbuf = NULL;
1504 parent = gtk_widget_get_parent(old);
1509 gtk_widget_hide(old);
1510 gtk_container_remove(GTK_CONTAINER(parent), old);
1511 gtk_container_add(GTK_CONTAINER(parent),
new);
1512 gtk_widget_show_all(
new);
1520 GdkPixbuf *pixbuf = NULL;
1544 gtk_image_set_from_pixbuf(GTK_IMAGE(ei->
mode_image), pixbuf);
1546 g_object_unref(pixbuf);
1550 fc_snprintf(buf,
sizeof(buf),
"<span weight=\"bold\">%s</span>",
1552 gtk_label_set_markup(GTK_LABEL(ei->
tool_label), buf);
1565 gtk_image_set_from_pixbuf(GTK_IMAGE(ei->
tool_image), pixbuf);
1567 g_object_unref(G_OBJECT(pixbuf));
1572 gtk_image_set_from_pixbuf(GTK_IMAGE(ei->
tool_image), pixbuf);
1574 g_object_unref(pixbuf);
1618 switch (ev->keyval) {
1667 if (ev->state & GDK_CONTROL_MASK) {
1671 if (ev->state & GDK_SHIFT_MASK) {
1677 switch (ev->keyval) {
1707 case GDK_KEY_KP_Add:
1717 case GDK_KEY_underscore:
1718 case GDK_KEY_KP_Subtract:
1843 g_object_unref(ei->
widget);
int send_chat_printf(const char *format,...)
int send_chat(const char *message)
bool client_is_global_observer(void)
int client_player_number(void)
editgui_notify_object_changed
int edit_buffer_get_status_string(const struct edit_buffer *ebuf, char *buf, int buflen)
bool editor_is_active(void)
int editor_tool_get_size(enum editor_tool_type ett)
void editor_set_tool(enum editor_tool_type ett)
void editor_mouse_button_press(int canvas_x, int canvas_y, int button, int modifiers)
void editor_mouse_move(int canvas_x, int canvas_y, int modifiers)
enum editor_tool_mode editor_tool_get_mode(enum editor_tool_type ett)
void editor_tool_set_count(enum editor_tool_type ett, int count)
void editor_tool_toggle_mode(enum editor_tool_type ett, enum editor_tool_mode etm)
const char * editor_tool_get_value_name(enum editor_tool_type emt, int value)
int editor_tool_get_value(enum editor_tool_type ett)
struct edit_buffer * editor_get_copy_buffer(void)
void editor_tool_set_applied_player(enum editor_tool_type ett, int player_no)
const char * editor_tool_get_mode_name(enum editor_tool_type ett, enum editor_tool_mode etm)
void editor_tool_cycle_mode(enum editor_tool_type ett)
int editor_tool_get_count(enum editor_tool_type ett)
void editor_tool_set_size(enum editor_tool_type ett, int size)
const char * editor_get_mode_tooltip(enum editor_tool_mode etm)
bool editor_tool_is_usable(enum editor_tool_type ett)
enum editor_tool_type editor_get_tool(void)
bool editor_tool_has_applied_player(enum editor_tool_type ett)
bool editor_tool_has_size(enum editor_tool_type ett)
void editor_tool_set_value(enum editor_tool_type ett, int value)
bool editor_tool_has_value(enum editor_tool_type ett)
const char * editor_tool_get_tooltip(enum editor_tool_type ett)
void editor_mouse_button_release(int canvas_x, int canvas_y, int button, int modifiers)
struct sprite * editor_tool_get_sprite(enum editor_tool_type ett)
void editor_apply_tool_to_selection(void)
bool editor_tool_has_mode(enum editor_tool_type ett, enum editor_tool_mode etm)
int editor_tool_get_applied_player(enum editor_tool_type ett)
bool editor_tool_has_count(enum editor_tool_type ett)
struct sprite * editor_get_mode_sprite(enum editor_tool_mode etm)
const char * editor_tool_get_name(enum editor_tool_type ett)
void editor_tool_set_mode(enum editor_tool_type ett, enum editor_tool_mode etm)
#define FC_STATIC_CANVAS_INIT
static void refresh_all_buttons(struct editbar *eb)
static void editbar_player_properties_button_clicked(GtkButton *b, gpointer userdata)
tool_applied_player_columns
static bool editgui_run_tool_selection(enum editor_tool_type ett)
static void editinfobox_refresh(struct editinfobox *ei)
void editgui_popup_properties(const struct tile_list *tiles, int objtype)
void editgui_notify_object_created(int tag, int id)
gboolean handle_edit_key_release(GdkEventKey *ev)
static void clear_tool_stores(struct editbar *eb)
static int convert_modifiers(int gdk_event_state)
static void try_to_set_editor_tool(enum editor_tool_type ett)
static void clear_tool_store(GtkListStore *store)
gboolean handle_edit_mouse_button_release(GdkEventButton *ev)
static gboolean handle_edit_key_press_with_ctrl(GdkEventKey *ev)
gboolean handle_edit_key_press(GdkEventKey *ev)
static int tool_value_selector_run(struct tool_value_selector *tvs)
static void editbar_add_mode_button(struct editbar *eb, enum editor_tool_mode etm)
static void editbar_tool_button_toggled(GtkToggleButton *tb, gpointer userdata)
static void editbar_add_tool_button(struct editbar *eb, enum editor_tool_type ett)
void editgui_create_widgets(void)
static struct editbar * editbar_create(void)
void editgui_popdown_all(void)
static void editbar_reload_tileset(struct editbar *eb)
static void tool_value_selector_treeview_row_activated(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data)
static void editinfobox_spin_button_value_changed(GtkSpinButton *spinbutton, gpointer userdata)
static void refresh_tool_applied_player_combo(struct editinfobox *ei)
static void editbar_mode_button_toggled(GtkToggleButton *tb, gpointer userdata)
static void editinfobox_tool_applied_player_changed(GtkComboBox *combo, gpointer userdata)
static gboolean handle_edit_key_press_with_shift(GdkEventKey *ev)
static void refresh_all_tool_value_selectors(struct editbar *eb)
gboolean handle_edit_mouse_button_press(GdkEventButton *ev)
static struct tool_value_selector * create_tool_value_selector(struct editbar *eb_parent, enum editor_tool_type ett)
static GdkPixbuf * create_terrain_pixbuf(struct terrain *pterrain)
static gboolean editbar_tool_button_mouse_click(GtkWidget *w, GdkEventButton *ev, gpointer userdata)
static void replace_widget(GtkWidget *old, GtkWidget *new)
static void editbar_player_pov_combobox_changed(GtkComboBox *combo, gpointer user_data)
struct editinfobox * editgui_get_editinfobox(void)
static int convert_mouse_button(int gdk_mouse_button)
gboolean handle_edit_mouse_move(GdkEventMotion *ev)
tool_value_selector_columns
void editgui_refresh(void)
static void editbar_refresh(struct editbar *eb)
static struct editinfobox * editor_infobox
static struct editbar * editor_toolbar
static gboolean editinfobox_handle_tool_image_button_press(GtkWidget *evbox, GdkEventButton *ev, gpointer data)
struct editbar * editgui_get_editbar(void)
static void refresh_tool_value_selector(struct editbar *eb, enum editor_tool_type ett)
static struct editinfobox * editinfobox_create(void)
static void refresh_player_pov_indicator(struct editbar *eb)
void editgui_tileset_changed(void)
static gboolean editinfobox_handle_mode_image_button_press(GtkWidget *evbox, GdkEventButton *ev, gpointer data)
static GdkPixbuf * get_tool_value_pixbuf(enum editor_tool_type ett, int value)
static GdkPixbuf * get_tool_mode_pixbuf(enum editor_tool_mode etm)
void property_editor_handle_object_changed(struct property_editor *pe, enum editor_object_type objtype, int object_id, bool remove)
void property_editor_handle_object_created(struct property_editor *pe, int tag, int object_id)
void property_editor_popup(struct property_editor *pe, enum editor_object_type objtype)
struct property_editor * editprop_get_property_editor(void)
void property_editor_reload(struct property_editor *pe, enum editor_object_type objtype)
void property_editor_popdown(struct property_editor *pe)
void property_editor_load_tiles(struct property_editor *pe, const struct tile_list *tiles)
void property_editor_clear(struct property_editor *pe)
GtkWidget * unit_info_box
void disable_gobject_callback(GObject *obj, GCallback cb)
void enable_gobject_callback(GObject *obj, GCallback cb)
GdkPixbuf * get_flag(const struct nation_type *nation)
GdkPixbuf * surface_get_pixbuf(cairo_surface_t *surf, int width, int height)
GdkPixbuf * sprite_get_pixbuf(struct sprite *sprite)
GdkPixbuf * create_extra_pixbuf(const struct extra_type *pextra)
#define fc_assert_ret(condition)
void put_drawn_sprites(struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y, int count, struct drawn_sprite *pdrawn, bool fog)
#define fc_calloc(n, esz)
#define NO_NATION_SELECTED
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
#define players_iterate_end
#define players_iterate(_pplayer)
cairo_surface_t * surface
GtkWidget * tool_buttons[NUM_EDITOR_TOOL_TYPES]
GtkWidget * player_pov_combobox
GtkListStore * player_pov_store
GtkSizeGroup * size_group
GtkWidget * mode_buttons[NUM_EDITOR_TOOL_MODES]
struct tool_value_selector * tool_selectors[NUM_EDITOR_TOOL_TYPES]
GtkListStore * tool_applied_player_store
GtkWidget * size_spin_button
GtkWidget * tool_applied_player_combobox
GtkWidget * tool_value_label
GtkWidget * count_spin_button
struct sprite * copypaste
struct sprite * properties
int fc_snprintf(char *str, size_t n, const char *format,...)
const char * terrain_name_translation(const struct terrain *pterrain)
struct terrain * terrain_by_number(const Terrain_type_id type)
Terrain_type_id terrain_number(const struct terrain *pterrain)
#define terrain_type_iterate(_p)
#define terrain_type_iterate_end
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum direction8 facing)
int fill_basic_terrain_layer_sprite_array(struct tileset *t, struct drawn_sprite *sprs, int layer, struct terrain *pterrain)
int tileset_tile_height(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)
const struct editor_sprites * get_editor_sprites(const struct tileset *t)
struct unit_type * utype_by_number(const Unit_type_id id)
Unit_type_id utype_number(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
#define unit_type_iterate(_p)
#define unit_type_iterate_end