|
bool | is_key_down (ImGuiKey key) |
|
bool | is_key_pressed (ImGuiKey key) |
|
bool | is_key_released (ImGuiKey key) |
|
bool | is_mouse_down (ImGuiKey key) |
|
bool | is_mouse_clicked (ImGuiKey key) |
|
bool | is_mouse_released (ImGuiKey key) |
|
InputState & | get_input () |
| Returns keyboard and mouse state.
|
|
const InputState & | get_input () const |
| Returns keyboard and mouse state.
|
|
| Viewer (const std::string &window_title, int window_width, int window_height) |
| Creates a window with given title and size and default options. More...
|
|
| Viewer (int argc, char **argv) |
| Creates a window with filename as title. More...
|
|
| Viewer (const WindowOptions &window_options) |
| Creates a window with given options. More...
|
|
| operator ui::Registry & () |
|
| operator const ui::Registry & () const |
|
bool | should_close () const |
| UI action wants the window to close. More...
|
|
bool | run (const std::function< bool(Registry &r)> &main_loop) |
| Runs the viewer until closed by the user or main_loop returns false.
|
|
bool | run (const std::function< void(void)> &main_loop={}) |
| Runs the viewer until closed by the user.
|
|
bool | is_initialized () const |
| Returns true if viewer initialized succesfully.
|
|
bool | is_show_topbar_menu () const |
| Returns true if the default menu is rendered.
|
|
void | set_show_topbar_menu (bool show_topbar_menu) |
| Set if the default menu is rendered.
|
|
double | get_frame_elapsed_time () const |
| Returns elapsed time in seconds from the last frame.
|
|
int | get_width () const |
|
int | get_height () const |
|
const std::string & | get_imgui_config_path () const |
|
float | get_window_scaling () const |
| Returns UI window scaling (when Windows or retina scaling is active)
|
|
Keybinds & | get_keybinds () |
| Returns keybinds object.
|
|
const Keybinds & | get_keybinds () const |
| Returns keybinds object.
|
|
Registry & | registry () |
| Returns reference to the registry.
|
|
const Registry & | registry () const |
| Returns reference to the registry.
|
|
const Systems & | systems () const |
| Returns reference to the systems.
|
|
Systems & | systems () |
| Returns reference to the systems.
|
|
std::future< void > | run_on_main_thread (std::function< void(void)> fn) |
| Enqueues fn to be run on the main thread.
|
|
unsigned int | get_main_thread_max_func_per_frame () const |
| Returns the limit of how many enqueued functions can be run during a single frame on the main thread.
|
|
void | set_main_thread_max_func_per_frame (unsigned int limit) |
| Sets the limit of how many enqueued functions can be run during a single frame on the main thread Use std::numeric_limits<unsigned int>::max() for no limit.
|
|
Viewer use systems()
to add functions that should be called every frame use registry()
or util functions to read and manipulate application's state.