Freeciv-3.3
|
#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.
Definition at line 214 of file unitselect.c.
Popup the unit selection dialog.
Definition at line 193 of file unitselect.c.
Callback for the center button.
Definition at line 1094 of file unitselect.c.
|
static |
Callback if the row is changed.
Definition at line 1191 of file unitselect.c.
Callback for the deselect button.
Definition at line 936 of file unitselect.c.
Main function for the callbacks.
Definition at line 944 of file unitselect.c.
Update one unit (select/deselect/ready/sentry).
Definition at line 1055 of file unitselect.c.
Callback for the focus button.
Definition at line 1133 of file unitselect.c.
|
static |
Focus to the currently selected unit.
Definition at line 1157 of file unitselect.c.
Callback for the ready button.
Definition at line 912 of file unitselect.c.
|
static |
Callback if a row is activated.
Definition at line 1148 of file unitselect.c.
Callback for the select button.
Definition at line 928 of file unitselect.c.
Callback for the sentry button.
Definition at line 920 of file unitselect.c.
|
static |
Create a new unit selection dialog.
Definition at line 241 of file unitselect.c.
Destroy a unit selection dialog.
Definition at line 292 of file unitselect.c.
Callback for the destruction of the dialog.
Definition at line 304 of file unitselect.c.
|
static |
Get the current unit selection dialog. Create it if needed and 'create' is TRUE.
Definition at line 223 of file unitselect.c.
Get an unit selection list item suitable description of the specified unit.
Definition at line 797 of file unitselect.c.
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 776 of file unitselect.c.
|
static |
Refresh the dialog.
Definition at line 337 of file unitselect.c.
|
static |
Append the unit activity.
Definition at line 738 of file unitselect.c.
|
static |
Append units (recursively).
Definition at line 839 of file unitselect.c.
|
static |
Append the data for one unit type.
Definition at line 689 of file unitselect.c.
|
static |
+-----------------------------—+ | +--------------—+-------—+ | | | (unit list) | select | |
deselect | |||
---|---|---|---|
center | |||
focus |
| +--------------—+-------—+ | | | tabs | ... | | | close | +-----------------------------—+
Definition at line 387 of file unitselect.c.
|
static |
Create a player dialog store.
Definition at line 551 of file unitselect.c.
|
static |
Update on tab of the dialog.
Definition at line 579 of file unitselect.c.
Set the reference tile.
Definition at line 312 of file unitselect.c.
|
static |
Definition at line 141 of file unitselect.c.
|
static |
Definition at line 94 of file unitselect.c.
enum usdlg_column_types usdlg_col_types[USDLG_COLUMNS_ALL] |
Definition at line 81 of file unitselect.c.