SpiecsEngine
 
Loading...
Searching...
No Matches
ImguiViewportToolBar.h
Go to the documentation of this file.
1/**
2* @file ImguiViewportToolBar.h
3* @brief The ImguiViewportToolBar Class Definitions.
4* @author Spices.
5*/
6
7#pragma once
8#include "Core/Core.h"
9#include "Slate/Imgui/ImguiUtils.h"
10
11namespace Spices {
12
14 {
15 public:
16
17 /**
18 * @brief Constructor Function.
19 * @param[in] panelName The Slate's name to show.
20 * @param[in] frameInfo The Frame Date that in use.
21 * @param[in] owner The slate Owner.
22 */
24 const std::string& panelName,
25 FrameInfo& frameInfo,
26 ImguiSlate* owner
27 );
28
29 /**
30 * @brief Destructor Function.
31 */
32 virtual ~ImguiViewportToolBar() override = default;
33
34 /**
35 * @brief This interface is called On SlateSystem Update.
36 * @param[in] ts TimeStep.
37 */
38 virtual void OnUpdate(TimeStep& ts) override {};
39
40 /**
41 * @brief This interface is called On SlateRenderer Render.
42 */
43 virtual void OnRender() override;
44
45 /**
46 * @brief This interface is called On Global Event Function Pointer is called.
47 */
48 virtual void OnEvent(Event& event) override {}
49
50 private:
51
52 /**
53 * @brief The owner, usually is a ImguiViewport class.
54 */
56
57 bool m_OptionMenuOn = false;
58 bool m_RenderMenuOn = false;
59 bool m_ViewMenuOn = false;
60 bool m_CameraMenuOn = false;
61 bool m_LightMenuOn = false;
62 bool m_WayPointOn = false;
63 };
64}
#define BIND_EVENT_FN(x)
Bind Event.
Definition Event.h:88
#define SPICES_PROFILE_ZONEN(...)
#define SPICES_PROFILE_ZONE
EventDispatcher(Event &event)
Constructor Function.
Definition Event.h:172
This Class store a Specific Event type first and Dispatch a event handle function to it.
Definition Event.h:156
This Class is the basic Event Class. Inherit from it and create specific event class.
Definition Event.h:96
FrameInfo Class. This class defines the FrameInfo data.
Definition FrameInfo.h:32
void End()
End a slate.
ImguiSlate(const std::string &panelName, FrameInfo &frameInfo)
Constructor Function. Init with Slate's name.
Definition ImguiUtils.h:35
bool m_IsResized
Boolean of whether resized this frame.
Definition ImguiUtils.h:186
This Class defines the basic behaves of specific slate. When we add an new Slate, we need inherit fro...
Definition ImguiUtils.h:27
ImguiSlate * m_Owner
The owner, usually is a ImguiViewport class.
virtual void OnUpdate(TimeStep &ts) override
This interface is called On SlateSystem Update.
ImguiViewportToolBar(const std::string &panelName, FrameInfo &frameInfo, ImguiSlate *owner)
Constructor Function.
virtual ~ImguiViewportToolBar() override=default
Destructor Function.
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.
uint32_t m_Index
This viewport index.
bool OnWindowResizeOver(WindowResizeOverEvent &event) const
Event Dispatcher target. Registry on Windows Resized.
void Toggle() const
Toggle viewport.
bool OnToggleSlate(KeyPressedEvent &event) const
Toggle focused slate.
ImguiViewport(const std::string &panelName, FrameInfo &frameInfo, uint32_t index=0)
Constructor Function.
bool OnSlateResize(SlateResizeEvent &event) const
Event Dispatcher target. Registry on Slate(Viewport) Resized.
virtual void QueryIsResizedThisFrame(const ImVec2 &thisFrameSize) override
Query whether viewport is resized this frame. Clamp min m_panelsize value to 1 here,...
virtual void OnRender() override
This interface is called On SlateRenderer Render.
std::pair< uint32_t, uint32_t > GetMousePosInViewport() const
Get Mouse Position Relative Viewport(Might be negative value).
virtual void OnEvent(Event &event) override
This interface is called On Global Event Function Pointer is called.
The ImguiViewport Class. This class defines how to render a viewport.
const int & GetKeyCode() const
Get Key Input Code.
Definition KeyEvent.h:30
This Class is inherited from KeyEvent Class.
Definition KeyEvent.h:57
This Class is inherited from Event Class. Called by Viewport Resize.
Definition SlateEvent.h:18
This Class handles our engine time step during frames. Global Unique.
Definition TimeStep.h:22