| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #pragma once
- #include "lumacs/ui_interface.hpp"
- #include <memory>
- #include <raylib.h>
- namespace lumacs {
- class Window;
- struct LayoutNode;
- class RaylibEditor : public IEditorView {
- public:
- RaylibEditor();
- ~RaylibEditor() override;
- void init() override;
- void run() override;
- void handle_editor_event(EditorEvent event) override;
- void set_core(EditorCore* core) override;
- private:
- void update();
- void render();
-
- // Input handling helpers
- void process_input();
-
- // Rendering helpers
- void draw_layout(LayoutNode* node, Rectangle area);
- void draw_window(Window& window, Rectangle area);
- void draw_modeline(Window& window, Rectangle area);
- void draw_minibuffer(Rectangle area);
- EditorCore* core_ = nullptr;
- bool should_close_ = false;
-
- // Graphics Resources
- Font font_;
- int font_size_ = 20;
- int char_width_ = 10;
- int line_height_ = 20;
- };
- std::unique_ptr<IEditorView> create_raylib_editor();
- } // namespace lumacs
|