BetaTrader
A HFT Eco-System
Loading...
Searching...
No Matches
client_ui::UIManager Class Reference

Manages the lifecycle of the GLFW window and ImGui context. More...

#include <UIManager.h>

Collaboration diagram for client_ui::UIManager:
Collaboration graph

Public Member Functions

 UIManager ()
 
 ~UIManager ()
 
void beginFrame ()
 Prepares for a new frame (polls events, starts ImGui frame).
 
void endFrame ()
 Finalizes the frame (renders ImGui, swaps buffers).
 
GLFWwindow * getWindow () const
 
void renderDockspace ()
 Renders the master dockspace that fills the entire window.
 
bool shouldClose () const
 Checks if the window should close (e.g., user clicked X).
 
bool start (const std::string &title, int width, int height)
 Initializes GLFW, creates the window, and sets up ImGui.
 
void stop ()
 Shuts down ImGui and GLFW, destroying the window.
 

Private Attributes

ImGuiContext * mImGuiContext = nullptr
 
GLFWwindow * mWindow = nullptr
 

Detailed Description

Manages the lifecycle of the GLFW window and ImGui context.

Constructor & Destructor Documentation

◆ UIManager()

client_ui::UIManager::UIManager ( )

◆ ~UIManager()

client_ui::UIManager::~UIManager ( )
Here is the call graph for this function:

Member Function Documentation

◆ beginFrame()

void client_ui::UIManager::beginFrame ( )

Prepares for a new frame (polls events, starts ImGui frame).

Here is the caller graph for this function:

◆ endFrame()

void client_ui::UIManager::endFrame ( )

Finalizes the frame (renders ImGui, swaps buffers).

Here is the caller graph for this function:

◆ getWindow()

GLFWwindow * client_ui::UIManager::getWindow ( ) const
inline

◆ renderDockspace()

void client_ui::UIManager::renderDockspace ( )

Renders the master dockspace that fills the entire window.

Here is the caller graph for this function:

◆ shouldClose()

bool client_ui::UIManager::shouldClose ( ) const

Checks if the window should close (e.g., user clicked X).

Here is the caller graph for this function:

◆ start()

bool client_ui::UIManager::start ( const std::string &  title,
int  width,
int  height 
)

Initializes GLFW, creates the window, and sets up ImGui.

Parameters
titleWindow title.
widthInitial width.
heightInitial height.
Returns
true if successful.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void client_ui::UIManager::stop ( )

Shuts down ImGui and GLFW, destroying the window.

Here is the caller graph for this function:

Member Data Documentation

◆ mImGuiContext

ImGuiContext* client_ui::UIManager::mImGuiContext = nullptr
private

◆ mWindow

GLFWwindow* client_ui::UIManager::mWindow = nullptr
private

The documentation for this class was generated from the following files: