Logo Search packages:      
Sourcecode: ardour version File versions  Download package

progress.cc

// -*- c++ -*-
//  Generated by gtkmmproc from ./../progress.gen_h -- DO NOT MODIFY!
#include <gtk--/progress.h>
#include <gtk--/private/progress_p.h>
#include <gtk--/adjustment.h>
namespace Gtk
{

void
Progress::set_format_string(const string& format)
{
  gtk_progress_set_format_string(gtkobj(), const_cast<gchar*>(format.c_str()));
}

}

namespace Gtk {
Gtk::Progress *wrap (GtkProgress *o)
  {
    return static_cast<Gtk::Progress *> (Gtk::wrap_auto ((GtkObject *) (o)));
  }
}

namespace Gtk {
Progress_Class Progress::progress_class = {0};

Object* Progress_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Progress((GtkProgress*)(o)));
    return cpp;
  }

bool Progress::isA( Object *checkcast)
  {
    return GTK_IS_PROGRESS(checkcast->gtkobj());
  }

GtkType Progress::get_type()
  {
    return progress_class.get_type();
  }

GtkType Progress_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__Progress",
            sizeof(BaseObjectType),
            sizeof(BaseClassType),
            (GtkClassInitFunc) class_init_function,
            (GtkObjectInitFunc) object_init_function,
            /* reserved_1 */ NULL,
            /* reserved_2 */ NULL,
            /*base_class_init_func */ (GtkClassInitFunc) NULL
          };
        type=gtk_type_unique(gtk_progress_get_type(), &info);
      }
    return type;
  }

const char* const Progress::signal_names[]={
   "paint",
   "update",
   "act_mode_enter",
   0};

void Progress::initialize_class()
  {

     progress_self=this;

  }

void Progress_Class::class_init_function(GtkProgressClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->paint=paint_callback;
    klass->update=update_callback;
    klass->act_mode_enter=act_mode_enter_callback;
  }

void Progress_Class::object_init_function(GtkProgress *)
  {}

}

Gtk::Progress::Progress(GtkProgress *castitem)
  :     Gtk::Widget((GtkWidget*)(castitem))
  {
    initialize_class();
  }

Gtk::Progress::~Progress() { destroy_(); }

void Gtk::Progress::set_show_text(bool show_text)
  {
    gtk_progress_set_show_text(gtkobj(),show_text);
  }

void Gtk::Progress::set_text_alignment(gfloat x_align,gfloat y_align)
  {
    gtk_progress_set_text_alignment(gtkobj(),x_align,y_align);
  }

void Gtk::Progress::set_adjustment(Gtk::Adjustment& adjustment)
  {
    gtk_progress_set_adjustment(gtkobj(),adjustment.gtkobj());
  }

void Gtk::Progress::set_adjustment(Gtk::Adjustment* adjustment)
  {
    gtk_progress_set_adjustment(gtkobj(),(GtkAdjustment*)Gtk::unwrap(adjustment));
  }

void Gtk::Progress::configure(gfloat value,gfloat min,gfloat max)
  {
    gtk_progress_configure(gtkobj(),value,min,max);
  }

void Gtk::Progress::set_percentage(gfloat percentage)
  {
    gtk_progress_set_percentage(gtkobj(),percentage);
  }

void Gtk::Progress::set_value(gfloat value)
  {
    gtk_progress_set_value(gtkobj(),value);
  }

gfloat Gtk::Progress::get_value() const
  {
    return gtk_progress_get_value(const_cast<GtkProgress*>(gtkobj()));
  }

void Gtk::Progress::set_activity_mode(bool activity_mode)
  {
    gtk_progress_set_activity_mode(gtkobj(),activity_mode);
  }

string Gtk::Progress::get_current_text() const
  {
    return gtk_progress_get_current_text(const_cast<GtkProgress*>(gtkobj()));
  }

string Gtk::Progress::get_text_from_value(gfloat value) const
  {
    return gtk_progress_get_text_from_value(const_cast<GtkProgress*>(gtkobj()),value);
  }

gfloat Gtk::Progress::get_current_percentage() const
  {
    return gtk_progress_get_current_percentage(const_cast<GtkProgress*>(gtkobj()));
  }

gfloat Gtk::Progress::get_percentage_from_value(gfloat value) const
  {
    return gtk_progress_get_percentage_from_value(const_cast<GtkProgress*>(gtkobj()),value);
  }

void Gtk::Progress_Class::paint_callback(GtkProgress* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      obj->paint_impl();
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->paint)
          (base->paint)(o_);
      }

  }

void Gtk::Progress::paint_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->paint)
      (base->paint)(gtkobj());

  }

void Gtk::Progress_Class::update_callback(GtkProgress* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      obj->update_impl();
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->update)
          (base->update)(o_);
      }

  }

void Gtk::Progress::update_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->update)
      (base->update)(gtkobj());

  }

void Gtk::Progress_Class::act_mode_enter_callback(GtkProgress* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      obj->act_mode_enter_impl();
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->act_mode_enter)
          (base->act_mode_enter)(o_);
      }

  }

void Gtk::Progress::act_mode_enter_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->act_mode_enter)
      (base->act_mode_enter)(gtkobj());

  }

Gtk::Adjustment* Gtk::Progress::get_adjustment() const
  { return Gtk::wrap(gtkobj()->adjustment); }

Generated by  Doxygen 1.6.0   Back to index