// -*- c++ -*-
// Generated by gtkmmproc -- DO NOT MODIFY!
#ifndef _LIBGNOMEPRINTMM_CONTEXT_H
#define _LIBGNOMEPRINTMM_CONTEXT_H

#include <glibmm.h>

/* $Id: context.hg,v 1.1 2003/08/24 16:10:03 murrayc Exp $ */
// -*- C++ -*- // this is for the .hg, I realize gensig puts one in

/* Copyright 2003 gnome-vfsmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the Free
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <glibmm/object.h>
#include <libgnomeprintmm/config.h>
#include <libgnomeprintmm/font.h>


//Wrap all of the API:
#define GNOME_PRINT_UNSTABLE_API

#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomePrintContext GnomePrintContext;
typedef struct _GnomePrintContextClass GnomePrintContextClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Print
{ class Context_Class; } // namespace Print

} // namespace Gnome
namespace Gnome
{

namespace Print
{

class Config;


class Context : public Glib::Object
{
  
#ifndef DOXYGEN_SHOULD_SKIP_THIS

public:
  typedef Context CppObjectType;
  typedef Context_Class CppClassType;
  typedef GnomePrintContext BaseObjectType;
  typedef GnomePrintContextClass BaseClassType;

private:  friend class Context_Class;
  static CppClassType context_class_;

private:
  // noncopyable
  Context(const Context&);
  Context& operator=(const Context&);

protected:
  explicit Context(const Glib::ConstructParams& construct_params);
  explicit Context(GnomePrintContext* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Context();

#ifndef DOXYGEN_SHOULD_SKIP_THIS
  static GType get_type()      G_GNUC_CONST;
  static GType get_base_type() G_GNUC_CONST;
#endif

  ///Provides access to the underlying C GObject.
  GnomePrintContext*       gobj()       { return reinterpret_cast<GnomePrintContext*>(gobject_); }

  ///Provides access to the underlying C GObject.
  const GnomePrintContext* gobj() const { return reinterpret_cast<GnomePrintContext*>(gobject_); }

  ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
  GnomePrintContext* gobj_copy();

private:

protected:
  explicit Context(const Glib::RefPtr<Config>& config);;

public:
  
  static Glib::RefPtr<Context> create(const Glib::RefPtr<Config>& config);


  int close();
  
  int create_transport();


 //TODO: These should be gnome_print_context_* functions in the C library:

  
  int new_path();

  
  int move_to(double x, double y);
  
  int line_to(double x, double y);
  
  int curve_to(double x1, double y1, double x2, double y2, double x3, double y3);
  
  int close_path();
  
  int stroke_path();
  //TODO: _WRAP_METHOD(int bpath(const ArtBpath *bpath, gboolean append), gnome_print_bpath)
  //TODO: _WRAP_METHOD(int vpath(const ArtVpath *vpath, gboolean append), gnome_print_vpath)
  
  int arc_to(double x, double y, double radius, double angle1, double angle2, int direction);


  int set_rtb_color(double r, double g, double b);
  
  int set_opacity(double opacity);
  
  int set_line_width(double width);
  
  int set_miter_limit(double limit);
  
  int set_line_join(int jointype);
  
  int set_line_cap(int captype);

    //TODO: Don't use gdouble*.
  
  int set_dash(int n_values, const gdouble* values, double offset);
  
  int set_font(const Glib::RefPtr<const Font>& font);
  
  int clip();
  
  int eoclip();

  //TODO: Don't use gdouble*.
  
  int concat(const gdouble* matrix);
  
  int scale(double sx, double sy);
  
  int rotate(double theta);
  
  int translate(double x, double y);

  
  int gsave();
  
  int grestore();


  int fill();
  
  int eofill();
  
  int stroke();


  int show(const Glib::ustring& text);
  
  int show(const Glib::ustring& text, int bytes);
//TODO:  _WRAP_METHOD(int glyph(GnomeGlyphList *glyphlist), gnome_print_glyphlist)


  int gray_image(const Glib::ustring& data, int width, int height, int rowstride);
  
  int rgb_image(const Glib::ustring& data, int width, int height, int rowstride);
  
  int rgba_image(const Glib::ustring& data, int width, int height, int rowstride);


  int begin_page(const Glib::ustring& name);
  
  int show_page();


  int line_stroked(double x0, double y0, double x1, double y1);
  
  int rect_stroked(double x, double y, double width, double height);
  
  int rect_filled(double x, double y, double width, double height);


public:

public:
  //C++ methods used to invoke GTK+ virtual functions:

protected:
  //GTK+ Virtual Functions (override these to change behaviour):

  //Default Signal Handlers::


};


} // namespace Print
} // namespace Gnome


namespace Glib
{
  /** @relates Gnome::Print::Context
   * @param object The C instance
   * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
   * @result A C++ instance that wraps this C instance.
   */
  Glib::RefPtr<Gnome::Print::Context> wrap(GnomePrintContext* object, bool take_copy = false);
}


#endif /* _LIBGNOMEPRINTMM_CONTEXT_H */

