Horizon
location_entry.hpp
1 #pragma once
2 #include <gtkmm.h>
3 
4 namespace horizon {
5 
6 class LocationEntry : public Gtk::Box {
7 public:
8  LocationEntry(const std::string &rel = "");
9  void set_filename(const std::string &s);
10  void set_rel_filename(const std::string &s);
11  void set_relative_to(const std::string &s);
12  std::string get_filename();
13  void set_warning(const std::string &t);
14 
15  typedef sigc::signal<void> type_signal_changed;
16  type_signal_changed signal_changed()
17  {
18  return s_signal_changed;
19  }
20 
21  bool check_ends_json(bool *v = nullptr);
22 
23 private:
24  std::string relative_to;
25  std::string get_rel_filename(const std::string &s) const;
26  Gtk::Entry *entry = nullptr;
27  void handle_button();
28 
29  type_signal_changed s_signal_changed;
30 };
31 } // namespace horizon
Definition: location_entry.hpp:6