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

table.cc

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

Table::Table(gint rows, gint columns, gint homogeneous)
  : Container((GtkContainer*)(gtk_object_new(get_type(),0)))
{
  initialize_class();
  gtkobj()->homogeneous = (homogeneous ? TRUE : FALSE);
  gtk_table_resize (gtkobj(), rows, columns);
}

void Table::set_spacings(int spacing)
{
  set_row_spacings(spacing);
  set_col_spacings(spacing);
}

}

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

namespace Gtk {
Table_Class Table::table_class = {0};

Object* Table_Class::wrap_new(GtkObject* o)
  {
    Object* cpp=manage(new Table((GtkTable*)(o)));
    return cpp;
  }

bool Table::isA( Object *checkcast)
  {
    return GTK_IS_TABLE(checkcast->gtkobj());
  }

GtkType Table::get_type()
  {
    return table_class.get_type();
  }

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

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

void Table::initialize_class()
  {

  }

void Table_Class::class_init_function(GtkTableClass *klass)
  {
    CppClassParent::class_init_function((BaseClassParent*)klass);
  }

void Table_Class::object_init_function(GtkTable *)
  {}

}

void Gtk::Table_Helpers::TableList::remove(const_reference child)
{
  g_return_if_fail(child!=0);
  gtk_container_remove(parent_->Container::gtkobj(),
                       (GtkWidget*)(child->gtkobj()));
}

void Gtk::Table_Helpers::TableList::remove(Widget &w)
{
  gtk_container_remove(parent_->Container::gtkobj(),(GtkWidget*)(w.gtkobj()));
}

Gtk::Table_Helpers::TableList::iterator Gtk::Table_Helpers::TableList::erase(iterator position)
{
  if (!position.node||position==end()) return end();
  iterator next=position;
  next++;

  gtk_container_remove(parent_->Container::gtkobj(),
      (GtkWidget*)((*position)->gtkobj()));
  return next;
}

GList*& Gtk::Table_Helpers::TableList::glist() const
{ return parent_->gtkobj()->children; }

Gtk::Table_Helpers::TableList::iterator Gtk::Table_Helpers::TableList::begin_() const
{return iterator(glist(),glist());}

Gtk::Table_Helpers::TableList::iterator Gtk::Table_Helpers::TableList::end_() const
{return iterator(glist(),(GList*)0);}

Gtk::Table_Helpers::TableList::size_type Gtk::Table_Helpers::TableList::size() const
  { return g_list_length(glist()); }

void Gtk::Table_Helpers::TableList::clear()
{ erase(begin(),end()); }

void Gtk::Table_Helpers::TableList::erase(iterator start, iterator stop)
{ while(start != stop) start=erase(start); }


Gtk::Table::Table(GtkTable *castitem)
  :     Gtk::Container((GtkContainer*)(castitem))
  {
    initialize_class();
  }

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

void Gtk::Table::attach(Gtk::Widget& child,guint left_attach,guint right_attach,guint top_attach,guint bottom_attach,gint xoptions,gint yoptions,guint xpadding,guint ypadding)
  {
    gtk_table_attach(gtkobj(),child.gtkobj(),left_attach,right_attach,top_attach,bottom_attach,(GtkAttachOptions)xoptions,(GtkAttachOptions)yoptions,xpadding,ypadding);
  }

void Gtk::Table::resize(guint rows,guint columns)
  {
    gtk_table_resize(gtkobj(),rows,columns);
  }

void Gtk::Table::set_homogeneous(bool homogeneous)
  {
    gtk_table_set_homogeneous(gtkobj(),(gint)homogeneous);
  }

void Gtk::Table::set_row_spacing(gint row,gint spacing)
  {
    gtk_table_set_row_spacing(gtkobj(),row,spacing);
  }

void Gtk::Table::set_col_spacing(gint column,gint spacing)
  {
    gtk_table_set_col_spacing(gtkobj(),column,spacing);
  }

void Gtk::Table::set_row_spacings(gint spacing)
  {
    gtk_table_set_row_spacings(gtkobj(),spacing);
  }

void Gtk::Table::set_col_spacings(gint spacing)
  {
    gtk_table_set_col_spacings(gtkobj(),spacing);
  }

Generated by  Doxygen 1.6.0   Back to index