/********************************************************************\
 * gnucash-scrolled-window.c -- gnucash specific scrolled window    *
 * Copyright (C) 2001 Gnumatic, Inc.                                *
 * Author: Dave Peticolas <dave@krondo.com>                         *
 *                                                                  *
 * This program is free software; you can redistribute it and/or    *
 * modify it under the terms of the GNU General Public License as   *
 * published by the Free Software Foundation; either version 2 of   *
 * the License, or (at your option) any later version.              *
 *                                                                  *
 * This program is distributed in the hope that it will be useful,  *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
 * GNU General Public License for more details.                     *
 *                                                                  *
 * You should have received a copy of the GNU General Public License*
 * along with this program; if not, contact:                        *
 *                                                                  *
 * Free Software Foundation           Voice:  +1-617-542-5942       *
 * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
 * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
\********************************************************************/

#include "config.h"

#include "gnucash-scrolled-window.h"


/** Static Globals ****************************************************/
static GtkScrolledWindowClass *parent_class = NULL;


/** Declarations ******************************************************/
static void gnc_scrolled_window_class_init (GNCScrolledWindowClass *class);
static void gnc_scrolled_window_init (GNCScrolledWindow *scrollwin);


/** Implementations ***************************************************/

GtkType
gnc_scrolled_window_get_type (void)
{
  static GtkType gnc_scrolled_window_type = 0;

  if (!gnc_scrolled_window_type)
  {
    static const GtkTypeInfo gnc_scrolled_window_info =
    {
      "GNCScrolledWindow",
      sizeof (GNCScrolledWindow),
      sizeof (GNCScrolledWindowClass),
      (GtkClassInitFunc) gnc_scrolled_window_class_init,
      (GtkObjectInitFunc) gnc_scrolled_window_init,
      /* reserved_1 */ NULL,
      /* reserved_2 */ NULL,
      (GtkClassInitFunc) NULL
    };

    gnc_scrolled_window_type = gtk_type_unique (GTK_TYPE_SCROLLED_WINDOW,
                                                &gnc_scrolled_window_info);
  }

  return gnc_scrolled_window_type;
}


GtkWidget *
gnc_scrolled_window_new (void)
{
  return gtk_widget_new (GNC_TYPE_SCROLLED_WINDOW,
                         "hadjustment", NULL,
                         "vadjustment", NULL,
                         NULL);
}


static void
gnc_scrolled_window_class_init (GNCScrolledWindowClass *class)
{
  GtkScrolledWindowClass *scroll_class = (GtkScrolledWindowClass *) class;

  parent_class = gtk_type_class (GTK_TYPE_SCROLLED_WINDOW);

  scroll_class->scrollbar_spacing = 0;
}

static void
gnc_scrolled_window_init (GNCScrolledWindow *scrollwin)
{
}
