Freeciv-3.3
|
#include <gtk/gtk.h>
#include "fcintl.h"
#include "support.h"
#include "combat.h"
#include "game.h"
#include "map.h"
#include "player.h"
#include "unit.h"
#include "overview_common.h"
#include "client_main.h"
#include "climap.h"
#include "climisc.h"
#include "control.h"
#include "editor.h"
#include "tilespec.h"
#include "text.h"
#include "zoom.h"
#include "cma_core.h"
#include "chatline.h"
#include "citydlg.h"
#include "colors.h"
#include "dialogs.h"
#include "editgui.h"
#include "graphics.h"
#include "gui_main.h"
#include "infradlg.h"
#include "inputdlg.h"
#include "mapview.h"
#include "menu.h"
#include "rallypointdlg.h"
#include "mapctrl.h"
Go to the source code of this file.
Data Structures | |
struct | tmousepos |
Variables | |
gint | cur_x |
gint | cur_y |
gboolean butt_down_mapcanvas | ( | GtkWidget * | w, |
GdkEventButton * | ev, | ||
gpointer | data | ||
) |
Handle all mouse button press on canvas. Future feature: User-configurable mouse clicks.
Definition at line 242 of file mapctrl.c.
Referenced by setup_widgets().
gboolean butt_down_overviewcanvas | ( | GtkWidget * | w, |
GdkEventButton * | ev, | ||
gpointer | data | ||
) |
gboolean butt_release_mapcanvas | ( | GtkWidget * | w, |
GdkEventButton * | ev, | ||
gpointer | data | ||
) |
Handle 'Mouse button released'. Because of the quickselect feature, the release of both left and right mousebutton can launch the goto.
Definition at line 221 of file mapctrl.c.
Referenced by setup_widgets().
Best effort to center the map on the currently selected unit(s)
Definition at line 496 of file mapctrl.c.
Referenced by center_view_callback(), and center_view_callback().
Update goto line so that destination is at current mouse pointer location.
Definition at line 355 of file mapctrl.c.
Referenced by base_set_mapview_origin(), request_unit_connect(), request_unit_goto(), request_unit_patrol(), and mr_menu::slot_delayed_goto().
gboolean leave_mapcanvas | ( | GtkWidget * | widget, |
GdkEventCrossing * | event | ||
) |
This function will reset the mouse cursor if it leaves the map.
Definition at line 435 of file mapctrl.c.
Referenced by setup_widgets().
gboolean move_mapcanvas | ( | GtkWidget * | w, |
GdkEventMotion * | ev, | ||
gpointer | data | ||
) |
Triggered by the mouse moving on the mapcanvas, this function will update the mouse cursor and goto lines.
Definition at line 406 of file mapctrl.c.
Referenced by setup_widgets().
gboolean move_overviewcanvas | ( | GtkWidget * | w, |
GdkEventMotion * | ev, | ||
gpointer | data | ||
) |
|
static |
Callback from city name dialog for new city.
Definition at line 176 of file mapctrl.c.
Referenced by popup_newcity_dialog().
|
static |
Popup a label with information about the tile, unit, city, when the user used the middle mouse button on the map.
Definition at line 121 of file mapctrl.c.
Referenced by butt_down_mapcanvas(), left_butt_down_mapcanvas(), and middle_butt_down_mapcanvas().
|
static |
Popup dialog where the user choose the name of the new city punit = (settler) unit which builds the city suggestname = suggestion of the new city's name
Definition at line 197 of file mapctrl.c.
Referenced by handle_city_name_suggestion_info().
|
static |
Put the popup on a smart position, after the real size of the widget is known: left of the cursor if within the right half of the map, and vice versa; displace the popup so as not to obscure it by the mouse cursor; stay always within the map if possible.
Definition at line 83 of file mapctrl.c.
Referenced by popit().
Enable or disable the turn done button. Should probably some where else.
Definition at line 210 of file mapctrl.c.
Referenced by update_turn_done_button_state().
The Area Selection rectangle. Called by center_tile_mapcanvas() and when the mouse pointer moves.
Definition at line 380 of file mapctrl.c.
Referenced by base_set_mapview_origin().
|
extern |
Definition at line 185 of file gui_main.c.
Referenced by move_mapcanvas(), and move_mapcanvas().
gint cur_y |
Definition at line 63 of file mapctrl.c.
Referenced by move_mapcanvas(), and move_mapcanvas().