24#include <gdk/gdkkeysyms.h>
128 tb =
eb->mode_buttons[
i];
189 _(
"The current ruleset does not define any "
190 "objects corresponding to this editor tool."));
236 store =
eb->player_pov_store;
267 combo =
eb->player_pov_combobox;
311 if (pplayer !=
NULL) {
329 if (
tvs ==
nullptr) {
333 dialog =
tvs->dialog;
417 if (
eb->tool_buttons[
i] !=
NULL) {
458 eb->tool_buttons[
ett] = button;
519 eb->mode_buttons[
etm] = button;
572 eb->player_pov_store = store;
591 _(
"Switch player point-of-view. Use this to edit "
592 "from the perspective of different players, or "
593 "even as a global observer."));
595 eb->player_pov_combobox = combo;
677 if (
eb ==
nullptr ||
eb->widget ==
nullptr) {
719 for (
i = 0;
i < 3;
i++) {
997 tvs->editbar_parent =
eb;
1214 ei->tool_label = label;
1220 ei->tool_value_label = label;
1255 ei->mode_label = label;
1265 _(
"Use this to change the \"size\" parameter for the tool. "
1266 "This parameter controls for example the half-width "
1267 "of the square of tiles that will be affected by the "
1268 "tool, or the size of a created city."));
1273 ei->size_spin_button =
spin;
1284 _(
"Use this to change the tool's \"count\" parameter. "
1285 "This controls for example how many units are placed "
1286 "at once with the unit tool."));
1291 ei->count_spin_button =
spin;
1300 ei->tool_applied_player_store = store;
1318 _(
"Use this to change the \"applied player\" tool parameter. "
1319 "This controls for example under which player units and cities "
1322 ei->tool_applied_player_combobox = combo;
1354 combo =
ei->tool_applied_player_combobox;
1355 store =
ei->tool_applied_player_store;
1357 if (!combo || !store) {
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)
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 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)
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)
static gboolean editbar_tool_right_button(GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gint blocking_dialog(GtkWidget *dlg)
#define fc_assert_ret(condition)
#define fc_assert(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
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
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)
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum unit_activity activity, enum direction8 facing)
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