Re: is there a signal for typing at bottom of window?

2018-09-27 Thread Eric Cashon via gtk-app-devel-list
You might be able to fiddle around with the newlines at the end of the buffer to get something to work with the textview. Eric //gcc -Wall text_space1.c -o text_space1 `pkg-config --cflags --libs gtk+-3.0` #include static void value_changed(GtkAdjustment *v_adjust, GtkWidget **widgets)   {

Re: is there a signal for typing at bottom of window?

2018-09-27 Thread Doug McCasland
t; > gtk_text_view_scroll_to_iter(..., 0.0, TRUE, 1.0, 0.5) > >> > > > >> > > so I have that to use. > >> > > > >> > > > >> > > On Tue, Sep 25, 2018 at 2:34 PM wrote: > >> > > > >> > > > > >>

Re: is there a signal for typing at bottom of window?

2018-09-26 Thread Doug McCasland
; > > > there is a better solution for this. > > > > > > > > static void value_changed(GtkAdjustment *v_adjust, gpointer textview) > > > > { > > > > static gint s_line=0; > > > > GtkTextIter iter; > > > >

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Joël Krähemann via gtk-app-devel-list
=0; > > > GtkTextIter iter; > > > GtkTextBuffer > > > *buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview)); > > > GtkTextMark *mark=gtk_text_buffer_get_mark(buffer, "insert"); > > > gtk_text_buffer_get_iter_at_mark(buffer, &iter,

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Joël Krähemann via gtk-app-devel-list
k_text_buffer_get_mark(buffer, "insert"); > > gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark); > > gint line=gtk_text_iter_get_line(&iter); > > if(s_line!=line) > > { > > g_print("Scroll Line\n&quo

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Doug McCasland
et_line(&iter); > if(s_line!=line) > { > g_print("Scroll Line\n"); > s_line=line; > } > } > > Eric > > > -----Original Message----- > From: Doug McCasland > To: cecashon > Sent: Tue, Sep 25, 2018

Re: is there a signal for typing at bottom of window?

2018-09-25 Thread Eric Cashon via gtk-app-devel-list
Hi Doug, Try getting the vertical adjustment of the scrolled window and connect to "value-changed". See if that will work. Something like ... static void value_changed(GtkAdjustment *v_adjust, gpointer user_data)   {   } ... GtkWidget *scroll=gtk_scrolled_window_new(NULL, NULL); GtkAdjustment

is there a signal for typing at bottom of window?

2018-09-24 Thread Doug McCasland
GTK app devel list is there a signal for typing at bottom of window? Hi, I have a TextView app -- it has: o main window from gtk_window_new() o add a box to that o create a scrolled window o add scrolled window to box o create a textview object o add textview to scrolled window oo When I type