edelib 2.1.0
SchemeEditor.h
1/*
2 * $Id: String.h 2839 2009-09-28 11:36:20Z karijes $
3 *
4 * Fl_Text_Editor enhacement for scheme editing
5 * Copyright (c) 2005-2012 edelib authors
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __EDELIB_SCHEME_EDITOR_H__
22#define __EDELIB_SCHEME_EDITOR_H__
23
24#include "edelib-global.h"
25
26#include <FL/Fl_Text_Editor.H>
27#include <FL/Fl_Text_Buffer.H>
28
29EDELIB_NS_BEGIN
30
50class EDELIB_API SchemeEditor : public Fl_Text_Editor {
51private:
52 Fl_Text_Buffer *stylebuf, *textbuf;
53 bool pmatch;
54
55 void highlight_parens(int start, int end);
56 void unhighlight_parens(void);
57public:
59 SchemeEditor(int X, int Y, int W, int H, const char *l = 0);
60
62 void textsize(int sz);
63
65 virtual int handle(int e);
66
68 Fl_Text_Buffer *style_buffer(void) { return stylebuf; }
69
84 void object_color(int id, int color);
85
87 void object_color(int id, const char *color);
88
90 void match_parenthesis(bool m) { pmatch = m; }
91};
92
93EDELIB_NS_END
94#endif
Editing component for Scheme language.
Definition: SchemeEditor.h:50
void object_color(int id, const char *color)
Fl_Text_Buffer * style_buffer(void)
Definition: SchemeEditor.h:68
virtual int handle(int e)
void textsize(int sz)
void match_parenthesis(bool m)
Definition: SchemeEditor.h:90
SchemeEditor(int X, int Y, int W, int H, const char *l=0)
void object_color(int id, int color)