1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) James Liggett 2009 <jrliggett@cox.net>
6 * git-shell-test is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * git-shell-test is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _ANJUTA_COMMAND_BAR_H_
21 #define _ANJUTA_COMMAND_BAR_H_
23 #include <glib-object.h>
25 #include <glib/gi18n.h>
29 #define ANJUTA_TYPE_COMMAND_BAR (anjuta_command_bar_get_type ())
30 #define ANJUTA_COMMAND_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ANJUTA_TYPE_COMMAND_BAR, AnjutaCommandBar))
31 #define ANJUTA_COMMAND_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ANJUTA_TYPE_COMMAND_BAR, AnjutaCommandBarClass))
32 #define ANJUTA_IS_COMMAND_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ANJUTA_TYPE_COMMAND_BAR))
33 #define ANJUTA_IS_COMMAND_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ANJUTA_TYPE_COMMAND_BAR))
34 #define ANJUTA_COMMAND_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ANJUTA_TYPE_COMMAND_BAR, AnjutaCommandBarClass))
36 typedef struct _AnjutaCommandBarClass AnjutaCommandBarClass
;
37 typedef struct _AnjutaCommandBar AnjutaCommandBar
;
38 typedef struct _AnjutaCommandBarPriv AnjutaCommandBarPriv
;
41 * AnjutaCommandBarEntryType:
42 * @ANJUTA_COMMAND_BAR_ENTRY_FRAME: This entry should create a frame in the
43 * action bar. The entry's action name and
44 * callback are ignored.
45 * @ANJUTA_COMMAND_BAR_ENTRY_BUTTON: This entry adds a button to the action bar,
46 * either to the last frame to appear in the
47 * entry list before this entry, or to the top
48 * of the bar if no frames were previously
51 * Specifies if the entry corresponds to a frame or a button.
52 * Buttons are added to the last frame that appears before the button entry
56 ANJUTA_COMMAND_BAR_ENTRY_FRAME
,
57 ANJUTA_COMMAND_BAR_ENTRY_BUTTON
58 } AnjutaCommandBarEntryType
;
61 * AnjutaCommandBarEntry:
62 * @type: The type of action
63 * @action_name: The name of the action for this entry
64 * @label: The display label for this entry
65 * @stock_icon: The stock icon to display for this entry
66 * @callback: Function to call when this entry's action is activated
68 * AnjutaCommandBarEntry is used to add a set of frames and actions to a command
73 AnjutaCommandBarEntryType type
;
74 const gchar
*action_name
;
77 const gchar
*stock_icon
;
79 } AnjutaCommandBarEntry
;
81 struct _AnjutaCommandBarClass
83 GtkNotebookClass parent_class
;
86 struct _AnjutaCommandBar
88 GtkNotebook parent_instance
;
90 AnjutaCommandBarPriv
*priv
;
93 GType
anjuta_command_bar_get_type (void) G_GNUC_CONST
;
94 GtkWidget
*anjuta_command_bar_new (void);
95 void anjuta_command_bar_add_action_group (AnjutaCommandBar
*self
,
96 const gchar
*group_name
,
97 const AnjutaCommandBarEntry
*entries
,
100 void anjuta_command_bar_remove_action_group (AnjutaCommandBar
*self
,
101 const gchar
*group_name
);
102 void anjuta_command_bar_show_action_group (AnjutaCommandBar
*self
,
103 const gchar
*group_name
);
104 GtkActionGroup
*anjuta_command_bar_get_action_group (AnjutaCommandBar
*self
,
105 const gchar
*group_name
);
106 GtkAction
*anjuta_command_bar_get_action (AnjutaCommandBar
*self
,
107 const gchar
*group_name
,
108 const gchar
*action_name
);
112 #endif /* _ANJUTA_COMMAND_BAR_H_ */