]> git.street.me.uk Git - andy/viking.git/blame_incremental - src/toolbar.h
Fix mislabelled distance markers when using Nautical Miles.
[andy/viking.git] / src / toolbar.h
... / ...
CommitLineData
1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2/*
3 * toolbar.h - this file was part of Geany (v1.24.1), a fast and lightweight IDE
4 *
5 * Copyright 2009-2012 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
6 * Copyright 2009-2012 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
7 * Copyright 2014 Rob Norris <rw_norris@hotmail.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 */
23
24#ifndef VIKING_TOOLBAR_H
25#define VIKING_TOOLBAR_H 1
26
27#include <gtk/gtk.h>
28
29G_BEGIN_DECLS
30
31#define VIK_TOOLBAR_TYPE (vik_toolbar_get_type ())
32#define VIK_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIK_TOOLBAR_TYPE, VikToolbar))
33#define VIK_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIK_TOOLBAR_TYPE, VikToolbarClass))
34#define VIK_IS_TOOLBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIK_TOOLBAR_TYPE))
35#define VIK_IS_TOOLBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIK_TOOLBAR_TYPE))
36#define VIK_TOOLBAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIK_TOOLBAR_TYPE, VikToolbarClass))
37
38typedef struct _VikToolbarClass VikToolbarClass;
39typedef struct _VikToolbar VikToolbar;
40
41GType vik_toolbar_get_type ();
42
43VikToolbar *vik_toolbar_new (void);
44void vik_toolbar_finalize ( VikToolbar *vtb );
45
46GtkWidget *toolbar_get_widget_by_name(VikToolbar *vtb, const gchar *name);
47GtkAction *toolbar_get_action_by_name(VikToolbar *vtb, const gchar *name);
48
49void toolbar_action_tool_entry_register(VikToolbar *vtb, GtkRadioActionEntry *action);
50void toolbar_action_mode_entry_register(VikToolbar *vtb, GtkRadioActionEntry *action);
51void toolbar_action_toggle_entry_register(VikToolbar *vtb, GtkToggleActionEntry *action, gpointer callback);
52void toolbar_action_entry_register(VikToolbar *vtb, GtkActionEntry *action);
53
54void toolbar_action_set_sensitive (VikToolbar *vtb, const gchar *name, gboolean sensitive);
55
56typedef void (ToolCB) (GtkAction *, GtkAction *, gpointer); // gpointer is actually a VikWindow
57typedef void (ReloadCB) (GtkActionGroup *, gpointer); // gpointer is actually a VikWindow
58
59void toolbar_init(VikToolbar *vtb,
60 GtkWindow *parent,
61 GtkWidget *vbox,
62 GtkWidget *hbox,
63 ToolCB tool_cb,
64 ReloadCB reload_cb,
65 gpointer user_data);
66
67void toolbar_apply_settings(VikToolbar *vtb,
68 GtkWidget *vbox,
69 GtkWidget *hbox,
70 gboolean reset);
71
72GtkWidget* toolbar_get_widget(VikToolbar *vtb);
73
74void a_toolbar_init (void);
75
76void a_toolbar_uninit (void);
77
78G_END_DECLS
79
80#endif