pavi  0.0
Map Path Viewer
callbacks.bas File Reference

Source for callbacks. More...

#include "Gir/OsmGpsMap-1.0.bi"
#include "track_store.bi"
#include "track_layer.bi"
#include "gui.bi"
#include "debug.bi"
Include dependency graph for callbacks.bas:

Go to the source code of this file.

Macros

#define GENERAL_KEYS()
 
#define BLANK_KEYS()
 
#define SHIFT_CONTROL_KEYS()
 
#define CONTROL_KEYS()
 
#define ALT_KEYS()
 

Functions

SUB_CDECL_ALIAS on_TrackEnable_toggled (BYVAL_AS_GtkCellRendererToggle_PTR Cell, BYVAL_AS_gchar_PTR Path, BYVAL_AS_gpointer UDat)
 Callback handling the enable button in the track view. More...
 
SUB_CDECL_ALIAS on_TrackSel_clicked (BYVAL_AS_GtkCellRendererToggle_PTR Cell, BYVAL_AS_gchar_PTR Path, BYVAL_AS_gpointer UDat)
 Callback handling the track selection. More...
 
SUB_CDECL_ALIAS on_Load_clicked (BYVAL_AS_GtkButton_PTR Butt, BYVAL_AS_gpointer UDat)
 Call back handling the load action. More...
 
SUB_CDECL_ALIAS on_Map_selected (BYVAL_AS_GtkTreeView_PTR Tree, BYVAL_AS_GtkTreePath_PTR Path, BYVAL_AS_GtkTreeViewColumn_PTR Clmn, BYVAL_AS_gpointer UDat)
 Callback fetching a new map source selection. More...
 
SUB_CDECL_ALIAS on_Poov_limit_size (BYVAL_AS_GtkContainer_PTR Cont, BYVAL_AS_gpointer UDat)
 FIXME. More...
 
SUB_CDECL_ALIAS on_Layer_toggled (BYVAL_AS_GtkToggleButton_PTR Butt, BYVAL_AS_gpointer UDat)
 Callback fetching the layer state. More...
 
FUNCTION_CDECL_ALIAS_AS_gboolean on_WIN_state (BYVAL_AS_GtkWidget_PTR Wid, BYVAL_AS_GdkEventWindowState_PTR Event, BYVAL_AS_gpointer Ud)
 Callback fetching state changes. More...
 
FUNCTION_CDECL_ALIAS_AS_gboolean on_Map_keypress (BYVAL_AS_GtkWidget_PTR Wid, BYVAL_AS_GdkEventKey_PTR Event, BYVAL_AS_gpointer UDat)
 

Detailed Description

Source for callbacks.

The callbacks in this source file handle user actions on the grafical user interface (mouse and keyboard).

Since
0.0

Definition in file callbacks.bas.

Macro Definition Documentation

◆ GENERAL_KEYS

#define GENERAL_KEYS ( )
Value:
/* (multi line FreeBASIC #MACRO)
_0_GENERAL:
WITH *GUI
SELECT CASE Event->keyval
CASE GDK_KEY_Plus, GDK_KEY_asterisk, GDK_KEY_KP_Add
osm_gps_map_zoom_in(OSM_GPS_MAP(GUI->MAP)) : RETURN TRUE
CASE GDK_KEY_minus, GDK_KEY_underscore, GDK_KEY_KP_Subtract
osm_gps_map_zoom_out(OSM_GPS_MAP(GUI->MAP)) : RETURN TRUE
CASE GDK_KEY_l, GDK_KEY_L_
VAR tb = GTK_TOGGLE_BUTTON(.TBL)
gtk_toggle_button_set_active(tb, _
IIF(gtk_toggle_button_get_active(tb), FALSE, TRUE)) : RETURN TRUE
END SELECT
END WITH
#ENDMACRO */

Definition at line 195 of file callbacks.bas.

◆ BLANK_KEYS

#define BLANK_KEYS ( )

Definition at line 196 of file callbacks.bas.

◆ SHIFT_CONTROL_KEYS

#define SHIFT_CONTROL_KEYS ( )

Definition at line 197 of file callbacks.bas.

◆ CONTROL_KEYS

#define CONTROL_KEYS ( )
Value:
/* (multi line FreeBASIC #MACRO)
_1_CONTROL:
WITH *GUI
SELECT CASE AS CONST Event->keyval
CASE GDK_KEY_0 : PAR->Map_store(0) : RETURN TRUE
CASE GDK_KEY_1 : PAR->Map_store(1) : RETURN TRUE
CASE GDK_KEY_2 : PAR->Map_store(2) : RETURN TRUE
CASE GDK_KEY_3 : PAR->Map_store(3) : RETURN TRUE
CASE GDK_KEY_4 : PAR->Map_store(4) : RETURN TRUE
CASE GDK_KEY_5 : PAR->Map_store(5) : RETURN TRUE
CASE GDK_KEY_6 : PAR->Map_store(6) : RETURN TRUE
CASE GDK_KEY_7 : PAR->Map_store(7) : RETURN TRUE
CASE GDK_KEY_8 : PAR->Map_store(8) : RETURN TRUE
CASE GDK_KEY_9 : PAR->Map_store(9) : RETURN TRUE
CASE GDK_KEY_o : on_Load_clicked(NULL, NULL) : RETURN TRUE
'CASE GDK_KEY_p : '!! print / pref
'CASE GDK_KEY_s : '!! save
CASE GDK_KEY_q : g_application_quit(G_APPLICATION(.APP))
CASE GDK_KEY_space : DIM AS TS_bbox x = (TRUE) : RETURN TRUE
END SELECT
END WITH
#ENDMACRO */

Definition at line 198 of file callbacks.bas.

◆ ALT_KEYS

#define ALT_KEYS ( )
Value:
/* (multi line FreeBASIC #MACRO)
_1_ALTERNATE:
WITH *GUI
SELECT CASE AS CONST Event->keyval
CASE GDK_KEY_o : on_Load_clicked(NULL, NULL) : return TRUE
CASE GDK_KEY_q : g_application_quit(G_APPLICATION(.APP)) ': return TRUE
END SELECT
END WITH
#ENDMACRO */

Definition at line 199 of file callbacks.bas.

Function Documentation

◆ on_TrackEnable_toggled()

SUB_CDECL_ALIAS on_TrackEnable_toggled ( BYVAL_AS_GtkCellRendererToggle_PTR  Cell,
BYVAL_AS_gchar_PTR  Path,
BYVAL_AS_gpointer  UDat 
)

Callback handling the enable button in the track view.

Parameters
CellCell renderer emitting the signal
PathPath (row) in tree store
UDatTree store to manipulate

FIXME

Since
0.0

Definition at line 26 of file callbacks.bas.

◆ on_TrackSel_clicked()

SUB_CDECL_ALIAS on_TrackSel_clicked ( BYVAL_AS_GtkCellRendererToggle_PTR  Cell,
BYVAL_AS_gchar_PTR  Path,
BYVAL_AS_gpointer  UDat 
)

Callback handling the track selection.

Parameters
CellFIXME
PathFIXME
UDatFIXME

FIXME

Since
0.0

Definition at line 48 of file callbacks.bas.

Here is the call graph for this function:

◆ on_Load_clicked()

SUB_CDECL_ALIAS on_Load_clicked ( BYVAL_AS_GtkButton_PTR  Butt,
BYVAL_AS_gpointer  UDat 
)

Call back handling the load action.

Parameters
ButtButton emitting the signal
UDatUnused

SUB handling track loading when user clicks on load button. It opens the file load dialog and loads the file[s] selected by the user.

Since
0.0

Definition at line 66 of file callbacks.bas.

Here is the call graph for this function:

◆ on_Map_selected()

SUB_CDECL_ALIAS on_Map_selected ( BYVAL_AS_GtkTreeView_PTR  Tree,
BYVAL_AS_GtkTreePath_PTR  Path,
BYVAL_AS_GtkTreeViewColumn_PTR  Clmn,
BYVAL_AS_gpointer  UDat 
)

Callback fetching a new map source selection.

Parameters
TreeTree view emitting the signal
PathPath (row) of new selection
ClmnColumn (unused)
UDatPopover widget to close

FIXME

Since
0.0

Definition at line 99 of file callbacks.bas.

◆ on_Poov_limit_size()

SUB_CDECL_ALIAS on_Poov_limit_size ( BYVAL_AS_GtkContainer_PTR  Cont,
BYVAL_AS_gpointer  UDat 
)

FIXME.

Parameters
ContContainer emitting the signal
UDatFIXME

FIXME

Since
0.0

Definition at line 129 of file callbacks.bas.

◆ on_Layer_toggled()

SUB_CDECL_ALIAS on_Layer_toggled ( BYVAL_AS_GtkToggleButton_PTR  Butt,
BYVAL_AS_gpointer  UDat 
)

Callback fetching the layer state.

Parameters
ButtButton emiting the signal
UDatUnused

SUB handling the map layer. The original OsmGpsMapLayer gets added or removed from the map widget. And the internal coordinates display get a note by setting the PARdata.LayOn flag.

Since
0.0

Definition at line 158 of file callbacks.bas.

◆ on_WIN_state()

FUNCTION_CDECL_ALIAS_AS_gboolean on_WIN_state ( BYVAL_AS_GtkWidget_PTR  Wid,
BYVAL_AS_GdkEventWindowState_PTR  Event,
BYVAL_AS_gpointer  Ud 
)

Callback fetching state changes.

Parameters
WidWidget (WinMain)
EventEvent window state
UdUser data
Returns
FALSE to continue event handling

Function to monitor the state of the main window, in order to fetch the full screen property.

Since
0.0

Definition at line 185 of file callbacks.bas.

◆ on_Map_keypress()

FUNCTION_CDECL_ALIAS_AS_gboolean on_Map_keypress ( BYVAL_AS_GtkWidget_PTR  Wid,
BYVAL_AS_GdkEventKey_PTR  Event,
BYVAL_AS_gpointer  UDat 
)

Definition at line 201 of file callbacks.bas.