Page principale   Modules   Liste des namespaces   Hiérarchie des classes   Liste des composants   Liste des fichiers   Membres des namespaces   Composants   Déclarations   Pages associées   Exemples  

button_box.cpp

Exemple d'utilisation de la classe gtk_button_box.

#include <gtk++/gtkbuttonboxes.hpp>
#include <gtk++/gtkwindows.hpp>
#include <gtk++/gtkbuttons.hpp>


int main (int argc, char * argv [])
{
  lgtkpp::gtk_window* Fenetre;
  lgtkpp::gtk_button_box* BBox;
  lgtkpp::gtk_button* Bouton;  
  // Initialisation des bibliotheques
  ::gtk_init (&argc, &argv);
  
  // Creation de la fenetre
  Fenetre = new lgtkpp::gtk_window ();
  Fenetre->SetTitle ("Test gtk_button_box");
  Fenetre->SetBorderWidth(10);
  Fenetre->SignalConnect("delete_event",GtkSignalFunc(gtk_exit),NULL);
  Fenetre->SignalConnect("destroy",GtkSignalFunc(gtk_exit),NULL);
  
  // Creation de la barre de bouton
  BBox = new lgtkpp::gtk_button_box(lgtkpp::horizontal);
  *Fenetre += *BBox;
  BBox->SetLayout (GTK_BUTTONBOX_END);
  
  // Creation des boutons
  *BBox += *(new lgtkpp::gtk_button ("Bouton 1"));
  *BBox += *(new lgtkpp::gtk_button ("Bouton 2"));
  *BBox += *(new lgtkpp::gtk_button ("Bouton 3"));

  Bouton = new lgtkpp::gtk_button ("Bouton Absent");
  Bouton->SetRelief(GTK_RELIEF_NONE);
  *BBox += *Bouton; 

  // Affichage et boucle principale
  Fenetre->ShowAll ();
  gtk_main();
  return 0;
}

Généré le Sun Oct 5 15:03:43 2003 pour lightgtk++ par doxygen1.3-rc3