21#include <gdk/gdkkeysyms.h>
69 const struct city *pcity,
89#define SPECHASH_TAG stored_tag
90#define SPECHASH_INT_KEY_TYPE
91#define SPECHASH_INT_DATA_TYPE
118#define PF_MAX_CLAUSES 16
119#define PF_DISJUNCTION_SEPARATOR "|"
120#define PF_CONJUNCTION_SEPARATOR "&"
267#define SPECHASH_TAG propstate
268#define SPECHASH_INT_KEY_TYPE
269#define SPECHASH_IDATA_TYPE struct propstate *
270#define SPECHASH_IDATA_FREE propstate_destroy
449#define SPECHASH_TAG objprop
450#define SPECHASH_INT_KEY_TYPE
451#define SPECHASH_IDATA_TYPE struct objprop *
503#define SPECHASH_TAG objbind
504#define SPECHASH_INT_KEY_TYPE
505#define SPECHASH_IDATA_TYPE struct objbind *
506#define SPECHASH_IDATA_FREE objbind_destroy
576 const struct tile *ptile);
614 int tag,
int object_id);
635#define property_page_objprop_iterate(ARG_pp, NAME_op) \
636 TYPED_HASH_DATA_ITERATE(struct objprop *, (ARG_pp)->objprop_table, NAME_op)
637#define property_page_objprop_iterate_end HASH_DATA_ITERATE_END
639#define property_page_objbind_iterate(ARG_pp, NAME_ob) \
640 TYPED_HASH_DATA_ITERATE(struct objbind *, (ARG_pp)->objbind_table, NAME_ob)
641#define property_page_objbind_iterate_end HASH_DATA_ITERATE_END
673 return _(
"Start Position");
681 return Q_(
"?play:Game");
686 log_error(
"%s() Unhandled request to get name of object type %d.",
705 return ((
struct unit *)
object)->id;
707 return ((
struct city *)
object)->id;
716 log_error(
"%s(): Unhandled request to get object ID from object %p of "
745 log_error(
"%s(): Unhandled request to get object of type %d (%s) "
771 log_error(
"%s(): Unhandled request for object type %d (%s)).",
793 return "struct built_status[B_LAST]";
795 return "bool[A_LAST]";
805 return "struct nation_hash";
809 return "struct tile_vision_data";
868 switch (
pv->valtype) {
882 if (
pv->data.v_gov !=
NULL) {
895 if (
pv->data.v_built[
id].turn < 0) {
915 if (
BV_ISSET(
pv->data.v_bv_inventions, tech)) {
924 if (
BV_ISSET(
pv->data.v_bv_special,
spe->data.special_idx)) {
963 count =
strlen(
pv->data.v_const_string);
972 log_error(
"%s(): Unhandled value type %d for property value %p.",
1057 switch (
pv->valtype) {
1072 pv_copy->data.v_pixbuf =
pv->data.v_pixbuf;
1082 pv_copy->data.v_bv_special =
pv->data.v_bv_special;
1085 pv_copy->data.v_bv_roads =
pv->data.v_bv_roads;
1088 pv_copy->data.v_bv_bases =
pv->data.v_bv_bases;
1091 pv_copy->data.v_nation =
pv->data.v_nation;
1102 pv_copy->data.v_bv_inventions =
pv->data.v_bv_inventions;
1107 pv_copy->data.v_tile_vision->tile_known
1108 =
pv->data.v_tile_vision->tile_known;
1110 pv_copy->data.v_tile_vision->tile_seen[v]
1111 =
pv->data.v_tile_vision->tile_seen[v];
1117 log_error(
"%s(): Unhandled value type %d for property value %p.",
1143 if (!
pv || !
pv->must_free) {
1147 switch (
pv->valtype) {
1164 free(
pv->data.v_pointer);
1171 log_error(
"%s(): Unhandled request to free data %p (type %s).",
1185 if (
pva->valtype !=
pvb->valtype) {
1189 switch (
pva->valtype) {
1193 return pva->data.v_int ==
pvb->data.v_int;
1195 return pva->data.v_bool ==
pvb->data.v_bool;
1197 if (
pva->data.v_const_string !=
NULL
1198 &&
pvb->data.v_const_string !=
NULL) {
1199 return !
strcmp(
pva->data.v_const_string,
1200 pvb->data.v_const_string);
1202 return pva->data.v_const_string ==
pvb->data.v_const_string;
1204 return pva->data.v_pixbuf ==
pvb->data.v_pixbuf;
1206 if (
pva->data.v_pointer ==
pvb->data.v_pointer) {
1208 }
else if (!
pva->data.v_pointer || !
pvb->data.v_pointer) {
1234 return pva->data.v_nation ==
pvb->data.v_nation;
1237 pvb->data.v_nation_hash);
1239 return pva->data.v_gov ==
pvb->data.v_gov;
1242 pvb->data.v_tile_vision->tile_known)) {
1247 pvb->data.v_tile_vision->tile_seen[v])) {
1254 log_error(
"%s(): Unhandled value type %d for property values %p and %p.",
1256 return pva->data.v_pointer ==
pvb->data.v_pointer;
1276 ps->property_value =
pv;
1291 ps->property_value =
NULL;
1319 ps->property_value =
pv;
1332 return ps->property_value;
1345 if (
object ==
NULL) {
1386 return ob->object_id;
1430 log_error(
"%s(): Unhandled request to destroy object %p (ID %d) of type "
1465 if (
NULL == ptile) {
1487 if (
NULL != pterrain) {
1490 pv->data.v_const_string =
"";
1498 if (
NULL != presource) {
1501 pv->data.v_const_string =
"";
1531 BV_SET(
pv->data.v_bv_special, pextra->data.special_idx);
1561 BV_SET(
pv->data.v_tile_vision->tile_known,
1570 BV_SET(
pv->data.v_tile_vision->tile_seen[v],
1579 pv->data.v_const_string = ptile->
label;
1581 pv->data.v_const_string =
"";
1585 log_error(
"%s(): Unhandled request for value of property %d "
1596 const struct tile *ptile;
1621 log_error(
"%s(): Unhandled request for value of property %d "
1688 log_error(
"%s(): Unhandled request for value of property %d "
1700 if (
NULL == pcity) {
1724 pv->data.v_int = pcity->
id;
1727 pv->data.v_const_string = pcity->
name;
1747 log_error(
"%s(): Unhandled request for value of property %d "
1760 if (
NULL == pplayer) {
1766 pv->data.v_const_string = pplayer->
name;
1788 BV_SET(
pv->data.v_bv_inventions, tech);
1809 log_error(
"%s(): Unhandled request for value of property %d "
1827 pv->data.v_bool =
pgame->scenario.is_scenario;
1830 pv->data.v_const_string =
pgame->scenario.name;
1833 pv->data.v_const_string =
pgame->scenario.authors;
1836 pv->data.v_const_string =
pgame->scenario_desc.description;
1839 pv->data.v_bool =
pgame->scenario.save_random;
1842 pv->data.v_bool =
pgame->scenario.players;
1845 pv->data.v_bool =
pgame->scenario.startpos_nations;
1848 pv->data.v_bool =
pgame->scenario.prevent_new_cities;
1851 pv->data.v_bool =
pgame->scenario.lake_flooding;
1854 pv->data.v_bool =
pgame->scenario.ruleset_locked;
1857 log_error(
"%s(): Unhandled request for value of property %d "
1869 log_error(
"%s(): Unhandled request for object type \"%s\" (nb %d).",
1926 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
1971 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
1980 if (
NULL == pcity) {
2013 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2047 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2053 log_error(
"%s(): Unhandled request for value range of property %d (%s) "
2062 log_error(
"%s(): Unhandled request for object type \"%s\" (nb %d).",
2073 if (!
ob || !
op || !
ob->propstate_table) {
2199 if (
ob->propstate_table) {
2201 ob->propstate_table =
NULL;
2230 ob->parent_property_page =
pp;
2255 if (
NULL == ptile) {
2303 if (
NULL == pcity) {
2307 packet->
id = pcity->
id;
2327 if (
NULL == pplayer) {
2417 if (
BV_ISSET(
pv->data.v_bv_special, pextra->data.special_idx)) {
2453 log_error(
"%s(): Unhandled request to pack value of property "
2476 log_error(
"%s(): Unhandled request to pack value of property "
2490 packet->
fuel =
pv->data.v_int;
2493 packet->
moved =
pv->data.v_bool;
2499 packet->
hp =
pv->data.v_int;
2505 packet->
stay =
pv->data.v_bool;
2511 log_error(
"%s(): Unhandled request to pack value of property "
2525 packet->
size =
pv->data.v_int;
2541 packet->
built[
i] =
pv->data.v_built[
i].turn;
2549 log_error(
"%s(): Unhandled request to pack value of property "
2583 packet->
gold =
pv->data.v_int;
2592 log_error(
"%s(): Unhandled request to pack value of property "
2636 log_error(
"%s(): Unhandled request to pack value of property "
2645 log_error(
"%s(): Unhandled request for object type \"%s\" (nb %d).",
2695 switch (
op->valtype) {
2803 return op->column_id;
2815 op->view_column =
col;
2827 return op->view_column;
3117 log_error(
"%s(): Unhandled request to create widget for property %d (%s).",
3364 "<span foreground=\"red\">%s</span>",
name);
3403 log_error(
"Cannot store child widget %p under name "
3404 "\"%s\" using objprop_set_child_widget for object "
3405 "property %d (%s) because objprop_get_widget does "
3406 "not return a valid widget.",
3429 log_error(
"Cannot retrieve child widget under name "
3430 "\"%s\" using objprop_get_child_widget for object "
3431 "property %d (%s) because objprop_get_widget does "
3432 "not return a valid widget.",
3439 log_error(
"Child widget \"%s\" not found for object "
3440 "property %d (%s) via objprop_get_child_widget.",
3468 return op->extviewer;
3479 return op->parent_page;
3550 ev->panel_label = label;
3556 ev->panel_widget = vbox;
3562 ev->panel_label = label;
3588 log_error(
"Unhandled request to create panel widget "
3589 "for property %d (%s) in extviewer_new().",
3604 ev->panel_button = button;
3645 log_error(
"Unhandled request to create data store "
3646 "for property %d (%s) in extviewer_new().",
3657 ev->view_widget = vbox;
3663 ev->view_label = label;
3777 log_error(
"Unhandled request to configure view widget "
3778 "for property %d (%s) in extviewer_new().",
3809 return ev->panel_widget;
3821 return ev->view_widget;
3854 textbuf =
ev->textbuf;
3865 id =
spe->data.special_idx;
3867 present =
BV_ISSET(
pv->data.v_bv_special,
id);
3928 present =
BV_ISSET(
pv->data.v_tile_vision->tile_known,
id);
3931 present =
BV_ISSET(
pv->data.v_tile_vision->tile_seen[v],
id);
3942 _(
"All nations"), -1);
3987 enum barbarian_type barbarian_type =
3996 present = (pnation ==
pv->data.v_nation);
4022 present = (
pgov ==
pv->data.v_gov);
4033 if (
pv->data.v_gov !=
NULL) {
4054 present =
BV_ISSET(
pv->data.v_bv_inventions,
id);
4088 log_error(
"Unhandled request to refresh widgets "
4089 "extviewer_refresh_widgets() for objprop id=%d "
4113 if (
ev->panel_label !=
NULL) {
4142 log_error(
"Unhandled request to clear widgets "
4143 "in extviewer_clear_widgets() for objprop id=%d "
4185 bool active, present;
4307 if (!(0 <=
id &&
id <
B_LAST)) {
4344 if (
pv->data.v_gov !=
NULL) {
4370 BV_SET(
pv->data.v_bv_inventions,
id);
4372 BV_CLR(
pv->data.v_bv_inventions,
id);
4381 log_error(
"Unhandled widget toggled signal in "
4382 "extviewer_view_cell_toggled() for objprop id=%d "
4429 log_error(
"Unhandled widget modified signal in "
4430 "extviewer_textbuf_changed() for objprop id=%d "
4445#define ADDPROP(ARG_id, ARG_name, ARG_tooltip, ARG_flags, ARG_valtype) do { \
4446 struct objprop *MY_op = objprop_new(ARG_id, ARG_name, ARG_tooltip, \
4447 ARG_flags, ARG_valtype, pp); \
4448 objprop_hash_insert(pp->objprop_table, MY_op->id, MY_op); \
4591 _(
"How likely user is to get this player by autoselect. '-1' for default behavior."),
4609 _(
"Scenario Name"),
NULL,
4613 _(
"Scenario Authors"),
NULL,
4617 _(
"Scenario Description"),
NULL,
4621 _(
"Save Random Number State"),
NULL,
4624 _(
"Save Players"),
NULL,
4627 _(
"Nation Start Positions"),
NULL,
4630 _(
"Prevent New Cities"),
NULL,
4633 _(
"Saltwater Flooding Lakes"),
NULL,
4636 _(
"Lock to current Ruleset"),
NULL,
4706 for (p =
rows; p !=
NULL; p = p->next) {
4920 _(
"Pressing this button will create a new object of the "
4921 "same type as the current property page and add it to "
4922 "the page. The specific type and count of the objects "
4923 "is taken from the editor tool state. So for example, "
4924 "the \"tool value\" of the unit tool and its \"count\" "
4925 "parameter affect unit creation."));
4935 _(
"Pressing this button will send a request to the server "
4936 "to destroy (i.e. erase) the objects selected in the object "
4978 pp->extviewer_notebook = notebook;
5054 _(
"Enter a filter string to limit which properties are shown. "
5055 "The filter is one or more text patterns separated by | "
5056 "(\"or\") or & (\"and\"). The symbol & has higher precedence "
5057 "than |. A pattern may also be negated by prefixing it with !."));
5070 _(
"Pressing this button will reset all modified properties of "
5071 "the selected objects to their current values (the values "
5072 "they have on the server)."));
5080 _(
"Pressing this button will send all modified properties of "
5081 "the objects selected in the object list to the server. "
5082 "Modified properties' names are shown in red in the properties "
5162 const struct city *pcity,
5254 const struct tile *ptile)
5257 if (!
pp || !ptile) {
5320 if (!
pp || !
pp->object_store || !
op || !
ob) {
5339 store =
pp->object_store;
5355 for (p =
buf; *p; p++) {
5356 if (*p ==
'\n' || *p ==
'\t' || *p ==
'\r') {
5383 if (
pv->data.v_gov !=
NULL) {
5411 if (!
pp || !
pp->objbind_table) {
5415 if (
pp->object_store) {
5461 return pp->focused_objbind;
5474 pp->focused_objbind =
ob;
5486 if (!
pp || !
pp->objbind_table) {
5501 if (!
pp || !tiles) {
5517 if (!
pp || !
pp->objbind_table) {
5537 bool changed =
FALSE;
5539 if (!
pp || !
op || !
pp->object_view) {
5550 for (p =
rows; p !=
NULL; p = p->next) {
5580 if (!
pp || !
pp->object_view) {
5596 for (p =
rows; p !=
NULL; p = p->next) {
5697 log_error(
"%s(): Unhandled object type %s (nb %d).",
5734 if (!
pp || !
pp->object_view) {
5744 for (p =
rows; p !=
NULL; p = p->next) {
5776 if (!
pp || !
pp->object_view) {
5787 for (p =
rows; p !=
NULL; p = p->next) {
5838 if (
NULL == ptile) {
5842 if (
NULL == ptile) {
6056 if (!
pp || !
pp->tag_table) {
6061 log_error(
"Attempted to insert object creation tag %d "
6062 "twice into tag table for property page %p (%d %s).",
6080 if (!
pp || !
pp->tag_table) {
6096 if (!
pp || !
pp->tag_table) {
6107 if (!
pp || !
pp->tag_table) {
6183 if (!
pe || !
pe->notebook) {
6291 if (!
pe || !tiles) {
6368 int tag,
int object_id)
6465 if (!filter || filter[0] ==
'\0') {
6477 pfc = &
pf->disjunction[
pf->count];
6548 if (
pf->count < 1) {
6554 for (
i = 0;
i <
pf->count;
i++) {
6555 pfc = &
pf->disjunction[
i];
6557 for (j = 0; j <
pfc->count; j++) {
6558 pfp = &
pfc->conjunction[j];
6559 match = (
pfp->text[0] ==
'\0'
6591 for (
i = 0;
i <
pf->count;
i++) {
6592 pfc = &
pf->disjunction[
i];
6593 for (j = 0; j <
pfc->count; j++) {
6614 return _(
"Seen (Main)");
6617 return _(
"Seen (Invis)");
6620 return _(
"Seen (Subsurface)");
6626 return _(
"Unknown");
Base_type_id base_number(const struct base_type *pbase)
Base_type_id base_count(void)
bool dbv_isset(const struct dbv *pdbv, int bit)
#define BV_ARE_EQUAL(vec1, vec2)
#define BV_ISSET(bv, bit)
struct canvas int int canvas_y
struct canvas int canvas_x
int city_granary_size(int city_size)
bool city_can_be_built_here(const struct civ_map *nmap, const struct tile *ptile, const struct unit *punit, bool hut_test)
#define city_tile(_pcity_)
static citizens city_size_get(const struct city *pcity)
#define city_owner(_pcity_)
bool client_nation_is_in_current_set(const struct nation_type *pnation)
void connection_do_buffer(struct connection *pc)
void connection_do_unbuffer(struct connection *pc)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
int editor_tool_get_size(enum editor_tool_type ett)
int editor_tool_get_value(enum editor_tool_type ett)
int editor_tool_get_count(enum editor_tool_type ett)
struct unit * editor_unit_virtual_create(void)
int editor_tool_get_applied_player(enum editor_tool_type ett)
void free_tokens(char **tokens, size_t ntokens)
int get_tokens(const char *str, char **tokens, size_t num_tokens, const char *delimiterset)
const struct functions * fc_funcs
#define PL_(String1, String2, n)
struct unit * game_unit_by_number(int id)
struct city * game_city_by_number(int id)
const char * government_name_translation(const struct government *pgovern)
Government_type_id government_count(void)
struct government * government_by_number(const Government_type_id gov)
Government_type_id government_index(const struct government *pgovern)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
#define FC_STATIC_CANVAS_INIT
static void add_column(GtkWidget *view, int col_id, const char *name, GType gtype, bool editable, bool is_radio, GCallback edit_callback, gpointer callback_userdata)
static void property_page_reset_objbinds(struct property_page *pp)
static void property_page_send_values(struct property_page *pp)
static void objprop_setup_widget(struct objprop *op)
static void property_page_store_creation_tag(struct property_page *pp, int tag, int count)
static gchar * propval_as_string(struct propval *pv)
static struct property_page * objprop_get_property_page(const struct objprop *op)
static const char * objprop_get_name(const struct objprop *op)
const char * vision_layer_get_name(enum vision_layer)
static int objbind_get_object_id(struct objbind *ob)
static void objprop_set_extviewer(struct objprop *op, struct extviewer *ev)
static GtkWidget * extviewer_get_panel_widget(struct extviewer *ev)
static gpointer objtype_get_object_from_id(enum editor_object_type objtype, int id)
void property_editor_handle_object_changed(struct property_editor *pe, enum editor_object_type objtype, int object_id, bool remove)
static struct propstate * propstate_new(struct objprop *op, struct propval *pv)
static const char * valtype_get_name(enum value_types valtype)
static void propstate_destroy(struct propstate *ps)
static bool objbind_set_modified_value(struct objbind *ob, struct objprop *op, struct propval *pv)
static GtkCellRenderer * objprop_create_cell_renderer(const struct objprop *op)
static void extviewer_clear_widgets(struct extviewer *ev)
@ VALTYPE_INVENTIONS_ARRAY
@ VALTYPE_TILE_VISION_DATA
static void objprop_set_child_widget(struct objprop *op, const char *widget_name, GtkWidget *widget)
static bool property_editor_add_page(struct property_editor *pe, enum editor_object_type objtype)
static void propstate_clear_value(struct propstate *ps)
static void objbind_pack_modified_value(struct objbind *ob, struct objprop *op, union packetdata packet)
static struct objbind * property_page_get_focused_objbind(struct property_page *pp)
static bool objprop_has_widget(const struct objprop *op)
static int objtype_get_id_from_object(enum editor_object_type objtype, gpointer object)
static enum editor_object_type objbind_get_objtype(const struct objbind *ob)
static struct extviewer * objprop_get_extviewer(struct objprop *op)
static void extviewer_refresh_widgets(struct extviewer *ev, struct propval *pv)
static enum editor_object_type property_page_get_objtype(const struct property_page *pp)
#define property_page_objbind_iterate_end
static void property_page_show_extviewer(struct property_page *pp, struct extviewer *ev)
static gpointer objbind_get_object(struct objbind *ob)
static const char * property_page_get_name(const struct property_page *pp)
void property_editor_handle_object_created(struct property_editor *pe, int tag, int object_id)
static bool objbind_property_is_modified(struct objbind *ob, struct objprop *op)
static struct propval * propstate_get_value(struct propstate *ps)
static void property_page_clear_tags(struct property_page *pp)
static void property_page_object_created(struct property_page *pp, int tag, int object_id)
static bool property_page_tag_is_known(struct property_page *pp, int tag)
static void property_page_remove_creation_tag(struct property_page *pp, int tag)
static void property_page_load_tiles(struct property_page *pp, const struct tile_list *tiles)
static void property_page_create_objects(struct property_page *pp, struct tile_list *hint_tiles)
static void property_page_add_extviewer(struct property_page *pp, struct extviewer *ev)
static void property_page_refresh_button_clicked(GtkButton *button, gpointer userdata)
static void property_page_set_focused_objbind(struct property_page *pp, struct objbind *ob)
static void property_page_setup_objprops(struct property_page *pp)
static void objbind_set_rowref(struct objbind *ob, GtkTreeRowReference *rr)
static void objbind_clear_modified_value(struct objbind *ob, struct objprop *op)
static struct propval * objbind_get_value_from_object(struct objbind *ob, struct objprop *op)
static void propval_free(struct propval *pv)
static struct property_filter * property_filter_new(const char *filter)
static bool property_page_set_store_value(struct property_page *pp, struct objprop *op, struct objbind *ob, GtkTreeIter *iter)
static const char * objtype_get_name(enum editor_object_type objtype)
static void objbind_clear_all_modified_values(struct objbind *ob)
static bool property_filter_match(struct property_filter *pf, const struct objprop *op)
void property_editor_popup(struct property_editor *pe, enum editor_object_type objtype)
static void property_page_destroy_button_clicked(GtkButton *button, gpointer userdata)
static struct objbind * objbind_new(enum editor_object_type objtype, gpointer object)
static gboolean property_page_selection_func(GtkTreeSelection *sel, GtkTreeModel *model, GtkTreePath *path, gboolean currently_selected, gpointer data)
static int property_page_get_num_objbinds(const struct property_page *pp)
static bool objprop_show_in_listview(const struct objprop *op)
static GType objprop_get_gtype(const struct objprop *op)
static void objprop_set_treeview_column(struct objprop *op, GtkTreeViewColumn *col)
static void objbind_pack_current_values(struct objbind *ob, union packetdata packet)
static const char * objprop_get_attribute_type_string(const struct objprop *op)
static struct propval * propval_copy(struct propval *pv)
struct property_editor * editprop_get_property_editor(void)
void property_editor_reload(struct property_editor *pe, enum editor_object_type objtype)
static GdkPixbuf * create_unit_pixbuf(const struct unit *punit)
static void extviewer_view_cell_toggled(GtkCellRendererToggle *cell, gchar *path, gpointer userdata)
static struct property_editor * property_editor_new(void)
static void property_page_send_packet(struct property_page *pp, union packetdata packet)
static gchar * built_status_to_string(struct built_status *bs)
static int objprop_get_id(const struct objprop *op)
@ OPID_GAME_LAKE_FLOODING
@ OPID_GAME_SCENARIO_NAME
@ OPID_GAME_SCENARIO_AUTHORS
@ OPID_PLAYER_SELECT_WEIGHT
@ OPID_GAME_PREVENT_CITIES
@ OPID_GAME_SCENARIO_DESC
@ OPID_GAME_STARTPOS_NATIONS
@ OPID_PLAYER_SCENARIO_RESERVED
@ OPID_GAME_SCENARIO_RANDSTATE
@ OPID_PLAYER_INFRAPOINTS
@ OPID_GAME_SCENARIO_PLAYERS
@ OPID_GAME_RULESET_LOCKED
static enum value_types objprop_get_valtype(const struct objprop *op)
static int get_next_unique_tag(void)
static bool objprop_is_sortable(const struct objprop *op)
static void property_page_add_objbinds_from_tile(struct property_page *pp, const struct tile *ptile)
static const char * objprop_get_tooltip(const struct objprop *op)
static GtkTreeRowReference * objbind_get_rowref(struct objbind *ob)
static void property_filter_free(struct property_filter *pf)
static void objprop_widget_spin_button_changed(GtkSpinButton *spin, gpointer userdata)
#define PF_DISJUNCTION_SEPARATOR
static GtkWidget * objprop_get_child_widget(struct objprop *op, const char *widget_name)
static void property_page_selection_changed(GtkTreeSelection *sel, gpointer userdata)
static bool objtype_is_conserved(enum editor_object_type objtype)
static struct extviewer * extviewer_new(struct objprop *op)
static bool propval_equal(struct propval *pva, struct propval *pvb)
static void property_page_quick_find_entry_changed(GtkWidget *entry, gpointer userdata)
static void objprop_refresh_widget(struct objprop *op, struct objbind *ob)
void property_editor_popdown(struct property_editor *pe)
static void objbind_destroy(struct objbind *ob)
static void property_page_add_objbind(struct property_page *pp, gpointer object_data)
static void objbind_request_destroy_object(struct objbind *ob)
static void property_page_create_button_clicked(GtkButton *button, gpointer userdata)
static GdkPixbuf * create_pixbuf_from_layers(const struct tile *ptile, const struct unit *punit, const struct city *pcity, enum layer_category category)
static union packetdata property_page_new_packet(struct property_page *pp)
static void propstate_set_value(struct propstate *ps, struct propval *pv)
static int objprop_get_column_id(const struct objprop *op)
static GdkPixbuf * create_tile_pixbuf(const struct tile *ptile)
static struct objprop * extviewer_get_objprop(struct extviewer *ev)
static bool can_create_unit_at_tile(struct tile *ptile)
static struct objbind * property_page_get_objbind(struct property_page *pp, int object_id)
static bool objbind_get_allowed_value_span(struct objbind *ob, struct objprop *op, double *pmin, double *pmax, double *pstep, double *pbig_step)
static void property_page_free_packet(struct property_page *pp, union packetdata packet)
static GdkPixbuf * create_city_pixbuf(const struct city *pcity)
#define ADDPROP(ARG_id, ARG_name, ARG_tooltip, ARG_flags, ARG_valtype)
static void extviewer_panel_button_clicked(GtkButton *button, gpointer userdata)
static void property_page_destroy_objects(struct property_page *pp)
void property_editor_load_tiles(struct property_editor *pe, const struct tile_list *tiles)
static struct property_page * property_page_new(enum editor_object_type objtype, struct property_editor *parent)
#define property_page_objprop_iterate_end
static void property_page_clear_objbinds(struct property_page *pp)
void property_editor_clear(struct property_editor *pe)
#define property_page_objprop_iterate(ARG_pp, NAME_op)
static void objprop_set_column_id(struct objprop *op, int col_id)
static void objbind_bind_properties(struct objbind *ob, struct property_page *pp)
static void property_page_fill_widgets(struct property_page *pp)
static bool objbind_has_modified_properties(struct objbind *ob)
static void property_page_change_value(struct property_page *pp, struct objprop *op, struct propval *pv)
static void objprop_widget_toggle_button_changed(GtkToggleButton *button, gpointer userdata)
#define PF_CONJUNCTION_SEPARATOR
static void property_page_apply_button_clicked(GtkButton *button, gpointer userdata)
static struct objprop * objprop_new(int id, const char *name, const char *tooltip, enum object_property_flags flags, enum value_types valtype, struct property_page *parent)
static GtkWidget * extviewer_get_view_widget(struct extviewer *ev)
static GtkWidget * objprop_get_widget(struct objprop *op)
static void propval_free_data(struct propval *pv)
static void extviewer_textbuf_changed(GtkTextBuffer *textbuf, gpointer userdata)
static struct property_editor * the_property_editor
static void property_page_object_changed(struct property_page *pp, int object_id, bool remove)
static bool objprop_is_readonly(const struct objprop *op)
#define property_page_objbind_iterate(ARG_pp, NAME_ob)
static GtkTreeViewColumn * objprop_get_treeview_column(const struct objprop *op)
static struct property_page * property_editor_get_page(struct property_editor *pe, enum editor_object_type objtype)
static struct propval * objbind_get_modified_value(struct objbind *ob, struct objprop *op)
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)
static void objprop_widget_text_changed(GtkEditable *text, gpointer userdata)
bool is_special_improvement(const struct impr_type *pimprove)
Impr_type_id improvement_index(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
const char * improvement_name_translation(const struct impr_type *pimprove)
bool is_small_wonder(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
#define fc_assert_ret_val(condition, val)
#define log_error(message,...)
struct startpos * map_startpos_get(const struct tile *ptile)
int startpos_number(const struct startpos *psp)
struct tile * startpos_tile(const struct startpos *psp)
const struct nation_hash * startpos_raw_nations(const struct startpos *psp)
bool startpos_pack(const struct startpos *psp, struct packet_edit_startpos_full *packet)
struct tile * index_to_tile(const struct civ_map *imap, int mindex)
bool startpos_is_excluding(const struct startpos *psp)
struct startpos * map_startpos_by_number(int id)
#define index_to_native_pos(pnat_x, pnat_y, mindex)
#define index_to_map_pos(pmap_x, pmap_y, mindex)
struct tile * get_center_tile_mapcanvas(void)
void put_one_element(struct canvas *pcanvas, float zoom, enum mapview_layer layer, const struct tile *ptile, const struct tile_edge *pedge, const struct tile_corner *pcorner, const struct unit *punit, const struct city *pcity, int canvas_x, int canvas_y, const struct city *citymode, const struct unit_type *putype)
#define fc_calloc(n, esz)
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
Nation_type_id nation_count(void)
Nation_type_id nation_number(const struct nation_type *pnation)
const char * nation_adjective_translation(const struct nation_type *pnation)
struct nation_type * nation_by_number(const Nation_type_id nation)
struct nation_type * nation_of_player(const struct player *pplayer)
bool is_nation_playable(const struct nation_type *nation)
Nation_type_id nation_index(const struct nation_type *pnation)
enum barbarian_type nation_barbarian_type(const struct nation_type *nation)
#define nation_hash_iterate(nationhash, pnation)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_hash_iterate_end
int dsend_packet_edit_city_create(struct connection *pc, int owner, int tile, int size, int tag)
int send_packet_edit_city(struct connection *pc, const struct packet_edit_city *packet)
int send_packet_edit_game(struct connection *pc, const struct packet_edit_game *packet)
int send_packet_edit_startpos_full(struct connection *pc, const struct packet_edit_startpos_full *packet)
int dsend_packet_edit_startpos(struct connection *pc, int id, bool removal, int tag)
int send_packet_edit_player(struct connection *pc, const struct packet_edit_player *packet)
int dsend_packet_edit_player_create(struct connection *pc, int tag)
int send_packet_edit_unit(struct connection *pc, const struct packet_edit_unit *packet)
int send_packet_edit_scenario_desc(struct connection *pc, const struct packet_edit_scenario_desc *packet)
int dsend_packet_edit_unit_remove_by_id(struct connection *pc, int id)
int dsend_packet_edit_unit_create(struct connection *pc, int owner, int tile, Unit_type_id type, int count, int tag)
int dsend_packet_edit_player_remove(struct connection *pc, int id)
int send_packet_edit_tile(struct connection *pc, const struct packet_edit_tile *packet)
int dsend_packet_edit_city_remove(struct connection *pc, int id)
bool player_slot_is_used(const struct player_slot *pslot)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
const char * player_name(const struct player *pplayer)
int player_slot_index(const struct player_slot *pslot)
bool player_has_flag(const struct player *pplayer, enum plr_flag_id flag)
int player_index(const struct player *pplayer)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
struct player * player_slot_get_player(const struct player_slot *pslot)
#define players_iterate_end
#define players_iterate(_pplayer)
#define player_slots_iterate(_pslot)
#define player_slots_iterate_end
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
Road_type_id road_count(void)
Road_type_id road_number(const struct road_type *proad)
cairo_surface_t * surface
struct built_status built[B_LAST]
struct packet_game_info info
struct government * government_during_revolution
struct propval * pv_cached
bool(* player_tile_vision_get)(const struct tile *ptile, const struct player *pplayer, enum vision_layer vision)
struct propstate_hash * propstate_table
struct property_page * parent_property_page
GtkTreeRowReference * rowref
enum editor_object_type objtype
struct property_page * parent_page
enum object_property_flags flags
struct extviewer * extviewer
GtkTreeViewColumn * view_column
char name[MAX_LEN_CITYNAME]
char scenario_authors[MAX_LEN_PACKET/3]
Government_type_id government
bool inventions[A_LAST+1]
bv_startpos_nations nations
struct pf_pattern conjunction[PF_MAX_CLAUSES]
struct government * government
struct player_economic economic
struct nation_type * nation
struct property_page * property_pages[NUM_OBJTYPES]
struct pf_conjunction disjunction[PF_MAX_CLAUSES]
GtkListStore * object_store
struct property_editor * pe_parent
GtkWidget * extviewer_notebook
struct objbind_hash * objbind_table
struct objbind * focused_objbind
struct stored_tag_hash * tag_table
enum editor_object_type objtype
struct objprop_hash * objprop_table
struct propval * property_value
bv_player tile_seen[V_COUNT]
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
char * fc_strcasestr(const char *haystack, const char *needle)
#define sz_strlcpy(dest, src)
#define sz_strlcat(dest, src)
const char * advance_name_translation(const struct advance *padvance)
Tech_type_id advance_index(const struct advance *padvance)
#define advance_index_iterate_end
static Tech_type_id advance_count(void)
#define advance_iterate(_p)
#define advance_iterate_end
#define advance_index_iterate(_start, _index)
const char * terrain_name_translation(const struct terrain *pterrain)
struct city * tile_city(const struct tile *ptile)
#define tile_resource(_tile)
#define tile_list_iterate(tile_list, ptile)
#define tile_terrain(_tile)
#define tile_list_iterate_end
static const bv_extras * tile_extras(const struct tile *ptile)
#define tile_has_extra(ptile, pextra)
struct sprite * get_government_sprite(const struct tileset *t, const struct government *gov)
int tileset_small_sprite_width(const struct tileset *t)
int tileset_full_tile_height(const struct tileset *t)
bool tileset_layer_in_category(enum mapview_layer layer, enum layer_category cat)
int tileset_small_sprite_height(const struct tileset *t)
int tileset_tile_height(const struct tileset *t)
int tileset_full_tile_width(const struct tileset *t)
int tileset_tile_width(const struct tileset *t)
#define mapview_layer_iterate(layer)
#define mapview_layer_iterate_end
struct packet_edit_tile * tile
struct packetdata::@148 pointers
struct packet_edit_unit * unit
struct packet_edit_player * player
struct packet_edit_city * city
struct packet_edit_game * game
struct packet_edit_startpos_full * startpos
struct government * v_gov
bv_max_extras v_bv_special
struct tile_vision_data * v_tile_vision
struct built_status * v_built
struct nation_type * v_nation
struct nation_hash * v_nation_hash
const char * v_const_string
static bool is_enemy_unit_tile(const struct tile *ptile, const struct player *pplayer)
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
int utype_veteran_levels(const struct unit_type *punittype)
const char * utype_name_translation(const struct unit_type *punittype)
#define utype_fuel(ptype)
#define vision_layer_iterate(v)
#define vision_layer_iterate_end