~kiwec/ke

ref: 2133c126a17a4627ffb76143c19c287e9c272749 ke/src/Editor.h -rw-r--r-- 451 bytes
2133c126 — Wolf Clément Add error, info and success messages 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <memory>
#include "Buffer.h"
#include "Status.h"

// TODO remove shared_ptr
class Editor : public InputHandler {
private:
	std::shared_ptr<Buffer> m_buf;
	Status m_status;
	
public:
	void draw();

	/// Handle keypresses
	virtual bool handle_key(tb_event* ev) override;
	virtual bool handle_mouse(tb_event* ev) override;

	/// Open a file
	void open(std::string filename);

	/// Close the editor and clean up
	void shutdown();
};