Flatten src into model, edit and ui, with .h headers

Resources and utilities sit directly in src. The ImGui windows, wizards, popups and helpers are in ui.
Headers that would shadow system ones are renamed: math_util, timestamp, subprocess, localization.
Includes are written from src.
This commit is contained in:
shweet committed 2026-11-22 17:12:05 -05:00
1 parent a515267e26
commit 7fb2c607c2
175 files changed
+537 -537

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
#pragma once
#include <tuple>
#include <vector>
#include "audio_stream.h"
#include "ui/canvas_view.h"
#include "manager.h"
#include "model/draw.h"
#include "render.h"
#include "resources.h"
#include "settings.h"
namespace anm2ed::imgui
{
class AnimationPreview : public CanvasView
{
MIX_Mixer* mixer = MIX_CreateMixerDevice(SDL_AUDIO_DEVICE_DEFAULT_PLAYBACK, nullptr);
AudioStream audioStream = AudioStream(mixer);
bool wasPlaybackPlaying{};
int soundFrame{-1};
bool isMoveDragging{};
glm::vec2 moveOffset{};
glm::vec2 nullRectScaleAnchor{};
render::Recorder recorder{};
glm::vec2 recordSize{};
glm::vec2 recordPan{};
float recordZoom{};
// Where each item's pivot is at every frame of the animation, kept until the document or view changes.
struct PivotPath
{
model::Draw item{};
std::vector<glm::vec2> points{};
};
std::vector<PivotPath> pivotPaths{};
std::tuple<std::uint64_t, std::uint64_t, int, bool> pivotPathsKey{};
void recording_start(Manager&, Settings&, Document&, const model::Animation*);
void recording_stop(Manager&, Document&);
public:
void tick(Manager&, Settings&, float);
void update(Manager&, Settings&, Resources&);
};
}