24 #ifndef __LIBS_GUI_UTILS_INTERFACE_CHOOSER_DIALOG_H_ 25 #define __LIBS_GUI_UTILS_INTERFACE_CHOOSER_DIALOG_H_ 27 #include <gtkmm/dialog.h> 28 #include <gtkmm/treeview.h> 29 #include <gtkmm/entry.h> 30 #include <gtkmm/expander.h> 31 #include <gtkmm/scrolledwindow.h> 32 #include <gtkmm/liststore.h> 52 const char *type_pattern,
53 const char *id_pattern,
54 const Glib::ustring& title = DEFAULT_TITLE);
63 class Record :
public Gtk::TreeModelColumnRecord
68 Gtk::TreeModelColumn<Glib::ustring>
type;
69 Gtk::TreeModelColumn<Glib::ustring>
id;
77 const char* type_pattern,
78 const char* id_pattern);
93 Gtk::Window &__parent;
94 Gtk::ScrolledWindow __scrollwin;
Blackboard interface chooser dialog.
Fawkes library namespace.
void init(BlackBoard *blackboard, const char *type_pattern, const char *id_pattern)
Initialization method.
virtual ~InterfaceChooserDialog()
Destructor.
Glib::RefPtr< Gtk::ListStore > __model
Data model of the tree.
virtual const Record & record() const
Returns the Record of this chooser dialog.
static const char *const DEFAULT_TITLE
Default title of interface chooser dialogs.
Base class for all Fawkes BlackBoard interfaces.
virtual int init_columns()
Initializes the columns GUI-wise.
Gtk::TreeModelColumn< Glib::ustring > type
The type of the interface.
Gtk::TreeModelColumn< bool > has_writer
Writer exists?
Gtk::TreeView __treeview
Tree widget for interfaces.
InterfaceChooserDialog(Gtk::Window &parent, const Glib::ustring &title)
Constructor for subclasses.
Gtk::TreeModelColumn< unsigned int > num_readers
Number of readers.
void get_selected_interface(Glib::ustring &type, Glib::ustring &id)
Get selected interface type and ID.
Blackboard interface record.
virtual void init_row(Gtk::TreeModel::Row &row, const InterfaceInfo &ii)
Initializes a row with the given interface.
fawkes::Interface * run_and_open_for_reading()
Run dialog and try to connect.
The BlackBoard abstract class.
Gtk::TreeModelColumn< Glib::ustring > id
The ID of the interface.
static InterfaceChooserDialog * create(Gtk::Window &parent, BlackBoard *blackboard, const char *type_pattern, const char *id_pattern, const Glib::ustring &title=DEFAULT_TITLE)
Factory method.