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);
230 GValue value = { 0, };
231 enum tech_state state;
235 bg = COLOR_REQTREE_UNKNOWN;
237 gtk_tree_store_append(
tstore, &l, parent);
240 g_value_init(&value, G_TYPE_STRING);
241 g_value_set_static_string(&value,
_(
"Removed"));
242 gtk_tree_store_set_value(
tstore, &l, 0, &value);
243 g_value_unset(&value);
245 gtk_tree_store_set(
tstore, &l,
256 if (tech_state_is_valid(state)) {
259 bg = COLOR_REQTREE_UNKNOWN;
262 bg = COLOR_REQTREE_KNOWN;
264 case TECH_PREREQS_KNOWN:
265 bg = COLOR_REQTREE_PREREQS_KNOWN;
269 bg = COLOR_REQTREE_BACKGROUND;
276 gtk_tree_store_append(
tstore, &l, parent);
279 g_value_init(&value, G_TYPE_STRING);
280 g_value_set_static_string(&value,
283 gtk_tree_store_set_value(
tstore, &l, 0, &value);
284 g_value_unset(&value);
286 gtk_tree_store_set(
tstore, &l,
310 GtkTreeViewColumn *col,
316 gtk_tree_model_get_iter(GTK_TREE_MODEL(
tstore), &it, path);
317 gtk_tree_model_get(GTK_TREE_MODEL(
tstore), &it, 2, &tech, -1);
327 gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
335 gtk_tree_view_collapse_all(GTK_TREE_VIEW(data));
347 s = gtk_label_get_text(GTK_LABEL(w));
351 switch (select->
type) {
382 button = gtk_button_new();
383 gtk_button_set_has_frame(GTK_BUTTON(button),
FALSE);
384 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
385 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
386 gtk_widget_set_name(label,
"help_link");
387 gtk_button_set_child(GTK_BUTTON(button), label);
388 gtk_widget_show(button);
389 g_signal_connect_swapped(button,
"clicked",
391 g_object_set_data(G_OBJECT(label),
"page_type", select);
411 GtkWidget *button, *label;
413 label = gtk_label_new(txt);
414 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
415 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
467 GtkWidget *child = gtk_widget_get_first_child(
help_vbox);
469 while (child != NULL) {
470 gtk_box_remove(GTK_BOX(
help_vbox), child);
471 child = gtk_widget_get_first_child(
help_vbox);
490 GtkTreeViewColumn *col;
495 model = gtk_tree_view_get_model(
view);
501 gtk_tree_view_get_cursor(
view, &path, &col);
502 gtk_tree_model_get_iter(model, &it, path);
503 gtk_tree_path_free(path);
509 gtk_tree_model_get(model, &it, 1, &pitem, -1);
519 if (help_history_pos < help_history->
len - 1) {
537 GtkCellRenderer *rend;
538 GtkTreeViewColumn *col;
541 GtkTreeSelection *selection;
570 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
571 gtk_box_append(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
help_dialog_shell))),
573 gtk_widget_show(hbox);
576 store = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
578 array = g_array_new(
FALSE,
FALSE,
sizeof(GtkTreeIter));
580 GtkTreeIter *it, *parent;
584 for (s = pitem->topic; *s ==
' '; s++) {
587 depth = s - pitem->topic;
589 array = g_array_set_size(array, depth+1);
592 parent = &g_array_index(array, GtkTreeIter, depth-1);
597 it = &g_array_index(array, GtkTreeIter, depth);
598 gtk_tree_store_append(store, it, parent);
600 gtk_tree_store_set(store, it, 0, pitem->topic, 1, pitem, -1);
604 help_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
605 g_object_unref(store);
606 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(
help_view));
607 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_view),
FALSE);
609 g_signal_connect(
help_view,
"cursor-changed",
612 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
613 gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
615 rend = gtk_cell_renderer_text_new();
616 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
"text", 0, NULL);
617 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_view), col);
620 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_view_sw),
621 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
633 help_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
638 gtk_widget_set_valign(
help_tile, GTK_ALIGN_CENTER);
639 gtk_widget_set_halign(
help_tile, GTK_ALIGN_CENTER);
640 tile_sw = gtk_scrolled_window_new();
641 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tile_sw),
644 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(tile_sw),
help_tile);
645 gtk_box_append(GTK_BOX(
help_box), tile_sw);
650 for (i = 0; i < 6; i++) {
657 gtk_grid_attach(GTK_GRID(
help_itable), button, i, 0, 1, 1);
669 for (i = 0; i < 6; i++) {
674 if (i == 3 || i == 5) {
676 gtk_grid_attach(GTK_GRID(
help_wtable), button, i, 0, 1, 1);
688 for (i = 0; i < 5; i++) {
689 for (j = 0; j < 5; j++) {
694 if (j == 4 && (i == 1 || i == 4)) {
701 gtk_grid_attach(GTK_GRID(
help_utable), button, i, j, 1, 1);
705 gtk_widget_set_name(
help_ulabel[j][i],
"help_label");
714 for (j = 0; j < 2; j++) {
715 for (i = 0; i < 5; i++) {
719 gtk_widget_set_name(
help_tlabel[j][i],
"help_label");
722 if (j == 1 && i == 1) {
739 for (i = 0; i < 6; i++) {
748 help_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1);
749 gtk_widget_set_margin_start(
help_vbox, 5);
752 gtk_widget_set_margin_bottom(
help_vbox, 5);
755 text = gtk_text_view_new();
758 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(
text),
FALSE);
759 gtk_text_view_set_editable(GTK_TEXT_VIEW(
text),
FALSE);
760 gtk_widget_set_margin_start(
text, 5);
761 gtk_widget_set_margin_end(
text, 5);
762 gtk_widget_set_margin_top(
text, 5);
763 gtk_widget_set_margin_bottom(
text, 5);
764 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(
text), GTK_WRAP_WORD);
765 gtk_widget_set_name(
text,
"help_text");
767 gtk_widget_show(
text);
770 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_text_sw),
771 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
776 tstore = gtk_tree_store_new(4,
785 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_tree),
FALSE);
787 g_signal_connect(
help_tree,
"row_activated",
791 col = gtk_tree_view_column_new();
793 rend = gtk_cell_renderer_text_new();
794 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD, NULL);
795 gtk_tree_view_column_pack_start(col, rend,
TRUE);
796 gtk_tree_view_column_set_attributes(col, rend,
798 "background-rgba", 3,
800 rend = gtk_cell_renderer_text_new();
801 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD,
"xalign", 1.0, NULL);
802 gtk_tree_view_column_pack_start(col, rend,
FALSE);
803 gtk_tree_view_column_set_attributes(col, rend,
805 "background-rgba", 3,
808 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_tree), col);
811 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_tree_sw),
812 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
855 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
860 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
864 for (i = 0; i < 3; i++) {
887 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
892 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
919 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]), buf);
920 sprintf(buf,
"%d", imp->
upkeep);
921 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]), buf);
930 if (!preq->present) {
937 gtk_label_set_text(GTK_LABEL(
help_ilabel[5]), req);
940 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]),
"0");
941 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]),
"0");
951 gtk_text_buffer_set_text(
help_text, buf, -1);
969 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]), buf);
979 if (!preq->present) {
984 req_buf,
sizeof(req_buf)));
992 if (pobs->source.kind == VUT_ADVANCE && pobs->present) {
995 (pobs->source.value.advance));
1004 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]),
"0");
1015 gtk_text_buffer_set_text(
help_text, buf, -1);
1028 if (utype != NULL) {
1030 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]), buf);
1032 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]), buf);
1034 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]), buf);
1036 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]), buf);
1038 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]), buf);
1039 sprintf(buf,
"%d", utype->
hp);
1040 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]), buf);
1044 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]), buf);
1067 gtk_text_buffer_set_text(
help_text, buf, -1);
1071 direction8_invalid()));
1073 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]),
"0");
1074 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]),
"0");
1075 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]),
"0");
1076 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]),
"0");
1077 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]),
"0");
1078 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]),
"0");
1079 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][1]),
"0");
1080 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]),
"0");
1087 gtk_text_buffer_set_text(
help_text, buf, -1);
1100 if (
str == NULL || !*
str) {
1105 for (i = g_utf8_find_prev_char(
str, i);
1106 (i != NULL && g_unichar_isspace(g_utf8_get_char(i)));
1107 i = g_utf8_find_prev_char(
str, i)) {
1120 GtkWidget *w, *hbox;
1124 if (padvance != NULL
1134 gtk_tree_store_clear(
tstore);
1145 w = gtk_text_view_new();
1146 gtk_widget_set_hexpand(w,
TRUE);
1147 gtk_widget_set_vexpand(w,
TRUE);
1148 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(w),
FALSE);
1149 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(w), GTK_WRAP_WORD);
1150 gtk_widget_set_name(w,
"help_text");
1151 gtk_widget_set_margin_start(w, 5);
1152 gtk_widget_set_margin_end(w, 5);
1153 gtk_widget_set_margin_top(w, 5);
1154 gtk_widget_set_margin_bottom(w, 5);
1155 gtk_text_view_set_editable(GTK_TEXT_VIEW(w),
FALSE);
1159 txt = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w));
1161 gtk_text_buffer_set_text(txt, buf, -1);
1164 w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
1165 gtk_widget_set_margin_bottom(w, 5);
1166 gtk_widget_set_margin_end(w, 5);
1167 gtk_widget_set_margin_start(w, 5);
1168 gtk_widget_set_margin_top(w, 5);
1169 gtk_widget_set_hexpand(w,
TRUE);
1170 gtk_widget_set_vexpand(w,
TRUE);
1178 if (VUT_ADVANCE == preq->source.kind
1179 && preq->source.value.advance == padvance) {
1180 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1182 w = gtk_label_new(
_(
"Allows"));
1183 gtk_box_append(GTK_BOX(hbox), w);
1186 gtk_box_append(GTK_BOX(hbox), w);
1187 gtk_widget_show(hbox);
1195 if (VUT_ADVANCE == preq->source.kind
1196 && preq->source.value.advance == padvance) {
1197 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1199 w = gtk_label_new(
_(
"Allows"));
1200 gtk_box_append(GTK_BOX(hbox), w);
1205 gtk_box_append(GTK_BOX(hbox), w);
1206 gtk_widget_show(hbox);
1210 if (pobs->source.kind == VUT_ADVANCE
1211 && pobs->source.value.advance == padvance
1213 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1215 w = gtk_label_new(
_(
"Obsoletes"));
1216 gtk_box_append(GTK_BOX(hbox), w);
1221 gtk_box_append(GTK_BOX(hbox), w);
1222 gtk_widget_show(hbox);
1229 if (padvance != punittype->require_advance) {
1232 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1234 w = gtk_label_new(
_(
"Allows"));
1235 gtk_box_append(GTK_BOX(hbox), w);
1237 gtk_box_append(GTK_BOX(hbox), w);
1238 gtk_widget_show(hbox);
1244 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1246 w = gtk_label_new(
_(
"Allows"));
1247 gtk_box_append(GTK_BOX(hbox), w);
1249 gtk_box_append(GTK_BOX(hbox), w);
1250 gtk_widget_show(hbox);
1252 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1254 w = gtk_label_new(
_(
"Allows"));
1255 gtk_box_append(GTK_BOX(hbox), w);
1257 gtk_box_append(GTK_BOX(hbox), w);
1258 w = gtk_label_new(
_(
"with"));
1259 gtk_box_append(GTK_BOX(hbox), w);
1263 gtk_box_append(GTK_BOX(hbox), w);
1264 w = gtk_label_new(
Q_(
"?techhelp:"));
1265 gtk_box_append(GTK_BOX(hbox), w);
1266 gtk_widget_show(hbox);
1270 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1272 w = gtk_label_new(
_(
"Allows"));
1273 gtk_box_append(GTK_BOX(hbox), w);
1275 gtk_box_append(GTK_BOX(hbox), w);
1276 w = gtk_label_new(
_(
"with"));
1277 gtk_box_append(GTK_BOX(hbox), w);
1281 gtk_box_append(GTK_BOX(hbox), w);
1282 w = gtk_label_new(
Q_(
"?techhelp:"));
1283 gtk_box_append(GTK_BOX(hbox), w);
1284 gtk_widget_show(hbox);
1296 const char *result_link_label,
1298 const char *descr_label)
1303 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1305 w = gtk_label_new(act_label);
1306 gtk_box_append(GTK_BOX(hbox), w);
1308 gtk_box_append(GTK_BOX(hbox), w);
1309 w = gtk_label_new(descr_label);
1310 gtk_box_append(GTK_BOX(hbox), w);
1312 gtk_widget_show(hbox);
1319 enum unit_activity act,
1325 if (pextra->buildable
1344 if (pterrain != NULL) {
1345 struct universal for_terr = { .
kind = VUT_TERRAIN, .value = { .terrain = pterrain }};
1352 int frac = defbonus % 100;
1354 if ((frac % 10) == 0) {
1357 sprintf(buf,
"%d/%d.%d",
1360 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][1]), buf);
1362 sprintf(buf,
"%d/%d/%d",
1366 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][4]), buf);
1372 for (r = pterrain->
resources; *r; r++) {
1374 sprintf (buf + strlen (buf),
" %s (%d/%d/%d),",
1380 buf[strlen (buf) - 1] =
'.';
1383 sprintf (buf + strlen (buf),
_(
"(none)"));
1385 gtk_label_set_text(GTK_LABEL(
help_tlabel[1][1]), buf);
1423 _(
"Build as irrigation"));
1427 _(
"Build as mine"));
1432 _(
"Build as road"));
1437 _(
"Build as base"));
1443 pitem->
text, pterrain);
1445 gtk_text_buffer_set_text(
help_text, buf, -1);
1460 if (pextra == NULL) {
1461 strcat(buf, pitem->
text);
1475 sprintf(buf,
_(
"Terrain specific"));
1480 gtk_label_set_text(GTK_LABEL(
help_elabel[1]), buf);
1485 strcat(buf,
_(
"Other Resources"));
1490 if (buf[0] !=
'\0') {
1497 gtk_label_set_text(GTK_LABEL(
help_elabel[3]), buf[0] ? buf :
_(
"(none)"));
1500 if (proad != NULL) {
1501 const char *bonus = NULL;
1506 bonus =
_(
"Terrain specific");
1510 if (bonus == NULL) {
1513 if (bonus == NULL) {
1515 bonus =
Q_(
"?bonus:None");
1518 gtk_label_set_text(GTK_LABEL(
help_elabel[5]), bonus);
1530 gtk_text_buffer_set_text(
help_text, buf, -1);
1543 if (pgood == NULL) {
1544 strcat(buf, pitem->
text);
1550 gtk_text_buffer_set_text(
help_text, buf, -1);
1563 if (pspec == NULL) {
1564 strcat(buf, pitem->
text);
1570 gtk_text_buffer_set_text(
help_text, buf, -1);
1584 strcat(buf, pitem->
text);
1590 gtk_text_buffer_set_text(
help_text, buf, -1);
1602 if (pnation == NULL) {
1603 strcat(buf, pitem->
text);
1610 gtk_text_buffer_set_text(
help_text, buf, -1);
1623 for (top = pitem->
topic; *top ==
' '; top++) {
1628 gtk_text_buffer_set_text(
help_text,
"", -1);
1630 switch (pitem->
type) {
1678 GtkTreeModel *model;
1679 GtkTreeIter it, child,
item;
1680 GtkTreeSelection *selection;
1682 model = gtk_tree_view_get_model(GTK_TREE_VIEW(
help_view));
1683 gtk_tree_model_get_iter(model, &
item, path);
1685 for (child =
item; gtk_tree_model_iter_parent(model, &it, &child); child = it) {
1686 GtkTreePath *it_path;
1688 it_path = gtk_tree_model_get_path(model, &it);
1689 gtk_tree_view_expand_row(GTK_TREE_VIEW(
help_view), it_path,
TRUE);
1690 gtk_tree_path_free(it_path);
1693 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
1694 gtk_tree_selection_select_iter(selection, &
item);
1695 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(
help_view), path, NULL,
1707 path = gtk_tree_path_new_first();
1713 for (s = pitem2->topic; *s ==
' '; s++) {
1716 depth = s - pitem2->topic + 1;
1718 while (depth < gtk_tree_path_get_depth(path)) {
1719 gtk_tree_path_up(path);
1720 gtk_tree_path_next(path);
1723 while (depth > gtk_tree_path_get_depth(path)) {
1724 gtk_tree_path_down(path);
1729 gtk_tree_path_next(path);
1732 if (pitem == pitem2) {
1750 GtkTreeViewColumn *col;
1759 col = gtk_tree_view_get_column(GTK_TREE_VIEW(
help_view), 0);
1760 gtk_tree_view_set_cursor(GTK_TREE_VIEW(
help_view), path, col,
FALSE);
1761 gtk_tree_path_free(path);
1772 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1773 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1775 gtk_dialog_set_response_sensitive(dialog, 1,
TRUE);
1776 gtk_dialog_set_response_sensitive(dialog, 2,
TRUE);
1779 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1782 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1795 if (response_id == 1) {
1805 }
else if (response_id == 2) {
1806 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 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 void help_box_add(GtkWidget *wdg)
static int help_dlog_height
static void help_box_clear(void)
static int help_dlog_width
void picture_set_from_surface(GtkPicture *pic, cairo_surface_t *surf)
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)