Freeciv-3.3
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions | Variables
cma_fe.c File Reference
#include <SDL2/SDL.h>
#include "fcintl.h"
#include "game.h"
#include "client_main.h"
#include "citydlg.h"
#include "cityrep.h"
#include "cma_fec.h"
#include "colors.h"
#include "graphics.h"
#include "gui_id.h"
#include "gui_main.h"
#include "gui_tilespec.h"
#include "mapview.h"
#include "sprite.h"
#include "themespec.h"
#include "widget.h"
#include "cma_fe.h"

Go to the source code of this file.

Data Structures

struct  hmove
 
struct  cma_dialog
 

Enumerations

enum  specialist_type { SP_ELVIS , SP_SCIENTIST , SP_TAXMAN , SP_LAST }
 

Functions

static void set_cma_hscrollbars (void)
 
static int cma_dlg_callback (struct widget *pwindow)
 
static int exit_cma_dialog_callback (struct widget *pwidget)
 
static Uint16 scroll_mouse_button_up (SDL_MouseButtonEvent *button_event, void *data)
 
static Uint16 scroll_mouse_motion_handler (SDL_MouseMotionEvent *motion_event, void *data)
 
static int min_horiz_cma_callback (struct widget *pwidget)
 
static int factor_horiz_cma_callback (struct widget *pwidget)
 
static int toggle_cma_celebrating_callback (struct widget *pwidget)
 
static int save_cma_window_callback (struct widget *pwindow)
 
static int ok_save_cma_callback (struct widget *pwidget)
 
static int cancel_sld_cma_callback (struct widget *pwidget)
 
static int save_cma_callback (struct widget *pwidget)
 
static int ld_cma_callback (struct widget *pwidget)
 
static void popup_load_del_presets_dialog (bool load, struct widget *button)
 
static int load_cma_callback (struct widget *pwidget)
 
static int del_cma_callback (struct widget *pwidget)
 
static int run_cma_callback (struct widget *pwidget)
 
static int run_cma_once_callback (struct widget *pwidget)
 
static int stop_cma_callback (struct widget *pwidget)
 
void update_city_cma_dialog (void)
 
void popup_city_cma_dialog (struct city *pcity)
 
void popdown_city_cma_dialog (void)
 

Variables

static struct cma_dialogcma = NULL
 

Enumeration Type Documentation

◆ specialist_type

Enumerator
SP_ELVIS 
SP_SCIENTIST 
SP_TAXMAN 
SP_LAST 

Definition at line 62 of file cma_fe.c.

Function Documentation

◆ cancel_sld_cma_callback()

static int cancel_sld_cma_callback ( struct widget pwidget)
static

Cancel : SAVE, LOAD, DELETE Dialogs

Definition at line 286 of file cma_fe.c.

Referenced by popup_load_del_presets_dialog(), and save_cma_callback().

◆ cma_dlg_callback()

static int cma_dlg_callback ( struct widget pwindow)
static

User interacted with cma dialog.

Definition at line 73 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ del_cma_callback()

static int del_cma_callback ( struct widget pwidget)
static

User interacted with delete cma settings -widget

Definition at line 628 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ exit_cma_dialog_callback()

static int exit_cma_dialog_callback ( struct widget pwidget)
static

User interacted with cma dialog close button.

Definition at line 81 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ factor_horiz_cma_callback()

static int factor_horiz_cma_callback ( struct widget pwidget)
static

User interacted with factor horizontal cma scrollbar

Definition at line 195 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ ld_cma_callback()

static int ld_cma_callback ( struct widget pwidget)
static

User interacted with some preset cma button.

Definition at line 440 of file cma_fe.c.

Referenced by popup_load_del_presets_dialog().

◆ load_cma_callback()

static int load_cma_callback ( struct widget pwidget)
static

User interacted with load cma settings -widget

Definition at line 616 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ min_horiz_cma_callback()

static int min_horiz_cma_callback ( struct widget pwidget)
static

User interacted with minimal horizontal cma scrollbar

Definition at line 155 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ ok_save_cma_callback()

static int ok_save_cma_callback ( struct widget pwidget)
static

User interacted with "yes" button from save cma dialog.

Definition at line 260 of file cma_fe.c.

Referenced by save_cma_callback().

◆ popdown_city_cma_dialog()

void popdown_city_cma_dialog ( void  )

Close cma dialog

Definition at line 1290 of file cma_fe.c.

Referenced by exit_cma_dialog_callback().

◆ popup_city_cma_dialog()

void popup_city_cma_dialog ( struct city pcity)

Open cma dialog for city.

Definition at line 891 of file cma_fe.c.

Referenced by cma_callback(), cma_city_dlg_callback(), and popup_cma_from_city_report_callback().

◆ popup_load_del_presets_dialog()

static void popup_load_del_presets_dialog ( bool  load,
struct widget button 
)
static

User clicked either load or delete preset widget.

Definition at line 474 of file cma_fe.c.

Referenced by del_cma_callback(), and load_cma_callback().

◆ run_cma_callback()

static int run_cma_callback ( struct widget pwidget)
static

Changes the workers of the city to the cma parameters and puts the city under agent control

Definition at line 643 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ run_cma_once_callback()

static int run_cma_once_callback ( struct widget pwidget)
static

Changes the workers of the city to the cma parameters

Definition at line 656 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ save_cma_callback()

static int save_cma_callback ( struct widget pwidget)
static

User interacted with cma setting saving button.

Definition at line 304 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ save_cma_window_callback()

static int save_cma_window_callback ( struct widget pwindow)
static

User interacted with widget that result in cma window getting saved.

Definition at line 252 of file cma_fe.c.

Referenced by popup_load_del_presets_dialog(), and save_cma_callback().

◆ scroll_mouse_button_up()

static Uint16 scroll_mouse_button_up ( SDL_MouseButtonEvent button_event,
void data 
)
static

User released mouse button while in scrollbar.

Definition at line 94 of file cma_fe.c.

Referenced by factor_horiz_cma_callback(), and min_horiz_cma_callback().

◆ scroll_mouse_motion_handler()

static Uint16 scroll_mouse_motion_handler ( SDL_MouseMotionEvent motion_event,
void data 
)
static

User moved mouse while holding scrollbar.

Definition at line 103 of file cma_fe.c.

Referenced by factor_horiz_cma_callback(), and min_horiz_cma_callback().

◆ set_cma_hscrollbars()

static void set_cma_hscrollbars ( void  )
static

Setup horizontal cma scrollbars

Definition at line 690 of file cma_fe.c.

Referenced by ld_cma_callback(), popup_city_cma_dialog(), and popup_load_del_presets_dialog().

◆ stop_cma_callback()

static int stop_cma_callback ( struct widget pwidget)
static

User interacted with release city from cma -widget

Definition at line 675 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ toggle_cma_celebrating_callback()

static int toggle_cma_celebrating_callback ( struct widget pwidget)
static

User interacted with cma celebrating -toggle.

Definition at line 235 of file cma_fe.c.

Referenced by popup_city_cma_dialog().

◆ update_city_cma_dialog()

void update_city_cma_dialog ( void  )

Variable Documentation

◆ cma

struct cma_dialog * cma = NULL
static