yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
image_import_view.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_UI_IMAGE_IMPORT_IMAGE_IMPORT_VIEW_H
2#define YAZE_APP_EDITOR_GRAPHICS_UI_IMAGE_IMPORT_IMAGE_IMPORT_VIEW_H
3
4#include <optional>
5#include <string>
6#include <vector>
7
8#include "absl/status/status.h"
11
12namespace yaze::editor {
13
14class UndoManager;
15
27 public:
29 : state_(state), undo_manager_(undo_manager) {}
30
31 absl::Status Update();
32
33 private:
34 void Load(absl::StatusOr<std::vector<uint8_t>> png_bytes,
35 const std::string& source);
36 void DrawImage();
37 void DrawSaveButtons();
38 void DrawWriteIntoSheet();
39 void DrawPaletteImport();
40 void SetStatus(std::string message, bool is_error);
41
44
45 std::string path_;
46 std::optional<ImportedSheetImage> image_;
47 std::string source_;
48 std::string status_;
49 bool status_is_error_ = false;
50};
51
52} // namespace yaze::editor
53
54#endif // YAZE_APP_EDITOR_GRAPHICS_UI_IMAGE_IMPORT_IMAGE_IMPORT_VIEW_H
Shared state between GraphicsEditor panel components.
Import view hosted by the existing graphics Image Import WindowContent. Imports a PNG file or the cli...
std::optional< ImportedSheetImage > image_
void Load(absl::StatusOr< std::vector< uint8_t > > png_bytes, const std::string &source)
ImageImportView(GraphicsEditorState *state, UndoManager *undo_manager)
void SetStatus(std::string message, bool is_error)
Manages undo/redo stacks for a single editor.
Editors are the view controllers for the application.
Image import for the Graphics editor that keeps the image's own palette order and pixel indices.