#pragma once #include "AftrConfig.h" #ifdef AFTR_CONFIG_USE_IMGUI #include "WOImGuiAbstract.h" namespace Aftr { class WOImGui_Demo : public WOImGuiAbstract { public: static WOImGui_Demo* New( WOGUI* parentWOGUI, float width = 1.0f, float height = 1.0f ); virtual ~WOImGui_Demo(); ///The main rendering method for the Dear ImGui. A user overrides this and places ///all ImGui:: calls here beginning with ImGui::Begin() and ending with ImGui::End(). virtual void drawImGui_for_this_frame(); virtual void onUpdateWO() override; ///Just an informal example on how to draw an Aftr::Texture as a image in ImGui. ///This is quite fast because ImGui uses the same underlying GLint texture that ///Aftr::Texture wraps. void drawImGui_Texture( Texture* tex ); protected: virtual void onCreate( float width, float height ) override; WOImGui_Demo( WOGUI* parentWOGUI ); std::filesystem::path selected_path{ "./" }; std::string origin_fileDialog = "None"; //not essential at all -- simply shows how title is used as a hashed key for file dialog }; } #endif