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

checkmenuitem.cc

// -*- c++ -*-
//  Generated by gtkmmproc from ./../checkmenuitem.gen_h -- DO NOT MODIFY!
#include <gtk--/checkmenuitem.h>
#include <gtk--/private/checkmenuitem_p.h>
#include <gtk--/misc.h>
#include <gtk--/label.h>

namespace Gtk
{

  CheckMenuItem::CheckMenuItem(const string &label,gfloat x,gfloat y)
    : MenuItem((GtkMenuItem*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
    add_label(label,x,y);
  }

}

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

namespace Gtk {
CheckMenuItem_Class CheckMenuItem::check_menu_item_class = {0};

Object* CheckMenuItem_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new CheckMenuItem((GtkCheckMenuItem*)(o)));
    return cpp;
  }

bool CheckMenuItem::isA( Object *checkcast)
  {
    return GTK_IS_CHECK_MENU_ITEM(checkcast->gtkobj());
  }

GtkType CheckMenuItem::get_type()
  {
    return check_menu_item_class.get_type();
  }

GtkType CheckMenuItem_Class::get_type()
  {
    if (!type)
      {
        CppClassParent::CppObjectType::get_type();
        GtkTypeInfo info =
          {
            "Gtk__CheckMenuItem",
            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_check_menu_item_get_type(), &info);
      }
    return type;
  }

const char* const CheckMenuItem::signal_names[]={
   "toggled",
   "draw_indicator",
   0};

void CheckMenuItem::initialize_class()
  {

     check_menu_item_self=this;

  }

void CheckMenuItem_Class::class_init_function(GtkCheckMenuItemClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
    klass->toggled=toggled_callback;
    klass->draw_indicator=draw_indicator_callback;
  }

void CheckMenuItem_Class::object_init_function(GtkCheckMenuItem *)
  {}

}

Gtk::CheckMenuItem::CheckMenuItem()
  :     Gtk::MenuItem((GtkMenuItem*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

Gtk::CheckMenuItem::CheckMenuItem(GtkCheckMenuItem *castitem)
  :     Gtk::MenuItem((GtkMenuItem*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::CheckMenuItem::set_active(bool state)
  {
    gtk_check_menu_item_set_active(gtkobj(),(gboolean)state);
  }

void Gtk::CheckMenuItem::set_show_toggle(bool always)
  {
    gtk_check_menu_item_set_show_toggle(gtkobj(),(gboolean)always);
  }

void Gtk::CheckMenuItem_Class::toggled_callback(GtkCheckMenuItem* o_)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

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

  }

void Gtk::CheckMenuItem::toggled_impl()
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->toggled)
      (base->toggled)(gtkobj());

  }

void Gtk::CheckMenuItem_Class::draw_indicator_callback(GtkCheckMenuItem* o_,GdkRectangle* p0)
  {
    CppObjectType *obj=
      static_cast<CppObjectType *>(static_cast<Gtk::Object *>(
        gtk_object_get_data_by_id((GtkObject*)o_,Gtk::quark_)));

    if (obj)
      obj->draw_indicator_impl(p0);
    else
      {
        BaseClassType* base=
          static_cast<BaseClassType*>(
            gtk_type_parent_class(((GtkObject*)o_)->klass->type));
        if (base->draw_indicator)
          (base->draw_indicator)(o_,p0);
      }

  }

void Gtk::CheckMenuItem::draw_indicator_impl(GdkRectangle* p0)
  {
    BaseClassType* base=
      static_cast<BaseClassType*>(
        gtk_type_parent_class(gtkobject->klass->type));
    if (base->draw_indicator)
      (base->draw_indicator)(gtkobj(),p0);

  }

guint Gtk::CheckMenuItem::get_active() const
  { return gtkobj()->active; }

Generated by  Doxygen 1.6.0   Back to index