58#define TECH_TREE_DEPTH 20
107{
N_(
"Base Cost:"), NULL,
N_(
"Upkeep:"), NULL,
N_(
"Requirement:"), NULL };
111{
N_(
"Base Cost:"), NULL,
N_(
"Requirement:"), NULL,
N_(
"Obsolete by:"), NULL };
118 {
N_(
"Cost:"), NULL, NULL,
N_(
"Attack:"), NULL },
119 {
N_(
"Defense:"), NULL, NULL,
N_(
"Move:"), NULL },
120 {
N_(
"Firepower:"), NULL, NULL,
N_(
"Hitpoints:"), NULL },
121 {
N_(
"Basic Upkeep:"), NULL, NULL,
N_(
"Vision:"), NULL },
122 {
N_(
"Requirement:"), NULL, NULL,
N_(
"Obsolete by:"), NULL }
127 {
N_(
"Move/Defense:"), NULL, NULL,
N_(
"Food/Res/Trade:"), NULL },
128 {
N_(
"Resources:"), NULL, NULL, NULL, NULL }
137 N_(
"Conflicts with:"), NULL,
140 N_(
"Bonus (F/P/T):"), NULL };
142#define REQ_LABEL_NONE _("?tech:None")
143#define REQ_LABEL_NEVER _("(Never)")
177 gtk_frame_set_label(GTK_FRAME(
help_frame), topic);
232 GValue value = { 0, };
233 enum tech_state state;
237 bg = COLOR_REQTREE_UNKNOWN;
239 gtk_tree_store_append(
tstore, &l, parent);
242 g_value_init(&value, G_TYPE_STRING);
243 g_value_set_static_string(&value,
_(
"Removed"));
244 gtk_tree_store_set_value(
tstore, &l, 0, &value);
245 g_value_unset(&value);
247 gtk_tree_store_set(
tstore, &l,
258 if (tech_state_is_valid(state)) {
261 bg = COLOR_REQTREE_UNKNOWN;
264 bg = COLOR_REQTREE_KNOWN;
266 case TECH_PREREQS_KNOWN:
267 bg = COLOR_REQTREE_PREREQS_KNOWN;
271 bg = COLOR_REQTREE_BACKGROUND;
278 gtk_tree_store_append(
tstore, &l, parent);
281 g_value_init(&value, G_TYPE_STRING);
282 g_value_set_static_string(&value,
285 gtk_tree_store_set_value(
tstore, &l, 0, &value);
286 g_value_unset(&value);
288 gtk_tree_store_set(
tstore, &l,
313 GtkTreeViewColumn *col,
319 gtk_tree_model_get_iter(GTK_TREE_MODEL(
tstore), &it, path);
320 gtk_tree_model_get(GTK_TREE_MODEL(
tstore), &it, 2, &tech, -1);
330 gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
338 gtk_tree_view_collapse_all(GTK_TREE_VIEW(data));
350 s = gtk_label_get_text(GTK_LABEL(w));
353 switch (select->
type) {
384 button = gtk_button_new();
385 gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
386 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
387 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
388 gtk_widget_set_name(label,
"help_link");
389 gtk_container_add(GTK_CONTAINER(button), label);
390 gtk_widget_show(button);
391 g_signal_connect_swapped(button,
"clicked",
393 g_object_set_data(G_OBJECT(label),
"page_type", select);
413 GtkWidget *button, *label;
415 label = gtk_label_new(txt);
416 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
417 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
471 GtkTreeViewColumn *col;
476 model = gtk_tree_view_get_model(
view);
478 gtk_tree_view_get_cursor(
view, &path, &col);
479 gtk_tree_model_get_iter(model, &it, path);
480 gtk_tree_path_free(path);
486 gtk_tree_model_get(model, &it, 1, &pitem, -1);
496 if (help_history_pos < help_history->
len - 1) {
514 GtkCellRenderer *rend;
515 GtkTreeViewColumn *col;
518 GtkTreeSelection *selection;
543 hbox = gtk_grid_new();
544 gtk_grid_set_column_spacing(GTK_GRID(hbox), 5);
545 gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(
help_dialog_shell))), hbox);
546 gtk_widget_show(hbox);
549 store = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
551 array = g_array_new(
FALSE,
FALSE,
sizeof(GtkTreeIter));
553 GtkTreeIter *it, *parent;
557 for (s = pitem->topic; *s ==
' '; s++) {
560 depth = s - pitem->topic;
562 array = g_array_set_size(array, depth+1);
565 parent = &g_array_index(array, GtkTreeIter, depth-1);
570 it = &g_array_index(array, GtkTreeIter, depth);
571 gtk_tree_store_append(store, it, parent);
573 gtk_tree_store_set(store, it, 0, pitem->topic, 1, pitem, -1);
578 help_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
579 g_object_unref(store);
580 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(
help_view));
581 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_view),
FALSE);
583 g_signal_connect(
help_view,
"cursor-changed",
586 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
587 gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
589 rend = gtk_cell_renderer_text_new();
590 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
"text", 0, NULL);
591 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_view), col);
594 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_view_sw),
595 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
603 gtk_container_add(GTK_CONTAINER(hbox),
help_frame);
604 gtk_widget_set_size_request(
help_frame, 520, 350);
608 gtk_grid_set_row_spacing(GTK_GRID(
help_box), 5);
609 gtk_orientable_set_orientation(GTK_ORIENTABLE(
help_box),
610 GTK_ORIENTATION_VERTICAL);
619 for (i = 0; i < 6; i++) {
626 gtk_grid_attach(GTK_GRID(
help_itable), button, i, 0, 1, 1);
638 for (i = 0; i < 6; i++) {
643 if (i == 3 || i == 5) {
645 gtk_grid_attach(GTK_GRID(
help_wtable), button, i, 0, 1, 1);
657 for (i = 0; i < 5; i++) {
658 for (j = 0; j < 5; j++) {
663 if (j == 4 && (i == 1 || i == 4)) {
670 gtk_grid_attach(GTK_GRID(
help_utable), button, i, j, 1, 1);
674 gtk_widget_set_name(
help_ulabel[j][i],
"help_label");
683 for (j = 0; j < 2; j++) {
684 for (i = 0; i < 5; i++) {
688 gtk_widget_set_name(
help_tlabel[j][i],
"help_label");
691 if (j == 1 && i == 1) {
708 for (i = 0; i < 6; i++) {
718 gtk_grid_set_row_spacing(GTK_GRID(
help_vbox), 1);
719 gtk_orientable_set_orientation(GTK_ORIENTABLE(
help_vbox),
720 GTK_ORIENTATION_VERTICAL);
721 gtk_container_set_border_width(GTK_CONTAINER(
help_vbox), 5);
724 text = gtk_text_view_new();
727 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(
text),
FALSE);
728 gtk_text_view_set_editable(GTK_TEXT_VIEW(
text),
FALSE);
729 gtk_container_set_border_width(GTK_CONTAINER(
text), 5);
730 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(
text), GTK_WRAP_WORD);
731 gtk_widget_set_name(
text,
"help_text");
733 gtk_widget_show(
text);
736 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_text_sw),
737 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
742 tstore = gtk_tree_store_new(4,
751 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_tree),
FALSE);
753 g_signal_connect(
help_tree,
"row_activated",
757 col = gtk_tree_view_column_new();
759 rend = gtk_cell_renderer_text_new();
760 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD, NULL);
761 gtk_tree_view_column_pack_start(col, rend,
TRUE);
762 gtk_tree_view_column_set_attributes(col, rend,
764 "background-rgba", 3,
766 rend = gtk_cell_renderer_text_new();
767 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD,
"xalign", 1.0, NULL);
768 gtk_tree_view_column_pack_start(col, rend,
FALSE);
769 gtk_tree_view_column_set_attributes(col, rend,
771 "background-rgba", 3,
774 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_tree), col);
778 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_tree_sw),
779 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
785 gtk_button_new_with_label(
_(
"Expand All"));
822 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
827 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
831 for (i = 0; i < 3; i++) {
854 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
859 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
886 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]), buf);
887 sprintf(buf,
"%d", imp->
upkeep);
888 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]), buf);
897 if (!preq->present) {
904 gtk_label_set_text(GTK_LABEL(
help_ilabel[5]), req);
907 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]),
"0");
908 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]),
"0");
918 gtk_text_buffer_set_text(
help_text, buf, -1);
936 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]), buf);
946 if (!preq->present) {
951 req_buf,
sizeof(req_buf)));
959 if (pobs->source.kind == VUT_ADVANCE && pobs->present) {
962 (pobs->source.value.advance));
971 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]),
"0");
982 gtk_text_buffer_set_text(
help_text, buf, -1);
997 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]), buf);
999 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]), buf);
1001 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]), buf);
1003 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]), buf);
1005 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]), buf);
1006 sprintf(buf,
"%d", utype->
hp);
1007 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]), buf);
1011 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]), buf);
1028 gtk_text_buffer_set_text(
help_text, buf, -1);
1032 direction8_invalid()));
1034 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]),
"0");
1035 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]),
"0");
1036 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]),
"0");
1037 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]),
"0");
1038 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]),
"0");
1039 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]),
"0");
1040 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][1]),
"0");
1041 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]),
"0");
1047 gtk_text_buffer_set_text(
help_text, buf, -1);
1065 for (i = g_utf8_find_prev_char(
str, i);
1066 (i && g_unichar_isspace(g_utf8_get_char(i)));
1067 i = g_utf8_find_prev_char(
str, i)) {
1079 GtkWidget *w, *hbox;
1087 gtk_container_foreach(GTK_CONTAINER(
help_vbox), (GtkCallback)gtk_widget_destroy, NULL);
1092 gtk_tree_store_clear(
tstore);
1103 w = gtk_text_view_new();
1104 gtk_widget_set_hexpand(w,
TRUE);
1105 gtk_widget_set_vexpand(w,
TRUE);
1106 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(w),
FALSE);
1107 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(w), GTK_WRAP_WORD);
1108 gtk_widget_set_name(w,
"help_text");
1109 gtk_container_set_border_width(GTK_CONTAINER(w), 5);
1110 gtk_text_view_set_editable(GTK_TEXT_VIEW(w),
FALSE);
1111 gtk_container_add(GTK_CONTAINER(
help_vbox), w);
1114 txt = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w));
1116 gtk_text_buffer_set_text(txt, buf, -1);
1119 w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
1120 g_object_set(w,
"margin", 5, NULL);
1121 gtk_widget_set_hexpand(w,
TRUE);
1122 gtk_widget_set_vexpand(w,
TRUE);
1123 gtk_container_add(GTK_CONTAINER(
help_vbox), w);
1130 if (VUT_ADVANCE == preq->source.kind
1131 && preq->source.value.advance == padvance) {
1132 hbox = gtk_grid_new();
1133 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1134 w = gtk_label_new(
_(
"Allows"));
1135 gtk_container_add(GTK_CONTAINER(hbox), w);
1138 gtk_container_add(GTK_CONTAINER(hbox), w);
1139 gtk_widget_show_all(hbox);
1147 if (VUT_ADVANCE == preq->source.kind
1148 && preq->source.value.advance == padvance) {
1149 hbox = gtk_grid_new();
1150 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1151 w = gtk_label_new(
_(
"Allows"));
1152 gtk_container_add(GTK_CONTAINER(hbox), w);
1157 gtk_container_add(GTK_CONTAINER(hbox), w);
1158 gtk_widget_show_all(hbox);
1162 if (pobs->source.kind == VUT_ADVANCE
1163 && pobs->source.value.advance == padvance
1165 hbox = gtk_grid_new();
1166 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1167 w = gtk_label_new(
_(
"Obsoletes"));
1168 gtk_container_add(GTK_CONTAINER(hbox), w);
1173 gtk_container_add(GTK_CONTAINER(hbox), w);
1174 gtk_widget_show_all(hbox);
1181 if (padvance != punittype->require_advance) {
1184 hbox = gtk_grid_new();
1185 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1186 w = gtk_label_new(
_(
"Allows"));
1187 gtk_container_add(GTK_CONTAINER(hbox), w);
1189 gtk_container_add(GTK_CONTAINER(hbox), w);
1190 gtk_widget_show_all(hbox);
1196 hbox = gtk_grid_new();
1197 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1198 w = gtk_label_new(
_(
"Allows"));
1199 gtk_container_add(GTK_CONTAINER(hbox), w);
1201 gtk_container_add(GTK_CONTAINER(hbox), w);
1202 gtk_widget_show_all(hbox);
1204 hbox = gtk_grid_new();
1205 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1206 w = gtk_label_new(
_(
"Allows"));
1207 gtk_container_add(GTK_CONTAINER(hbox), w);
1209 gtk_container_add(GTK_CONTAINER(hbox), w);
1210 w = gtk_label_new(
_(
"with"));
1211 gtk_container_add(GTK_CONTAINER(hbox), w);
1215 gtk_container_add(GTK_CONTAINER(hbox), w);
1216 w = gtk_label_new(
Q_(
"?techhelp:"));
1217 gtk_container_add(GTK_CONTAINER(hbox), w);
1218 gtk_widget_show_all(hbox);
1222 hbox = gtk_grid_new();
1223 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1224 w = gtk_label_new(
_(
"Allows"));
1225 gtk_container_add(GTK_CONTAINER(hbox), w);
1227 gtk_container_add(GTK_CONTAINER(hbox), w);
1228 w = gtk_label_new(
_(
"with"));
1229 gtk_container_add(GTK_CONTAINER(hbox), w);
1232 gtk_container_add(GTK_CONTAINER(hbox), w);
1233 w = gtk_label_new(
Q_(
"?techhelp:"));
1234 gtk_container_add(GTK_CONTAINER(hbox), w);
1235 gtk_widget_show_all(hbox);
1246 const char *result_link_label,
1248 const char *descr_label)
1253 hbox = gtk_grid_new();
1254 gtk_container_add(GTK_CONTAINER(
help_vbox), hbox);
1255 w = gtk_label_new(act_label);
1256 gtk_container_add(GTK_CONTAINER(hbox), w);
1258 gtk_container_add(GTK_CONTAINER(hbox), w);
1259 w = gtk_label_new(descr_label);
1260 gtk_container_add(GTK_CONTAINER(hbox), w);
1262 gtk_widget_show_all(hbox);
1269 enum unit_activity act,
1275 if (pextra->buildable
1295 struct universal for_terr = { .
kind = VUT_TERRAIN, .value = { .terrain = pterrain }};
1302 int frac = defbonus % 100;
1304 if ((frac % 10) == 0) {
1307 sprintf(buf,
"%d/%d.%d",
1310 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][1]), buf);
1312 sprintf(buf,
"%d/%d/%d",
1316 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][4]), buf);
1322 for (r = pterrain->
resources; *r; r++) {
1324 sprintf (buf + strlen (buf),
" %s (%d/%d/%d),",
1330 buf[strlen (buf) - 1] =
'.';
1333 sprintf (buf + strlen (buf),
_(
"(none)"));
1335 gtk_label_set_text(GTK_LABEL(
help_tlabel[1][1]), buf);
1337 gtk_container_foreach(GTK_CONTAINER(
help_vbox), (GtkCallback)gtk_widget_destroy, NULL);
1390 gtk_text_buffer_set_text(
help_text, buf, -1);
1405 if (pextra == NULL) {
1406 strcat(buf, pitem->
text);
1420 sprintf(buf,
_(
"Terrain specific"));
1425 gtk_label_set_text(GTK_LABEL(
help_elabel[1]), buf);
1430 strcat(buf,
_(
"Other Resources"));
1435 if (buf[0] !=
'\0') {
1442 gtk_label_set_text(GTK_LABEL(
help_elabel[3]), buf[0] ? buf :
_(
"(none)"));
1445 if (proad != NULL) {
1446 const char *bonus = NULL;
1451 bonus =
_(
"Terrain specific");
1460 bonus =
Q_(
"?bonus:None");
1462 gtk_label_set_text(GTK_LABEL(
help_elabel[5]), bonus);
1464 gtk_label_set_text(GTK_LABEL(
help_elabel[5]),
Q_(
"?bonus:None"));
1471 gtk_text_buffer_set_text(
help_text, buf, -1);
1485 strcat(buf, pitem->
text);
1491 gtk_text_buffer_set_text(
help_text, buf, -1);
1505 strcat(buf, pitem->
text);
1511 gtk_text_buffer_set_text(
help_text, buf, -1);
1525 strcat(buf, pitem->
text);
1530 gtk_text_buffer_set_text(
help_text, buf, -1);
1543 strcat(buf, pitem->
text);
1550 gtk_text_buffer_set_text(
help_text, buf, -1);
1563 for (top = pitem->
topic; *top ==
' '; top++) {
1568 gtk_text_buffer_set_text(
help_text,
"", -1);
1570 switch (pitem->
type) {
1618 GtkTreeModel *model;
1619 GtkTreeIter it, child,
item;
1620 GtkTreeSelection *selection;
1622 model = gtk_tree_view_get_model(GTK_TREE_VIEW(
help_view));
1623 gtk_tree_model_get_iter(model, &
item, path);
1625 for (child=
item; gtk_tree_model_iter_parent(model, &it, &child); child=it) {
1626 GtkTreePath *it_path;
1628 it_path = gtk_tree_model_get_path(model, &it);
1629 gtk_tree_view_expand_row(GTK_TREE_VIEW(
help_view), it_path,
TRUE);
1630 gtk_tree_path_free(it_path);
1633 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
1634 gtk_tree_selection_select_iter(selection, &
item);
1635 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(
help_view), path, NULL,
1647 path = gtk_tree_path_new_first();
1653 for (s = pitem2->topic; *s ==
' '; s++) {
1656 depth = s - pitem2->topic + 1;
1658 while (depth < gtk_tree_path_get_depth(path)) {
1659 gtk_tree_path_up(path);
1660 gtk_tree_path_next(path);
1663 while (depth > gtk_tree_path_get_depth(path)) {
1664 gtk_tree_path_down(path);
1669 gtk_tree_path_next(path);
1672 if (pitem == pitem2)
1689 GtkTreeViewColumn *col;
1698 col = gtk_tree_view_get_column(GTK_TREE_VIEW(
help_view), 0);
1699 gtk_tree_view_set_cursor(GTK_TREE_VIEW(
help_view), path, col,
FALSE);
1700 gtk_tree_path_free(path);
1711 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1712 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1714 gtk_dialog_set_response_sensitive(dialog, 1,
TRUE);
1715 gtk_dialog_set_response_sensitive(dialog, 2,
TRUE);
1718 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1721 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1734 if (response_id == 1) {
1744 }
else if (response_id == 2) {
1745 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)
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)