Menu

[r7524]: / branches / wxsmith_addons / src / include / cbstyledtextctrl.h  Maximize  Restore  History

Download this file

62 lines (48 with data), 2.0 kB

 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
* http://www.gnu.org/licenses/lgpl-3.0.html
*/
#ifndef CBSTYLEDTEXTCTRL_H_INCLUDED
#define CBSTYLEDTEXTCTRL_H_INCLUDED
#include "wx/wxscintilla.h"
#include <wx/longlong.h>
#include <map>
#include <set>
class wxContextMenuEvent;
class wxFocusEvent;
class wxMouseEvent;
class cbStyledTextCtrl : public wxScintilla
{
public:
cbStyledTextCtrl(wxWindow* pParent, int id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0);
virtual ~cbStyledTextCtrl();
wxDateTime GetLastFocusTime() const {return m_lastFocusTime;}
void EnableTabSmartJump(bool enable = true);
bool IsCharacter(int style);
bool IsString(int style);
bool IsPreprocessor(int style);
bool IsComment(int style);
void CallTipCancel();
static std::map<int, std::set<int> > &GetCharacterLexerStyles();
static std::map<int, std::set<int> > &GetStringLexerStyles();
static std::map<int, std::set<int> > &GetPreprocessorLexerStyles();
static std::map<int, std::set<int> > &GetCommentLexerStyles();
private:
void OnContextMenu(wxContextMenuEvent& event);
void OnKillFocus(wxFocusEvent& event);
void OnSetFocus(wxFocusEvent& event);
void OnMouseMiddleDown(wxMouseEvent& event);
void OnKeyDown(wxKeyEvent& event);
void OnKeyUp(wxKeyEvent& event);
void OnMouseLeftUp(wxMouseEvent& event);
bool AllowTabSmartJump();
void HighlightRightBrace();
wxWindow* m_pParent;
wxLongLong m_lastFocusTime;
int m_bracePosition;
int m_lastPosition;
bool m_tabSmartJump;
static std::map<int, std::set<int> > CharacterLexerStyles, StringLexerStyles, PreprocessorLexerStyles, CommentLexerStyles;
DECLARE_EVENT_TABLE()
};
#endif // CBSTYLEDTEXTCTRL_H_INCLUDED
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.