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

Responsible for registering keybinds for animations, rendering timeline, logs window, controls window, etc. More...

#include <Manager.h>

Public Member Functions

 AnimationManager (SharedPtr< ProjectFile > proj, AssetLoader *assetLoader, SharedPtr< EditorController > editorController, KeybindsRegistry &keybinds, AppSettings &settings)
 Creates an animation manager for a project and its UI state.
 ~AnimationManager ()
void RegisterKeybinds ()
 Registers animation-specific keybinds.
void RenderTimeline (bool prevEnabled)
 Renders the timeline UI.
void RenderControls ()
 Renders playback and frame-management controls.
SharedPtr< ProjectFileProj () const
 Returns the currently managed project.
void SetProj (SharedPtr< ProjectFile > proj)
 Replaces the active project and updates the player to match.
void ResetProjectState ()
 Clears renderer/player state derived from the active project.
void SetSettings (AppSettings &settings)
 Rebinds the manager to a different settings object.
AnimationPlayerPlayer () const
 Returns the animation player.
void SetPlayer (AnimationPlayer *player)
 Replaces the owned animation player.
unsigned long SelectedFrameI () const
 Returns the selected frame index.
FrameSelectedFrame ()
 Returns the selected frame object.
const UniquePtr< FrameRenderer > & GetFrameRenderer () const
 Returns the primary frame renderer.

Static Public Member Functions

static void RenderLogs ()
 Renders animation-related log or debug output.

Private Attributes

SharedPtr< ProjectFilem_Proj
unsigned long m_SelectedFrame {0}
UniquePtr< FrameRendererm_FrameRenderer
UniquePtr< FrameRendererm_TimelineFrameRenderer
UniquePtr< ToolManagerm_ToolManager
UniquePtr< AnimationPlayerm_Player
SharedPtr< EditorControllerm_EditorController
KeybindsRegistrym_Keybinds
AssetLoaderm_AssetLoader
AppSettingsm_Settings

Detailed Description

Responsible for registering keybinds for animations, rendering timeline, logs window, controls window, etc.

Manages animation playback and user interaction, including handling input bindings and coordinating UI elements such as the timeline, logs, and control panels. Keeps animation state in sync with the editor and ensures consistent behavior during playback and editing.

Invariant
m_Proj is always non-null after construction.
m_Player is always non-null and references the same ProjectFile as m_Proj.
m_SelectedFrame is always a valid index into m_Proj->AnimFrames().
m_FrameRenderer and m_TimelineFrameRenderer are initialized before any render call.
m_EditorController is always non-null.
m_AssetLoader is non-null and owned externally.
m_Settings and m_Keybinds remain valid for the lifetime of this instance.k
Note
This class does not own the AssetLoader.
Warning
SetPlayer() must be called before SetProj().
See also
AnimationPlayer
FrameRenderer

Constructor & Destructor Documentation

◆ AnimationManager()

FuncDoodle::AnimationManager::AnimationManager ( SharedPtr< ProjectFile > proj,
AssetLoader * assetLoader,
SharedPtr< EditorController > editorController,
KeybindsRegistry & keybinds,
AppSettings & settings )

Creates an animation manager for a project and its UI state.

Parameters
projActive project to manage.
assetLoaderAsset loader used for icons and sounds.
editorControllerShared editor controller used by frame renderers.
keybindsRegistry containing animation-related keybinds.
settingsMutable application settings.

◆ ~AnimationManager()

FuncDoodle::AnimationManager::~AnimationManager ( )
default

Member Function Documentation

◆ GetFrameRenderer()

const UniquePtr< FrameRenderer > & FuncDoodle::AnimationManager::GetFrameRenderer ( ) const
inlinenodiscard

Returns the primary frame renderer.

Returns
Owned frame renderer pointer wrapper.

◆ Player()

AnimationPlayer * FuncDoodle::AnimationManager::Player ( ) const
inlinenodiscard

Returns the animation player.

Returns
Pointer to the playback controller.

◆ Proj()

SharedPtr< ProjectFile > FuncDoodle::AnimationManager::Proj ( ) const
inlinenodiscard

Returns the currently managed project.

Returns
Shared pointer to the active project.

◆ RegisterKeybinds()

void FuncDoodle::AnimationManager::RegisterKeybinds ( )

Registers animation-specific keybinds.

◆ RenderControls()

void FuncDoodle::AnimationManager::RenderControls ( )

Renders playback and frame-management controls.

◆ RenderLogs()

void FuncDoodle::AnimationManager::RenderLogs ( )
static

Renders animation-related log or debug output.

◆ RenderTimeline()

void FuncDoodle::AnimationManager::RenderTimeline ( bool prevEnabled)

Renders the timeline UI.

Parameters
prevEnabledWhether previous-frame preview is enabled.

◆ ResetProjectState()

void FuncDoodle::AnimationManager::ResetProjectState ( )

Clears renderer/player state derived from the active project.

◆ SelectedFrame()

Frame * FuncDoodle::AnimationManager::SelectedFrame ( )
inline

Returns the selected frame object.

Returns
Pointer to the selected frame.

◆ SelectedFrameI()

unsigned long FuncDoodle::AnimationManager::SelectedFrameI ( ) const
inlinenodiscard

Returns the selected frame index.

Returns
Current frame index.

◆ SetPlayer()

void FuncDoodle::AnimationManager::SetPlayer ( AnimationPlayer * player)
inline

Replaces the owned animation player.

Parameters
playerNew player instance to own.

◆ SetProj()

void FuncDoodle::AnimationManager::SetProj ( SharedPtr< ProjectFile > proj)
inline

Replaces the active project and updates the player to match.

Parameters
projProject to manage.

◆ SetSettings()

void FuncDoodle::AnimationManager::SetSettings ( AppSettings & settings)
inline

Rebinds the manager to a different settings object.

Parameters
settingsSettings reference to store.

Member Data Documentation

◆ m_AssetLoader

AssetLoader* FuncDoodle::AnimationManager::m_AssetLoader
private

◆ m_EditorController

SharedPtr<EditorController> FuncDoodle::AnimationManager::m_EditorController
private

◆ m_FrameRenderer

UniquePtr<FrameRenderer> FuncDoodle::AnimationManager::m_FrameRenderer
private

◆ m_Keybinds

KeybindsRegistry& FuncDoodle::AnimationManager::m_Keybinds
private

◆ m_Player

UniquePtr<AnimationPlayer> FuncDoodle::AnimationManager::m_Player
private

◆ m_Proj

SharedPtr<ProjectFile> FuncDoodle::AnimationManager::m_Proj
private

◆ m_SelectedFrame

unsigned long FuncDoodle::AnimationManager::m_SelectedFrame {0}
private

◆ m_Settings

AppSettings& FuncDoodle::AnimationManager::m_Settings
private

◆ m_TimelineFrameRenderer

UniquePtr<FrameRenderer> FuncDoodle::AnimationManager::m_TimelineFrameRenderer
private

◆ m_ToolManager

UniquePtr<ToolManager> FuncDoodle::AnimationManager::m_ToolManager
private

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