Internal GUI/Menu configurations

From Navit's Wiki
< Internal GUI
Revision as of 18:34, 8 January 2011 by Korrosa (talk | contribs) (Started page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The menu used in the Internal GUI is defined by a html-like syntax inside the <gui>...</gui> tags within navit.xml. As a result, the menu offers a variety of configuration options to better suite the user.

Default Configuration

Below is the default menu configuration found in a freshly-installed version of navit.xml.

<![CDATA[
<html>
	<a name='Main Menu'><text>Main menu</text>
		<a href='#Actions'><img src='gui_actions'>Actions</img></a>
		<img cond='flags&2' src='gui_map' onclick='back_to_map()'><text>Show Map</text></img>
		<a href='#Settings'><img src='gui_settings'><text>Settings</text></img></a>
		<a href='#Tools'><img src='gui_tools'><text>Tools</text></img></a>
		<a href='#Route'><img src='gui_settings'><text>Route</text></img></a>
               	<img src='gui_about'  onclick='about()'><text>About</text></img>
	</a>
			
	<a name='Actions'><text>Actions</text>
		<img src='gui_bookmark' onclick='bookmarks()'><text>Bookmarks</text></img>
		<img cond='click_coord_geo' src='gui_map' onclick='position(click_coord_geo,_("Map Point"),8|16|32|64|256)'>
                <script>write(click_coord_geo)</script></img>
		<img cond='position_coord_geo' src='gui_vehicle' onclick='position(position_coord_geo,_("Vehicle Position"),8|32|64|128|256)'>
                <script>write(position_coord_geo)</script></img>
		<img src='gui_town' onclick='town()'><text>Town</text></img>
		<img src='gui_quit' onclick='quit()'><text>Quit</text></img>
		<img cond='navit.route.route_status&52' src='gui_stop' onclick='abort_navigation()'><text>Stop Navigation</text></img>
	</a>

	<a name='Settings'><text>Settings</text>
		<a href='#Settings Display'><img src='gui_display'><text>Display</text></img></a>
		<img src='gui_maps' onclick='setting_maps()'><text>Maps</text></img>
		<img src='gui_vehicle' onclick='setting_vehicle()'><text>Vehicle</text></img>
		<img src='gui_rules' onclick='setting_rules()'><text>Rules</text></img>
	</a>

	<a name='Settings Display'><text>Display</text>
		<img src='gui_display' onclick='setting_layout()'><text>Layout</text></img>
		<img cond='fullscreen==0' src='gui_fullscreen' onclick='fullscreen=1'><text>Fullscreen</text></img>
		<img cond='fullscreen==1' src='gui_leave_fullscreen' onclick='fullscreen=0'><text>Window Mode</text></img>
		<img cond='navit.pitch==0' src='gui_map' onclick='navit.pitch=pitch;redraw_map();back_to_map()'><text>3D</text></img>
		<img cond='navit.pitch!=0' src='gui_map' onclick='navit.pitch=0;redraw_map();back_to_map()'><text>2D</text></img>
	</a>

	<a name='Tools'><text>Tools</text>
		<img src='gui_actions' onclick='locale()'><text>Show Locale</text></img>
	</a>

	<a name='Route'><text>Route</text>
		<img src='gui_actions' onclick='route_description()'><text>Description</text></img>
		<img src='gui_actions' onclick='route_height_profile()'><text>Height Profile</text></img>
	</a>

</html>
]]>

WVGA Configuration 1

Features of this menu:

  • Main menu:
    • Actions
    • Settings
    • Route (if a route is active)
    • Quit
  • Actions submenu:
    • Bookmarks
    • Town selection
    • GPS position
    • Vehicle position
  • Settings submenu:
    • Fullscreen yes/no
    • Map Selection
    • 3D/2D
    • About
  • Route submenu:
    • Vehicle Selection
    • Route Description
    • Route Height Profile
    • Stop Navigation (if a route is active)
<![CDATA[
<html>
	<a name='Main Menu'><text>Main menu</text>
		<a href='#Actions'>   <img src='gui_actions'>                    <text>Actions</text></img></a>
		<a href='#Settings'>  <img src='gui_rules'>                      <text>Settings</text></img></a>
                                      <img src='gui_quit'    onclick='quit()'>   <text>Quit</text></img>
                <a cond='navit.route.route_status&52' href='#Route'>
                                      <img src='gui_vehicle'>                    <text>Route</text></img></a>
	</a>
            
	<a name='Actions'><text>Actions</text>
                <img src='gui_bookmark'                          onclick='bookmarks()'> <text>Bookmarks</text></img>
                <img src='gui_town'                              onclick='town()'>      <text>Town</text></img>
                <img cond='click_coord_geo'    src='gui_map'     onclick='position(click_coord_geo,_("Map Point"),8|32|48|128)'>            <script>write(click_coord_geo)</script> </img>
                <img cond='position_coord_geo' src='gui_vehicle' onclick='position(position_coord_geo,_("Vehicle Position"),8|32|48|128)'>  <script>write(position_coord_geo)</script> </img>
	</a>
            
	<a name='Settings'><text>Settings</text>
                <img cond='fullscreen==0'  src='gui_fullscreen'       onclick='fullscreen=1'>      <text>Fullscreen</text></img>
                <img cond='fullscreen==1'  src='gui_leave_fullscreen' onclick='fullscreen=0'>      <text>Window Mode</text></img>
                <img                       src='gui_maps'             onclick='setting_maps()'>    <text>Maps</text></img>
                
                <img cond='navit.pitch==0' src='gui_map'              onclick='navit.pitch=24;  redraw_map();back_to_map()'> <text>3D</text> </img>
                <img cond='navit.pitch!=0' src='gui_map'              onclick='navit.pitch=0;   redraw_map();back_to_map()'> <text>2D</text> </img>
                <img                       src='gui_about'            onclick='about()'>           <text>About</text></img>
	</a>

	<a name='Route'><text>Route</text>
                <img src='gui_vehicle_pedestrian'   onclick='setting_vehicle();back()'>          <text>Vehicle</text></img>
              
                <img src='gui_town'     onclick='route_description()'>                           <text>Description</text></img>
                <img src='gui_zoom_in'  onclick='route_height_profile()'>                        <text>Height Profile</text></img>
                <img src='gui_stop'     onclick='abort_navigation();redraw_map();back_to_map()'> <text>Stop Navigation</text></img>
	</a>
</html>
]]>