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

bin.cc

// -*- c++ -*-
//  Generated by gtkmmproc from ./../bin.gen_h -- DO NOT MODIFY!
#include <gtk--/bin.h>
#include <gtk--/private/bin_p.h>
#include <gtk--/adjustment.h>
#include <gtk--/label.h>
#include <gtk--/box.h>
#include <gtk--/pixmap.h>

namespace Gtk
{


void
Bin::remove()
{
  if (gtkobj()->child)
    gtk_container_remove(Container::gtkobj(),gtkobj()->child);
}

void
Bin::add_label(const string &str,gfloat x,gfloat y)
{
  Label* label=manage(new Label(str,x,y));
  add(*label);
  label->show();
}

void
Bin::add_pixmap(const Gdk_Pixmap &pixmap,const Gdk_Bitmap &bitmap)
{
  Pixmap* p=manage(new Pixmap(pixmap,bitmap));
  add(*p);
  p->show();
}

void
Bin::add_pixlabel(const Gdk_Pixmap &pixmap,const Gdk_Bitmap &bitmap,const string &str,gfloat x,gfloat y)
{
  Pixmap* pmap=manage(new Pixmap(pixmap,bitmap));
  Label* label=manage(new Label(str,x,y));
  Box* box=manage(new HBox(false,5));

  box->pack_start(*pmap,false);
  box->pack_start(*label);
  box->show_all();

  add(*box);
}

void
Bin::add_pixlabel(const string& pixfile,const string &str,gfloat x,gfloat y)
{
  Pixmap* pmap=manage(new Pixmap(pixfile));
  Label* label=manage(new Label(str,x,y));
  Box* vbox=manage(new HBox(false,5));

  vbox->pack_start(*pmap,false);
  vbox->pack_start(*label);
  vbox->show_all();

  add(*vbox);
}


}

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

namespace Gtk {
Bin_Class Bin::bin_class = {0};

Object* Bin_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Bin((GtkBin*)(o)));
    return cpp;
  }

bool Bin::isA( Object *checkcast)
  {
    return GTK_IS_BIN(checkcast->gtkobj());
  }

GtkType Bin::get_type()
  {
    return bin_class.get_type();
  }

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

const char* const Bin::signal_names[]={
   0};

void Bin::initialize_class()
  {

  }

void Bin_Class::class_init_function(GtkBinClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void Bin_Class::object_init_function(GtkBin *)
  {}

}

Gtk::Bin::Bin(GtkBin *castitem)
  :     Gtk::Container((GtkContainer*)(castitem))
  {
    initialize_class();
  }

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

Gtk::Bin::Bin()
  :     Gtk::Container((GtkContainer*)(gtk_object_new(get_type(),0)))
  {
    initialize_class();
  }

Gtk::Widget* Gtk::Bin::get_child() const
  { return Gtk::wrap(gtkobj()->child); }

Generated by  Doxygen 1.6.0   Back to index