58#define TECH_TREE_DEPTH 20
108{
N_(
"Base Cost:"), NULL,
N_(
"Upkeep:"), NULL,
N_(
"Requirement:"), NULL };
112{
N_(
"Base Cost:"), NULL,
N_(
"Requirement:"), NULL,
N_(
"Obsolete by:"), NULL };
119 {
N_(
"Cost:"), NULL, NULL,
N_(
"Attack:"), NULL },
120 {
N_(
"Defense:"), NULL, NULL,
N_(
"Move:"), NULL },
121 {
N_(
"Firepower:"), NULL, NULL,
N_(
"Hitpoints:"), NULL },
122 {
N_(
"Basic Upkeep:"), NULL, NULL,
N_(
"Vision:"), NULL },
123 {
N_(
"Requirement:"), NULL, NULL,
N_(
"Obsolete by:"), NULL }
128 {
N_(
"Move/Defense:"), NULL, NULL,
N_(
"Food/Res/Trade:"), NULL },
129 {
N_(
"Resources:"), NULL, NULL, NULL, NULL }
138 N_(
"Conflicts with:"), NULL,
141 N_(
"Bonus (F/P/T):"), NULL };
143#define REQ_LABEL_NONE _("?tech:None")
144#define REQ_LABEL_NEVER _("(Never)")
178 gtk_frame_set_label(GTK_FRAME(
help_frame), topic);
233 GValue value = { 0, };
234 enum tech_state state;
238 bg = COLOR_REQTREE_UNKNOWN;
240 gtk_tree_store_append(
tstore, &l, parent);
243 g_value_init(&value, G_TYPE_STRING);
244 g_value_set_static_string(&value,
_(
"Removed"));
245 gtk_tree_store_set_value(
tstore, &l, 0, &value);
246 g_value_unset(&value);
248 gtk_tree_store_set(
tstore, &l,
259 if (tech_state_is_valid(state)) {
262 bg = COLOR_REQTREE_UNKNOWN;
265 bg = COLOR_REQTREE_KNOWN;
267 case TECH_PREREQS_KNOWN:
268 bg = COLOR_REQTREE_PREREQS_KNOWN;
272 bg = COLOR_REQTREE_BACKGROUND;
279 gtk_tree_store_append(
tstore, &l, parent);
282 g_value_init(&value, G_TYPE_STRING);
283 g_value_set_static_string(&value,
286 gtk_tree_store_set_value(
tstore, &l, 0, &value);
287 g_value_unset(&value);
289 gtk_tree_store_set(
tstore, &l,
314 GtkTreeViewColumn *col,
320 gtk_tree_model_get_iter(GTK_TREE_MODEL(
tstore), &it, path);
321 gtk_tree_model_get(GTK_TREE_MODEL(
tstore), &it, 2, &tech, -1);
331 gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
339 gtk_tree_view_collapse_all(GTK_TREE_VIEW(data));
351 s = gtk_label_get_text(GTK_LABEL(w));
354 switch (select->
type) {
385 button = gtk_button_new();
386 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
387 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
388 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
389 gtk_widget_set_name(label,
"help_link");
390 gtk_container_add(GTK_CONTAINER(button), label);
391 gtk_widget_show(button);
392 g_signal_connect_swapped(button,
"clicked",
394 g_object_set_data(G_OBJECT(label),
"page_type", select);
414 GtkWidget *button, *label;
416 label = gtk_label_new(txt);
417 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
418 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
472 GtkTreeViewColumn *col;
477 model = gtk_tree_view_get_model(
view);
479 gtk_tree_view_get_cursor(
view, &path, &col);
480 gtk_tree_model_get_iter(model, &it, path);
481 gtk_tree_path_free(path);
487 gtk_tree_model_get(model, &it, 1, &pitem, -1);
497 if (help_history_pos < help_history->
len - 1) {
515 GtkCellRenderer *rend;
516 GtkTreeViewColumn *col;
519 GtkTreeSelection *selection;
544 hbox = gtk_grid_new();
545 gtk_grid_set_column_spacing(GTK_GRID(hbox), 5);
546 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
help_dialog_shell))), hbox);
547 gtk_widget_show(hbox);
550 store = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
552 array = g_array_new(
FALSE,
FALSE,
sizeof(GtkTreeIter));
554 GtkTreeIter *it, *parent;
558 for (s = pitem->topic; *s ==
' '; s++) {
561 depth = s - pitem->topic;
563 array = g_array_set_size(array, depth+1);
566 parent = &g_array_index(array, GtkTreeIter, depth-1);
571 it = &g_array_index(array, GtkTreeIter, depth);
572 gtk_tree_store_append(store, it, parent);
574 gtk_tree_store_set(store, it, 0, pitem->topic, 1, pitem, -1);
579 help_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
580 g_object_unref(store);
581 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(
help_view));
582 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_view),
FALSE);
584 g_signal_connect(
help_view,
"cursor-changed",
587 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
588 gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
590 rend = gtk_cell_renderer_text_new();
591 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
"text", 0, NULL);
592 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_view), col);
595 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_view_sw),
596 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
604 gtk_container_add(GTK_CONTAINER(hbox),
help_frame);
609 gtk_grid_set_row_spacing(GTK_GRID(
help_box), 5);
610 gtk_orientable_set_orientation(GTK_ORIENTABLE(
help_box),
611 GTK_ORIENTATION_VERTICAL);
620 for (i = 0; i < 6; i++) {
627 gtk_grid_attach(GTK_GRID(
help_itable), button, i, 0, 1, 1);
639 for (i = 0; i < 6; i++) {
644 if (i == 3 || i == 5) {
646 gtk_grid_attach(GTK_GRID(
help_wtable), button, i, 0, 1, 1);
658 for (i = 0; i < 5; i++) {
659 for (j = 0; j < 5; j++) {
664 if (j == 4 && (i == 1 || i == 4)) {
671 gtk_grid_attach(GTK_GRID(
help_utable), button, i, j, 1, 1);
675 gtk_widget_set_name(
help_ulabel[j][i],
"help_label");
684 for (j = 0; j < 2; j++) {
685 for (i = 0; i < 5; i++) {
689 gtk_widget_set_name(
help_tlabel[j][i],
"help_label");
692 if (j == 1 && i == 1) {
709 for (i = 0; i < 6; i++) {
719 gtk_grid_set_row_spacing(GTK_GRID(
help_vbox), 1);
720 gtk_orientable_set_orientation(GTK_ORIENTABLE(
help_vbox),
721 GTK_ORIENTATION_VERTICAL);
722 gtk_container_set_border_width(GTK_CONTAINER(
help_vbox), 5);
725 text = gtk_text_view_new();
728 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(
text),
FALSE);
729 gtk_text_view_set_editable(GTK_TEXT_VIEW(
text),
FALSE);
730 gtk_container_set_border_width(GTK_CONTAINER(
text), 5);
731 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(
text), GTK_WRAP_WORD);
732 gtk_widget_set_name(
text,
"help_text");
734 gtk_widget_show(
text);
737 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_text_sw),
738 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
743 tstore = gtk_tree_store_new(4,
752 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_tree),
FALSE);
754 g_signal_connect(
help_tree,
"row_activated",
758 col = gtk_tree_view_column_new();
760 rend = gtk_cell_renderer_text_new();
761 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD, NULL);
762 gtk_tree_view_column_pack_start(col, rend,
TRUE);
763 gtk_tree_view_column_set_attributes(col, rend,
765 "background-rgba", 3,
767 rend = gtk_cell_renderer_text_new();
768 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD,
"xalign", 1.0, NULL);
769 gtk_tree_view_column_pack_start(col, rend,
FALSE);
770 gtk_tree_view_column_set_attributes(col, rend,
772 "background-rgba", 3,
775 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_tree), col);
779 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_tree_sw),
780 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
786 gtk_button_new_with_label(
_(
"Expand All"));
823 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
828 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
832 for (i = 0; i < 3; i++) {
855 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
860 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
887 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]), buf);
888 sprintf(buf,
"%d", imp->
upkeep);
889 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]), buf);
898 if (!preq->present) {
905 gtk_label_set_text(GTK_LABEL(
help_ilabel[5]), req);
908 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]),
"0");
909 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]),
"0");
919 gtk_text_buffer_set_text(
help_text, buf, -1);
937 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]), buf);
947 if (!preq->present) {
952 req_buf,
sizeof(req_buf)));
960 if (pobs->source.kind == VUT_ADVANCE && pobs->present) {
963 (pobs->source.value.advance));
972 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]),
"0");
983 gtk_text_buffer_set_text(
help_text, buf, -1);
998 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]), buf);
1000 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]), buf);
1002 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]), buf);
1004 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]), buf);
1006 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]), buf);
1007 sprintf(buf,
"%d", utype->
hp);
1008 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]), buf);
1012 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]), buf);
1029 gtk_text_buffer_set_text(
help_text, buf, -1);
1033 direction8_invalid()));
1035 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]),
"0");
1036 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]),
"0");
1037 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]),
"0");
1038 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]),
"0");
1039 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]),
"0");
1040 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]),
"0");
1041 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][1]),
"0");
1042 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]),
"0");
1048 gtk_text_buffer_set_text(
help_text, buf, -1);
1066 for (i = g_utf8_find_prev_char(
str, i);
1067 (i && g_unichar_isspace(g_utf8_get_char(i)));
1068 i = g_utf8_find_prev_char(
str, i)) {
1080 GtkWidget *w, *hbox;
1088 gtk_container_foreach(GTK_CONTAINER(
help_vbox), (GtkCallback)gtk_widget_destroy, NULL);
1093 gtk_tree_store_clear(
tstore);
1104 w = gtk_text_view_new();
1105 gtk_widget_set_hexpand(w,
TRUE);
1106 gtk_widget_set_vexpand(w,
TRUE);
1107 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(w),
FALSE);
1108 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(w), GTK_WRAP_WORD);
1109 gtk_widget_set_name(w,
"help_text");
1110 gtk_container_set_border_width(GTK_CONTAINER(w), 5);
1111 gtk_text_view_set_editable(GTK_TEXT_VIEW(w),
FALSE);
1112 gtk_container_add(GTK_CONTAINER(
help_vbox), w);
1115 txt = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w));
1117 gtk_text_buffer_set_text(txt, buf, -1);
1120 w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
1121 g_object_set(w,
"margin", 5, NULL);
1122 gtk_widget_set_hexpand(w,
TRUE);
1123 gtk_widget_set_vexpand(w,
TRUE);
1124 gtk_container_add(GTK_CONTAINER(
help_vbox), w);
1131 if (VUT_ADVANCE == preq->source.kind
1132 && preq->source.value.advance == padvance) {
1133 hbox = gtk_grid_new();
1134 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1135 w = gtk_label_new(
_(
"Allows"));
1136 gtk_container_add(GTK_CONTAINER(hbox), w);
1139 gtk_container_add(GTK_CONTAINER(hbox), w);
1140 gtk_widget_show_all(hbox);
1148 if (VUT_ADVANCE == preq->source.kind
1149 && preq->source.value.advance == padvance) {
1150 hbox = gtk_grid_new();
1151 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1152 w = gtk_label_new(
_(
"Allows"));
1153 gtk_container_add(GTK_CONTAINER(hbox), w);
1158 gtk_container_add(GTK_CONTAINER(hbox), w);
1159 gtk_widget_show_all(hbox);
1163 if (pobs->source.kind == VUT_ADVANCE
1164 && pobs->source.value.advance == padvance
1166 hbox = gtk_grid_new();
1167 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1168 w = gtk_label_new(
_(
"Obsoletes"));
1169 gtk_container_add(GTK_CONTAINER(hbox), w);
1174 gtk_container_add(GTK_CONTAINER(hbox), w);
1175 gtk_widget_show_all(hbox);
1182 if (padvance != punittype->require_advance) {
1185 hbox = gtk_grid_new();
1186 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1187 w = gtk_label_new(
_(
"Allows"));
1188 gtk_container_add(GTK_CONTAINER(hbox), w);
1190 gtk_container_add(GTK_CONTAINER(hbox), w);
1191 gtk_widget_show_all(hbox);
1197 hbox = gtk_grid_new();
1198 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1199 w = gtk_label_new(
_(
"Allows"));
1200 gtk_container_add(GTK_CONTAINER(hbox), w);
1202 gtk_container_add(GTK_CONTAINER(hbox), w);
1203 gtk_widget_show_all(hbox);
1205 hbox = gtk_grid_new();
1206 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1207 w = gtk_label_new(
_(
"Allows"));
1208 gtk_container_add(GTK_CONTAINER(hbox), w);
1210 gtk_container_add(GTK_CONTAINER(hbox), w);
1211 w = gtk_label_new(
_(
"with"));
1212 gtk_container_add(GTK_CONTAINER(hbox), w);
1216 gtk_container_add(GTK_CONTAINER(hbox), w);
1217 w = gtk_label_new(
Q_(
"?techhelp:"));
1218 gtk_container_add(GTK_CONTAINER(hbox), w);
1219 gtk_widget_show_all(hbox);
1223 hbox = gtk_grid_new();
1224 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1225 w = gtk_label_new(
_(
"Allows"));
1226 gtk_container_add(GTK_CONTAINER(hbox), w);
1228 gtk_container_add(GTK_CONTAINER(hbox), w);
1229 w = gtk_label_new(
_(
"with"));
1230 gtk_container_add(GTK_CONTAINER(hbox), w);
1233 gtk_container_add(GTK_CONTAINER(hbox), w);
1234 w = gtk_label_new(
Q_(
"?techhelp:"));
1235 gtk_container_add(GTK_CONTAINER(hbox), w);
1236 gtk_widget_show_all(hbox);
1247 const char *result_link_label,
1249 const char *descr_label)
1254 hbox = gtk_grid_new();
1255 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1256 w = gtk_label_new(act_label);
1257 gtk_container_add(GTK_CONTAINER(hbox), w);
1259 gtk_container_add(GTK_CONTAINER(hbox), w);
1260 w = gtk_label_new(descr_label);
1261 gtk_container_add(GTK_CONTAINER(hbox), w);
1263 gtk_widget_show_all(hbox);
1270 enum unit_activity act,
1276 if (pextra->buildable
1296 struct universal for_terr = { .
kind = VUT_TERRAIN, .value = { .terrain = pterrain }};
1303 int frac = defbonus % 100;
1305 if ((frac % 10) == 0) {
1308 sprintf(buf,
"%d/%d.%d",
1311 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][1]), buf);
1313 sprintf(buf,
"%d/%d/%d",
1317 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][4]), buf);
1323 for (r = pterrain->
resources; *r; r++) {
1325 sprintf (buf + strlen (buf),
" %s (%d/%d/%d),",
1331 buf[strlen (buf) - 1] =
'.';
1334 sprintf (buf + strlen (buf),
_(
"(none)"));
1336 gtk_label_set_text(GTK_LABEL(
help_tlabel[1][1]), buf);
1338 gtk_container_foreach(GTK_CONTAINER(
help_vbox), (GtkCallback)gtk_widget_destroy, NULL);
1391 gtk_text_buffer_set_text(
help_text, buf, -1);
1406 if (pextra == NULL) {
1407 strcat(buf, pitem->
text);
1421 sprintf(buf,
_(
"Terrain specific"));
1426 gtk_label_set_text(GTK_LABEL(
help_elabel[1]), buf);
1431 strcat(buf,
_(
"Other Resources"));
1436 if (buf[0] !=
'\0') {
1443 gtk_label_set_text(GTK_LABEL(
help_elabel[3]), buf[0] ? buf :
_(
"(none)"));
1446 if (proad != NULL) {
1447 const char *bonus = NULL;
1452 bonus =
_(
"Terrain specific");
1461 bonus =
Q_(
"?bonus:None");
1463 gtk_label_set_text(GTK_LABEL(
help_elabel[5]), bonus);
1475 gtk_text_buffer_set_text(
help_text, buf, -1);
1489 strcat(buf, pitem->
text);
1495 gtk_text_buffer_set_text(
help_text, buf, -1);
1509 strcat(buf, pitem->
text);
1515 gtk_text_buffer_set_text(
help_text, buf, -1);
1529 strcat(buf, pitem->
text);
1534 gtk_text_buffer_set_text(
help_text, buf, -1);
1547 strcat(buf, pitem->
text);
1554 gtk_text_buffer_set_text(
help_text, buf, -1);
1567 for (top = pitem->
topic; *top ==
' '; top++) {
1572 gtk_text_buffer_set_text(
help_text,
"", -1);
1574 switch (pitem->
type) {
1622 GtkTreeModel *model;
1623 GtkTreeIter it, child,
item;
1624 GtkTreeSelection *selection;
1626 model = gtk_tree_view_get_model(GTK_TREE_VIEW(
help_view));
1627 gtk_tree_model_get_iter(model, &
item, path);
1629 for (child=
item; gtk_tree_model_iter_parent(model, &it, &child); child=it) {
1630 GtkTreePath *it_path;
1632 it_path = gtk_tree_model_get_path(model, &it);
1633 gtk_tree_view_expand_row(GTK_TREE_VIEW(
help_view), it_path,
TRUE);
1634 gtk_tree_path_free(it_path);
1637 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
1638 gtk_tree_selection_select_iter(selection, &
item);
1639 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(
help_view), path, NULL,
1651 path = gtk_tree_path_new_first();
1657 for (s = pitem2->topic; *s ==
' '; s++) {
1660 depth = s - pitem2->topic + 1;
1662 while (depth < gtk_tree_path_get_depth(path)) {
1663 gtk_tree_path_up(path);
1664 gtk_tree_path_next(path);
1667 while (depth > gtk_tree_path_get_depth(path)) {
1668 gtk_tree_path_down(path);
1673 gtk_tree_path_next(path);
1676 if (pitem == pitem2)
1693 GtkTreeViewColumn *col;
1702 col = gtk_tree_view_get_column(GTK_TREE_VIEW(
help_view), 0);
1703 gtk_tree_view_set_cursor(GTK_TREE_VIEW(
help_view), path, col,
FALSE);
1704 gtk_tree_path_free(path);
1715 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1716 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1718 gtk_dialog_set_response_sensitive(dialog, 1,
TRUE);
1719 gtk_dialog_set_response_sensitive(dialog, 2,
TRUE);
1722 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1725 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1738 if (response_id == 1) {
1748 }
else if (response_id == 2) {
1749 if (help_history_pos < help_history->
len - 1) {
#define action_id_univs_not_blocking(act_id, act_uni, tgt_uni)
#define output_type_iterate(output)
#define output_type_iterate_end
struct color * get_color(const struct tileset *t, enum color_std stdcolor)
const char * skip_intl_qualifier_prefix(const char *str)
#define PL_(String1, String2, n)
const char * government_name_translation(const struct government *pgovern)
struct government * government_by_translated_name(const char *name)
#define governments_iterate(NAME_pgov)
#define governments_iterate_end
#define FC_STATIC_CANVAS_INIT
void set_relative_window_position(GtkWindow *ref, GtkWindow *w, int px, int py)
void setup_dialog(GtkWidget *shell, GtkWidget *parent)
static GtkWidget * help_tree_sw
static void set_title_topic(char *topic)
static void activated_topic(GtkTreeView *view, gpointer data)
static GtkWidget * help_tree
static GtkWidget * help_tree_expand
static GtkWidget * help_ulabel[5][5]
static void help_update_specialist(const struct help_item *pitem, char *title)
static void help_hyperlink_callback(GtkWidget *w)
static GtkWidget * help_elabel[6]
static GtkWidget * help_etable
static void help_destroy_callback(GtkWidget *w, gpointer data)
static void set_help_tile_from_extra(const struct extra_type *pextra)
static GtkWidget * help_frame
static void help_tech_tree_activated_callback(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer data)
static void help_update_tech(const struct help_item *pitem, char *title)
static void help_item_zoom(GtkTreePath *path)
static GtkWidget * help_slink_new_page(const gchar *txt, enum help_page_type page)
static GtkWidget * help_tlabel[2][5]
static GtkTreePath * help_item_path(const struct help_item *pitem)
static GtkWidget * help_tree_collapse
static void help_update_nation(const struct help_item *pitem, char *title, struct nation_type *pnation)
static void create_help_dialog(void)
static GtkTextBuffer * help_text
static void help_update_wonder(const struct help_item *pitem, char *title)
static GtkWidget * help_hyperlink_new_page(GtkWidget *label, enum help_page_type page)
static GtkWidget * help_dialog_shell
static GtkWidget * help_text_sw
static GPtrArray * help_history
static const char * help_elabel_name[6]
static void create_tech_tree(int tech, int levels, GtkTreeIter *parent)
static void help_update_extra(const struct help_item *pitem, char *title)
static GtkWidget * help_ilabel[6]
static void set_help_tile_from_sprite(struct sprite *spr)
static const char * help_wlabel_name[6]
static const char * help_ulabel_name[5][5]
static void help_tech_tree_collapse_callback(GtkWidget *w, gpointer data)
static void set_help_tile_from_terrain(struct terrain *pterr)
static GtkWidget * help_view
static void help_update_goods(const struct help_item *pitem, char *title)
void help_system_init(void)
static void help_box_hide(void)
static void help_update_unit_type(const struct help_item *pitem, char *title)
void popdown_help_dialog(void)
static void help_update_terrain(const struct help_item *pitem, char *title)
static void help_update_dialog(const struct help_item *pitem)
static char * fc_chomp(char *str, size_t len)
void popup_help_dialog_string(const char *item)
static int help_history_pos
static struct help_page_selection help_wndr_req
static GtkWidget * help_wlabel[6]
static GtkWidget * help_box
static void help_extras_of_act_for_terrain(struct terrain *pterr, enum unit_activity act, char *label)
void popup_help_dialog_typed(const char *item, enum help_page_type htype)
static void help_command_update(void)
static struct help_page_selection page_selections[HELP_LAST]
static const char * help_tlabel_name[2][5]
static struct help_page_selection help_impr_req
static GtkWidget * help_wtable
static GtkWidget * help_slink_new(const gchar *txt, struct help_page_selection *select)
static GtkWidget * help_vbox
static void help_tech_tree_expand_callback(GtkWidget *w, gpointer data)
static GtkWidget * help_tile
static GtkWidget * help_hyperlink_new(GtkWidget *label, struct help_page_selection *select)
static void help_update_government(const struct help_item *pitem, char *title)
static GtkWidget * help_ttable
static void help_update_improvement(const struct help_item *pitem, char *title)
static const char * help_ilabel_name[6]
static GtkWidget * help_tree_buttons_hbox
static GtkWidget * help_view_sw
static void select_help_item_string(const char *item, enum help_page_type htype)
static bool help_advances[A_LAST]
static GtkWidget * help_utable
static GtkWidget * help_itable
static GtkTreeStore * tstore
static void add_act_help_for_terrain(const char *act_label, const char *result_link_label, enum help_page_type result_link_type, const char *descr_label)
static void help_command_callback(GtkWidget *w, gint response_id)
static int help_frame_width
static int help_frame_height
void helptext_government(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct government *gov)
void helptext_advance(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, int i)
enum help_page_type help_type_by_requirement(const struct requirement *req)
void helptext_extra(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct extra_type *pextra)
void helptext_goods(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct goods_type *pgood)
const char * helptext_road_bonus_str(const struct terrain *pterrain, const struct road_type *proad)
char * helptext_unit_upkeep_str(const struct unit_type *utype)
const char * helptext_extra_for_terrain_str(struct extra_type *pextra, struct terrain *pterrain, enum unit_activity act)
void helptext_specialist(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct specialist *pspec)
const struct help_item * get_help_item_spec(const char *name, enum help_page_type htype, int *pos)
char * helptext_building(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct impr_type *pimprove)
void helptext_terrain(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, struct terrain *pterrain)
char * helptext_unit(char *buf, size_t bufsz, struct player *pplayer, const char *user_text, const struct unit_type *utype)
void helptext_nation(char *buf, size_t bufsz, struct nation_type *pnation, const char *user_text)
#define help_items_iterate(pitem)
#define help_items_iterate_end
const struct impr_type * valid_improvement(const struct impr_type *pimprove)
int impr_base_build_shield_cost(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
struct impr_type * improvement_by_translated_name(const char *name)
const char * improvement_name_translation(const struct impr_type *pimprove)
#define improvement_iterate_end
#define improvement_iterate(_p)
void put_drawn_sprites(struct canvas *pcanvas, float zoom, int canvas_x, int canvas_y, int count, struct drawn_sprite *pdrawn, bool fog)
const char * move_points_text(int mp, bool reduce)
struct nation_type * nation_by_translated_plural(const char *name)
const char * universal_name_translation(const struct universal *psource, char *buf, size_t bufsz)
#define requirement_fulfilled_by_terrain(_ter_, _rqs_)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
int research_goal_unknown_techs(const struct research *presearch, Tech_type_id goal)
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
struct specialist * specialist_by_translated_name(const char *name)
cairo_surface_t * surface
enum help_page_selection::@152 type
const struct requirement * req
union help_page_selection::@153 u
struct requirement_vector obsolete_by
struct requirement_vector reqs
cairo_surface_t * surface
struct terrain * cultivate_result
struct extra_type ** resources
struct terrain * plant_result
struct terrain * transform_result
const struct unit_type * obsoleted_by
struct advance * require_advance
int fc_snprintf(char *str, size_t n, const char *format,...)
struct advance * advance_by_number(const Tech_type_id atype)
bool is_future_tech(Tech_type_id tech)
struct advance * advance_by_translated_name(const char *name)
struct advance * advance_requires(const struct advance *padvance, enum tech_req require)
const char * advance_name_translation(const struct advance *padvance)
Tech_type_id advance_required(const Tech_type_id tech, enum tech_req require)
Tech_type_id advance_number(const struct advance *padvance)
#define advance_iterate(_start, _p)
#define advance_iterate_end
struct terrain * terrain_by_translated_name(const char *name)
const char * terrain_name_translation(const struct terrain *pterrain)
struct sprite * get_building_sprite(const struct tileset *t, const struct impr_type *pimprove)
struct sprite * get_unittype_sprite(const struct tileset *t, const struct unit_type *punittype, enum direction8 facing)
int fill_basic_extra_sprite_array(const struct tileset *t, struct drawn_sprite *sprs, const struct extra_type *pextra)
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_nation_flag_sprite(const struct tileset *t, const struct nation_type *pnation)
int tileset_tile_width(const struct tileset *t)
struct sprite * get_tech_sprite(const struct tileset *t, Tech_type_id tech)
struct goods_type * goods_by_translated_name(const char *name)
int utype_build_shield_cost_base(const struct unit_type *punittype)
struct unit_type * unit_type_by_translated_name(const char *name)
const char * utype_name_translation(const struct unit_type *punittype)
#define unit_type_iterate(_p)
#define unit_type_iterate_end
const char * freeciv_name_version(void)