GTK+ IOStream  Beta
<< GTK+ >> add C++ IOStream operators to GTK+. Now with extra abilities ... like network serialisation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TextView.H
Go to the documentation of this file.
1 /* Copyright 2000-2013 Matt Flax <flatmax@flatmax.org>
2  This file is part of GTK+ IOStream class set
3 
4  GTK+ IOStream is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or
7  (at your option) any later version.
8 
9  GTK+ IOStream is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You have received a copy of the GNU General Public License
15  along with GTK+ IOStream
16 */
17 #ifndef TEXTVIEW_H_
18 #define TEXTVIEW_H_
19 
20 #include "Container.H"
21 
36 class TextView : public Container {
37 public:
40  TextView(void){
41  widget=gtk_text_view_new (); // create the entry box
42  }
43 
55  void setFont(PangoFontDescription *pangoFontDescription){
56  if (pangoFontDescription)
57  gtk_widget_modify_font(widget,pangoFontDescription);
58  }
59 
62  void connectBufferChangedSignal(GCallback callBack, void *data){
63  //g_signal_connect(widget, "insert-at-cursor", callBack, data);
64  GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(widget));
65  g_signal_connect(GTK_WIDGET(buffer), "changed", callBack, data);
66  }
67 };
68 
69 #endif // TEXTVIEW_H_