/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2004 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */

package org.gnu.gtk;
import org.gnu.glib.GObject;
import org.gnu.glib.Type;
/**
 * A CellRenderer is an object used to reder data in a {@link TreeView} widget.
 * This is for all types of Table, Tree and list. Each renderer has one or more
 * {@link CellRendererAttribute}. These attributes are for data to be rendered.
 * This data is usually stored in a {@link TreeModel} object; the two current
 * implementations of {@link TreeModel} being {@link ListStore} (for tables and
 * lists) and {@link TreeStore} for trees. 
 * <p>The choice of data to be rendered is particular to the TreeView widget -
 * any number of TreeView widgets may share the same data and choose to display
 * only a selection of it. Data is displayed in a {@link TreeView} widget by
 * attaching {@link TreeViewColumn}s and packing any number of {@link
 * CellRenderer}s into each column. Links are then made between the renderers
 * and the data in the model via the {@link
 * TreeViewColumn#addAttributeMapping(CellRenderer, CellRendererAttribute, int)}
 * method. 
 *
 * <p>This class is a base class for the renderers, either home grown or any of
 * the following standard renderers:
 * <ul>
 * <li>{@link CellRendererPixbuf}
 * <li>{@link CellRendererText}
 * <li>{@link CellRendererToggle}
 * </ul>
 *
 * <p>For a full overview of the tree and list objects, see the {@link TreeView}
 * description.
 */
public class CellRenderer extends GObject 
{
	CellRenderer(int hndl) {
		super(hndl);
	}
	
	/**
	 * fixme:
	 * to allow users to create cellrenderers, something will have to be done
	 * here.
	 * Anyone interested?
	 */

	/*
	 * FIXME: There are a number of properties which cellrenderers can have. We
	 * don't support setting/getting any of them at the moment:
	 *
	 *  "cell-background"      gchararray           : Write
  "cell-background-gdk"  GdkColor             : Read / Write
  "cell-background-set"  gboolean             : Read / Write
  "height"               gint                 : Read / Write
  "is-expanded"          gboolean             : Read / Write
  "is-expander"          gboolean             : Read / Write
  "mode"                 GtkCellRendererMode  : Read / Write
  "visible"              gboolean             : Read / Write
  "width"                gint                 : Read / Write
  "xalign"               gfloat               : Read / Write
  "xpad"                 guint                : Read / Write
  "yalign"               gfloat               : Read / Write
  "ypad"                 guint                : Read / Write
  */
	
	/**
	 * Retrieve the runtime type used by the GLib library.
	 */
	public static Type getType() {
		return new Type(gtk_cell_renderer_get_type());
	}
	
    /****************************************
     * BEGINNING OF GENERATED CODE
     ****************************************/
    native static final protected int gtk_cell_renderer_get_type ();
    native static final protected void gtk_cell_renderer_get_size (int cell, int widget, int cellArea, int [] xOffset, int [] yOffset, int [] width, int [] height);
    native static final protected void gtk_cell_renderer_render (int cell, int window, int widget, int backgroundArea, int cellArea, int exposedArea, int flags);
    native static final protected boolean gtk_cell_renderer_activate (int cell, int event, int widget, String path, int backgroundArea, int cellArea, int flags);
    native static final protected int gtk_cell_renderer_start_editing (int cell, int event, int widget, String path, int backgroundArea, int cellArea, int flags);
    native static final protected void gtk_cell_renderer_set_fixed_size (int cell, int width, int height);
    native static final protected void gtk_cell_renderer_get_fixed_size (int cell, int [] width, int [] height);
    /****************************************
     * END OF GENERATED CODE
     ****************************************/
}

