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

#include <glibmm.h>

/* $Id: job.hg,v 1.2 2003/10/17 16:30:20 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/context.h>


#ifndef DOXYGEN_SHOULD_SKIP_THIS
typedef struct _GnomePrintJob GnomePrintJob;
typedef struct _GnomePrintJobClass GnomePrintJobClass;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */


namespace Gnome
{

namespace Print
{ class Job_Class; } // namespace Print

} // namespace Gnome
namespace Gnome
{

namespace Print
{


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

public:
  typedef Job CppObjectType;
  typedef Job_Class CppClassType;
  typedef GnomePrintJob BaseObjectType;
  typedef GnomePrintJobClass BaseClassType;

private:  friend class Job_Class;
  static CppClassType job_class_;

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

protected:
  explicit Job(const Glib::ConstructParams& construct_params);
  explicit Job(GnomePrintJob* castitem);

#endif /* DOXYGEN_SHOULD_SKIP_THIS */

public:
  virtual ~Job();

#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.
  GnomePrintJob*       gobj()       { return reinterpret_cast<GnomePrintJob*>(gobject_); }

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

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

private:

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

public:
  
  static Glib::RefPtr<Job> create();

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


  Glib::RefPtr<Config> get_config() const;
  
  Glib::RefPtr<Context> get_context() const;
 

  //TODO: check return and throw exception. libgnomeprint should probably use GError.
  
  int close();
  
  int print();

  
  void set_file(const std::string& input);


  int render(const Glib::RefPtr<Context>& context);
  
  int render_page(const Glib::RefPtr<Context>& context, int page, bool pageops);
  
  int get_pages() const;

  //TODO: The function is wrongly named in the C library. Patch it.
  
  int set_print_to_file(const std::string& output);
  
  bool get_page_size(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::Job
   * @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::Job> wrap(GnomePrintJob* object, bool take_copy = false);
}


#endif /* _LIBGNOMEPRINTMM_JOB_H */

