forked from mika314/texteditor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtabs.hpp
34 lines (31 loc) · 1017 Bytes
/
tabs.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
#include "widget.hpp"
#include "signal_slot.hpp"
#include <vector>
class BaseTextBuffer;
class Screen;
class Tabs: public Widget
{
public:
Tabs(Widget *parent);
void addTextBuffer(BaseTextBuffer *);
void closeTextBuffer(BaseTextBuffer *);
void closeActiveTextBuffer();
void switchToNextTextBuffer();
void switchToPrevTextBuffer();
void moveTextBufferLeft();
void moveTextBufferRight();
std::vector<BaseTextBuffer *> &textBuffersList();
const std::vector<BaseTextBuffer *> &textBuffersList() const;
void setActiveTextBuffer(BaseTextBuffer *);
const BaseTextBuffer *activeTextBuffer() const;
BaseTextBuffer *activeTextBuffer();
virtual int maxHeight() const;
virtual int minHeight() const;
Signal<void, BaseTextBuffer *> setTextBuffer;
Signal<void, BaseTextBuffer *> deleteTextBuffer;
private:
virtual void paintEvent(PaintEvent &);
std::vector<BaseTextBuffer *> textBuffersList_;
BaseTextBuffer *activeTextBuffer_;
};