| 1 |
/* textwidget.h |
| 2 |
* |
| 3 |
* Copyright (C) 2001-2002 The gtkmm Development Team |
| 4 |
* |
| 5 |
* This library is free software; you can redistribute it and/or |
| 6 |
* modify it under the terms of the GNU Lesser General Public |
| 7 |
* License as published by the Free Software Foundation; either |
| 8 |
* version 2.1 of the License, or (at your option) any later version. |
| 9 |
* |
| 10 |
* This library is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 |
* Lesser General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU Lesser General Public |
| 16 |
* License along with this library; if not, see <https://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef _TEXTWIDGET_H |
| 20 |
#define _TEXTWIDGET_H |
| 21 |
|
| 22 |
#include <gtkmm/scrolledwindow.h> |
| 23 |
#include <gtkmm/textview.h> |
| 24 |
|
| 25 |
class TextWidget : public Gtk::ScrolledWindow |
| 26 |
{ |
| 27 |
public: |
| 28 |
TextWidget(bool is_source); |
| 29 |
~TextWidget() override; |
| 30 |
|
| 31 |
Glib::RefPtr<Gtk::TextBuffer> get_buffer(); |
| 32 |
void wipe(); |
| 33 |
void fontify(); |
| 34 |
|
| 35 |
protected: |
| 36 |
|
| 37 |
//Signal handlers: |
| 38 |
|
| 39 |
//Child widgets: |
| 40 |
Gtk::TextView m_TextView; |
| 41 |
Glib::RefPtr<Gtk::TextBuffer> m_refTextBuffer; |
| 42 |
|
| 43 |
}; |
| 44 |
|
| 45 |
#endif //_TEXTWIDGET_H |