1#include "application.h"
36 return d->set_focus(w);
44 return d->get_nr_windows();
58 std::cerr <<
"\nSorry, but no cgv::gui-driver available.\n"
59 <<
"To get one, compile project 'cg_fltk' and add 'plugin:cg_fltk.cgv'\n"
60 <<
"to the argument list when starting the fltk_viewer\n"
61 <<
"(in Visual Studio right click you project and get to properties,\n"
62 <<
" select 'configuration settings' -> 'debugging' -> command line arguments')" << std::endl;
82 d->copy_to_clipboard(s);
91 return d->paste_from_clipboard();
bool empty() const
check if pointer is not yet set
static window_ptr create_window(int w, int h, const std::string &title, const std::string &window_type="viewer")
create a window of the given type, where all gui implementations must support the type "viewer"
static void copy_to_clipboard(const std::string &s)
copy text to the clipboard
static bool run()
run the main loop of the window system
static bool enumerate_monitors(std::vector< monitor_description > &monitor_descriptions)
fill the passed vector with a list of all monitors descriptions; returns false if no gui driver is av...
static window_ptr get_window(unsigned int i)
return the i-th created window
static void quit(int exit_code=0)
quit the application by closing all windows
static std::string paste_from_clipboard()
retreive text from clipboard
static bool remove_window(window_ptr w)
remove a window from the application's list of windows
static unsigned int get_nr_windows()
return the number of created windows
static bool set_focus(const_window_ptr)
set the input focus to the given window
data::ref_ptr< window > window_ptr
ref counted pointer to &window
gui_driver_ptr get_gui_driver()
return the currently registered gui driver or an empty pointer if non has been registered