Horizon
Loading...
Searching...
No Matches
sort_helper.hpp
1#pragma once
2#include <gtkmm.h>
3#include "util/changeable.hpp"
4
5namespace horizon {
6class SortHelper : public Changeable, public sigc::trackable {
7public:
8 const std::string &get_column() const;
9 Gtk::SortType get_sort_type() const;
10 int transform_order(int x) const;
11 void attach(const std::string &column, Gtk::Button &button, Gtk::Image &indicator);
12 void attach(const std::string &column, const Glib::RefPtr<Gtk::Builder> &x);
13 void set_sort(const std::string &col, Gtk::SortType st);
14
15private:
16 void handle_button(const std::string &col);
17 void update();
18 struct Column {
19 const std::string name;
20 Gtk::Image &indicator;
21 };
22 std::vector<Column> columns;
23 std::string sort_column;
24 Gtk::SortType sort_type;
25};
26} // namespace horizon
Definition changeable.hpp:5
Definition sort_helper.hpp:6