FuncDoodle
Loading...
Searching...
No Matches
FuncDoodle::ToolManager Class Reference

Manages tools in FuncDoodle. More...

#include <ToolManager.h>

Public Member Functions

 ToolManager (KeybindsRegistry &keybinds)
 Creates a tool manager bound to the application keybind registry.
 ~ToolManager ()
void RegisterKeybinds ()
 Registers tool-selection keybinds.
void RenderTools ()
 Renders the complete tool UI.
void Buttons ()
 Renders tool-selection buttons.
void Widgets ()
 Renders tool configuration widgets.
void UpdateCursor ()
 Updates cursor state to match the active tool.
void Cursor ()
 Renders or updates the tool cursor overlay.
ToolType GetSelectedTool ()
 Returns the currently selected tool.
const float * GetCol ()
 Returns the current tool color as normalized RGB values.
void SetCol (struct Col col)
 Sets the current tool color from an 8-bit RGB color.
int GetSize () const
 Returns the current tool size.
void SetSize (int size)
 Sets the current tool size.

Private Attributes

ToolType m_SelectedTool = ToolType::Pencil
float m_Col [3] = {0.0f, 0.0f, 0.0f}
int m_Size = 1
KeybindsRegistrym_Keybinds

Detailed Description

Manages tools in FuncDoodle.

Does various stuff like rendering tool buttons, handling tool keybinds

Constructor & Destructor Documentation

◆ ToolManager()

FuncDoodle::ToolManager::ToolManager ( KeybindsRegistry & keybinds)

Creates a tool manager bound to the application keybind registry.

Parameters
keybindsKeybind registry used for tool shortcuts.

◆ ~ToolManager()

FuncDoodle::ToolManager::~ToolManager ( )
default

Member Function Documentation

◆ Buttons()

void FuncDoodle::ToolManager::Buttons ( )

Renders tool-selection buttons.

◆ Cursor()

void FuncDoodle::ToolManager::Cursor ( )

Renders or updates the tool cursor overlay.

◆ GetCol()

const float * FuncDoodle::ToolManager::GetCol ( )
inline

Returns the current tool color as normalized RGB values.

Returns
Pointer to a 3-float RGB array.

◆ GetSelectedTool()

ToolType FuncDoodle::ToolManager::GetSelectedTool ( )
inline

Returns the currently selected tool.

Returns
Active tool type.

◆ GetSize()

int FuncDoodle::ToolManager::GetSize ( ) const
inlinenodiscard

Returns the current tool size.

Returns
Brush or tool size.

◆ RegisterKeybinds()

void FuncDoodle::ToolManager::RegisterKeybinds ( )

Registers tool-selection keybinds.

◆ RenderTools()

void FuncDoodle::ToolManager::RenderTools ( )

Renders the complete tool UI.

◆ SetCol()

void FuncDoodle::ToolManager::SetCol ( struct Col col)
inline

Sets the current tool color from an 8-bit RGB color.

Parameters
colNew tool color.

◆ SetSize()

void FuncDoodle::ToolManager::SetSize ( int size)
inline

Sets the current tool size.

Parameters
sizeNew brush or tool size.

◆ UpdateCursor()

void FuncDoodle::ToolManager::UpdateCursor ( )

Updates cursor state to match the active tool.

◆ Widgets()

void FuncDoodle::ToolManager::Widgets ( )

Renders tool configuration widgets.

Member Data Documentation

◆ m_Col

float FuncDoodle::ToolManager::m_Col[3] = {0.0f, 0.0f, 0.0f}
private

◆ m_Keybinds

KeybindsRegistry& FuncDoodle::ToolManager::m_Keybinds
private

◆ m_SelectedTool

ToolType FuncDoodle::ToolManager::m_SelectedTool = ToolType::Pencil
private

◆ m_Size

int FuncDoodle::ToolManager::m_Size = 1
private

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