|
FuncDoodle
|
Class holding most of the data required to launch FuncDoodle. More...
#include <App.h>
Public Types | |
| enum class | Where { Before = 0 , After = 1 } |
| Controls whether imported content is inserted before or after the current frame. More... | |
Public Member Functions | |
| Application () | |
| ~Application () | |
| void | Run () |
| Runs the main application loop. | |
| void | InitImGui () |
| Initializes ImGui for the application window. | |
| void | RenderImGui () |
| Renders one ImGui frame. | |
| void | OpenFileDialog (std::function< void()> done) |
| Opens the project open dialog. | |
| void | SaveFileDialog (std::function< void()> done) |
| Opens the project save dialog. | |
| void | ReadProjectFile () |
| Reads the currently selected project file from disk. | |
| void | SaveProjectFile () |
| Saves the current project using its active path. | |
| void | RegisterKeybinds () |
| Registers application-level keybinds. | |
| void | OpenSaveChangesDialog () |
| Opens the unsaved-changes confirmation dialog. | |
| bool | SaveChangesDialogOpen () |
| Returns whether the save-changes dialog is open. | |
| void | HideCursor () |
| Hides the application cursor. | |
| void | ShowCursor () |
| Shows the application cursor. | |
| SharedPtr< ProjectFile > | GetCurProj () |
| Returns the currently open project. | |
| void | SetCurProj (SharedPtr< ProjectFile > proj) |
| Sets the currently open project. | |
| SharedPtr< ProjectFile > | GetCacheProj () |
| Returns the cached project used during prompts and swaps. | |
| void | SetCacheProj (SharedPtr< ProjectFile > proj) |
| Sets the cached project reference. | |
| AssetLoader * | GetAssetLoader () |
| Returns the global asset loader. | |
| bool | GetShouldClose () const |
| Returns whether the application should exit. | |
| UUID | GetTheme () |
| Returns the currently selected theme UUID. | |
| void | SetTheme (UUID theme) |
| Sets the current theme UUID. | |
| void | SetFrameLimit (double frameLimit) |
| Sets the main-loop frame cap. | |
| void | SetShouldClose (bool shouldClose) |
| Sets whether the application should exit. | |
| Platform::Window * | GetWindow () |
| Returns the mutable application window. | |
| AppSettings & | GetSettings () |
| Returns mutable application settings. | |
| double | GetFrameTime () const |
| Returns target frame time derived from the frame limit. | |
| KeybindsRegistry & | GetKeybinds () |
| Returns the application keybind registry. | |
| int | GetExportFormat () const |
| Returns the selected export format identifier. | |
| UIManager & | GetUiManager () |
| Returns the top-level UI manager. | |
| int & | GetExportFormatPtr () |
| Returns a mutable reference to the export format field. | |
| std::filesystem::path | GetThemesPath () |
| Returns the directory used for theme files. | |
| double & | GetFrameLimitCache () |
| Returns the cached previous frame limit. | |
| void | SetExportFormat (int format) |
| Sets the export format identifier. | |
| AnimationManager * | GetManager () |
| Returns the animation manager. | |
| SharedPtr< EditorController > | GetController () |
| Returns the shared editor controller. | |
| Platform::Window | GetWindow () const |
| Returns a copy of the application window wrapper. | |
| void | UpdateFPS (double deltaTime) |
| Updates FPS tracking from frame delta time. | |
| void | DropCallback (int count, const char **paths) |
| Handles file-drop events from the window. | |
| void | Update () |
| Updates per-frame application state outside direct rendering. | |
| void | Save (bool exit=false) |
| Saves the current project and optionally exits. | |
| void | CloseCurrentProject () |
| Releases the active project and clears dependent UI state. | |
| void | SaveAt (const char *path) |
| Saves the current project at an explicit path. | |
| void | RenderRotate () |
| Renders the rotate-project UI. | |
| void | Rotate (int32_t deg) |
| Rotates the active frame or selection by degrees. | |
| void | Import (Where where) |
| Imports content relative to the current frame. | |
| void | DeleteCurrentSelection () |
| Deletes the active selection contents. | |
| void | MoveCurrentSelection (Direction direction) |
| Moves the active selection by one step. | |
Static Public Member Functions | |
| static Application * | Get () |
| Returns the active application singleton. | |
| static void | ApplyThemeStyle (const ImGuiStyle &themeStyle) |
| Applies an ImGui style to the application. | |
| static void | ApplyThemeUuid (const FuncDoodle::UUID &uuid) |
| Applies a theme by UUID, falling back to the default theme. | |
| static bool | IsPosInFrame (ImVec2 pos) |
| Returns whether a screen-space point lies within the frame view. | |
Private Attributes | |
| std::string | m_FilePath |
| UIManager | m_UiManager |
| AppSettings | m_Settings |
| KeybindsRegistry | m_Keybinds |
| SharedPtr< ProjectFile > | m_CurrentProj |
| SharedPtr< ProjectFile > | m_CacheProj |
| UniquePtr< AnimationManager > | m_Manager |
| Platform::Window | m_Window |
| UniquePtr< AssetLoader > | m_AssetLoader |
| SharedPtr< EditorController > | m_EditorController |
| int | m_ExportFormat = 0 |
| UUID | m_Theme |
| bool | m_ShouldClose = false |
| bool | m_ShowTests = true |
| double | m_FrameLimitCache = 1000.0 |
| double | m_LastFrameTime = 0.0 |
| std::chrono::time_point< std::chrono::high_resolution_clock > | m_LastFrame |
| double | m_FPS = 0.0 |
| std::array< float, 3 > | m_CacheBGCol |
| std::filesystem::path | m_ThemesPath |
Static Private Attributes | |
| static Application * | s_Instance = nullptr |
Class holding most of the data required to launch FuncDoodle.
Main application class.
|
strong |
| FuncDoodle::Application::Application | ( | ) |
| FuncDoodle::Application::~Application | ( | ) |
|
inlinestatic |
Applies an ImGui style to the application.
| themeStyle | Theme style to copy into ImGui. |
|
inlinestatic |
| void FuncDoodle::Application::CloseCurrentProject | ( | ) |
Releases the active project and clears dependent UI state.
| void FuncDoodle::Application::DeleteCurrentSelection | ( | ) |
Deletes the active selection contents.
| void FuncDoodle::Application::DropCallback | ( | int | count, |
| const char ** | paths ) |
Handles file-drop events from the window.
| count | Number of dropped paths. |
| paths | Array of dropped file paths. |
|
inlinestatic |
Returns the active application singleton.
|
inline |
Returns the global asset loader.
|
inline |
Returns the cached project used during prompts and swaps.
|
inline |
Returns the shared editor controller.
|
inline |
Returns the currently open project.
|
inline |
Returns the selected export format identifier.
|
inline |
Returns a mutable reference to the export format field.
|
inline |
Returns the cached previous frame limit.
|
inline |
Returns target frame time derived from the frame limit.
|
inline |
Returns the application keybind registry.
|
inline |
Returns the animation manager.
|
inline |
Returns mutable application settings.
|
inline |
Returns whether the application should exit.
|
inline |
|
inline |
Returns the directory used for theme files.
|
inline |
Returns the top-level UI manager.
|
inline |
Returns the mutable application window.
|
inlinenodiscard |
Returns a copy of the application window wrapper.
| void FuncDoodle::Application::HideCursor | ( | ) |
Hides the application cursor.
| void FuncDoodle::Application::Import | ( | Where | where | ) |
Imports content relative to the current frame.
| where | Whether to insert before or after. |
| void FuncDoodle::Application::InitImGui | ( | ) |
Initializes ImGui for the application window.
|
static |
Returns whether a screen-space point lies within the frame view.
| pos | Position to test. |
| void FuncDoodle::Application::MoveCurrentSelection | ( | Direction | direction | ) |
Moves the active selection by one step.
| direction | Direction to move in. |
| void FuncDoodle::Application::OpenFileDialog | ( | std::function< void()> | done | ) |
Opens the project open dialog.
| done | Callback invoked after dialog handling completes. |
| void FuncDoodle::Application::OpenSaveChangesDialog | ( | ) |
Opens the unsaved-changes confirmation dialog.
| void FuncDoodle::Application::ReadProjectFile | ( | ) |
Reads the currently selected project file from disk.
| void FuncDoodle::Application::RegisterKeybinds | ( | ) |
Registers application-level keybinds.
| void FuncDoodle::Application::RenderImGui | ( | ) |
Renders one ImGui frame.
| void FuncDoodle::Application::RenderRotate | ( | ) |
Renders the rotate-project UI.
| void FuncDoodle::Application::Rotate | ( | int32_t | deg | ) |
Rotates the active frame or selection by degrees.
| deg | Rotation angle in degrees. |
| void FuncDoodle::Application::Run | ( | ) |
Runs the main application loop.
| void FuncDoodle::Application::Save | ( | bool | exit = false | ) |
Saves the current project and optionally exits.
| exit | Whether to close the app after saving. |
| void FuncDoodle::Application::SaveAt | ( | const char * | path | ) |
Saves the current project at an explicit path.
| path | Output project path. |
|
inline |
Returns whether the save-changes dialog is open.
| void FuncDoodle::Application::SaveFileDialog | ( | std::function< void()> | done | ) |
Opens the project save dialog.
| done | Callback invoked after dialog handling completes. |
| void FuncDoodle::Application::SaveProjectFile | ( | ) |
Saves the current project using its active path.
|
inline |
Sets the cached project reference.
| proj | Project to cache. |
|
inline |
Sets the currently open project.
| proj | Project to make active. |
|
inline |
Sets the export format identifier.
| format | Export format value. |
|
inline |
Sets the main-loop frame cap.
| frameLimit | Target frame limit. |
|
inline |
Sets whether the application should exit.
| shouldClose | New close flag value. |
|
inline |
| void FuncDoodle::Application::ShowCursor | ( | ) |
Shows the application cursor.
| void FuncDoodle::Application::Update | ( | ) |
Updates per-frame application state outside direct rendering.
| void FuncDoodle::Application::UpdateFPS | ( | double | deltaTime | ) |
Updates FPS tracking from frame delta time.
| deltaTime | Frame time in seconds. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |