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);
229 GValue value = { 0, };
230 enum tech_state state;
234 bg = COLOR_REQTREE_UNKNOWN;
236 gtk_tree_store_append(
tstore, &l, parent);
239 g_value_init(&value, G_TYPE_STRING);
240 g_value_set_static_string(&value,
_(
"Removed"));
241 gtk_tree_store_set_value(
tstore, &l, 0, &value);
242 g_value_unset(&value);
244 gtk_tree_store_set(
tstore, &l,
255 if (tech_state_is_valid(state)) {
258 bg = COLOR_REQTREE_UNKNOWN;
261 bg = COLOR_REQTREE_KNOWN;
263 case TECH_PREREQS_KNOWN:
264 bg = COLOR_REQTREE_PREREQS_KNOWN;
268 bg = COLOR_REQTREE_BACKGROUND;
275 gtk_tree_store_append(
tstore, &l, parent);
278 g_value_init(&value, G_TYPE_STRING);
279 g_value_set_static_string(&value,
282 gtk_tree_store_set_value(
tstore, &l, 0, &value);
283 g_value_unset(&value);
285 gtk_tree_store_set(
tstore, &l,
309 GtkTreeViewColumn *col,
315 gtk_tree_model_get_iter(GTK_TREE_MODEL(
tstore), &it, path);
316 gtk_tree_model_get(GTK_TREE_MODEL(
tstore), &it, 2, &tech, -1);
326 gtk_tree_view_expand_all(GTK_TREE_VIEW(data));
334 gtk_tree_view_collapse_all(GTK_TREE_VIEW(data));
346 s = gtk_label_get_text(GTK_LABEL(w));
350 switch (select->
type) {
381 button = gtk_button_new();
382 gtk_button_set_has_frame(GTK_BUTTON(button),
FALSE);
383 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
384 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
385 gtk_widget_set_name(label,
"help_link");
386 gtk_button_set_child(GTK_BUTTON(button), label);
387 gtk_widget_show(button);
388 g_signal_connect_swapped(button,
"clicked",
390 g_object_set_data(G_OBJECT(label),
"page_type", select);
410 GtkWidget *button, *label;
412 label = gtk_label_new(txt);
413 gtk_widget_set_halign(label, GTK_ALIGN_CENTER);
414 gtk_widget_set_valign(label, GTK_ALIGN_CENTER);
466 GtkWidget *child = gtk_widget_get_first_child(
help_vbox);
468 while (child != NULL) {
469 gtk_box_remove(GTK_BOX(
help_vbox), child);
470 child = gtk_widget_get_first_child(
help_vbox);
489 GtkTreeViewColumn *col;
494 model = gtk_tree_view_get_model(
view);
500 gtk_tree_view_get_cursor(
view, &path, &col);
501 gtk_tree_model_get_iter(model, &it, path);
502 gtk_tree_path_free(path);
508 gtk_tree_model_get(model, &it, 1, &pitem, -1);
518 if (help_history_pos < help_history->
len - 1) {
536 GtkCellRenderer *rend;
537 GtkTreeViewColumn *col;
540 GtkTreeSelection *selection;
566 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5);
567 gtk_box_append(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(
help_dialog_shell))),
569 gtk_widget_show(hbox);
572 store = gtk_tree_store_new(2, G_TYPE_STRING, G_TYPE_POINTER);
574 array = g_array_new(
FALSE,
FALSE,
sizeof(GtkTreeIter));
576 GtkTreeIter *it, *parent;
580 for (s = pitem->topic; *s ==
' '; s++) {
583 depth = s - pitem->topic;
585 array = g_array_set_size(array, depth+1);
588 parent = &g_array_index(array, GtkTreeIter, depth-1);
593 it = &g_array_index(array, GtkTreeIter, depth);
594 gtk_tree_store_append(store, it, parent);
596 gtk_tree_store_set(store, it, 0, pitem->topic, 1, pitem, -1);
600 help_view = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store));
601 g_object_unref(store);
602 gtk_tree_view_columns_autosize(GTK_TREE_VIEW(
help_view));
603 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_view),
FALSE);
605 g_signal_connect(
help_view,
"cursor-changed",
608 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
609 gtk_tree_selection_set_mode(selection, GTK_SELECTION_BROWSE);
611 rend = gtk_cell_renderer_text_new();
612 col = gtk_tree_view_column_new_with_attributes(NULL, rend,
"text", 0, NULL);
613 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_view), col);
616 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_view_sw),
617 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
629 help_box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 5);
634 gtk_widget_set_valign(
help_tile, GTK_ALIGN_CENTER);
635 gtk_widget_set_halign(
help_tile, GTK_ALIGN_CENTER);
636 tile_sw = gtk_scrolled_window_new();
637 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(tile_sw),
640 gtk_scrolled_window_set_child(GTK_SCROLLED_WINDOW(tile_sw),
help_tile);
641 gtk_box_append(GTK_BOX(
help_box), tile_sw);
646 for (i = 0; i < 6; i++) {
653 gtk_grid_attach(GTK_GRID(
help_itable), button, i, 0, 1, 1);
665 for (i = 0; i < 6; i++) {
670 if (i == 3 || i == 5) {
672 gtk_grid_attach(GTK_GRID(
help_wtable), button, i, 0, 1, 1);
684 for (i = 0; i < 5; i++) {
685 for (j = 0; j < 5; j++) {
690 if (j == 4 && (i == 1 || i == 4)) {
697 gtk_grid_attach(GTK_GRID(
help_utable), button, i, j, 1, 1);
701 gtk_widget_set_name(
help_ulabel[j][i],
"help_label");
710 for (j = 0; j < 2; j++) {
711 for (i = 0; i < 5; i++) {
715 gtk_widget_set_name(
help_tlabel[j][i],
"help_label");
718 if (j == 1 && i == 1) {
735 for (i = 0; i < 6; i++) {
744 help_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 1);
745 gtk_widget_set_margin_start(
help_vbox, 5);
748 gtk_widget_set_margin_bottom(
help_vbox, 5);
751 text = gtk_text_view_new();
754 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(
text),
FALSE);
755 gtk_text_view_set_editable(GTK_TEXT_VIEW(
text),
FALSE);
756 gtk_widget_set_margin_start(
text, 5);
757 gtk_widget_set_margin_end(
text, 5);
758 gtk_widget_set_margin_top(
text, 5);
759 gtk_widget_set_margin_bottom(
text, 5);
760 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(
text), GTK_WRAP_WORD);
761 gtk_widget_set_name(
text,
"help_text");
763 gtk_widget_show(
text);
766 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_text_sw),
767 GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
772 tstore = gtk_tree_store_new(4,
781 gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(
help_tree),
FALSE);
783 g_signal_connect(
help_tree,
"row_activated",
787 col = gtk_tree_view_column_new();
789 rend = gtk_cell_renderer_text_new();
790 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD, NULL);
791 gtk_tree_view_column_pack_start(col, rend,
TRUE);
792 gtk_tree_view_column_set_attributes(col, rend,
794 "background-rgba", 3,
796 rend = gtk_cell_renderer_text_new();
797 g_object_set(rend,
"weight", PANGO_WEIGHT_BOLD,
"xalign", 1.0, NULL);
798 gtk_tree_view_column_pack_start(col, rend,
FALSE);
799 gtk_tree_view_column_set_attributes(col, rend,
801 "background-rgba", 3,
804 gtk_tree_view_append_column(GTK_TREE_VIEW(
help_tree), col);
807 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(
help_tree_sw),
808 GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
851 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
856 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
860 for (i = 0; i < 3; i++) {
883 canvas.
surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
888 cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
915 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]), buf);
916 sprintf(buf,
"%d", imp->
upkeep);
917 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]), buf);
926 if (!preq->present) {
933 gtk_label_set_text(GTK_LABEL(
help_ilabel[5]), req);
936 gtk_label_set_text(GTK_LABEL(
help_ilabel[1]),
"0");
937 gtk_label_set_text(GTK_LABEL(
help_ilabel[3]),
"0");
947 gtk_text_buffer_set_text(
help_text, buf, -1);
965 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]), buf);
975 if (!preq->present) {
980 req_buf,
sizeof(req_buf)));
988 if (pobs->source.kind == VUT_ADVANCE && pobs->present) {
991 (pobs->source.value.advance));
1000 gtk_label_set_text(GTK_LABEL(
help_wlabel[1]),
"0");
1011 gtk_text_buffer_set_text(
help_text, buf, -1);
1024 if (utype != NULL) {
1026 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]), buf);
1028 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]), buf);
1030 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]), buf);
1032 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]), buf);
1034 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]), buf);
1035 sprintf(buf,
"%d", utype->
hp);
1036 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]), buf);
1040 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]), buf);
1063 gtk_text_buffer_set_text(
help_text, buf, -1);
1067 direction8_invalid()));
1069 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][1]),
"0");
1070 gtk_label_set_text(GTK_LABEL(
help_ulabel[0][4]),
"0");
1071 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][1]),
"0");
1072 gtk_label_set_text(GTK_LABEL(
help_ulabel[1][4]),
"0");
1073 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][1]),
"0");
1074 gtk_label_set_text(GTK_LABEL(
help_ulabel[2][4]),
"0");
1075 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][1]),
"0");
1076 gtk_label_set_text(GTK_LABEL(
help_ulabel[3][4]),
"0");
1083 gtk_text_buffer_set_text(
help_text, buf, -1);
1096 if (
str == NULL || !*
str) {
1101 for (i = g_utf8_find_prev_char(
str, i);
1102 (i != NULL && g_unichar_isspace(g_utf8_get_char(i)));
1103 i = g_utf8_find_prev_char(
str, i)) {
1116 GtkWidget *w, *hbox;
1120 if (padvance != NULL
1130 gtk_tree_store_clear(
tstore);
1141 w = gtk_text_view_new();
1142 gtk_widget_set_hexpand(w,
TRUE);
1143 gtk_widget_set_vexpand(w,
TRUE);
1144 gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(w),
FALSE);
1145 gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(w), GTK_WRAP_WORD);
1146 gtk_widget_set_name(w,
"help_text");
1147 gtk_widget_set_margin_start(w, 5);
1148 gtk_widget_set_margin_end(w, 5);
1149 gtk_widget_set_margin_top(w, 5);
1150 gtk_widget_set_margin_bottom(w, 5);
1151 gtk_text_view_set_editable(GTK_TEXT_VIEW(w),
FALSE);
1155 txt = gtk_text_view_get_buffer(GTK_TEXT_VIEW(w));
1157 gtk_text_buffer_set_text(txt, buf, -1);
1160 w = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
1161 gtk_widget_set_margin_bottom(w, 5);
1162 gtk_widget_set_margin_end(w, 5);
1163 gtk_widget_set_margin_start(w, 5);
1164 gtk_widget_set_margin_top(w, 5);
1165 gtk_widget_set_hexpand(w,
TRUE);
1166 gtk_widget_set_vexpand(w,
TRUE);
1174 if (VUT_ADVANCE == preq->source.kind
1175 && preq->source.value.advance == padvance) {
1176 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1178 w = gtk_label_new(
_(
"Allows"));
1179 gtk_box_append(GTK_BOX(hbox), w);
1182 gtk_box_append(GTK_BOX(hbox), w);
1183 gtk_widget_show(hbox);
1191 if (VUT_ADVANCE == preq->source.kind
1192 && preq->source.value.advance == padvance) {
1193 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1195 w = gtk_label_new(
_(
"Allows"));
1196 gtk_box_append(GTK_BOX(hbox), w);
1201 gtk_box_append(GTK_BOX(hbox), w);
1202 gtk_widget_show(hbox);
1206 if (pobs->source.kind == VUT_ADVANCE
1207 && pobs->source.value.advance == padvance
1209 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1211 w = gtk_label_new(
_(
"Obsoletes"));
1212 gtk_box_append(GTK_BOX(hbox), w);
1217 gtk_box_append(GTK_BOX(hbox), w);
1218 gtk_widget_show(hbox);
1225 if (padvance != punittype->require_advance) {
1228 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1230 w = gtk_label_new(
_(
"Allows"));
1231 gtk_box_append(GTK_BOX(hbox), w);
1233 gtk_box_append(GTK_BOX(hbox), w);
1234 gtk_widget_show(hbox);
1240 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1242 w = gtk_label_new(
_(
"Allows"));
1243 gtk_box_append(GTK_BOX(hbox), w);
1245 gtk_box_append(GTK_BOX(hbox), w);
1246 gtk_widget_show(hbox);
1248 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1250 w = gtk_label_new(
_(
"Allows"));
1251 gtk_box_append(GTK_BOX(hbox), w);
1253 gtk_box_append(GTK_BOX(hbox), w);
1254 w = gtk_label_new(
_(
"with"));
1255 gtk_box_append(GTK_BOX(hbox), w);
1259 gtk_box_append(GTK_BOX(hbox), w);
1260 w = gtk_label_new(
Q_(
"?techhelp:"));
1261 gtk_box_append(GTK_BOX(hbox), w);
1262 gtk_widget_show(hbox);
1266 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1268 w = gtk_label_new(
_(
"Allows"));
1269 gtk_box_append(GTK_BOX(hbox), w);
1271 gtk_box_append(GTK_BOX(hbox), w);
1272 w = gtk_label_new(
_(
"with"));
1273 gtk_box_append(GTK_BOX(hbox), w);
1277 gtk_box_append(GTK_BOX(hbox), w);
1278 w = gtk_label_new(
Q_(
"?techhelp:"));
1279 gtk_box_append(GTK_BOX(hbox), w);
1280 gtk_widget_show(hbox);
1292 const char *result_link_label,
1294 const char *descr_label)
1299 hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
1301 w = gtk_label_new(act_label);
1302 gtk_box_append(GTK_BOX(hbox), w);
1304 gtk_box_append(GTK_BOX(hbox), w);
1305 w = gtk_label_new(descr_label);
1306 gtk_box_append(GTK_BOX(hbox), w);
1308 gtk_widget_show(hbox);
1315 enum unit_activity act,
1321 if (pextra->buildable
1340 if (pterrain != NULL) {
1341 struct universal for_terr = { .
kind = VUT_TERRAIN, .value = { .terrain = pterrain }};
1348 int frac = defbonus % 100;
1350 if ((frac % 10) == 0) {
1353 sprintf(buf,
"%d/%d.%d",
1356 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][1]), buf);
1358 sprintf(buf,
"%d/%d/%d",
1362 gtk_label_set_text(GTK_LABEL(
help_tlabel[0][4]), buf);
1368 for (r = pterrain->
resources; *r; r++) {
1370 sprintf (buf + strlen (buf),
" %s (%d/%d/%d),",
1376 buf[strlen (buf) - 1] =
'.';
1379 sprintf (buf + strlen (buf),
_(
"(none)"));
1381 gtk_label_set_text(GTK_LABEL(
help_tlabel[1][1]), buf);
1419 _(
"Build as irrigation"));
1423 _(
"Build as mine"));
1428 _(
"Build as road"));
1433 _(
"Build as base"));
1439 pitem->
text, pterrain);
1441 gtk_text_buffer_set_text(
help_text, buf, -1);
1456 if (pextra == NULL) {
1457 strcat(buf, pitem->
text);
1471 sprintf(buf,
_(
"Terrain specific"));
1476 gtk_label_set_text(GTK_LABEL(
help_elabel[1]), buf);
1481 strcat(buf,
_(
"Other Resources"));
1486 if (buf[0] !=
'\0') {
1493 gtk_label_set_text(GTK_LABEL(
help_elabel[3]), buf[0] ? buf :
_(
"(none)"));
1496 if (proad != NULL) {
1497 const char *bonus = NULL;
1502 bonus =
_(
"Terrain specific");
1506 if (bonus == NULL) {
1509 if (bonus == NULL) {
1511 bonus =
Q_(
"?bonus:None");
1514 gtk_label_set_text(GTK_LABEL(
help_elabel[5]), bonus);
1516 gtk_label_set_text(GTK_LABEL(
help_elabel[5]),
Q_(
"?bonus:None"));
1523 gtk_text_buffer_set_text(
help_text, buf, -1);
1536 if (pgood == NULL) {
1537 strcat(buf, pitem->
text);
1543 gtk_text_buffer_set_text(
help_text, buf, -1);
1556 if (pspec == NULL) {
1557 strcat(buf, pitem->
text);
1563 gtk_text_buffer_set_text(
help_text, buf, -1);
1577 strcat(buf, pitem->
text);
1583 gtk_text_buffer_set_text(
help_text, buf, -1);
1595 if (pnation == NULL) {
1596 strcat(buf, pitem->
text);
1603 gtk_text_buffer_set_text(
help_text, buf, -1);
1616 for (top = pitem->
topic; *top ==
' '; top++) {
1621 gtk_text_buffer_set_text(
help_text,
"", -1);
1623 switch (pitem->
type) {
1671 GtkTreeModel *model;
1672 GtkTreeIter it, child,
item;
1673 GtkTreeSelection *selection;
1675 model = gtk_tree_view_get_model(GTK_TREE_VIEW(
help_view));
1676 gtk_tree_model_get_iter(model, &
item, path);
1678 for (child =
item; gtk_tree_model_iter_parent(model, &it, &child); child = it) {
1679 GtkTreePath *it_path;
1681 it_path = gtk_tree_model_get_path(model, &it);
1682 gtk_tree_view_expand_row(GTK_TREE_VIEW(
help_view), it_path,
TRUE);
1683 gtk_tree_path_free(it_path);
1686 selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(
help_view));
1687 gtk_tree_selection_select_iter(selection, &
item);
1688 gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(
help_view), path, NULL,
1700 path = gtk_tree_path_new_first();
1706 for (s = pitem2->topic; *s ==
' '; s++) {
1709 depth = s - pitem2->topic + 1;
1711 while (depth < gtk_tree_path_get_depth(path)) {
1712 gtk_tree_path_up(path);
1713 gtk_tree_path_next(path);
1716 while (depth > gtk_tree_path_get_depth(path)) {
1717 gtk_tree_path_down(path);
1722 gtk_tree_path_next(path);
1725 if (pitem == pitem2) {
1743 GtkTreeViewColumn *col;
1752 col = gtk_tree_view_get_column(GTK_TREE_VIEW(
help_view), 0);
1753 gtk_tree_view_set_cursor(GTK_TREE_VIEW(
help_view), path, col,
FALSE);
1754 gtk_tree_path_free(path);
1765 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1766 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1768 gtk_dialog_set_response_sensitive(dialog, 1,
TRUE);
1769 gtk_dialog_set_response_sensitive(dialog, 2,
TRUE);
1772 gtk_dialog_set_response_sensitive(dialog, 1,
FALSE);
1775 gtk_dialog_set_response_sensitive(dialog, 2,
FALSE);
1788 if (response_id == 1) {
1798 }
else if (response_id == 2) {
1799 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 void help_box_clear(void)
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)