]> git.street.me.uk Git - andy/viking.git/blame - src/toolbar.h
[DOC] Mention XML configuration can override internal defaults.
[andy/viking.git] / src / toolbar.h
CommitLineData
59bc9e85 1/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
50b4f4de 2/*
59bc9e85 3 * toolbar.h - this file was part of Geany (v1.24.1), a fast and lightweight IDE
50b4f4de
RN
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>
59bc9e85 7 * Copyright 2014 Rob Norris <rw_norris@hotmail.com>
50b4f4de
RN
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
59bc9e85
RN
24#ifndef VIKING_TOOLBAR_H
25#define VIKING_TOOLBAR_H 1
50b4f4de 26
59bc9e85 27#include <gtk/gtk.h>
50b4f4de 28
59bc9e85 29G_BEGIN_DECLS
50b4f4de 30
59bc9e85
RN
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))
50b4f4de 37
59bc9e85
RN
38typedef struct _VikToolbarClass VikToolbarClass;
39typedef struct _VikToolbar VikToolbar;
50b4f4de 40
59bc9e85 41GType vik_toolbar_get_type ();
50b4f4de 42
59bc9e85
RN
43VikToolbar *vik_toolbar_new (void);
44void vik_toolbar_finalize ( VikToolbar *vtb );
50b4f4de 45
59bc9e85
RN
46GtkWidget *toolbar_get_widget_by_name(VikToolbar *vtb, const gchar *name);
47GtkAction *toolbar_get_action_by_name(VikToolbar *vtb, const gchar *name);
50b4f4de 48
59bc9e85
RN
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);
50b4f4de 53
59bc9e85 54void toolbar_action_set_sensitive (VikToolbar *vtb, const gchar *name, gboolean sensitive);
50b4f4de 55
59bc9e85
RN
56typedef void (ToolCB) (GtkAction *, GtkAction *, gpointer); // gpointer is actually a VikWindow
57typedef void (ReloadCB) (GtkActionGroup *, gpointer); // gpointer is actually a VikWindow
50b4f4de 58
59bc9e85
RN
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);
50b4f4de 66
59bc9e85
RN
67void toolbar_apply_settings(VikToolbar *vtb,
68 GtkWidget *vbox,
69 GtkWidget *hbox,
70 gboolean reset);
50b4f4de 71
59bc9e85 72GtkWidget* toolbar_get_widget(VikToolbar *vtb);
50b4f4de 73
59bc9e85 74void a_toolbar_init (void);
50b4f4de 75
59bc9e85 76void a_toolbar_uninit (void);
50b4f4de
RN
77
78G_END_DECLS
79
80#endif