-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMiniStyledTextCtrl.h
44 lines (33 loc) · 1.26 KB
/
MiniStyledTextCtrl.h
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
35
36
37
38
39
40
41
42
43
44
#ifndef MINI_STYLED_TEXT_CTRL_H
#define MINI_STYLED_TEXT_CTRL_H
#include <cbstyledtextctrl.h>
class ConfigManager;
class MiniStyledTextCtrl: public cbStyledTextCtrl
{
public:
MiniStyledTextCtrl(wxWindow* pParent, int id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
virtual ~MiniStyledTextCtrl(){}
void UpdateMiniature(cbStyledTextCtrl *stc);
void UpdateConfig();
void Init();
static void RemoveMarkers(cbStyledTextCtrl *stc);
private:
void SetMarker();
void DesignateVisibleRange(int from, int to);
void MakePositionVisible(int fromLine, int length);
void OnKey(wxKeyEvent& event);
void OnMousWheel(wxMouseEvent& event);
void OnMouseUpOrDown(wxMouseEvent& event);
void OnMouseDClick(wxMouseEvent& event);
void OnMouseMove(wxMouseEvent& event);
void OnMouseEnterOrLeave(wxMouseEvent& event);
int GetLineFromPosition(const wxPoint &pt);
int visibleFrom_, visibleLength_;
static const int GetOurMarkerNumber();
wxColor backgroundColour_;
bool showDesignator_;
bool inverseMarker_;
bool doScrollToPosition_;
DECLARE_EVENT_TABLE();
};
#endif