GnuCash  2.6.99
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gnucash-scrolled-window.c
1 /********************************************************************\
2  * gnucash-scrolled-window.c -- gnucash specific scrolled window *
3  * Copyright (C) 2001 Gnumatic, Inc. *
4  * Author: Dave Peticolas <[email protected]> *
5  * *
6  * This program is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU General Public License as *
8  * published by the Free Software Foundation; either version 2 of *
9  * the License, or (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License*
17  * along with this program; if not, contact: *
18  * *
19  * Free Software Foundation Voice: +1-617-542-5942 *
20  * 51 Franklin Street, Fifth Floor Fax: +1-617-542-2652 *
21  * Boston, MA 02110-1301, USA [email protected] *
22 \********************************************************************/
23 
24 #include "config.h"
25 
26 #include "gnucash-scrolled-window.h"
27 
28 
30 static GtkScrolledWindowClass *parent_class = NULL;
31 
32 
34 static void gnc_scrolled_window_class_init (GncScrolledWindowClass *klass);
35 static void gnc_scrolled_window_init (GncScrolledWindow *scrollwin);
36 
37 
40 GType
41 gnc_scrolled_window_get_type (void)
42 {
43  static GType gnc_scrolled_window_type = 0;
44 
45  if (!gnc_scrolled_window_type)
46  {
47  static const GTypeInfo gnc_scrolled_window_info =
48  {
49  sizeof (GncScrolledWindowClass),
50  NULL,
51  NULL,
52  (GClassInitFunc) gnc_scrolled_window_class_init,
53  NULL,
54  NULL,
55  sizeof (GncScrolledWindow),
56  0,
57  (GInstanceInitFunc) gnc_scrolled_window_init
58  };
59 
60  gnc_scrolled_window_type = g_type_register_static (GTK_TYPE_SCROLLED_WINDOW,
61  "GncScrolledWindow",
62  &gnc_scrolled_window_info, 0);
63  }
64 
65  return gnc_scrolled_window_type;
66 }
67 
68 
69 GtkWidget *
70 gnc_scrolled_window_new (void)
71 {
72  return gtk_widget_new (GNC_TYPE_SCROLLED_WINDOW,
73  "hadjustment", NULL,
74  "vadjustment", NULL,
75  NULL);
76 }
77 
78 
79 static void
80 gnc_scrolled_window_class_init (GncScrolledWindowClass *klass)
81 {
82  GtkScrolledWindowClass *scroll_class = GTK_SCROLLED_WINDOW_CLASS (klass);
83 
84  parent_class = g_type_class_peek_parent (klass);
85 
86  scroll_class->scrollbar_spacing = 0;
87 }
88 
89 static void
90 gnc_scrolled_window_init (GncScrolledWindow *scrollwin)
91 {
92 }