|
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.
Definition at line 207 of file unitselect.c.
Popup the unit selection dialog.
Definition at line 186 of file unitselect.c.
Callback for the center button.
Definition at line 1088 of file unitselect.c.
|
static |
Callback if the row is changed.
Definition at line 1189 of file unitselect.c.
Callback for the deselect button.
Definition at line 930 of file unitselect.c.
Main function for the callbacks.
Definition at line 938 of file unitselect.c.
Update one unit (select/deselect/ready/sentry).
Definition at line 1049 of file unitselect.c.
Callback for the focus button.
Definition at line 1127 of file unitselect.c.
|
static |
Focus to the currently selected unit.
Definition at line 1151 of file unitselect.c.
Callback for the ready button.
Definition at line 906 of file unitselect.c.
|
static |
Callback if a row is activated.
Definition at line 1142 of file unitselect.c.
Callback for the select button.
Definition at line 922 of file unitselect.c.
Callback for the sentry button.
Definition at line 914 of file unitselect.c.
|
static |
Create a new unit selection dialog.
Definition at line 234 of file unitselect.c.
Destroy a unit selection dialog.
Definition at line 285 of file unitselect.c.
Callback for the destruction of the dialog.
Definition at line 297 of file unitselect.c.
|
static |
Get the current unit selection dialog. Create it if needed and 'create' is TRUE.
Definition at line 216 of file unitselect.c.
Get an unit selection list item suitable description of the specified unit.
Definition at line 791 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 770 of file unitselect.c.
|
static |
Refresh the dialog.
Definition at line 330 of file unitselect.c.
|
static |
Append the unit activity.
Definition at line 732 of file unitselect.c.
|
static |
Append units (recursively).
Definition at line 833 of file unitselect.c.
|
static |
Append the data for one unit type.
Definition at line 683 of file unitselect.c.
|
static |
+-----------------------------—+ | +--------------—+-------—+ | | | (unit list) | select | |
| deselect | |||
|---|---|---|---|
| center | |||
| focus |
| +--------------—+-------—+ | | | tabs | ... | | | close | +-----------------------------—+
Definition at line 380 of file unitselect.c.
|
static |
Create a player dialog store.
Definition at line 545 of file unitselect.c.
|
static |
Update on tab of the dialog.
Definition at line 573 of file unitselect.c.
Set the reference tile.
Definition at line 305 of file unitselect.c.
|
static |
Definition at line 134 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.