Freeciv-3.2
|
#include <gtk/gtk.h>
#include "fcintl.h"
#include "fc_types.h"
#include "game.h"
#include "player.h"
#include "unit.h"
#include "unitlist.h"
#include "unittype.h"
#include "client_main.h"
#include "control.h"
#include "goto.h"
#include "tilespec.h"
#include "unitselect_common.h"
#include "graphics.h"
#include "gui_stuff.h"
#include "gui_main.h"
#include "unitselect.h"
Go to the source code of this file.
Data Structures | |
struct | unit_select_dialog |
Macros | |
#define | USDLG_COLUMNS_DEFAULT 3 |
#define | USDLG_COL_UTID USDLG_COLUMNS_DEFAULT + 0 /* Unit type ID */ |
#define | USDLG_COL_UID USDLG_COLUMNS_DEFAULT + 1 /* Unit ID */ |
#define | USDLG_COL_LOCATION USDLG_COLUMNS_DEFAULT + 2 /* Unit location */ |
#define | USDLG_COL_ACTIVITY USDLG_COLUMNS_DEFAULT + 3 /* Unit activity */ |
#define | USDLG_COL_ROW_TYPE USDLG_COLUMNS_DEFAULT + 4 /* Row type */ |
#define | USDLG_COLUMNS_DEBUG USDLG_COLUMNS_DEFAULT + 5 |
#define | USDLG_COL_STYLE USDLG_COLUMNS_DEBUG + 0 |
#define | USDLG_COL_WEIGHT USDLG_COLUMNS_DEBUG + 1 |
#define | USDLG_COLUMNS_ALL USDLG_COLUMNS_DEBUG + 2 |
#define | USDLG_COLUMNS_SHOW USDLG_COLUMNS_DEFAULT |
Enumerations | |
enum | usdlg_column_types { COL_PIXBUF , COL_TEXT , COL_INT } |
enum | usdlg_row_types { ROW_UNITTYPE , ROW_ACTIVITY , ROW_UNIT , ROW_UNIT_TRANSPORTED } |
enum | usdlg_cmd { USDLG_CMD_SELECT , USDLG_CMD_DESELECT , USDLG_CMD_READY , USDLG_CMD_SENTRY , USDLG_CMD_CENTER , USDLG_CMD_FOCUS , USDLG_CMD_LAST } |
Variables | |
enum usdlg_column_types | usdlg_col_types [USDLG_COLUMNS_ALL] |
static const char * | usdlg_col_titles [USDLG_COLUMNS_ALL] |
static struct unit_select_dialog * | unit_select_dlg = NULL |
#define USDLG_COL_ACTIVITY USDLG_COLUMNS_DEFAULT + 3 /* Unit activity */ |
Definition at line 67 of file unitselect.c.
#define USDLG_COL_LOCATION USDLG_COLUMNS_DEFAULT + 2 /* Unit location */ |
Definition at line 66 of file unitselect.c.
#define USDLG_COL_ROW_TYPE USDLG_COLUMNS_DEFAULT + 4 /* Row type */ |
Definition at line 68 of file unitselect.c.
#define USDLG_COL_STYLE USDLG_COLUMNS_DEBUG + 0 |
Definition at line 71 of file unitselect.c.
#define USDLG_COL_UID USDLG_COLUMNS_DEFAULT + 1 /* Unit ID */ |
Definition at line 65 of file unitselect.c.
#define USDLG_COL_UTID USDLG_COLUMNS_DEFAULT + 0 /* Unit type ID */ |
Definition at line 64 of file unitselect.c.
#define USDLG_COL_WEIGHT USDLG_COLUMNS_DEBUG + 1 |
Definition at line 72 of file unitselect.c.
#define USDLG_COLUMNS_ALL USDLG_COLUMNS_DEBUG + 2 |
Definition at line 73 of file unitselect.c.
#define USDLG_COLUMNS_DEBUG USDLG_COLUMNS_DEFAULT + 5 |
Definition at line 69 of file unitselect.c.
#define USDLG_COLUMNS_DEFAULT 3 |
Definition at line 62 of file unitselect.c.
#define USDLG_COLUMNS_SHOW USDLG_COLUMNS_DEFAULT |
Definition at line 78 of file unitselect.c.
Enumerator | |
---|---|
USDLG_CMD_SELECT | |
USDLG_CMD_DESELECT | |
USDLG_CMD_READY | |
USDLG_CMD_SENTRY | |
USDLG_CMD_CENTER | |
USDLG_CMD_FOCUS | |
USDLG_CMD_LAST |
Definition at line 107 of file unitselect.c.
Enumerator | |
---|---|
COL_PIXBUF | |
COL_TEXT | |
COL_INT |
Definition at line 48 of file unitselect.c.
Enumerator | |
---|---|
ROW_UNITTYPE | |
ROW_ACTIVITY | |
ROW_UNIT | |
ROW_UNIT_TRANSPORTED |
Definition at line 54 of file unitselect.c.
Popdown the unit selection dialog.
Popdown a dialog window to select units on a particular tile.
Definition at line 214 of file unitselect.c.
Referenced by exit_unit_select_callback(), popdown_all_game_dialogs(), and unit_select_callback().
Popup the unit selection dialog.
Definition at line 193 of file unitselect.c.
Referenced by unit_select_dialog_popup(), and unit_select_dialog_update_real().
Callback for the center button.
Definition at line 1083 of file unitselect.c.
Referenced by usdlg_tab_select().
|
static |
Callback if the row is changed.
Definition at line 1180 of file unitselect.c.
Referenced by usdlg_tab_select().
Callback for the deselect button.
Definition at line 925 of file unitselect.c.
Referenced by usdlg_tab_select().
Main function for the callbacks.
Definition at line 933 of file unitselect.c.
Referenced by usdlg_cmd_deselect(), usdlg_cmd_ready(), usdlg_cmd_select(), and usdlg_cmd_sentry().
Update one unit (select/deselect/ready/sentry).
Definition at line 1044 of file unitselect.c.
Referenced by usdlg_cmd_exec().
Callback for the focus button.
Definition at line 1122 of file unitselect.c.
Referenced by usdlg_tab_select().
|
static |
Focus to the currently selected unit.
Definition at line 1146 of file unitselect.c.
Referenced by usdlg_cmd_focus(), and usdlg_cmd_row_activated().
Callback for the ready button.
Definition at line 901 of file unitselect.c.
Referenced by usdlg_tab_select().
|
static |
Callback if a row is activated.
Definition at line 1137 of file unitselect.c.
Referenced by usdlg_tab_select().
Callback for the select button.
Definition at line 917 of file unitselect.c.
Referenced by usdlg_tab_select().
Callback for the sentry button.
Definition at line 909 of file unitselect.c.
Referenced by usdlg_tab_select().
|
static |
Create a new unit selection dialog.
Definition at line 241 of file unitselect.c.
Referenced by usdlg_get().
Destroy a unit selection dialog.
Definition at line 293 of file unitselect.c.
Referenced by unit_select_dialog_popdown(), usdlg_cmd_focus_real(), and usdlg_destroy_callback().
Callback for the destruction of the dialog.
Definition at line 305 of file unitselect.c.
Referenced by usdlg_create().
|
static |
Get the current unit selection dialog. Create it if needed and 'create' is TRUE.
Definition at line 223 of file unitselect.c.
Referenced by unit_select_dialog_popup_main(), usdlg_cmd_center(), usdlg_cmd_cursor_changed(), usdlg_cmd_exec(), and usdlg_cmd_focus().
Get an unit selection list item suitable description of the specified unit.
Definition at line 786 of file unitselect.c.
Referenced by select_tgt_unit(), and usdlg_tab_append_units().
Get an unit selection list item suitable image of the specified unit.
Caller is responsible for getting rid of the returned image after use.
Definition at line 765 of file unitselect.c.
Referenced by select_tgt_unit(), and usdlg_tab_append_units().
|
static |
Refresh the dialog.
Definition at line 338 of file unitselect.c.
Referenced by unit_select_dialog_popup_main(), and usdlg_cmd_exec().
|
static |
Append the unit activity.
Definition at line 727 of file unitselect.c.
Referenced by usdlg_tab_update().
|
static |
Append units (recursively).
Definition at line 828 of file unitselect.c.
Referenced by usdlg_tab_append_units(), and usdlg_tab_update().
|
static |
Append the data for one unit type.
Definition at line 678 of file unitselect.c.
Referenced by usdlg_tab_update().
|
static |
+-----------------------------—+ | +--------------—+-------—+ | | | (unit list) | select | |
deselect | |||
---|---|---|---|
center | |||
focus |
| +--------------—+-------—+ | | | tabs | ... | | | close | +-----------------------------—+
Definition at line 387 of file unitselect.c.
Referenced by usdlg_create().
|
static |
Create a player dialog store.
Definition at line 540 of file unitselect.c.
Referenced by usdlg_tab_select().
|
static |
Update on tab of the dialog.
Definition at line 568 of file unitselect.c.
Referenced by usdlg_refresh().
Set the reference tile.
Definition at line 313 of file unitselect.c.
Referenced by unit_select_dialog_popup_main().
|
static |
Definition at line 141 of file unitselect.c.
Referenced by usdlg_destroy(), and usdlg_get().
|
static |
Definition at line 94 of file unitselect.c.
Referenced by usdlg_tab_select().
enum usdlg_column_types usdlg_col_types[USDLG_COLUMNS_ALL] |
Definition at line 81 of file unitselect.c.
Referenced by usdlg_tab_select(), and usdlg_tab_store_new().