34 widget=gtk_text_view_new ();
48 void setFont(PangoFontDescription *pangoFontDescription){
49 if (pangoFontDescription)
50 gtk_widget_modify_font(
widget,pangoFontDescription);
57 GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW(
widget));
58 g_signal_connect(GTK_WIDGET(buffer),
"changed", callBack, data);
72 GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (
widget));
73 gtk_text_buffer_set_text(buffer,text,-1);
82 GtkTextIter start, end;
83 bool includeInvisible=
true;
85 GtkTextBuffer *buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (
widget));
86 gtk_text_buffer_get_bounds (buffer, &start, &end);
87 text_ = gtk_text_buffer_get_text(buffer, &start, &end, includeInvisible);
126 int isHex=(text.find(
"0x")==string::npos)?-1:text.find(
"0x")+2;
129 istringstream iss(text.substr(isHex,text.size()-isHex));
132 istringstream iss(text);
145 int isHex=(text.find(
"0x")==string::npos)?-1:text.find(
"0x")+2;
148 istringstream iss(text.substr(isHex,text.size()-isHex));
151 istringstream iss(text);
163 template<
typename TYPE>
167 istringstream iss(text);
173 #endif // TEXTVIEW_H_ TextView & operator>>(string &text)
TextView & operator>>(TYPE &var)
void setFont(PangoFontDescription *pangoFontDescription)
TextView & operator<<(string &text)
TextView & operator>>(int &num)
void setText(const char *text)
void setText(string &text)
void connectBufferChangedSignal(GCallback callBack, void *data)
TextView & operator>>(long &num)
TextView & operator<<(const char *text)