Logo Search packages:      
Sourcecode: ardour version File versions

void Gtk::Bin::add_pixlabel ( const Glib::RefPtr< Gdk::Pixmap > &  pixmap,
const Glib::RefPtr< Gdk::Bitmap > &  mask,
const Glib::ustring label,
double  x_align = 0.5,
double  y_align = 0.5 
) [inherited]

Add Image and Label objects. This does not correspond to any GTK+ function and is provided purely for convenience. This will create, manage, add, and show a new Image and Label (within an HBox) to this Bin.

pixmap A Glib::RefPtr to a Gdk::Pixmap.
mask A Glib::RefPtr to a Gdk::Bitmap.
label The text for the label.
x_align The horizontal alignment of the text in the label.
y_align The vertical alignment of the text in the label.

Definition at line 90 of file bin.cc.

References Gtk::PACK_SHRINK, Gtk::Box::pack_start(), Gtk::Misc::set_alignment(), and Gtk::Widget::show_all().

  //Create Pixmap and Label widgets:
  Image* pmap = manage(new Image(pixmap, mask));
  Label* label = manage(new Label(str));
  label->set_alignment (x_align, y_align);

  //Put them in a VBox:
  Box* box = manage(new HBox(false,5));
  box->pack_start(*pmap, PACK_SHRINK);

  //And put that VBox in this:

Generated by  Doxygen 1.6.0   Back to index