Horizon
main_window.hpp
1 #pragma once
2 #include "common/common.hpp"
3 #include <gtkmm.h>
4 
5 namespace horizon {
6 
7 class MainWindow : public Gtk::ApplicationWindow {
8 public:
9  MainWindow(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builder> &x);
10  static MainWindow *create();
11  class CanvasGL *canvas = nullptr;
12  Gtk::Label *tool_hint_label = nullptr;
13  Gtk::Label *cursor_label = nullptr;
14  Gtk::Box *left_panel = nullptr;
15  Gtk::Box *grid_box = nullptr;
16  Gtk::Label *grid_mul_label = nullptr;
17  Gtk::Label *selection_label = nullptr;
18  Gtk::Viewport *property_viewport = nullptr;
19  Gtk::ScrolledWindow *property_scrolled_window = nullptr;
20  Gtk::Revealer *property_throttled_revealer = nullptr;
21  Gtk::HeaderBar *header = nullptr;
22  Glib::RefPtr<Gtk::Builder> builder;
23 
24  Gtk::Button *pool_reload_button = nullptr;
25 
26  void tool_bar_set_visible(bool v);
27  void tool_bar_set_tool_name(const std::string &s);
28  void tool_bar_set_tool_tip(const std::string &s);
29  void tool_bar_flash(const std::string &s);
30 
31  void hud_update(const std::string &s);
32  void hud_hide();
33 
34  void show_nonmodal(const std::string &la, const std::string &button, std::function<void(void)> fn,
35  const std::string &la2 = "");
36 
37  // virtual ~MainWindow();
38 private:
39  Gtk::Box *gl_container = nullptr;
40  Gtk::Revealer *tool_bar = nullptr;
41  Gtk::Label *tool_bar_name_label = nullptr;
42  Gtk::Label *tool_bar_tip_label = nullptr;
43  Gtk::Label *tool_bar_flash_label = nullptr;
44  Gtk::Stack *tool_bar_stack = nullptr;
45  sigc::connection tip_timeout_connection;
46  bool tool_bar_queue_close = false;
47 
48  Gtk::Revealer *hud = nullptr;
49  Gtk::Label *hud_label = nullptr;
50 
51  sigc::connection hud_timeout_connection;
52  bool hud_queue_close = false;
53 
54  Gtk::Button *nonmodal_close_button = nullptr;
55  Gtk::Button *nonmodal_button = nullptr;
56  Gtk::Revealer *nonmodal_rev = nullptr;
57  Gtk::Label *nonmodal_label = nullptr;
58  Gtk::Label *nonmodal_label2 = nullptr;
59  std::function<void(void)> nonmodal_fn;
60 
61  void sc(void);
62  void cm(const horizon::Coordi &cursor_pos);
63 };
64 } // namespace horizon
Definition: main_window.hpp:7
Definition: canvas_gl.hpp:13
Definition: block.cpp:9