cgv
application.h
1 #pragma once
2 
3 #include <string>
4 #include "window.h"
5 #include "lib_begin.h"
6 
7 namespace cgv {
9  namespace gui {
10 
13 {
14  // pixel coordinate of monitor
15  int x, y;
16  // pixel dimensions of monitor
17  unsigned w, h;
18  // pixel densities
19  float dpi_x, dpi_y;
20 };
21 
23 class CGV_API application
24 {
25 public:
27  static bool enumerate_monitors(std::vector<monitor_description>& monitor_descriptions);
29  static window_ptr create_window(int w, int h,
30  const std::string& title, const std::string& window_type = "viewer");
32  static bool remove_window(window_ptr w);
34  static bool set_focus(const_window_ptr);
36  static unsigned int get_nr_windows();
38  static window_ptr get_window(unsigned int i);
40  static bool run();
42  static void quit(int exit_code = 0);
44  static void copy_to_clipboard(const std::string& s);
46  static std::string paste_from_clipboard();
47 };
48 
49  }
50 }
51 
52 #include <cgv/config/lib_end.h>
cgv::gui::application
the application class is only a container for static methods that give access to the windows of the a...
Definition: application.h:24
cgv::gui::monitor_description
monitor description
Definition: application.h:13
cgv::data::ref_ptr< window >
cgv
the cgv namespace
Definition: vr_calib.cxx:9