Freeciv21
Develop your civilization from humble roots to a global empire
mapctrl_common.h
Go to the documentation of this file.
1 /**************************************************************************
2  Copyright (c) 1996-2020 Freeciv21 and Freeciv contributors. This file is
3  part of Freeciv21. Freeciv21 is free software: you can redistribute it
4  and/or modify it under the terms of the GNU General Public License as
5  published by the Free Software Foundation, either version 3 of the
6  License, or (at your option) any later version. You should have received
7  a copy of the GNU General Public License along with Freeciv21. If not,
8  see https://www.gnu.org/licenses/.
9 **************************************************************************/
10 #pragma once
11 
12 // common
13 #include "map.h" // enum direction8
14 
15 // client
16 #include "control.h" // quickselect_type
17 
18 extern bool rectangle_active;
19 extern bool tiles_hilited_cities;
20 
22 extern bool keyboardless_goto_active;
23 extern struct tile *keyboardless_goto_start_tile;
24 
26 
27 void key_city_overlay(int canvas_x, int canvas_y);
28 
29 bool clipboard_copy_production(struct tile *ptile);
30 void clipboard_paste_production(struct city *pcity);
32 
33 void release_goto_button(int canvas_x, int canvas_y);
34 void maybe_activate_keyboardless_goto(int canvas_x, int canvas_y);
35 
37 bool can_end_turn();
38 void action_button_pressed(int canvas_x, int canvas_y,
39  enum quickselect_type qtype);
40 void wakeup_button_pressed(int canvas_x, int canvas_y);
41 void adjust_workers_button_pressed(int canvas_x, int canvas_y);
42 void recenter_button_pressed(int canvas_x, int canvas_y);
44 void update_line(int canvas_x, int canvas_y);
45 
46 extern struct city *city_workers_display;
quickselect_type
Definition: control.h:30
void update_line(int canvas_x, int canvas_y)
Update the goto/patrol line to the given map canvas location.
void maybe_activate_keyboardless_goto(int canvas_x, int canvas_y)
The goto hover state is only activated when the mouse pointer moves beyond the tile where the button ...
void adjust_workers_button_pressed(int canvas_x, int canvas_y)
Adjust the position of city workers from the mapview.
bool rectangle_active
void release_goto_button(int canvas_x, int canvas_y)
Goto button has been released.
bool get_turn_done_button_state()
Return TRUE iff the turn done button should be enabled.
bool tiles_hilited_cities
void recenter_button_pressed(int canvas_x, int canvas_y)
Recenter the map on the canvas location, on user request.
void update_turn_done_button_state()
Update the turn done button state.
void action_button_pressed(int canvas_x, int canvas_y, enum quickselect_type qtype)
Do some appropriate action when the "main" mouse button (usually left-click) is pressed.
void wakeup_button_pressed(int canvas_x, int canvas_y)
Wakeup sentried units on the tile of the specified location.
struct city * city_workers_display
bool keyboardless_goto_button_down
void key_city_overlay(int canvas_x, int canvas_y)
The user pressed the overlay-city button (t) while the mouse was at the given canvas position.
bool can_end_turn()
Return TRUE iff client can end turn.
void cancel_selection_rectangle()
Redraws the selection rectangle after a map flush.
void upgrade_canvas_clipboard()
A newer technology may be available for units.
bool keyboardless_goto_active
void clipboard_paste_production(struct city *pcity)
If City tiles are hilited, paste into all those cities.
bool clipboard_copy_production(struct tile *ptile)
Shift-Left-Click on owned city or any visible unit to copy.
struct tile * keyboardless_goto_start_tile
Definition: city.h:291
Definition: tile.h:42