Freeciv-3.2: /fast/freeciv/nightly/S3_2/client/gui-gtk-4.0/mapctrl.h File Reference

Freeciv-3.2

Loading...
Searching...
No Matches
Functions
mapctrl.h File Reference
`#include <gtk/gtk.h>`
`#include "fc_types.h"`
`#include "mapctrl_g.h"`

Go to the source code of this file.

## Functions

gboolean | left_butt_up_mapcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | right_butt_up_mapcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | left_butt_down_mapcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | right_butt_down_mapcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | middle_butt_down_mapcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | left_butt_down_overviewcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | right_butt_down_overviewcanvas (GtkGestureClick *gesture, int n_press, double x, double y, gpointer data)
gboolean | move_mapcanvas (GtkEventControllerMotion *controller, gdouble x, gdouble y, gpointer data)
gboolean | leave_mapcanvas (GtkEventControllerMotion *controller, gpointer data)
gboolean | move_overviewcanvas (GtkEventControllerMotion *controller, gdouble x, gdouble y, gpointer data)
void | center_on_unit (void)
void | popupinfo_popdown_callback (GtkWidget *w, gpointer data)

## Function Documentation

## ◆ center_on_unit()

void center_on_unit | ( | void |  | ) |

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().

## ◆ leave_mapcanvas()

gboolean leave_mapcanvas | ( | GtkEventControllerMotion * | controller,
|  | gpointer | data
| ) |  |

This function will reset the mouse cursor if it leaves the map.

Definition at line 451 of file mapctrl.c.

## ◆ left_butt_down_mapcanvas()

gboolean left_butt_down_mapcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Handle all left mouse button presses on canvas. Future feature: User-configurable mouse clicks.

Definition at line 206 of file mapctrl.c.

Referenced by setup_widgets().

## ◆ left_butt_down_overviewcanvas()

gboolean left_butt_down_overviewcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Left button pressed at overview

Definition at line 474 of file mapctrl.c.

Referenced by setup_widgets().

## ◆ left_butt_up_mapcanvas()

gboolean left_butt_up_mapcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Handle 'Left mouse button released'. Because of the quickselect feature, the release of both left and right mousebutton can launch the goto.

Definition at line 164 of file mapctrl.c.

Referenced by setup_widgets().

## ◆ middle_butt_down_mapcanvas()

gboolean middle_butt_down_mapcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Handle all middle mouse button presses on canvas. Future feature: User-configurable mouse clicks.

Definition at line 330 of file mapctrl.c.

Referenced by setup_widgets().

## ◆ move_mapcanvas()

gboolean move_mapcanvas | ( | GtkEventControllerMotion * | controller,
|  | gdouble | x,
|  | gdouble | y,
|  | gpointer | data
| ) |  |

Triggered by the mouse moving on the mapcanvas, this function will update the mouse cursor and goto lines.

Definition at line 418 of file mapctrl.c.

## ◆ move_overviewcanvas()

gboolean move_overviewcanvas | ( | GtkEventControllerMotion * | controller,
|  | gdouble | x,
|  | gdouble | y,
|  | gpointer | data
| ) |  |

Overview canvas moved

Definition at line 463 of file mapctrl.c.

## ◆ popupinfo_popdown_callback()

void popupinfo_popdown_callback | ( | GtkWidget * | w,
|  | gpointer | data
| ) |  |

Information label destruction requested

Definition at line 167 of file mapctrl.c.

Referenced by popit(), and popit().

## ◆ right_butt_down_mapcanvas()

gboolean right_butt_down_mapcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Handle all right mouse button presses on canvas. Future feature: User-configurable mouse clicks.

Definition at line 261 of file mapctrl.c.

Referenced by setup_widgets().

## ◆ right_butt_down_overviewcanvas()

gboolean right_butt_down_overviewcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Right button pressed at overview

Definition at line 499 of file mapctrl.c.

Referenced by setup_widgets().

## ◆ right_butt_up_mapcanvas()

gboolean right_butt_up_mapcanvas | ( | GtkGestureClick * | gesture,
|  | int | n_press,
|  | double | x,
|  | double | y,
|  | gpointer | data
| ) |  |

Handle 'Right mouse button released'. Because of the quickselect feature, the release of both left and right mousebutton can launch the goto.

Definition at line 181 of file mapctrl.c.

Referenced by setup_widgets().