FuncDoodle
Loading...
Searching...
No Matches
FuncDoodle Namespace Reference

The FuncDoodle C++ namespace. More...

Namespaces

namespace  Platform
namespace  ImUtil
namespace  Themes

Classes

class  Action
 Base interface for undoable and redoable editor actions. More...
class  DrawAction
 Represents a single-pixel draw operation for undo/redo. More...
class  FillAction
 Represents a bucket fill operation for undo/redo. More...
class  StrokeAction
 Represents a multi-pixel stroke operation for undo/redo. More...
struct  MoveSelectionActionContext
 Context data required to perform a selection move action. More...
class  DeleteFrameAction
 Removes a frame from a project with undo support. More...
class  InsertFrameAction
 Inserts a frame into a project with undo support. More...
class  MoveFrameLeftAction
 Moves a frame one position to the left. More...
class  MoveFrameRightAction
 Moves a frame one position to the right. More...
class  RotateFrameAction
 Rotates a frame by a fixed angle. More...
class  RotateSelectionAction
 Rotates a selection by a fixed angle in degrees. More...
class  DeleteSelectionAction
 Deletes a selection and stores previous pixel data for undo. More...
class  MoveSelectionAction
 Moves a selection in a given direction. More...
class  AssetLoader
 Convenient abstraction that's responsible for loading assets at a given assetsPath. More...
struct  AudioData
 Represents raw PCM audio data. More...
class  AudioManager
 Handles loading and playback of audio data. More...
class  Application
 Class holding most of the data required to launch FuncDoodle. More...
struct  AppSettings
 Represents the application's current settings and loaded from imgui.ini. More...
class  Grid
 Represents a singular grid. More...
class  AnimationManager
 Responsible for registering keybinds for animations, rendering timeline, logs window, controls window, etc. More...
class  AnimationPlayer
 Responsible for playing a users' animation. More...
class  EditorController
 Handles canvas editing, painting tools, and stroke recording. More...
class  KeyMask
 Bitmask representing a set of ImGui keys. More...
class  Shortcut
 Keyboard shortcut definition (key + mods). More...
class  ShortcutWithUser
 Stores a default shortcut and an optional user-defined one. More...
class  KeybindsRegistry
 Stores and persists all keybinds used in FuncDoodle (default + user-defined). More...
struct  TimelineKeyContext
 Bundles commonly used parameters for timeline rendering. More...
class  KeyHandler
 Processes keybinds & shortcuts. More...
class  LongIndexArray
 Dynamic array of Frame objects for animation storage. More...
struct  Col
 A struct holding an RGB8 color. More...
class  ImageArray
 2D array of RGB8 color pixels. More...
class  Frame
 Wraps an ImageArray with higher-level frame editing operations. More...
class  ProjectFile
 Class that is responsible for storing, reading & saving users' project files. More...
class  PopupRegistry
 Stores all popups used in FuncDoodle. More...
class  FrameRenderer
 Responible for rendering a single frame, status bar and dispatching painting to EditorController. More...
class  Selection
 Base class for selection shapes. More...
struct  SquareSelection
 Rectangular selection defined by two corner points. More...
struct  TestResult
 Represents a single failed or recorded test assertion. More...
class  TestRegistry
 Global singleton collecting test scope results. More...
class  TestScope
 RAII-style test container for grouping assertions. More...
class  ToolManager
 Manages tools in FuncDoodle. More...
class  UIManager
 Renders main FuncDoodle UI. More...
struct  TextMetrics
 Basic rect struct used for text measurement. More...
class  TextUtil
 Opaque,static text measurement utility functions. More...
class  UUID
 Represents a single 16-byte opaque uuid-like unique identifier. More...

Enumerations

enum class  Direction {
  None = 0 , Left , Right , Up ,
  Down
}
 Direction used for moving a selection. More...
enum class  ToolType {
  Pencil , Eraser , Bucket , Picker ,
  Select
}
 All available tools in the editor. More...

Functions

void GlobalLoadAssets (AssetLoader *assetLoader)
 Loads global textures and sounds into the shared asset handles.
consteval const char * FuncVer ()
char * GlobalGetShortcut (const char *key, bool shift, bool super)
std::string Repeat (std::string_view s, size_t n)
 Repeats a string N times.
constexpr const char * ToolTypeName (ToolType t)
 Returns the user-facing name of a tool type.
constexpr uint32_t ToolTexID (ToolType tool)
 Returns the toolbar texture ID associated with a tool.
static void Tooltips (ToolType tool)
static void ToolKeybindsRegister (KeybindsRegistry &keybinds)
static void ToolKeybinds (ToolType *tool, KeybindsRegistry &keybinds)
std::ostream & operator<< (std::ostream &os, const UUID &obj)

Variables

uint32_t s_PlayTexId = 0
 Toolbar play icon texture.
uint32_t s_PauseTexId = 0
 Toolbar pause icon texture.
uint32_t s_RewindTexId = 0
 Toolbar rewind icon texture.
uint32_t s_EndTexId = 0
 Toolbar jump-to-end icon texture.
uint32_t s_PencilTexId = 0
 Pencil tool icon texture.
uint32_t s_PickerTexId = 0
 Color picker tool icon texture.
uint32_t s_EraserTexId = 0
 Eraser tool icon texture.
uint32_t s_BucketTexId = 0
 Bucket tool icon texture.
uint32_t s_SelectTexId = 0
 Selection tool icon texture.
uint32_t s_TextTexId = 0
 Reserved text tool icon texture.
uint32_t s_AddTexId = 0
 Add/new action icon texture.
uint32_t s_OpenTexId = 0
 Open action icon texture.
AudioData s_ProjCreateSound
 Sound played when creating a project.
AudioData s_ProjSaveSound
 Sound played when saving a project.
AudioData s_ExportSound
 Sound played when exporting.
AudioData s_ProjSaveEndSound
 Sound played when save completes.
constexpr uint8_t g_MaxColorValue = 255
 Maximum value for an 8-bit color channel.
constexpr uint8_t g_ColorWhite = 255
 Fully white RGB channel value.
constexpr uint8_t g_AlphaOpaque = 255
 Fully opaque alpha value.
constexpr uint8_t g_ColorGrayRgb = 150
 Default gray color value in RGB space.
constexpr int g_BufferChunkSize = 32
 Size of an internal buffer chunk (used for batching/processing).
constexpr int g_DefaultCanvasWidth = 32
 Default canvas width in pixels.
constexpr int g_DefaultCanvasHeight = 32
 Default canvas height in pixels.
constexpr int g_ToolbarHeight = 32
 Height of the application toolbar in pixels.
constexpr int g_DefaultWindowWidth = 1920
 Default application window width in pixels.
constexpr int g_DefaultWindowHeight = 1080
 Default application window height in pixels.
constexpr int g_TimelineWidth = 1074
 Width of the timeline UI panel.
constexpr int g_TimelineHeight = 160
 Height of the timeline UI panel.
constexpr int g_MenuNameBufferSize = 32
 Maximum buffer size for menu name strings.
constexpr int g_FilePathBufferSize = 512
 Maximum buffer size for file path strings.
constexpr int g_LargeBufferSize = 1024
 Large general-purpose buffer size for temporary storage.
constexpr int g_KeybindBufferSize = 1024
 Buffer size for keybind serialization/deserialization.
constexpr int g_KeyNameBufferSize = 256
 Buffer size for storing key name strings.
constexpr float g_MaxRotationDeg = 360.0f
 Maximum rotation angle in degrees.
constexpr int g_HalfAlpha = 128
 Half alpha value (semi-transparent).
constexpr int g_DashColorPrimary = 150
 Primary dash color intensity (used in UI/grid rendering).
constexpr int g_DashColorSecondary = 255
 Secondary dash color intensity (used in UI/grid rendering).
constexpr int g_UuidRandomRange = 255
 Maximum range used for UUID random generation byte selection.
constexpr double g_MinDeltaTime = 1.0 / 1000.0
 Minimum allowed delta time between frames (seconds).
constexpr double g_MaxDeltaTime = 1.0
 Maximum allowed delta time between frames (seconds).
constexpr float g_DefaultFps = 60.0f
 Default target FPS for timing calculations.
constexpr float g_FrameTimeDivisor = 1000.0f
 Divisor used when converting milliseconds to frame time.
constexpr bool c_Debug = true
static constexpr const char * c_FuncVer = FuncVer()
 The FuncDoodle version string.
static constexpr uint8_t c_FdpVerMajor = 0
 FuncDoodle project file format major version.
static constexpr uint8_t c_FdpVerMinor = 4
 FuncDoodle project file format minor version.
static constexpr const char * g_SupportedExtensionsForImporting
const float c_StatusBarHeight = 20.0f
constexpr int KEY_MASK_SIZE = (ImGuiKey_NamedKey_END + 63) / 64
 Number of 64-bit slots required to store all named ImGui keys.
constexpr std::array< ToolType, 5 > ToolTypes
 Ordered list of tools used for iteration and UI rendering.

Detailed Description

The FuncDoodle C++ namespace.

All classes, functions, and utilities in FuncDoodle are contained within this namespace. It encompasses the complete pixel art animation application, including:

Note
This namespace avoids conflicts with other libraries.

Enumeration Type Documentation

◆ Direction

enum class FuncDoodle::Direction
strong

Direction used for moving a selection.

Enumerator
None 
Left 
Right 
Up 
Down 

◆ ToolType

enum class FuncDoodle::ToolType
strong

All available tools in the editor.

Enumerator
Pencil 
Eraser 
Bucket 
Picker 
Select 

Function Documentation

◆ FuncVer()

const char * FuncDoodle::FuncVer ( )
consteval
Note
Helper for initializing c_FuncVer

◆ GlobalGetShortcut()

char * FuncDoodle::GlobalGetShortcut ( const char * key,
bool shift,
bool super )

◆ GlobalLoadAssets()

void FuncDoodle::GlobalLoadAssets ( AssetLoader * assetLoader)

Loads global textures and sounds into the shared asset handles.

Parameters
assetLoaderLoader used to fetch assets from disk.

◆ operator<<()

std::ostream & FuncDoodle::operator<< ( std::ostream & os,
const UUID & obj )

◆ Repeat()

std::string FuncDoodle::Repeat ( std::string_view s,
size_t n )
inline

Repeats a string N times.

Parameters
sInput string to repeat.
nNumber of repetitions.
Returns
Concatenated string repeated N times.

◆ ToolKeybinds()

void FuncDoodle::ToolKeybinds ( ToolType * tool,
KeybindsRegistry & keybinds )
static

◆ ToolKeybindsRegister()

void FuncDoodle::ToolKeybindsRegister ( KeybindsRegistry & keybinds)
static

◆ ToolTexID()

uint32_t FuncDoodle::ToolTexID ( ToolType tool)
constexpr

Returns the toolbar texture ID associated with a tool.

◆ Tooltips()

void FuncDoodle::Tooltips ( ToolType tool)
static

◆ ToolTypeName()

const char * FuncDoodle::ToolTypeName ( ToolType t)
constexpr

Returns the user-facing name of a tool type.

Variable Documentation

◆ c_Debug

bool FuncDoodle::c_Debug = true
inlineconstexpr

◆ c_FdpVerMajor

uint8_t FuncDoodle::c_FdpVerMajor = 0
staticconstexpr

FuncDoodle project file format major version.

Indicates breaking changes in the .fdp file format.

◆ c_FdpVerMinor

uint8_t FuncDoodle::c_FdpVerMinor = 4
staticconstexpr

FuncDoodle project file format minor version.

Indicates minor changes in the .fdp file format.

◆ c_FuncVer

const char* FuncDoodle::c_FuncVer = FuncVer()
staticconstexpr

The FuncDoodle version string.

Evaluated entirely at compile-time via FuncVer().

◆ c_StatusBarHeight

const float FuncDoodle::c_StatusBarHeight = 20.0f

◆ g_AlphaOpaque

uint8_t FuncDoodle::g_AlphaOpaque = 255
constexpr

Fully opaque alpha value.

◆ g_BufferChunkSize

int FuncDoodle::g_BufferChunkSize = 32
constexpr

Size of an internal buffer chunk (used for batching/processing).

◆ g_ColorGrayRgb

uint8_t FuncDoodle::g_ColorGrayRgb = 150
constexpr

Default gray color value in RGB space.

◆ g_ColorWhite

uint8_t FuncDoodle::g_ColorWhite = 255
constexpr

Fully white RGB channel value.

◆ g_DashColorPrimary

int FuncDoodle::g_DashColorPrimary = 150
constexpr

Primary dash color intensity (used in UI/grid rendering).

◆ g_DashColorSecondary

int FuncDoodle::g_DashColorSecondary = 255
constexpr

Secondary dash color intensity (used in UI/grid rendering).

◆ g_DefaultCanvasHeight

int FuncDoodle::g_DefaultCanvasHeight = 32
constexpr

Default canvas height in pixels.

◆ g_DefaultCanvasWidth

int FuncDoodle::g_DefaultCanvasWidth = 32
constexpr

Default canvas width in pixels.

◆ g_DefaultFps

float FuncDoodle::g_DefaultFps = 60.0f
constexpr

Default target FPS for timing calculations.

◆ g_DefaultWindowHeight

int FuncDoodle::g_DefaultWindowHeight = 1080
constexpr

Default application window height in pixels.

◆ g_DefaultWindowWidth

int FuncDoodle::g_DefaultWindowWidth = 1920
constexpr

Default application window width in pixels.

◆ g_FilePathBufferSize

int FuncDoodle::g_FilePathBufferSize = 512
constexpr

Maximum buffer size for file path strings.

◆ g_FrameTimeDivisor

float FuncDoodle::g_FrameTimeDivisor = 1000.0f
constexpr

Divisor used when converting milliseconds to frame time.

◆ g_HalfAlpha

int FuncDoodle::g_HalfAlpha = 128
constexpr

Half alpha value (semi-transparent).

◆ g_KeybindBufferSize

int FuncDoodle::g_KeybindBufferSize = 1024
constexpr

Buffer size for keybind serialization/deserialization.

◆ g_KeyNameBufferSize

int FuncDoodle::g_KeyNameBufferSize = 256
constexpr

Buffer size for storing key name strings.

◆ g_LargeBufferSize

int FuncDoodle::g_LargeBufferSize = 1024
constexpr

Large general-purpose buffer size for temporary storage.

◆ g_MaxColorValue

uint8_t FuncDoodle::g_MaxColorValue = 255
constexpr

Maximum value for an 8-bit color channel.

◆ g_MaxDeltaTime

double FuncDoodle::g_MaxDeltaTime = 1.0
constexpr

Maximum allowed delta time between frames (seconds).

◆ g_MaxRotationDeg

float FuncDoodle::g_MaxRotationDeg = 360.0f
constexpr

Maximum rotation angle in degrees.

◆ g_MenuNameBufferSize

int FuncDoodle::g_MenuNameBufferSize = 32
constexpr

Maximum buffer size for menu name strings.

◆ g_MinDeltaTime

double FuncDoodle::g_MinDeltaTime = 1.0 / 1000.0
constexpr

Minimum allowed delta time between frames (seconds).

◆ g_SupportedExtensionsForImporting

const char* FuncDoodle::g_SupportedExtensionsForImporting
staticconstexpr
Initial value:
=
"png,jpg,jpeg,bmp,tga,psd,gif,hdr,pic,ppm,pgm,pnm"

◆ g_TimelineHeight

int FuncDoodle::g_TimelineHeight = 160
constexpr

Height of the timeline UI panel.

◆ g_TimelineWidth

int FuncDoodle::g_TimelineWidth = 1074
constexpr

Width of the timeline UI panel.

◆ g_ToolbarHeight

int FuncDoodle::g_ToolbarHeight = 32
constexpr

Height of the application toolbar in pixels.

◆ g_UuidRandomRange

int FuncDoodle::g_UuidRandomRange = 255
constexpr

Maximum range used for UUID random generation byte selection.

◆ KEY_MASK_SIZE

int FuncDoodle::KEY_MASK_SIZE = (ImGuiKey_NamedKey_END + 63) / 64
constexpr

Number of 64-bit slots required to store all named ImGui keys.

◆ s_AddTexId

uint32_t FuncDoodle::s_AddTexId = 0

Add/new action icon texture.

◆ s_BucketTexId

uint32_t FuncDoodle::s_BucketTexId = 0

Bucket tool icon texture.

◆ s_EndTexId

uint32_t FuncDoodle::s_EndTexId = 0

Toolbar jump-to-end icon texture.

◆ s_EraserTexId

uint32_t FuncDoodle::s_EraserTexId = 0

Eraser tool icon texture.

◆ s_ExportSound

AudioData FuncDoodle::s_ExportSound

Sound played when exporting.

◆ s_OpenTexId

uint32_t FuncDoodle::s_OpenTexId = 0

Open action icon texture.

◆ s_PauseTexId

uint32_t FuncDoodle::s_PauseTexId = 0

Toolbar pause icon texture.

◆ s_PencilTexId

uint32_t FuncDoodle::s_PencilTexId = 0

Pencil tool icon texture.

◆ s_PickerTexId

uint32_t FuncDoodle::s_PickerTexId = 0

Color picker tool icon texture.

◆ s_PlayTexId

uint32_t FuncDoodle::s_PlayTexId = 0

Toolbar play icon texture.

◆ s_ProjCreateSound

AudioData FuncDoodle::s_ProjCreateSound

Sound played when creating a project.

◆ s_ProjSaveEndSound

AudioData FuncDoodle::s_ProjSaveEndSound

Sound played when save completes.

◆ s_ProjSaveSound

AudioData FuncDoodle::s_ProjSaveSound

Sound played when saving a project.

◆ s_RewindTexId

uint32_t FuncDoodle::s_RewindTexId = 0

Toolbar rewind icon texture.

◆ s_SelectTexId

uint32_t FuncDoodle::s_SelectTexId = 0

Selection tool icon texture.

◆ s_TextTexId

uint32_t FuncDoodle::s_TextTexId = 0

Reserved text tool icon texture.

◆ ToolTypes

std::array<ToolType, 5> FuncDoodle::ToolTypes
constexpr
Initial value:
{
}
@ Eraser
Definition Tool.h:37
@ Bucket
Definition Tool.h:38
@ Pencil
Definition Tool.h:36
@ Select
Definition Tool.h:40
@ Picker
Definition Tool.h:39

Ordered list of tools used for iteration and UI rendering.