Freeciv-3.3: /fast/freeciv/nightly/main/client/gui-sdl3/repodlgs.c File Reference

Freeciv-3.3

Loading...
Searching...
No Matches
Data Structures | Macros | Functions | Variables
repodlgs.c File Reference
`#include "fcintl.h"`
`#include "log.h"`
`#include "game.h"`
`#include "government.h"`
`#include "research.h"`
`#include "unitlist.h"`
`#include "client_main.h"`
`#include "text.h"`
`#include "cityrep.h"`
`#include "colors.h"`
`#include "dialogs.h"`
`#include "graphics.h"`
`#include "gui_id.h"`
`#include "gui_main.h"`
`#include "gui_tilespec.h"`
`#include "helpdlg.h"`
`#include "mapctrl.h"`
`#include "mapview.h"`
`#include "sprite.h"`
`#include "themespec.h"`
`#include "widget.h"`
`#include "repodlgs.h"`

Go to the source code of this file.

## Data Structures

struct | units_entry
struct | rates_move

## Macros

#define | TARGETS_ROW 2
#define | TARGETS_COL 4

## Functions

static void | get_units_report_data (struct units_entry *entries, struct units_entry *total)
static int | units_dialog_callback (struct widget *pwindow)
static int | ok_upgrade_unit_window_callback (struct widget *pwidget)
static int | upgrade_unit_window_callback (struct widget *pwindow)
static int | cancel_upgrade_unit_callback (struct widget *pwidget)
static int | popup_upgrade_unit_callback (struct widget *pwidget)
static int | exit_units_dlg_callback (struct widget *pwidget)
static void | real_activeunits_report_dialog_update (struct units_entry *units, struct units_entry *total)
void | real_units_report_dialog_update (void *unused)
void | units_report_dialog_popup (bool make_modal)
void | units_report_dialog_popdown (void)
static int | economy_dialog_callback (struct widget *pwindow)
static int | exit_economy_dialog_callback (struct widget *pwidget)
static int | toggle_block_callback (struct widget *pcheckbox)
static Uint16 | report_scroll_mouse_button_up (SDL_MouseButtonEvent *button_event, void *data)
static Uint16 | report_scroll_mouse_motion_handler (SDL_MouseMotionEvent *motion_event, void *data)
static int | horiz_taxrate_callback (struct widget *horiz_src)
static int | apply_taxrates_callback (struct widget *button)
static void | enable_economy_dlg (void)
static void | disable_economy_dlg (void)
static int | ok_sell_impr_callback (struct widget *pwidget)
static int | sell_impr_window_callback (struct widget *pwindow)
static int | cancel_sell_impr_callback (struct widget *pwidget)
static int | popup_sell_impr_callback (struct widget *pwidget)
void | real_economy_report_dialog_update (void *unused)
void | economy_report_dialog_popdown (void)
void | economy_report_dialog_popup (bool make_modal)
SDL_Surface * | create_select_tech_icon (utf8_str *pstr, Tech_type_id tech_id, enum tech_info_mode mode)
static void | enable_science_dialog (void)
static void | disable_science_dialog (void)
void | real_science_report_dialog_update (void *unused)
static void | science_report_dialog_popdown (void)
static int | exit_change_tech_dlg_callback (struct widget *pwidget)
static int | change_research_callback (struct widget *pwidget)
static int | change_research_goal_dialog_callback (struct widget *pwindow)
static void | popup_change_research_dialog (void)
static int | change_research_goal_callback (struct widget *pwidget)
static void | popup_change_research_goal_dialog (void)
static int | science_dialog_callback (struct widget *pwindow)
static int | popup_change_research_dialog_callback (struct widget *pwidget)
static int | popup_change_research_goal_dialog_callback (struct widget *pwidget)
static int | popdown_science_dialog_callback (struct widget *pwidget)
void | science_report_dialog_popup (bool raise)
void | science_report_dialogs_popdown_all (void)
void | science_report_dialog_redraw (void)
void | endgame_report_dialog_start (const struct packet_endgame_report *packet)
void | endgame_report_dialog_player (const struct packet_endgame_player *packet)

## Variables

static struct advanced_dialog * | units_dlg = NULL
static struct small_dialog * | units_upg_dlg = NULL
static struct advanced_dialog * | economy_dlg = NULL
static struct small_dialog * | economy_sell_dlg = NULL
static struct small_dialog * | science_dlg = NULL
static struct advanced_dialog * | change_tech_dlg = NULL
static char | eg_buffer [150 *MAX_NUM_PLAYERS]
static int | eg_player_count = 0
static int | eg_players_received = 0

## Macro Definition Documentation

## ◆ TARGETS_COL

#define TARGETS_COL 4

Definition at line 1817 of file repodlgs.c.

## ◆ TARGETS_ROW

#define TARGETS_ROW 2

Definition at line 1816 of file repodlgs.c.

## Function Documentation

## ◆ apply_taxrates_callback()

static int apply_taxrates_callback | ( | struct widget * | button | ) |

static

User interacted with Update button of the Rates.

Definition at line 1408 of file repodlgs.c.

## ◆ cancel_sell_impr_callback()

static int cancel_sell_impr_callback | ( | struct widget * | pwidget | ) |

static

User interacted with Cancel button of the improvement selling dialog.

Definition at line 1573 of file repodlgs.c.

## ◆ cancel_upgrade_unit_callback()

static int cancel_upgrade_unit_callback | ( | struct widget * | pwidget | ) |

static

User interacted with Cancel button of the unit upgrade dialog.

Definition at line 165 of file repodlgs.c.

## ◆ change_research_callback()

static int change_research_callback | ( | struct widget * | pwidget | ) |

static

User interacted with button of specific Tech.

Definition at line 2905 of file repodlgs.c.

## ◆ change_research_goal_callback()

static int change_research_goal_callback | ( | struct widget * | pwidget | ) |

static

User chose spesic tech as research goal.

Definition at line 3103 of file repodlgs.c.

## ◆ change_research_goal_dialog_callback()

static int change_research_goal_dialog_callback | ( | struct widget * | pwindow | ) |

static

This function is used by change research and change goals dlgs.

Definition at line 2920 of file repodlgs.c.

## ◆ create_select_tech_icon()

SDL_Surface * create_select_tech_icon | ( | utf8_str * | pstr,
|  | Tech_type_id | tech_id,
|  | enum tech_info_mode | mode
| ) |  |

Create icon surface for a tech.

Definition at line 2423 of file repodlgs.c.

## ◆ disable_economy_dlg()

static void disable_economy_dlg | ( | void |  | ) |

static

Set economy dialog widgets disabled.

Definition at line 1484 of file repodlgs.c.

## ◆ disable_science_dialog()

static void disable_science_dialog | ( | void |  | ) |

static

Disable science dialog group ( without window )

Definition at line 2610 of file repodlgs.c.

## ◆ economy_dialog_callback()

static int economy_dialog_callback | ( | struct widget * | pwindow | ) |

static

User interacted with Economy Report window.

Definition at line 1133 of file repodlgs.c.

## ◆ economy_report_dialog_popdown()

void economy_report_dialog_popdown | ( | void |  | ) |

Popdown the economy report.

Definition at line 1798 of file repodlgs.c.

## ◆ economy_report_dialog_popup()

void economy_report_dialog_popup | ( | bool | make_modal | ) |

Popup (or raise) the economy report (F5). It may or may not be modal.

Definition at line 1822 of file repodlgs.c.

## ◆ enable_economy_dlg()

static void enable_economy_dlg | ( | void |  | ) |

static

Set economy dialog widgets enabled.

Definition at line 1445 of file repodlgs.c.

## ◆ enable_science_dialog()

static void enable_science_dialog | ( | void |  | ) |

static

Enable science dialog group ( without window )

Definition at line 2601 of file repodlgs.c.

## ◆ endgame_report_dialog_player()

void endgame_report_dialog_player | ( | const struct packet_endgame_player * | packet | ) |

Received endgame report information about single player

Definition at line 3527 of file repodlgs.c.

## ◆ endgame_report_dialog_start()

void endgame_report_dialog_start | ( | const struct packet_endgame_report * | packet | ) |

Show a dialog with player statistics at endgame. TODO: Display all statistics in packet_endgame_report.

Definition at line 3517 of file repodlgs.c.

## ◆ exit_change_tech_dlg_callback()

static int exit_change_tech_dlg_callback | ( | struct widget * | pwidget | ) |

static

Close research target changing dialog.

Definition at line 2884 of file repodlgs.c.

## ◆ exit_economy_dialog_callback()

static int exit_economy_dialog_callback | ( | struct widget * | pwidget | ) |

static

User interacted with Economy dialog Close Dialog button.

Definition at line 1145 of file repodlgs.c.

## ◆ exit_units_dlg_callback()

static int exit_units_dlg_callback | ( | struct widget * | pwidget | ) |

static

User interacted with units dialog Close Dialog button.

Definition at line 333 of file repodlgs.c.

## ◆ get_units_report_data()

static void get_units_report_data | ( | struct units_entry * | entries,
|  | struct units_entry * | total
| ) |  |

static

Fill unit types specific report data + totals.

Definition at line 74 of file repodlgs.c.

## ◆ horiz_taxrate_callback()

static int horiz_taxrate_callback | ( | struct widget * | horiz_src | ) |

static

Handle Rates sliders.

Definition at line 1319 of file repodlgs.c.

## ◆ ok_sell_impr_callback()

static int ok_sell_impr_callback | ( | struct widget * | pwidget | ) |

static

User interacted with Yes button of the improvement selling dialog.

Definition at line 1525 of file repodlgs.c.

## ◆ ok_upgrade_unit_window_callback()

static int ok_upgrade_unit_window_callback | ( | struct widget * | pwidget | ) |

static

User interacted with accept button of the unit upgrade dialog.

Definition at line 134 of file repodlgs.c.

## ◆ popdown_science_dialog_callback()

static int popdown_science_dialog_callback | ( | struct widget * | pwidget | ) |

static

Close science dialog.

Definition at line 3354 of file repodlgs.c.

## ◆ popup_change_research_dialog()

static void popup_change_research_dialog | ( | void |  | ) |

static

Popup dialog to change current research.

Definition at line 2934 of file repodlgs.c.

## ◆ popup_change_research_dialog_callback()

static int popup_change_research_dialog_callback | ( | struct widget * | pwidget | ) |

static

Open research target changing dialog.

Definition at line 3320 of file repodlgs.c.

## ◆ popup_change_research_goal_dialog()

static void popup_change_research_goal_dialog | ( | void |  | ) |

static

Popup dialog to change research goal.

Definition at line 3123 of file repodlgs.c.

## ◆ popup_change_research_goal_dialog_callback()

static int popup_change_research_goal_dialog_callback | ( | struct widget * | pwidget | ) |

static

Open research goal changing dialog.

Definition at line 3337 of file repodlgs.c.

## ◆ popup_sell_impr_callback()

static int popup_sell_impr_callback | ( | struct widget * | pwidget | ) |

static

Open improvement selling dialog.

Definition at line 1591 of file repodlgs.c.

## ◆ popup_upgrade_unit_callback()

static int popup_upgrade_unit_callback | ( | struct widget * | pwidget | ) |

static

Open dialog for upgrading units.

Definition at line 182 of file repodlgs.c.

## ◆ real_activeunits_report_dialog_update()

static void real_activeunits_report_dialog_update | ( | struct units_entry * | units,
|  | struct units_entry * | total
| ) |  |

static

Rebuild the units report.

Definition at line 356 of file repodlgs.c.

## ◆ real_economy_report_dialog_update()

void real_economy_report_dialog_update | ( | void * | unused | ) |

Update the economy report.

Definition at line 1750 of file repodlgs.c.

## ◆ real_science_report_dialog_update()

void real_science_report_dialog_update | ( | void * | unused | ) |

Update the science report.

Definition at line 2619 of file repodlgs.c.

## ◆ real_units_report_dialog_update()

void real_units_report_dialog_update | ( | void * | unused | ) |

Update the units report.

Definition at line 892 of file repodlgs.c.

## ◆ report_scroll_mouse_button_up()

static Uint16 report_scroll_mouse_button_up | ( | SDL_MouseButtonEvent * | button_event,
|  | void * | data
| ) |  |

static

User released mouse button while adjusting rates.

Definition at line 1194 of file repodlgs.c.

## ◆ report_scroll_mouse_motion_handler()

static Uint16 report_scroll_mouse_motion_handler | ( | SDL_MouseMotionEvent * | motion_event,
|  | void * | data
| ) |  |

static

User moved a mouse while adjusting rates.

Definition at line 1203 of file repodlgs.c.

## ◆ science_dialog_callback()

static int science_dialog_callback | ( | struct widget * | pwindow | ) |

static

User interacted with science dialog window.

Definition at line 3301 of file repodlgs.c.

## ◆ science_report_dialog_popdown()

static void science_report_dialog_popdown | ( | void |  | ) |

static

Close science report dialog.

Definition at line 2868 of file repodlgs.c.

## ◆ science_report_dialog_popup()

void science_report_dialog_popup | ( | bool | raise | ) |

Popup (or raise) the science report(F6). It may or may not be modal.

Definition at line 3366 of file repodlgs.c.

## ◆ science_report_dialog_redraw()

void science_report_dialog_redraw | ( | void |  | ) |

Resize and redraw the requirement tree.

Definition at line 3500 of file repodlgs.c.

## ◆ science_report_dialogs_popdown_all()

void science_report_dialogs_popdown_all | ( | void |  | ) |

Popdown all the science reports (report, change tech, change goals).

Definition at line 3479 of file repodlgs.c.

## ◆ sell_impr_window_callback()

static int sell_impr_window_callback | ( | struct widget * | pwindow | ) |

static

User interacted with the improvement selling window.

Definition at line 1561 of file repodlgs.c.

## ◆ toggle_block_callback()

static int toggle_block_callback | ( | struct widget * | pcheckbox | ) |

static

Toggle Rates dialog locking checkbox.

Definition at line 1171 of file repodlgs.c.

## ◆ units_dialog_callback()

static int units_dialog_callback | ( | struct widget * | pwindow | ) |

static

User interacted with Units Report button.

Definition at line 120 of file repodlgs.c.

## ◆ units_report_dialog_popdown()

void units_report_dialog_popdown | ( | void |  | ) |

Closes the units report dialog.

Definition at line 1102 of file repodlgs.c.

## ◆ units_report_dialog_popup()

void units_report_dialog_popup | ( | bool | make_modal | ) |

Popup (or raise) the units report (F2). It may or may not be modal.

Definition at line 1086 of file repodlgs.c.

## ◆ upgrade_unit_window_callback()

static int upgrade_unit_window_callback | ( | struct widget * | pwindow | ) |

static

User interacted with Upgrade Obsolete button of the unit upgrade dialog.

Definition at line 153 of file repodlgs.c.

## Variable Documentation

## ◆ change_tech_dlg

struct advanced_dialog* change_tech_dlg = NULL

static

Definition at line 2418 of file repodlgs.c.

## ◆ economy_dlg

struct advanced_dialog* economy_dlg = NULL

static

Definition at line 1120 of file repodlgs.c.

## ◆ economy_sell_dlg

struct small_dialog* economy_sell_dlg = NULL

static

Definition at line 1121 of file repodlgs.c.

## ◆ eg_buffer

char eg_buffer[150 *MAX_NUM_PLAYERS]

static

Definition at line 3509 of file repodlgs.c.

## ◆ eg_player_count

int eg_player_count = 0

static

Definition at line 3510 of file repodlgs.c.

## ◆ eg_players_received

int eg_players_received = 0

static

Definition at line 3511 of file repodlgs.c.

## ◆ science_dlg

struct small_dialog* science_dlg = NULL

static

Definition at line 2416 of file repodlgs.c.

## ◆ units_dlg

struct advanced_dialog* units_dlg = NULL

static

Definition at line 61 of file repodlgs.c.

## ◆ units_upg_dlg

struct small_dialog* units_upg_dlg = NULL

static

Definition at line 62 of file repodlgs.c.