GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnc-cell-renderer-popup-entry.h
1 /*************************************************************************
2  * The following code has come from Planner. This code implements a
3  * GtkCalendar in a custom GtkCellEditable popup from GtkCellRenderer.
4  *
5  * These files have been renamed and changed to remove code not required
6  * and to remove a dependency on libplanner.
7  *
8  * Copyright (C) 2012 Robert Fewell
9  *
10  * Copyright (C) 2001-2002 CodeFactory AB
11  * Copyright (C) 2001-2002 Richard Hult <[email protected]>
12  * Copyright (C) 2001-2002 Mikael Hallendal <[email protected]>
13  *
14  * This program is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU General Public License as
16  * published by the Free Software Foundation; either version 2 of the
17  * License, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * General Public License for more details.
23  *
24  * You should have received a copy of the GNU General Public
25  * License along with this program; if not, write to the
26  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
27  * Boston, MA 02111-1307, USA.
28  *************************************************************************/
29 
30 #ifndef __GNC_POPUP_ENTRY_H__
31 #define __GNC_POPUP_ENTRY_H__
32 
33 #include <pango/pango.h>
34 #include <gtk/gtkeventbox.h>
35 
36 #define GNC_TYPE_POPUP_ENTRY (gnc_popup_entry_get_type ())
37 #define GNC_POPUP_ENTRY(obj) (GTK_CHECK_CAST ((obj), GNC_TYPE_POPUP_ENTRY, GncPopupEntry))
38 #define GNC_POPUP_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GNC_TYPE_POPUP_ENTRY, GncPopupEntryClass))
39 #define GNC_IS_POPUP_ENTRY(obj) (GTK_CHECK_TYPE ((obj), GNC_TYPE_POPUP_ENTRY))
40 #define GNC_IS_POPUP_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GNC_TYPE_POPUP_ENTRY))
41 #define GNC_POPUP_ENTRY_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GNC_TYPE_POPUP_ENTRY, GncPopupEntryClass))
42 
43 typedef struct _GncPopupEntry GncPopupEntry;
45 
47 {
48  GtkEventBox parent;
49 
50  GtkWidget *hbox;
51  GtkWidget *button;
52  GtkWidget *entry;
53 
54  gboolean editing_canceled;
55 };
56 
58 {
59  GtkEventBoxClass parent_class;
60 };
61 
62 GtkType gnc_popup_entry_get_type (void) G_GNUC_CONST;
63 
64 GtkWidget *gnc_popup_entry_new (void);
65 
66 void gnc_popup_entry_set_text (GncPopupEntry *popup,
67  const gchar *text);
68 
69 const gchar *gnc_popup_entry_get_text (GncPopupEntry *popup);
70 
71 gint gnc_popup_get_button_width (void);
72 
73 
74 #endif /* __GNC_POPUP_ENTRY_H__ */