Freeciv-3.2
|
#include "cma_core.h"
Go to the source code of this file.
Functions | |
void | cmafec_init (void) |
void | cmafec_free (void) |
void | cmafec_set_fe_parameter (struct city *pcity, const struct cm_parameter *const parameter) |
void | cmafec_get_fe_parameter (struct city *pcity, struct cm_parameter *dest) |
const char * | cmafec_get_short_descr (const struct cm_parameter *const parameter) |
const char * | cmafec_get_short_descr_of_city (const struct city *pcity) |
const char * | cmafec_get_result_descr (struct city *pcity, const struct cm_result *result, const struct cm_parameter *const parameter) |
void | cmafec_preset_add (const char *descr_name, struct cm_parameter *pparam) |
void | cmafec_preset_remove (int idx) |
int | cmafec_preset_get_index_of_parameter (const struct cm_parameter *const parameter) |
char * | cmafec_preset_get_descr (int idx) |
const struct cm_parameter * | cmafec_preset_get_parameter (int idx) |
int | cmafec_preset_num (void) |
void | create_default_cma_presets (void) |
void cmafec_get_fe_parameter | ( | struct city * | pcity, |
struct cm_parameter * | dest | ||
) |
Return the front-end parameter for the given city. Returns a dummy parameter if no parameter was set.
Definition at line 115 of file cma_fec.c.
Referenced by button_press_callback(), button_press_callback(), cell_data_func(), cma_active_callback(), cma_preset_add_popup_callback(), create_cma_dialog(), hscale_changed(), popup_city_cma_dialog(), refresh_cma_dialog(), and city_dialog::update_cma_tab().
const char * cmafec_get_result_descr | ( | struct city * | pcity, |
const struct cm_result * | result, | ||
const struct cm_parameter *const | parameter | ||
) |
Return string describing result
Definition at line 322 of file cma_fec.c.
Referenced by refresh_cma_dialog(), and update_city_cma_dialog().
Returns the description of the matching preset or "custom" if no preset could be found.
Definition at line 236 of file cma_fec.c.
Referenced by cell_data_func(), cmafec_get_result_descr(), and cmafec_get_short_descr_of_city().
Return short description of city governor preset
Definition at line 221 of file cma_fec.c.
Referenced by cr_entry_cma(), city_map::paintEvent(), and city_dialog::update_cma_tab().
Initialize the presets if there are no presets loaded on startup.
Definition at line 76 of file cma_fec.c.
Referenced by agents_init().
void cmafec_preset_add | ( | const char * | descr_name, |
struct cm_parameter * | pparam | ||
) |
Adds a preset.
Definition at line 136 of file cma_fec.c.
Referenced by cma_preset_add_popup_callback(), create_default_cma_presets(), ok_save_cma_callback(), and city_dialog::save_cma().
Returns the indexed preset's description.
Definition at line 169 of file cma_fec.c.
Referenced by append_cma_to_menu_item(), cma_add_preset_callback(), cma_preset_remove(), city_dialog::cma_remove(), cmafec_get_short_descr(), create_governor_menu(), city_widget::gen_cma_labels(), popup_load_del_presets_dialog(), update_cma_preset_list(), and city_dialog::update_cma_tab().
int cmafec_preset_get_index_of_parameter | ( | const struct cm_parameter *const | parameter | ) |
Returns the index of the preset which matches the given parameter. Returns -1 if no preset could be found.
Definition at line 196 of file cma_fec.c.
Referenced by append_cma_to_menu_item(), cell_data_func(), cmafec_get_short_descr(), create_governor_menu(), select_cma_callback(), select_governor_callback(), and city_dialog::update_cma_tab().
const struct cm_parameter * cmafec_preset_get_parameter | ( | int | idx | ) |
Returns the indexed preset's parameter.
Definition at line 182 of file cma_fec.c.
Referenced by append_cma_to_menu_item(), cma_activate_preset_callback(), city_dialog::cma_double_clicked(), cma_iterate(), city_dialog::cma_selected(), create_governor_menu(), city_widget::display_list_menu(), governors_iterate(), ld_cma_callback(), popup_load_del_presets_dialog(), select_cma_callback(), select_governor_callback(), and city_dialog::update_sliders().
Returns the total number of presets.
Definition at line 213 of file cma_fec.c.
Referenced by append_cma_to_menu_item(), city_dialog::cma_remove(), city_dialog::cma_selected(), cmafec_free(), cmafec_preset_get_descr(), cmafec_preset_get_parameter(), cmafec_preset_remove(), create_governor_menu(), city_widget::gen_cma_labels(), popup_load_del_presets_dialog(), update_city_cma_dialog(), update_cma_preset_list(), city_dialog::update_cma_tab(), and city_dialog::update_sliders().
Removes a preset.
Definition at line 153 of file cma_fec.c.
Referenced by cma_preset_remove_response(), city_dialog::cma_remove(), cmafec_free(), ld_cma_callback(), and popup_load_del_presets_dialog().
Sets the front-end parameter.
Definition at line 105 of file cma_fec.c.
Referenced by cma_activate_preset_callback(), cmafec_get_fe_parameter(), factor_horiz_cma_callback(), hscale_changed(), ld_cma_callback(), min_horiz_cma_callback(), popup_load_del_presets_dialog(), and toggle_cma_celebrating_callback().