Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-gtk-3.22/gui_stuff.c File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Functions | Variables
gui_stuff.c File Reference
`#include <stdarg.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <gtk/gtk.h>`
`#include <gdk/gdkkeysyms.h>`
`#include "fcintl.h"`
`#include "log.h"`
`#include "mem.h"`
`#include "support.h"`
`#include "options.h"`
`#include "colors.h"`
`#include "gui_main.h"`
`#include "gui_stuff.h"`

Go to the source code of this file.

## Functions

void | gtk_expose_now (GtkWidget *w)
void | set_relative_window_position (GtkWindow *ref, GtkWindow *w, int px, int py)
GtkWidget * | icon_label_button_new (const gchar *icon_name, const gchar *label_text)
void | gtk_stockbutton_set_label (GtkWidget *button, const gchar *label_text)
void | intl_slist (int n, const char **s, bool *done)
void | itree_begin (GtkTreeModel *model, ITree *it)
gboolean | itree_end (ITree *it)
void | itree_next (ITree *it)
void | itree_set (ITree *it,...)
void | itree_get (ITree *it,...)
void | tstore_append (GtkTreeStore *store, ITree *it, ITree *parent)
gboolean | itree_is_selected (GtkTreeSelection *selection, ITree *it)
void | itree_select (GtkTreeSelection *selection, ITree *it)
void | itree_unselect (GtkTreeSelection *selection, ITree *it)
gint | gtk_tree_selection_get_row (GtkTreeSelection *selection)
void | gtk_tree_view_focus (GtkTreeView *view)
GtkWidget * | gtk_aux_menu_bar_new (void)
static void | close_callback (GtkDialog *dialog, gpointer data)
void | setup_dialog (GtkWidget *shell, GtkWidget *parent)
static void | gui_dialog_response (struct gui_dialog *dlg, int response)
static void | gui_dialog_destroyed (struct gui_dialog *dlg, int response, gpointer data)
static void | gui_dialog_destroy_handler (GtkWidget *w, struct gui_dialog *dlg)
static gint | gui_dialog_delete_handler (GtkWidget *widget, GdkEventAny *ev, gpointer data)
static gint | gui_dialog_delete_tab_handler (struct gui_dialog *dlg)
static gboolean | gui_dialog_key_press_handler (GtkWidget *w, GdkEventKey *ev, gpointer data)
static void | gui_dialog_switch_page_handler (GtkNotebook *notebook, GtkWidget *page, guint num, struct gui_dialog *dlg)
static void | gui_dialog_detach (struct gui_dialog *dlg)
static gboolean | click_on_tab_callback (GtkWidget *w, GdkEventButton *button, gpointer data)
void | gui_dialog_new (struct gui_dialog **pdlg, GtkNotebook *notebook, gpointer user_data, bool check_top)
static void | action_widget_activated (GtkWidget *button, GtkWidget *vbox)
static void | gui_dialog_pack_button (struct gui_dialog *dlg, GtkWidget *button, int response)
GtkWidget * | gui_dialog_add_button (struct gui_dialog *dlg, const char *icon_name, const char *text, int response)
GtkWidget * | gui_dialog_add_widget (struct gui_dialog *dlg, GtkWidget *widget)
void | gui_dialog_set_default_response (struct gui_dialog *dlg, int response)
void | gui_dialog_set_response_sensitive (struct gui_dialog *dlg, int response, bool setting)
GtkWidget * | gui_dialog_get_toplevel (struct gui_dialog *dlg)
void | gui_dialog_show_all (struct gui_dialog *dlg)
void | gui_dialog_present (struct gui_dialog *dlg)
void | gui_dialog_raise (struct gui_dialog *dlg)
void | gui_dialog_alert (struct gui_dialog *dlg)
void | gui_dialog_set_default_size (struct gui_dialog *dlg, int width, int height)
void | gui_dialog_set_title (struct gui_dialog *dlg, const char *title)
void | gui_dialog_destroy (struct gui_dialog *dlg)
void | gui_dialog_destroy_all (void)
void | gui_dialog_response_set_callback (struct gui_dialog *dlg, GUI_DIALOG_RESPONSE_FUN fun)
void | gui_dialog_set_return_dialog (struct gui_dialog *dlg, struct gui_dialog *return_dialog)
void | gui_update_font (const char *font_name, const char *font_value)
void | gui_update_font_full (const char *font_name, const char *font_value, PangoFontDescription **font_desc)
void | disable_gobject_callback (GObject *obj, GCallback cb)
void | enable_gobject_callback (GObject *obj, GCallback cb)
GtkTreeViewColumn * | add_treeview_column (GtkWidget *view, const char *title, GType gtype, int model_index)
void | dlg_tab_provider_prepare (void)

## Variables

static GList * | dialog_list
static GtkSizeGroup * | gui_action
static GtkCssProvider * | dlg_tab_provider = NULL

## Function Documentation

## ◆ action_widget_activated()

static void action_widget_activated | ( | GtkWidget * | button,
|  | GtkWidget * | vbox
| ) |  |

static

Called when a dialog button is activated.

Definition at line 667 of file gui_stuff.c.

Referenced by gui_dialog_pack_button().

## ◆ add_treeview_column()

GtkTreeViewColumn * add_treeview_column | ( | GtkWidget * | view,
|  | const char * | title,
|  | GType | gtype,
|  | int | model_index
| ) |  |

Convenience function to add a column to a GtkTreeView. Returns the added column, or NULL if an error occurred.

Definition at line 1123 of file gui_stuff.c.

Referenced by create_network_page().

## ◆ click_on_tab_callback()

static gboolean click_on_tab_callback | ( | GtkWidget * | w,
|  | GdkEventButton * | button,
|  | gpointer | data
| ) |  |

static

Someone has clicked on a label in a notebook

Definition at line 494 of file gui_stuff.c.

Referenced by gui_dialog_new().

## ◆ close_callback()

static void close_callback | ( | GtkDialog * | dialog,
|  | gpointer | data
| ) |  |

static

Generic close callback for all widgets

Definition at line 277 of file gui_stuff.c.

Referenced by setup_dialog().

## ◆ disable_gobject_callback()

void disable_gobject_callback | ( | GObject * | obj,
|  | GCallback | cb
| ) |  |

Temporarily disable signal invocation of the given callback for the given GObject. Re-enable the signal with enable_gobject_callback.

Definition at line 1090 of file gui_stuff.c.

Referenced by extviewer_clear_widgets(), extviewer_refresh_widgets(), objprop_refresh_widget(), and refresh_all_buttons().

## ◆ dlg_tab_provider_prepare()

void dlg_tab_provider_prepare | ( | void |  | ) |

Prepare dialog tab style provider.

Definition at line 1155 of file gui_stuff.c.

Referenced by activate_gui(), and ui_main().

## ◆ enable_gobject_callback()

void enable_gobject_callback | ( | GObject * | obj,
|  | GCallback | cb
| ) |  |

Re-enable a signal callback blocked by disable_gobject_callback.

Definition at line 1106 of file gui_stuff.c.

Referenced by extviewer_clear_widgets(), extviewer_refresh_widgets(), objprop_refresh_widget(), and refresh_all_buttons().

## ◆ gtk_aux_menu_bar_new()

GtkWidget * gtk_aux_menu_bar_new | ( | void |  | ) |

Create an auxiliary menubar (i.e., not the main menubar at the top of the window).

Definition at line 255 of file gui_stuff.c.

Referenced by create_city_report_menubar(), create_diplomacy_dialog(), create_players_dialog(), and create_worklist().

## ◆ gtk_expose_now()

void gtk_expose_now | ( | GtkWidget * | w | ) |

Draw widget now

Definition at line 52 of file gui_stuff.c.

## ◆ gtk_stockbutton_set_label()

void gtk_stockbutton_set_label | ( | GtkWidget * | button,
|  | const gchar * | label_text
| ) |  |

Changes the label (with mnemonic) on an existing stockbutton. See gtk_stockbutton_new.

Definition at line 96 of file gui_stuff.c.

Referenced by update_start_page_buttons().

## ◆ gtk_tree_selection_get_row()

gint gtk_tree_selection_get_row | ( | GtkTreeSelection * | selection | ) |

Return the selected row in a GtkTreeSelection. If no row is selected return -1.

Definition at line 215 of file gui_stuff.c.

Referenced by cma_add_preset_callback(), cma_del_preset_callback(), cma_preset_key_pressed(), and cma_preset_key_pressed_callback().

## ◆ gtk_tree_view_focus()

void gtk_tree_view_focus | ( | GtkTreeView * | view | ) |

Give focus to view

Definition at line 236 of file gui_stuff.c.

Referenced by create_advances_list(), create_cma_dialog(), create_goto_dialog(), create_improvements_list(), create_messageopt_dialog(), create_players_dialog(), economy_report_init(), popup_find_dialog(), real_set_client_page(), and units_report_init().

## ◆ gui_dialog_add_button()

GtkWidget * gui_dialog_add_button | ( | struct gui_dialog * | dlg,
|  | const char * | icon_name,
|  | const char * | text,
|  | int | response
| ) |  |

Adds a button to a dialog.

Definition at line 706 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_diplomacy_dialog(), create_messageopt_dialog(), create_players_dialog(), create_spaceship_dialog(), diplomacy_main_create(), economy_report_init(), luaconsole_dialog_create(), meswin_dialog_init(), popup_find_dialog(), popup_notify_dialog(), science_report_init(), and units_report_init().

## ◆ gui_dialog_add_widget()

GtkWidget * gui_dialog_add_widget | ( | struct gui_dialog * | dlg,
|  | GtkWidget * | widget
| ) |  |

Adds a widget to a dialog.

Definition at line 722 of file gui_stuff.c.

Referenced by create_city_report_dialog(), and create_players_dialog().

## ◆ gui_dialog_alert()

void gui_dialog_alert | ( | struct gui_dialog * | dlg | ) |

Alert the user to an important event.

Definition at line 888 of file gui_stuff.c.

Referenced by gui_recv_accept_treaty(), gui_recv_create_clause(), gui_recv_remove_clause(), meswin_dialog_refresh(), and science_report_dialog_popup().

## ◆ gui_dialog_delete_handler()

static gint gui_dialog_delete_handler | ( | GtkWidget * | widget,
|  | GdkEventAny * | ev,
|  | gpointer | data
| ) |  |

static

Emit a delete event response on dialog deletion in case the end-user needs to know when a deletion took place. Popup dialog version

Definition at line 374 of file gui_stuff.c.

Referenced by gui_dialog_detach(), and gui_dialog_new().

## ◆ gui_dialog_delete_tab_handler()

static gint gui_dialog_delete_tab_handler | ( | struct gui_dialog * | dlg | ) |

static

Emit a delete event response on dialog deletion in case the end-user needs to know when a deletion took place. TAB version

Definition at line 391 of file gui_stuff.c.

Referenced by gui_dialog_new().

## ◆ gui_dialog_destroy()

void gui_dialog_destroy | ( | struct gui_dialog * | dlg | ) |

Destroy a dialog.

Definition at line 954 of file gui_stuff.c.

Referenced by city_command_callback(), city_report_dialog_popdown(), diplomacy_destroy(), diplomacy_main_destroy(), economy_report_command_callback(), economy_report_free(), find_response(), gui_dialog_destroy_all(), gui_dialog_destroyed(), luaconsole_dialog_destroy(), luaconsole_response_callback(), messageopt_response(), meswin_dialog_free(), meswin_dialog_response_callback(), popdown_players_dialog(), popdown_spaceship_dialog(), science_report_free(), spaceship_response(), units_report_command_callback(), and units_report_free().

## ◆ gui_dialog_destroy_all()

void gui_dialog_destroy_all | ( | void |  | ) |

Destroy all dialogs.

Definition at line 974 of file gui_stuff.c.

Referenced by popdown_all_game_dialogs().

## ◆ gui_dialog_destroy_handler()

static void gui_dialog_destroy_handler | ( | GtkWidget * | w,
|  | struct gui_dialog * | dlg
| ) |  |

static

Cleanups the leftovers after a dialog is destroyed.

Definition at line 331 of file gui_stuff.c.

Referenced by gui_dialog_new().

## ◆ gui_dialog_destroyed()

static void gui_dialog_destroyed | ( | struct gui_dialog * | dlg,
|  | int | response,
|  | gpointer | data
| ) |  |

static

Default dialog response handler. Destroys the dialog.

Definition at line 322 of file gui_stuff.c.

Referenced by gui_dialog_new().

## ◆ gui_dialog_detach()

static void gui_dialog_detach | ( | struct gui_dialog * | dlg | ) |

static

Changes a tab into a window.

Definition at line 451 of file gui_stuff.c.

Referenced by click_on_tab_callback(), and click_on_tab_callback().

## ◆ gui_dialog_get_toplevel()

GtkWidget * gui_dialog_get_toplevel | ( | struct gui_dialog * | dlg | ) |

Get the dialog's toplevel window.

Definition at line 787 of file gui_stuff.c.

Referenced by economy_report_command_callback(), and units_report_command_callback().

## ◆ gui_dialog_key_press_handler()

static gboolean gui_dialog_key_press_handler | ( | GtkWidget * | w,
|  | GdkEventKey * | ev,
|  | gpointer | data
| ) |  |

static

Allow the user to close a dialog using Escape or CTRL+W.

Definition at line 413 of file gui_stuff.c.

Referenced by gui_dialog_new().

## ◆ gui_dialog_new()

void gui_dialog_new | ( | struct gui_dialog ** | pdlg,
|  | GtkNotebook * | notebook,
|  | gpointer | user_data,
|  | bool | check_top
| ) |  |

Creates a new dialog. It will be a tab or a window depending on the current user setting of 'enable_tabs' gtk-gui option. Sets pdlg to point to the dialog once it is create, Zeroes pdlg on dialog destruction. user_data will be passed through response function check_top indicates if the layout decision should depend on the parent.

Definition at line 517 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_diplomacy_dialog(), create_messageopt_dialog(), create_players_dialog(), create_spaceship_dialog(), diplomacy_main_create(), economy_report_init(), endgame_report_init(), luaconsole_dialog_create(), meswin_dialog_init(), popup_find_dialog(), popup_notify_dialog(), science_report_init(), and units_report_init().

## ◆ gui_dialog_pack_button()

static void gui_dialog_pack_button | ( | struct gui_dialog * | dlg,
|  | GtkWidget * | button,
|  | int | response
| ) |  |

static

Places a button into a dialog, taking care of setting up signals, etc.

Definition at line 680 of file gui_stuff.c.

Referenced by gui_dialog_add_button().

## ◆ gui_dialog_present()

void gui_dialog_present | ( | struct gui_dialog * | dlg | ) |

Notify the user the dialog has changed.

Definition at line 835 of file gui_stuff.c.

Referenced by city_report_dialog_popup(), diplomacy_main_create(), economy_report_dialog_popup(), endgame_report_dialog_player(), luaconsole_dialog_popup(), meswin_dialog_popup(), popup_diplomacy_dialog(), popup_notify_dialog(), popup_players_dialog(), science_report_dialog_popup(), and units_report_dialog_popup().

## ◆ gui_dialog_raise()

void gui_dialog_raise | ( | struct gui_dialog * | dlg | ) |

Raise dialog to top.

Definition at line 865 of file gui_stuff.c.

Referenced by city_report_dialog_popup(), economy_report_dialog_popup(), gui_dialog_destroy_handler(), luaconsole_dialog_popup(), meswin_dialog_popup(), popup_diplomacy_dialog(), popup_find_dialog(), popup_messageopt_dialog(), popup_players_dialog(), popup_spaceship_dialog(), science_report_dialog_popup(), and units_report_dialog_popup().

## ◆ gui_dialog_response()

static void gui_dialog_response | ( | struct gui_dialog * | dlg,
|  | int | response
| ) |  |

static

Emit a dialog response.

Definition at line 312 of file gui_stuff.c.

Referenced by action_widget_activated(), gui_dialog_delete_handler(), gui_dialog_delete_handler(), gui_dialog_delete_tab_handler(), gui_dialog_key_press_handler(), and gui_dialog_key_press_handler().

## ◆ gui_dialog_response_set_callback()

void gui_dialog_response_set_callback | ( | struct gui_dialog * | dlg,
|  | GUI_DIALOG_RESPONSE_FUN | fun
| ) |  |

Set the response callback for a dialog.

Definition at line 988 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_diplomacy_dialog(), create_messageopt_dialog(), create_spaceship_dialog(), diplomacy_main_create(), economy_report_init(), luaconsole_dialog_create(), meswin_dialog_init(), popup_find_dialog(), and units_report_init().

## ◆ gui_dialog_set_default_response()

void gui_dialog_set_default_response | ( | struct gui_dialog * | dlg,
|  | int | response
| ) |  |

Changes the default dialog response.

Definition at line 734 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_diplomacy_dialog(), create_players_dialog(), diplomacy_main_create(), economy_report_init(), popup_find_dialog(), popup_notify_dialog(), science_report_init(), and units_report_init().

## ◆ gui_dialog_set_default_size()

void gui_dialog_set_default_size | ( | struct gui_dialog * | dlg,
|  | int | width,
|  | int | height
| ) |  |

Sets the dialog's default size (applies to toplevel windows only).

Definition at line 919 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_messageopt_dialog(), create_players_dialog(), economy_report_init(), endgame_report_init(), meswin_dialog_init(), popup_find_dialog(), popup_notify_dialog(), and units_report_init().

## ◆ gui_dialog_set_response_sensitive()

void gui_dialog_set_response_sensitive | ( | struct gui_dialog * | dlg,
|  | int | response,
|  | bool | setting
| ) |  |

Change the sensitivity of a dialog button.

Definition at line 760 of file gui_stuff.c.

Referenced by economy_report_selection_callback(), meswin_dialog_selection_callback(), refresh_spaceship_dialog(), and units_report_selection_callback().

## ◆ gui_dialog_set_return_dialog()

void gui_dialog_set_return_dialog | ( | struct gui_dialog * | dlg,
|  | struct gui_dialog * | return_dialog
| ) |  |

When the dlg dialog is destroyed the return_dialog will be raised

Definition at line 997 of file gui_stuff.c.

Referenced by gui_dialog_delete_tab_handler(), and popup_diplomacy_dialog().

## ◆ gui_dialog_set_title()

void gui_dialog_set_title | ( | struct gui_dialog * | dlg,
|  | const char * | title
| ) |  |

Changes a dialog's title.

Definition at line 935 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_diplomacy_dialog(), create_messageopt_dialog(), create_players_dialog(), create_spaceship_dialog(), diplomacy_destroy(), economy_report_init(), endgame_report_init(), luaconsole_dialog_create(), meswin_dialog_init(), popup_find_dialog(), popup_notify_dialog(), science_report_init(), and units_report_init().

## ◆ gui_dialog_show_all()

void gui_dialog_show_all | ( | struct gui_dialog * | dlg | ) |

Show the dialog contents, but not the dialog per se.

Definition at line 795 of file gui_stuff.c.

Referenced by create_city_report_dialog(), create_diplomacy_dialog(), create_messageopt_dialog(), create_players_dialog(), create_spaceship_dialog(), diplomacy_main_create(), economy_report_init(), endgame_report_init(), luaconsole_dialog_create(), meswin_dialog_init(), popup_find_dialog(), popup_notify_dialog(), science_report_init(), and units_report_init().

## ◆ gui_dialog_switch_page_handler()

static void gui_dialog_switch_page_handler | ( | GtkNotebook * | notebook,
|  | GtkWidget * | page,
|  | guint | num,
|  | struct gui_dialog * | dlg
| ) |  |

static

Resets tab colour on tab activation.

Definition at line 431 of file gui_stuff.c.

Referenced by gui_dialog_new().

## ◆ gui_update_font()

void gui_update_font | ( | const char * | font_name,
|  | const char * | font_value
| ) |  |

Updates a gui font style.

Definition at line 1010 of file gui_stuff.c.

## ◆ gui_update_font_full()

void gui_update_font_full | ( | const char * | font_name,
|  | const char * | font_value,
|  | PangoFontDescription ** | font_desc
| ) |  |

Update a font option which is not attached to a widget.

Definition at line 1073 of file gui_stuff.c.

Referenced by apply_city_names_font(), apply_city_productions_font(), and apply_reqtree_text_font().

## ◆ icon_label_button_new()

GtkWidget * icon_label_button_new | ( | const gchar * | icon_name,
|  | const gchar * | label_text
| ) |  |

Create new icon button with label

Definition at line 76 of file gui_stuff.c.

Referenced by create_and_append_overview_page(), create_cma_dialog(), create_main_page(), create_production_header(), create_production_header(), create_start_page(), create_worklist(), and gui_dialog_add_button().

## ◆ intl_slist()

void intl_slist | ( | int | n,
|  | const char ** | s,
|  | bool * | done
| ) |  |

Returns gettext-converted list of n strings. The individual strings in the list are as returned by gettext(). In case of no NLS, the strings will be the original strings, so caller should ensure that the originals persist for as long as required. (For no NLS, still allocate the list, for consistency.)

(This is not directly gui/gtk related, but it fits in here because so far it is used for doing i18n for gtk titles...)

Definition at line 111 of file gui_stuff.c.

Referenced by create_and_append_settings_page(), create_city_info_table(), create_city_info_table(), create_happiness_dialog(), populate_view(), and usdlg_tab_select().

## ◆ itree_begin()

void itree_begin | ( | GtkTreeModel * | model,
|  | ITree * | it
| ) |  |

Set itree to the beginning

Definition at line 127 of file gui_stuff.c.

Referenced by append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), city_invert_selection_callback(), city_invert_selection_callback(), city_select_building_callback(), city_select_building_callback(), city_select_coastal_callback(), city_select_coastal_callback(), hilite_cities_from_canvas(), messageopt_response(), real_city_report_dialog_update(), same_island_iterate(), science_report_combo_set_active(), select_cma_callback(), select_governor_callback(), select_impr_or_unit_callback(), and select_impr_or_unit_callback().

## ◆ itree_end()

gboolean itree_end | ( | ITree * | it | ) |

Return whether itree end has been reached

Definition at line 136 of file gui_stuff.c.

Referenced by append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), city_invert_selection_callback(), city_invert_selection_callback(), city_select_building_callback(), city_select_building_callback(), city_select_coastal_callback(), city_select_coastal_callback(), hilite_cities_from_canvas(), messageopt_response(), real_city_report_dialog_update(), same_island_iterate(), science_report_combo_set_active(), select_cma_callback(), select_governor_callback(), select_impr_or_unit_callback(), and select_impr_or_unit_callback().

## ◆ itree_get()

void itree_get | ( | ITree * | it,
|  |  | ...
| ) |  |

Get values from itree

Definition at line 164 of file gui_stuff.c.

Referenced by messageopt_response(), real_city_report_dialog_update(), and science_report_combo_set_active().

## ◆ itree_is_selected()

gboolean itree_is_selected | ( | GtkTreeSelection * | selection,
|  | ITree * | it
| ) |  |

Return whether current itree item is selected

Definition at line 190 of file gui_stuff.c.

Referenced by append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), city_invert_selection_callback(), city_invert_selection_callback(), and real_city_report_dialog_update().

## ◆ itree_next()

void itree_next | ( | ITree * | it | ) |

Make itree to go forward one step

Definition at line 144 of file gui_stuff.c.

Referenced by append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), city_invert_selection_callback(), city_invert_selection_callback(), city_select_building_callback(), city_select_building_callback(), city_select_coastal_callback(), city_select_coastal_callback(), hilite_cities_from_canvas(), messageopt_response(), real_city_report_dialog_update(), same_island_iterate(), science_report_combo_set_active(), select_cma_callback(), select_governor_callback(), select_impr_or_unit_callback(), and select_impr_or_unit_callback().

## ◆ itree_select()

void itree_select | ( | GtkTreeSelection * | selection,
|  | ITree * | it
| ) |  |

Add current itree item to selection

Definition at line 198 of file gui_stuff.c.

Referenced by city_invert_selection_callback(), city_invert_selection_callback(), city_select_building_callback(), city_select_building_callback(), city_select_coastal_callback(), city_select_coastal_callback(), hilite_cities_from_canvas(), same_island_iterate(), select_cma_callback(), select_governor_callback(), select_impr_or_unit_callback(), and select_impr_or_unit_callback().

## ◆ itree_set()

void itree_set | ( | ITree * | it,
|  |  | ...
| ) |  |

Store values to itree

Definition at line 152 of file gui_stuff.c.

## ◆ itree_unselect()

void itree_unselect | ( | GtkTreeSelection * | selection,
|  | ITree * | it
| ) |  |

Remove current itree item from selection

Definition at line 206 of file gui_stuff.c.

Referenced by city_invert_selection_callback(), and city_invert_selection_callback().

## ◆ set_relative_window_position()

void set_relative_window_position | ( | GtkWindow * | ref,
|  | GtkWindow * | w,
|  | int | px,
|  | int | py
| ) |  |

Set window position relative to reference window

Definition at line 60 of file gui_stuff.c.

Referenced by popup_help_dialog_typed().

## ◆ setup_dialog()

void setup_dialog | ( | GtkWidget * | shell,
|  | GtkWidget * | parent
| ) |  |

This function handles new windows which are subwindows to the toplevel window. It must be called on every dialog in the game, so fullscreen windows are handled properly by the window manager.

Definition at line 287 of file gui_stuff.c.

Referenced by buy_callback(), choice_dialog_start(), cma_preset_remove(), confirm_cancel_pact(), create_advances_list(), create_city_dialog(), create_goto_dialog(), create_help_dialog(), create_improvements_list(), create_intel_dialog(), create_intel_wonder_dialog(), create_multiplier_dialog(), create_races_dialog(), create_rates_dialog(), create_worklists_report(), economy_report_command_callback(), gui_dialog_detach(), gui_dialog_new(), infra_dialog_popup(), input_dialog_create(), leave_callback(), leave_callback(), luaconsole_load_file_popup(), option_color_select_callback(), option_dialog_new(), popup_bribe_dialog(), popup_connect_msg(), popup_disband_dialog(), popup_incite_dialog(), popup_notify_goto_dialog(), popup_quit_dialog(), popup_revolution_dialog(), popup_soundset_suggestion_dialog(), popup_tileset_suggestion_dialog(), popup_upgrade_dialog(), rally_dialog_popup(), request_action_confirmation(), save_dialog_file_chooser_popup(), save_dialog_new(), select_color_callback(), select_color_callback(), select_tgt_extra(), select_tgt_unit(), sell_callback(), show_conn_popup(), show_tileset_error(), tearoff_callback(), units_report_command_callback(), and usdlg_create().

## ◆ tstore_append()

void tstore_append | ( | GtkTreeStore * | store,
|  | ITree * | it,
|  | ITree * | parent
| ) |  |

Append one item to the end of tree store

Definition at line 176 of file gui_stuff.c.

## Variable Documentation

## ◆ dialog_list

GList* dialog_list

static

Definition at line 42 of file gui_stuff.c.

Referenced by gui_dialog_destroy_all(), gui_dialog_destroy_handler(), and gui_dialog_new().

## ◆ dlg_tab_provider

GtkCssProvider* dlg_tab_provider = NULL

static

Definition at line 46 of file gui_stuff.c.

Referenced by dlg_tab_provider_prepare(), and gui_dialog_new().

## ◆ gui_action

GtkSizeGroup* gui_action

static

Definition at line 44 of file gui_stuff.c.

Referenced by gui_dialog_add_action_widget(), gui_dialog_add_widget(), gui_dialog_new(), and gui_dialog_pack_button().