mirror of https://gitlab.com/cppit/jucipp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
|
11 years ago
|
#ifndef JUCI_DIRECTORIES_H_
|
||
|
|
#define JUCI_DIRECTORIES_H_
|
||
|
11 years ago
|
|
||
|
|
#include <gtkmm.h>
|
||
|
11 years ago
|
#include <vector>
|
||
|
|
#include <string>
|
||
|
11 years ago
|
#include "boost/filesystem.hpp"
|
||
|
11 years ago
|
|
||
|
11 years ago
|
class Directories : public Gtk::ScrolledWindow {
|
||
|
|
public:
|
||
|
11 years ago
|
class Config {
|
||
|
|
public:
|
||
|
11 years ago
|
std::vector<std::string> ignored;
|
||
|
|
std::vector<std::string> exceptions;
|
||
|
11 years ago
|
};
|
||
|
11 years ago
|
|
||
|
|
class ColumnRecord : public Gtk::TreeModel::ColumnRecord {
|
||
|
11 years ago
|
public:
|
||
|
11 years ago
|
ColumnRecord() {
|
||
|
|
add(id);
|
||
|
|
add(name);
|
||
|
|
add(path);
|
||
|
11 years ago
|
}
|
||
|
11 years ago
|
Gtk::TreeModelColumn<Glib::ustring> id;
|
||
|
|
Gtk::TreeModelColumn<Glib::ustring> name;
|
||
|
|
Gtk::TreeModelColumn<Glib::ustring> path;
|
||
|
11 years ago
|
};
|
||
|
|
|
||
|
11 years ago
|
Directories();
|
||
|
|
void open_folder(const boost::filesystem::path& dir_path);
|
||
|
|
std::string get_cmakelists_variable(const boost::filesystem::path& dir_path, std::string command_name);
|
||
|
|
|
||
|
|
std::function<void(const std::string &file)> on_row_activated;
|
||
|
|
|
||
|
|
private:
|
||
|
|
void add_paths(const boost::filesystem::path& dir_path, const Gtk::TreeModel::Row &row, unsigned depth);
|
||
|
|
Gtk::TreeView tree_view;
|
||
|
|
Glib::RefPtr<Gtk::TreeStore> tree_store;
|
||
|
|
ColumnRecord column_record;
|
||
|
|
bool ignored(std::string path);
|
||
|
|
};
|
||
|
11 years ago
|
|
||
|
11 years ago
|
#endif // JUCI_DIRECTORIES_H_
|