~kiwec/ke

ref: 842396976984e3cbd83251296dd90a46b9d53b3c ke/src/Editor.h -rw-r--r-- 457 bytes
84239697 — Wolf Clément Downgrade to C++17, avoid stdlib 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 "StatusBar.h"

// TODO remove shared_ptr
class Editor : public InputHandler {
private:
	std::shared_ptr<Buffer> m_buf;
	StatusBar 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();
};