22 #ifndef GtkCRNFileSelecter_HEADER
23 #define GtkCRNFileSelecter_HEADER
25 #include <libgtkcrnmm_config.h>
62 void on_selection_changed();
64 void on_row_activated(
const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
66 Gtk::Entry pathdisplay;
68 class ModelColumns :
public Gtk::TreeModelColumnRecord
71 ModelColumns() { add(name); }
72 Gtk::TreeModelColumn<Glib::ustring> name;
75 Glib::RefPtr<Gtk::ListStore> files;
76 mutable Gtk::TreeView tv;
78 sigc::signal<void, crn::Path> selection_changed;
79 sigc::signal<void, crn::Path> selection_activated;
const crn::Path & get_path() const
Gets the path of the displayed directory.
crn::Path get_selection() const
Gets the selected file.
bool set_selection(const crn::Path &p)
Sets the selected file.
virtual ~FileSelecter() override
sigc::signal< void, crn::Path > signal_selection_activated()
Signals when a file was double clicked. Connect to void on_double_click(crn::Path relative_filename) ...
A convenience class for file paths.
FileSelecter(const crn::Path &p)
Constructor.
A widget that displays the files in a directory and allows to select one.
void set_path(const crn::Path &p)
Sets the path of the directory to display.
sigc::signal< void, crn::Path > signal_selection_changed()
Signals when a file was selected. Connect to void on_new_file_selected(crn::Path relative_filename) ...