|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
|
|
|
/* $Id: wnd_routing.c,v 1.3 2013/06/20 21:28:04 steffen Exp $ */
|
|
|
|
/***************************************************************************
|
|
|
|
/***************************************************************************
|
|
|
|
* wnd_routing.c
|
|
|
|
* wnd_routing.c
|
|
|
|
*
|
|
|
|
*
|
|
|
|
@ -27,11 +28,85 @@
|
|
|
|
#include "system.h"
|
|
|
|
#include "system.h"
|
|
|
|
|
|
|
|
|
|
|
|
static GUIWindow wrouting = {0};
|
|
|
|
static GUIWindow wrouting = {0};
|
|
|
|
|
|
|
|
GUIItem *wr_label[5] = { NULL };
|
|
|
|
|
|
|
|
GUIItem *wr_entrytxt = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_entrylon = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_entrylat = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_labellon = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_labellat = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_labeldest = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_btnfav = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_btnsearch = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_btnnavigate = NULL;
|
|
|
|
|
|
|
|
GUIItem *wr_btnclose = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wnd_routing_search ();
|
|
|
|
|
|
|
|
void wnd_routing_navigate ();
|
|
|
|
|
|
|
|
void wnd_routing_close ();
|
|
|
|
|
|
|
|
void wnd_routing_fav ();
|
|
|
|
|
|
|
|
|
|
|
|
void wnd_routing_show () {
|
|
|
|
void wnd_routing_show () {
|
|
|
|
if (wrouting.screen == NULL) gui_window_new (&wrouting, 220, 260, _("Routing.."));
|
|
|
|
char text[128];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wrouting.screen == NULL) gui_window_new (&wrouting, 220, 130, NULL);
|
|
|
|
wrouting.screen_changed = 1;
|
|
|
|
wrouting.screen_changed = 1;
|
|
|
|
wrouting.style = WGUI_S_VCENTER | WGUI_S_HCENTER;
|
|
|
|
wrouting.style = WGUI_S_VCENTER | WGUI_S_HCENTER;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_label[0] == NULL) wr_label[0] = gui_label_new (_("destination:"), 5, 5);
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_label[0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_entrytxt == NULL) wr_entrytxt = gui_entry_new ("", 80, 5, 100, 20);
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_entrytxt);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_btnsearch == NULL) wr_btnsearch = gui_button_new (_("Search"), 25, 55, 70, 20);
|
|
|
|
|
|
|
|
GUI_BUTTON_T(wr_btnsearch)->callback_clicked = wnd_routing_search;
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_btnsearch);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_btnfav == NULL) wr_btnfav = gui_button_new (_("Favorites"), 100, 55, 70, 20);
|
|
|
|
|
|
|
|
GUI_BUTTON_T(wr_btnfav)->callback_clicked = wnd_routing_fav;
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_btnfav);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_label[1] == NULL) wr_label[1] = gui_label_new (_("lon:"), 5, 30);
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_label[1]);
|
|
|
|
|
|
|
|
if (wr_entrylon == NULL) {
|
|
|
|
|
|
|
|
sprintf (text, "%9.6f", view_lon);
|
|
|
|
|
|
|
|
wr_entrylon = gui_entry_new (text, 30, 30, 75, 20);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_entrylon);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_label[2] == NULL) wr_label[2] = gui_label_new (_("lat:"), 110, 30);
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_label[2]);
|
|
|
|
|
|
|
|
if (wr_entrylat == NULL) {
|
|
|
|
|
|
|
|
sprintf (text, "%9.6f", view_lat);
|
|
|
|
|
|
|
|
wr_entrylat = gui_entry_new (text, 135, 30, 75, 20);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_entrylat);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_btnnavigate == NULL) wr_btnnavigate = gui_button_new (_("Navigate"), 60, 105, 75, 20);
|
|
|
|
|
|
|
|
GUI_BUTTON_T(wr_btnnavigate)->callback_clicked = wnd_routing_navigate;
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_btnnavigate);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (wr_btnclose == NULL) wr_btnclose = gui_button_new (_("Close"), 140, 105, 75, 20);
|
|
|
|
|
|
|
|
GUI_BUTTON_T(wr_btnclose)->callback_clicked = wnd_routing_close;
|
|
|
|
|
|
|
|
gui_window_item_add (&wrouting, wr_btnclose);
|
|
|
|
|
|
|
|
|
|
|
|
gui_show (&wrouting);
|
|
|
|
gui_show (&wrouting);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wnd_routing_fav () {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wnd_routing_search () {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wnd_routing_navigate () {
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void wnd_routing_close () {
|
|
|
|
|
|
|
|
gui_close ();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|