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;
3119 log_error(
"%s(): Unhandled request to create widget for property %d (%s).",
3355 "<span foreground=\"red\">%s</span>",
name);
3394 log_error(
"Cannot store child widget %p under name "
3395 "\"%s\" using objprop_set_child_widget for object "
3396 "property %d (%s) because objprop_get_widget does "
3397 "not return a valid widget.",
3420 log_error(
"Cannot retrieve child widget under name "
3421 "\"%s\" using objprop_get_child_widget for object "
3422 "property %d (%s) because objprop_get_widget does "
3423 "not return a valid widget.",
3430 log_error(
"Child widget \"%s\" not found for object "
3431 "property %d (%s) via objprop_get_child_widget.",
3459 return op->extviewer;
3470 return op->parent_page;
3542 ev->panel_label = label;
3551 ev->panel_widget = vbox;
3557 ev->panel_label = label;
3577 log_error(
"Unhandled request to create panel widget "
3578 "for property %d (%s) in extviewer_new().",
3594 ev->panel_button = button;
3635 log_error(
"Unhandled request to create data store "
3636 "for property %d (%s) in extviewer_new().",
3651 ev->view_widget = vbox;
3657 ev->view_label = label;
3770 log_error(
"Unhandled request to configure view widget "
3771 "for property %d (%s) in extviewer_new().",
3802 return ev->panel_widget;
3814 return ev->view_widget;
3847 textbuf =
ev->textbuf;
3858 id =
spe->data.special_idx;
3860 present =
BV_ISSET(
pv->data.v_bv_special,
id);
3920 present =
BV_ISSET(
pv->data.v_tile_vision->tile_known,
id);
3923 present =
BV_ISSET(
pv->data.v_tile_vision->tile_seen[v],
id);
3934 _(
"All nations"), -1);
3979 enum barbarian_type barbarian_type =
3988 present = (pnation ==
pv->data.v_nation);
4014 present = (
pgov ==
pv->data.v_gov);
4025 if (
pv->data.v_gov !=
NULL) {
4046 present =
BV_ISSET(
pv->data.v_bv_inventions,
id);
4080 log_error(
"Unhandled request to refresh widgets "
4081 "extviewer_refresh_widgets() for objprop id=%d "
4105 if (
ev->panel_label !=
NULL) {
4134 log_error(
"Unhandled request to clear widgets "
4135 "in extviewer_clear_widgets() for objprop id=%d "
4177 bool active, present;
4299 if (!(0 <=
id &&
id <
B_LAST)) {
4336 if (
pv->data.v_gov !=
NULL) {
4362 BV_SET(
pv->data.v_bv_inventions,
id);
4364 BV_CLR(
pv->data.v_bv_inventions,
id);
4373 log_error(
"Unhandled widget toggled signal in "
4374 "extviewer_view_cell_toggled() for objprop id=%d "
4421 log_error(
"Unhandled widget modified signal in "
4422 "extviewer_textbuf_changed() for objprop id=%d "
4437#define ADDPROP(ARG_id, ARG_name, ARG_tooltip, ARG_flags, ARG_valtype) do { \
4438 struct objprop *MY_op = objprop_new(ARG_id, ARG_name, ARG_tooltip, \
4439 ARG_flags, ARG_valtype, pp); \
4440 objprop_hash_insert(pp->objprop_table, MY_op->id, MY_op); \
4583 _(
"How likely user is to get this player by autoselect. '-1' for default behavior."),
4601 _(
"Scenario Name"),
NULL,
4605 _(
"Scenario Authors"),
NULL,
4609 _(
"Scenario Description"),
NULL,
4613 _(
"Save Random Number State"),
NULL,
4616 _(
"Save Players"),
NULL,
4619 _(
"Nation Start Positions"),
NULL,
4622 _(
"Prevent New Cities"),
NULL,
4625 _(
"Saltwater Flooding Lakes"),
NULL,
4628 _(
"Lock to current Ruleset"),
NULL,
4698 for (p =
rows; p !=
NULL; p = p->next) {
4910 _(
"Pressing this button will create a new object of the "
4911 "same type as the current property page and add it to "
4912 "the page. The specific type and count of the objects "
4913 "is taken from the editor tool state. So for example, "
4914 "the \"tool value\" of the unit tool and its \"count\" "
4915 "parameter affect unit creation."));
4927 _(
"Pressing this button will send a request to the server "
4928 "to destroy (i.e. erase) the objects selected in the object "
4966 pp->extviewer_notebook = notebook;
5034 _(
"Enter a filter string to limit which properties are shown. "
5035 "The filter is one or more text patterns separated by | "
5036 "(\"or\") or & (\"and\"). The symbol & has higher precedence "
5037 "than |. A pattern may also be negated by prefixing it with !."));
5049 _(
"Pressing this button will reset all modified properties of "
5050 "the selected objects to their current values (the values "
5051 "they have on the server)."));
5059 _(
"Pressing this button will send all modified properties of "
5060 "the objects selected in the object list to the server. "
5061 "Modified properties' names are shown in red in the properties "
5141 const struct city *pcity,
5233 const struct tile *ptile)
5236 if (!
pp || !ptile) {
5299 if (!
pp || !
pp->object_store || !
op || !
ob) {
5318 store =
pp->object_store;
5334 for (p =
buf; *p; p++) {
5335 if (*p ==
'\n' || *p ==
'\t' || *p ==
'\r') {
5362 if (
pv->data.v_gov !=
NULL) {
5390 if (!
pp || !
pp->objbind_table) {
5394 if (
pp->object_store) {
5440 return pp->focused_objbind;
5453 pp->focused_objbind =
ob;
5465 if (!
pp || !
pp->objbind_table) {
5480 if (!
pp || !tiles) {
5496 if (!
pp || !
pp->objbind_table) {
5516 bool changed =
FALSE;
5518 if (!
pp || !
op || !
pp->object_view) {
5529 for (p =
rows; p !=
NULL; p = p->next) {
5559 if (!
pp || !
pp->object_view) {
5575 for (p =
rows; p !=
NULL; p = p->next) {
5676 log_error(
"%s(): Unhandled object type %s (nb %d).",
5713 if (!
pp || !
pp->object_view) {
5723 for (p =
rows; p !=
NULL; p = p->next) {
5755 if (!
pp || !
pp->object_view) {
5766 for (p =
rows; p !=
NULL; p = p->next) {
5817 if (
NULL == ptile) {
5821 if (
NULL == ptile) {
6034 if (!
pp || !
pp->tag_table) {
6039 log_error(
"Attempted to insert object creation tag %d "
6040 "twice into tag table for property page %p (%d %s).",
6058 if (!
pp || !
pp->tag_table) {
6074 if (!
pp || !
pp->tag_table) {
6085 if (!
pp || !
pp->tag_table) {
6161 if (!
pe || !
pe->notebook) {
6268 if (!
pe || !tiles) {
6294 if (!
pe || !
pe->widget) {
6311 if (!
pe || !
pe->widget) {
6344 int tag,
int object_id)
6441 if (!filter || filter[0] ==
'\0') {
6453 pfc = &
pf->disjunction[
pf->count];
6524 if (
pf->count < 1) {
6530 for (
i = 0;
i <
pf->count;
i++) {
6531 pfc = &
pf->disjunction[
i];
6533 for (j = 0; j <
pfc->count; j++) {
6534 pfp = &
pfc->conjunction[j];
6535 match = (
pfp->text[0] ==
'\0'
6567 for (
i = 0;
i <
pf->count;
i++) {
6568 pfc = &
pf->disjunction[
i];
6569 for (j = 0; j <
pfc->count; j++) {
6590 return _(
"Seen (Main)");
6593 return _(
"Seen (Invis)");
6596 return _(
"Seen (Subsurface)");
6602 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 objprop_widget_entry_changed(GtkEntry *entry, gpointer userdata)
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)
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_full_tile_height(const struct tileset *t)
bool tileset_layer_in_category(enum mapview_layer layer, enum layer_category cat)
int tileset_tile_height(const struct tileset *t)
int tileset_full_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_scenario_desc * desc
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