Tyro/src/widgets/EditPane.h
2015-04-13 13:01:25 -04:00

38 lines
653 B
C++

#ifndef TYROEDIT_PANE_H
#define TYROEDIT_PANE_H
#include "../wx_common.h"
#include <wx/stc/stc.h>
#include "../../include/json/json.h"
class EditPane: public wxStyledTextCtrl
{
public:
EditPane(
wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxPoint &post = wxDefaultPosition,
const wxSize &size = wxDefaultSize,
long style =
#ifndef __WXMAC__
wxSUNKEN_BORDER |
#endif
wxVSCROLL
);
~EditPane();
void OnSize(wxSizeEvent &event);
bool LoadAndHighlight(wxString filePath);
private:
enum
{
MARGIN_LINE_NUMBERS,
MARGIN_FOLD
};
StringConstMap lexer_map;
StringConstMap::iterator lexer_map_it;
};
#endif // TYRODOC_FRAME_H