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


#ifndef __pbd_gtkmm_choice_h__
#define __pbd_gtkmm_choice_h__

#include <gtk--.h>
#include <vector>

namespace Gtkmmext {

class Choice : public Gtk::Window
      Choice (std::string prompt, std::vector<std::string> choices);
      virtual ~Choice ();

      /* This signal will be raised when a choice
         is made or the choice window is deleted.
         If the choice was to cancel, or the window
         was deleted, then the argument will be -1.
         Otherwise, it will be choice selected
         of those presented, starting at zero.

      SigC::Signal1<void,int> choice_made;
      SigC::Signal0<void> chosen;

      int get_choice ();

      void realize_impl ();
      Gtk::VBox packer;
      Gtk::Label prompt_label;
      Gtk::HBox button_packer;
      std::vector<Gtk::Button*> buttons;
      int  which_choice;

      void _choice_made (int nbutton);
      gint closed (GdkEventAny *);

} /* namespace */

#endif  // __pbd_gtkmm_choice_h__

Generated by  Doxygen 1.6.0   Back to index