Re: focus line pattern around gtk event box

2011-12-20 Thread David Nečas
On Tue, Dec 20, 2011 at 11:24:44AM +0530, Guruprasad Bhat wrote:
> When I set the focus line pattern in rc file, dotted border comes around
> button widgtes, entry widgets when focus comes on that. But for event box,
> layout, even though i set Can focus flag TRUE  focus in indication is not
> appearing. How I can get the visual indication of focus in for gtk event
> box, gtk layout. Early suggestion appreciated.

Using gtk_paint_focus() in the "draw" handler to draw it if the widget
has focus.

Yeti

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: focus line pattern around gtk event box

2011-12-20 Thread Andrew Cowie
On Tue, 2011-12-20 at 09:25 +0100, David Nečas wrote:

> Using gtk_paint_focus() in the "draw" handler...

Deprecated now, apparently; refers to
http://developer.gnome.org/gtk3/3.3/GtkStyleContext.html#gtk-render-focus
instead.

AfC
Sydney


___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: focus line pattern around gtk event box

2011-12-20 Thread David Nečas
On Tue, Dec 20, 2011 at 10:43:43PM +1100, Andrew Cowie wrote:
> On Tue, 2011-12-20 at 09:25 +0100, David Nečas wrote:
> 
> > Using gtk_paint_focus() in the "draw" handler...
> 
> Deprecated now, apparently; refers to
> http://developer.gnome.org/gtk3/3.3/GtkStyleContext.html#gtk-render-focus
> instead.

No, I just mixed up Gtk+ 2 and 3 functions (sorry for that).

gtk_paint_focus() is the correct method to draw focus in Gtk+ 2, but you
do this in "expose-event" handler.  Use gtk_render_focus() in "draw"
handler if you use Gtk+ 3.

Yeti

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

OpenGL and GtkDrawingArea

2011-12-20 Thread Alessio Giovanni Baroni
Hi,
how can I to enable OpenGL on a GtkDrawingArea (GTK+ 3.0)?
I attempted to enable it in realize signal, but the gtk_widget_get_window
(widget) returns NULL.
In draw signal X11 returns BadMatch instead.

Thanks.
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


no joy...

2011-12-20 Thread Gary Kline

thanks to those  who have tried to help, mostly off-list.  i can't
believe how hard this is.

i want to open a  base  window:

gtk_window_set_title(GTK_WINDOW(window),"testing");
gtk_widget_set_usize(GTK_WIDGET(window),200,300);

  ...

and then only a text window --upon button press-- and display
some text:


text = gtk_text_view_new();
gtk_container_add(GTK_CONTAINER(window),text);
buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
"
and fopen some file and display the text in the buffer.  The   
question remains: how? what am i missing to display some
miscellaneous words in the text window?

thanks in a advance.

gary

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


no luck with dialogs and ecrooolbars, and gtktext..

2011-12-20 Thread Gary Kline
Sorry, crummy  Subject line before::

n Tue, Dec 20, 2011 at 02:52:10PM -0800, Gary Kline wrote:
> Date: Tue, 20 Dec 2011 14:52:10 -0800
> From: Gary Kline 
> Subject: no joy...
> To: GTK Devel List 
> 
> 
> thanks to those  who have tried to help, mostly off-list.  i can't
> believe how hard this is.
> 
> i want to open a  base  window:
> 
> gtk_window_set_title(GTK_WINDOW(window),"testing");
> gtk_widget_set_usize(GTK_WIDGET(window),200,300);
> 
>   ...
> 
> and then only a text window --upon button press-- and display
> some text:
> 
> 
> text = gtk_text_view_new();
> gtk_container_add(GTK_CONTAINER(window),text);
> buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
> "
> and fopen some file and display the text in the buffer.  The   
> question remains: how? what am i missing to display some
> miscellaneous words in the text window?
> 
> thanks in a advance.
> 
> gary
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
 Gary Kline  kl...@thought.org  http://www.thought.org  Public Service Unix
   Journey Toward the Dawn, E-Book: http://www.thought.org
  The 8.57a release of Jottings: http://jottings.thought.org
 Twenty-five years of service to the Unix community.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: no joy...

2011-12-20 Thread Colomban Wendling
Le 20/12/2011 23:52, Gary Kline a écrit :
> 
> thanks to those  who have tried to help, mostly off-list.  i can't
> believe how hard this is.
> 
> i want to open a  base  window:
> 
> gtk_window_set_title(GTK_WINDOW(window),"testing");
> gtk_widget_set_usize(GTK_WIDGET(window),200,300);
> 
>   ...
> 
> and then only a text window --upon button press-- and display
> some text:
> 
> 
> text = gtk_text_view_new();
> gtk_container_add(GTK_CONTAINER(window),text);
> buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
> "
> and fopen some file and display the text in the buffer.  The   
> question remains: how? what am i missing to display some
> miscellaneous words in the text window?

You have the buffer, now the only needed thing is to load the data (I
assume you know how to do, right?) and add it to that buffer.  There is
some docs [1], but basically you want one of

gtk_text_buffer_set_text()
gtk_text_buffer_insert()
gtk_text_buffer_insert_at_cursor()

Also, don't forget you have to show your widgets (gtk_widget_show()).


Cheers,
Colomban

[1] http://developer.gnome.org/gtk/stable/GtkTextBuffer.html


> 
> thanks in a advance.
> 
> gary
> 
> ___
> gtk-app-devel-list mailing list
> gtk-app-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Re: no luck with dialogs and ecrooolbars, and gtktext..

2011-12-20 Thread James Morris
> n Tue, Dec 20, 2011 at 02:52:10PM -0800, Gary Kline wrote:
>>         text = gtk_text_view_new();
>>         gtk_container_add(GTK_CONTAINER(window),text);
>>         buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
>> "
>> and fopen some file and display the text in the buffer.  The
>> question remains: how? what am i missing to display some
>> miscellaneous words in the text window?


http://www.gtk.org/documentation.php
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list