# airport_gui.cpp File Reference

The GUI for airports. More...

`#include "stdafx.h"`
`#include "window_gui.h"`
`#include "station_gui.h"`
`#include "terraform_gui.h"`
`#include "airport.h"`
`#include "sound_func.h"`
`#include "window_func.h"`
`#include "strings_func.h"`
`#include "settings_type.h"`
`#include "viewport_func.h"`
`#include "gfx_func.h"`
`#include "company_func.h"`
`#include "station_type.h"`
`#include "tilehighlight_func.h"`
`#include "company_base.h"`
`#include "table/sprites.h"`
`#include "table/strings.h"`

Go to the source code of this file.

## Data Structures
struct | BuildAirToolbarWindow
class | AirportPickerWindow
## Typedefs
typedef void | OnButtonClick (Window *w)
## Enumerations
enum | { ATW_AIRPORT = 3, ATW_DEMOLISH = 4 }
## Functions
static void | ShowBuildAirportPicker (Window *parent)
void | CcBuildAirport (bool success, TileIndex tile, uint32 p1, uint32 p2)
static void | PlaceAirport (TileIndex tile)
static void | BuildAirClick_Airport (Window *w)
static void | BuildAirClick_Demolish (Window *w)
void | ShowBuildAirToolbar ()
void | InitializeAirportGui ()
## Variables
static byte | _selected_airport_type
static OnButtonClick *const | _build_air_button_proc []
static const Widget | _air_toolbar_widgets []
static const WindowDesc | _air_toolbar_desc (WDP_ALIGN_TBR, 22, 64, 36, 64, 36, WC_BUILD_TOOLBAR, WC_NONE, WDF_STD_TOOLTIPS|WDF_STD_BTN|WDF_DEF_WIDGET|WDF_STICKY_BUTTON|WDF_CONSTRUCTION, _air_toolbar_widgets)
static const Widget | _build_airport_picker_widgets []
static const WindowDesc | _build_airport_desc (WDP_AUTO, WDP_AUTO, 148, 240, 148, 240, WC_BUILD_STATION, WC_BUILD_TOOLBAR, WDF_STD_TOOLTIPS|WDF_STD_BTN|WDF_DEF_WIDGET|WDF_CONSTRUCTION, _build_airport_picker_widgets)

## Detailed Description

The GUI for airports.

Definition in file airport_gui.cpp.

## Variable Documentation

const Widget _air_toolbar_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,   COLOUR_DARK_GREEN,     0,    10,     0,    13, STR_00C5,            STR_018B_CLOSE_WINDOW },
    {    WWT_CAPTION,   RESIZE_NONE,   COLOUR_DARK_GREEN,    11,    51,     0,    13, STR_A000_AIRPORTS,   STR_018C_WINDOW_TITLE_DRAG_THIS },
    {  WWT_STICKYBOX,   RESIZE_NONE,   COLOUR_DARK_GREEN,    52,    63,     0,    13, 0x0,                 STR_STICKY_BUTTON },
    {     WWT_IMGBTN,   RESIZE_NONE,   COLOUR_DARK_GREEN,     0,    41,    14,    35, SPR_IMG_AIRPORT,     STR_A01E_BUILD_AIRPORT },
    {     WWT_IMGBTN,   RESIZE_NONE,   COLOUR_DARK_GREEN,    42,    63,    14,    35, SPR_IMG_DYNAMITE,    STR_018D_DEMOLISH_BUILDINGS_ETC },
    {   WIDGETS_END},
    }

Definition at line 131 of file airport_gui.cpp.

OnButtonClick* const _build_air_button_proc[]`[static]`

Initial value:

     {
      BuildAirClick_Airport,
      BuildAirClick_Demolish,
    }

Definition at line 65 of file airport_gui.cpp.

const Widget _build_airport_picker_widgets[]`[static]`

Initial value:

     {
    {   WWT_CLOSEBOX,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,    10,     0,    13, STR_00C5,                         STR_018B_CLOSE_WINDOW},
    {    WWT_CAPTION,   RESIZE_NONE,   COLOUR_DARK_GREEN,  11,   147,     0,    13, STR_3001_AIRPORT_SELECTION,       STR_018C_WINDOW_TITLE_DRAG_THIS},
    {      WWT_PANEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,    14,    52, 0x0,                              STR_NULL},
    {      WWT_LABEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,    14,    27, STR_SMALL_AIRPORTS,               STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,    53,    89, 0x0,                              STR_NULL},
    {      WWT_LABEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,    52,    65, STR_LARGE_AIRPORTS,               STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,    90,   127, 0x0,                              STR_NULL},
    {      WWT_LABEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,    90,   103, STR_HUB_AIRPORTS,                 STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,   128,   177, 0x0,                              STR_NULL},
    {      WWT_LABEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,   128,   141, STR_HELIPORTS,                    STR_NULL},
    {      WWT_PANEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,   178,   239, 0x0,                              STR_NULL},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,    27,    38, STR_SMALL_AIRPORT,                STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,    65,    76, STR_CITY_AIRPORT,                 STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,   141,   152, STR_HELIPORT,                     STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,    77,    88, STR_METRO_AIRPORT ,               STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,   103,   114, STR_INTERNATIONAL_AIRPORT,        STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,    39,    50, STR_COMMUTER_AIRPORT,             STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,   165,   176, STR_HELIDEPOT,                    STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,   115,   126, STR_INTERCONTINENTAL_AIRPORT,     STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,         2,   145,   153,   164, STR_HELISTATION,                  STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,        14,    73,   191,   202, STR_02DB_OFF,                     STR_3065_DON_T_HIGHLIGHT_COVERAGE},
    {    WWT_TEXTBTN,   RESIZE_NONE,   COLOUR_GREY,        74,   133,   191,   202, STR_02DA_ON,                      STR_3064_HIGHLIGHT_COVERAGE_AREA},
    {      WWT_LABEL,   RESIZE_NONE,   COLOUR_DARK_GREEN,   0,   147,   178,   191, STR_3066_COVERAGE_AREA_HIGHLIGHT, STR_NULL},
    {   WIDGETS_END},
    }

Definition at line 275 of file airport_gui.cpp.