1#ifndef YAZE_APP_EDITOR_GRAPHICS_PIXEL_EDITOR_VIEW_H
2#define YAZE_APP_EDITOR_GRAPHICS_PIXEL_EDITOR_VIEW_H
4#include "absl/status/status.h"
32 std::string
GetId()
const override {
return "graphics.pixel_editor"; }
52 void Draw(
bool* p_open)
override;
124 void DrawLine(
int x1,
int y1,
int x2,
int y2);
129 void DrawRectangle(
int x1,
int y1,
int x2,
int y2,
bool filled);
The Rom class is used to load, save, and modify Rom data. This is a generic SNES ROM container and do...
Shared state between GraphicsEditor panel components.
Main pixel editing view for graphics sheets.
void ApplyFill(int x, int y)
Apply flood fill starting at position.
float GetPreferredWidth() const override
Get preferred width for this panel (optional)
std::string GetId() const override
Unique identifier for this panel.
int GetPriority() const override
Get display priority for menu ordering.
void DrawBrushPreview()
Draw brush size preview circle.
void DrawCursorCrosshair()
Draw crosshair at cursor position.
absl::Status Update()
Legacy Update method for backward compatibility.
void DrawCanvas()
Draw the main editing canvas.
void ApplyPencil(int x, int y)
Apply pencil tool at position.
std::string GetEditorCategory() const override
Editor category this panel belongs to.
std::vector< uint8_t > pending_undo_before_data_
void FinalizeUndoAction()
Finalize the current undo action by capturing the after-snapshot and pushing a GraphicsPixelEditActio...
void BeginSelection(int x, int y)
Start a new selection.
void HandleCanvasInput()
Handle canvas mouse input for current tool.
void DrawTransparencyGrid(float canvas_width, float canvas_height)
Draw checkerboard pattern for transparent pixels.
void Initialize()
Initialize the view.
GraphicsEditorState * state_
PixelEditorView(GraphicsEditorState *state, Rom *rom, UndoManager *undo_manager=nullptr)
std::string GetDisplayName() const override
Human-readable name shown in menus and title bars.
void ApplyEyedropper(int x, int y)
Apply eyedropper tool at position.
ImVec2 PixelToScreen(int x, int y)
Convert pixel coordinates to screen coordinates.
void DrawPixelInfoTooltip(const gfx::Bitmap &sheet)
Draw tooltip with pixel information.
void FlipSelectionHorizontal()
Flip selection horizontally.
ImVec2 ScreenToPixel(ImVec2 screen_pos)
Convert screen coordinates to pixel coordinates.
void DrawTileHighlight(const gfx::Bitmap &sheet)
Draw a transient highlight for a target tile.
void PasteSelection(int x, int y)
Paste clipboard at position.
void Draw(bool *p_open) override
Draw the pixel editor UI (WindowContent interface)
bool IsVisibleByDefault() const override
Whether this panel should be visible by default.
void DrawLine(int x1, int y1, int x2, int y2)
Draw line from start to end.
std::string GetIcon() const override
Material Design icon for this panel.
void CopySelection()
Copy selection to clipboard.
void UpdateSelection(int x, int y)
Update selection during drag.
void FlipSelectionVertical()
Flip selection vertically.
void DrawToolbar()
Draw the toolbar with tool selection.
void DrawViewControls()
Draw zoom and view controls.
void SaveUndoState()
Save current state for undo (captures before-snapshot)
void DrawRectangle(int x1, int y1, int x2, int y2, bool filled)
Draw rectangle from start to end.
uint16_t pending_undo_sheet_id_
void EndSelection()
Finalize the selection.
UndoManager * undo_manager_
void ApplyBrush(int x, int y)
Apply brush tool at position.
void DrawStatusBar()
Draw the status bar with cursor position.
void ApplyEraser(int x, int y)
Apply eraser tool at position.
void DrawColorPicker()
Draw the color palette picker.
void DrawMiniMap()
Draw the mini navigation map.
Manages undo/redo stacks for a single editor.
Base interface for all logical window content components.
Represents a bitmap image optimized for SNES ROM hacking.
Modern, robust canvas for drawing and manipulating graphics.