Horizon
selection_filter_dialog.hpp
1 #pragma once
2 #include <gtkmm.h>
3 #include "common/common.hpp"
4 namespace horizon {
5 
6 class SelectionFilterDialog : public Gtk::Window {
7 public:
8  SelectionFilterDialog(Gtk::Window *parent, class SelectionFilter &sf, class ImpBase &imp);
9  void update_layers();
10 
11 private:
12  SelectionFilter &selection_filter;
13  ImpBase &imp;
14  Gtk::ListBox *listbox = nullptr;
15 
16  class Type {
17  public:
18  Gtk::CheckButton *checkbutton = nullptr;
19  std::map<int, Gtk::CheckButton *> layer_buttons;
20  Gtk::CheckButton *other_layer_checkbutton = nullptr;
21  void update();
22  bool get_all_active();
23  bool expanded = false;
24  bool blocked = false;
25  };
26 
27  std::map<ObjectType, Type> checkbuttons;
28  Gtk::Button *reset_button = nullptr;
29  void update();
30  void set_all(bool state);
31  void connect_doubleclick(Gtk::CheckButton *cb);
32  Gtk::CheckButton *add_layer_button(ObjectType type, int layer, int index, bool active = true);
33 };
34 } // namespace horizon
horizon::SelectionFilter
Definition: selection_filter.hpp:6
horizon::SelectionFilterDialog
Definition: selection_filter_dialog.hpp:6
horizon::ImpBase
Definition: imp.hpp:36