The ImguiViewport Class. This class defines how to render a viewport. More...
#include <ImguiViewport.h>
Public Member Functions | |
| ImguiViewport (const std::string &panelName, FrameInfo &frameInfo, uint32_t index=0) | |
| Constructor Function. | |
| virtual | ~ImguiViewport () override=default |
| Destructor Function. | |
| virtual void | OnUpdate (TimeStep &ts) override |
| This interface is called On SlateSystem Update. | |
| virtual void | OnRender () override |
| This interface is called On SlateRenderer Render. | |
| virtual void | OnEvent (Event &event) override |
| This interface is called On Global Event Function Pointer is called. | |
| std::pair< uint32_t, uint32_t > | GetMousePosInViewport () const |
| Get Mouse Position Relative Viewport(Might be negative value). | |
| std::shared_ptr< ImguiGizmos > | GetGizmo () |
| Get Gizmo Shared Pointer. | |
| void | Toggle () const |
| Toggle viewport. | |
| void | SetWindowState (bool isSlateOn) |
| Set Slate is render able or not. | |
| ImVec2 & | GetPanelSize () |
| Get Panel Size. | |
| ImVec2 & | GetPanelPos () |
| Get Panel Pos. | |
| bool | IsFocused () const |
| Get is IsFocused. | |
| bool | IsHovered () const |
| Get is IsHovered. | |
| bool | IsResizedThisFrame () const |
| Get boolean of whether resized this frame. | |
| const std::string & | GetName () const |
| Get this panel Name. | |
Protected Member Functions | |
| virtual void | QueryIsResizedThisFrame (const ImVec2 &thisFrameSize) override |
| Query whether viewport is resized this frame. Clamp min m_panelsize value to 1 here, for vulkan can not work with 0 extent. | |
| void | Begin (float alpha=1.0f, ImGuiWindowFlags flags=0) |
| Begin a common slate. | |
| void | Begin (const std::string &panelName, float alpha=1.0f, ImGuiWindowFlags flags=0) |
| Begin a common slate with name. | |
| void | End () |
| End a slate. | |
| void | LoadSlateIcon (ImTextureID &id, const std::string &iconFile) |
| Load a Texture from ResourcePool. | |
Protected Attributes | |
| ImVec2 | m_PanelSize = { 1, 1 } |
| This slate's size. | |
| ImVec2 | m_PanelPos |
| This slate's position in desktop. | |
| std::string | m_PanelName |
| This slate's name. | |
| FrameInfo & | m_FrameInfo |
| The FrameData reference. | |
| bool | m_IsFocused = false |
| True if Focus. | |
| bool | m_IsHovered = false |
| True if Hovered. | |
| bool | m_IsSlateOn = false |
| bool | m_IsResized = false |
| Boolean of whether resized this frame. | |
| ImGuiWindowFlags | m_WindowFlags = 0 |
| Flags of this window slate. | |
Private Member Functions | |
| bool | OnSlateResize (SlateResizeEvent &event) const |
| Event Dispatcher target. Registry on Slate(Viewport) Resized. | |
| bool | OnWindowResizeOver (WindowResizeOverEvent &event) const |
| Event Dispatcher target. Registry on Windows Resized. | |
| bool | OnToggleSlate (KeyPressedEvent &event) const |
| Toggle focused slate. | |
Private Attributes | |
| std::shared_ptr< SlateImage > | m_ViewportContext |
| SlateImage of SceneColor. | |
| uint32_t | m_Index |
| This viewport index. | |
| std::shared_ptr< ImguiFloatingInfo > | m_FloatingInfo |
| The shared pointer of ImguiFloatingInfo. | |
| std::shared_ptr< ImguiGizmos > | m_Gizmos |
| The shared pointer of ImguiGizmos. | |
| std::shared_ptr< ImguiViewportToolBar > | m_ToolBar |
| The shared pointer of ImguiGizmos. | |
| bool | m_IsToggled = false |
| True if this slate toggled this frame. | |
| std::shared_ptr< scl::behave_state_list< void > > | m_ToggleStateList |
| Toggle behave state list. | |
The ImguiViewport Class. This class defines how to render a viewport.
Definition at line 34 of file ImguiViewport.h.