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/entry.h>
29 #include <gtkmm/expander.h>
30 #include <gtkmm/liststore.h>
31 #include <gtkmm/scrolledwindow.h>
32 #include <gtkmm/treeview.h>
47 const char * type_pattern,
48 const char * id_pattern,
58 class Record :
public Gtk::TreeModelColumnRecord
63 Gtk::TreeModelColumn<Glib::ustring>
type;
64 Gtk::TreeModelColumn<Glib::ustring>
id;
71 void init(
BlackBoard *blackboard,
const char *type_pattern,
const char *id_pattern);
86 Gtk::Window & parent_;
87 Gtk::ScrolledWindow scrollwin_;
InterfaceInfo representation for JSON transfer.
The BlackBoard abstract class.
Blackboard interface record.
Gtk::TreeModelColumn< bool > has_writer
Writer exists?
Gtk::TreeModelColumn< Glib::ustring > id
The ID of the interface.
Gtk::TreeModelColumn< Glib::ustring > type
The type of the interface.
Gtk::TreeModelColumn< unsigned int > num_readers
Number of readers.
Blackboard interface chooser dialog.
virtual int init_columns()
Initializes the columns GUI-wise.
Gtk::TreeView treeview_
Tree widget for interfaces.
static const char *const DEFAULT_TITLE
Default title of interface chooser dialogs.
void init(BlackBoard *blackboard, const char *type_pattern, const char *id_pattern)
Initialization method.
void get_selected_interface(Glib::ustring &type, Glib::ustring &id)
Get selected interface type and ID.
virtual void init_row(Gtk::TreeModel::Row &row, const InterfaceInfo &ii)
Initializes a row with the given interface.
virtual ~InterfaceChooserDialog()
Destructor.
virtual const Record & record() const
Returns the Record of this chooser dialog.
Glib::RefPtr< Gtk::ListStore > model_
Data model of the tree.
InterfaceChooserDialog(Gtk::Window &parent, const Glib::ustring &title)
Constructor for subclasses.
static InterfaceChooserDialog * create(Gtk::Window &parent, BlackBoard *blackboard, const char *type_pattern, const char *id_pattern, const Glib::ustring &title=DEFAULT_TITLE)
Factory method.
fawkes::Interface * run_and_open_for_reading()
Run dialog and try to connect.
Base class for all Fawkes BlackBoard interfaces.
Fawkes library namespace.