Re: Howto change a cursor for Gtk::Window ?



Following up on Paul's message, you usually have to get the parent
Gtk::Windows Gdk::Window.

This is what I use.

Glib::RefPtr <Gdk::Window> ref_window;

ref_window = get_window();
Gdk::Cursor m_Cursor (Gdk::WATCH);
ref_window->set_cursor(m_Cursor);
while (Gtk::Main::events_pending ())
    Gtk::Main::iteration ();

... do busy stuff ...

ref_window->set_cursor ();
while (Gtk::Main::events_pending ())
    Gtk::Main::iteration ();


Don't know if that's something you already had or not :-)

- John Hobbs


On Wed, Jun 11, 2008 at 10:06 AM, Paul Davis <paul linuxaudiosystems com> wrote:
>
> On Wed, 2008-06-11 at 14:41 +0200, Karl Schmitt wrote:
>> Hi,
>>
>> I am fairly new to gtkmm and GTK+.
>>
>> I have trouble figuring out how to change
>> the gtkmm Window cursor (Gtk::Window) ...
>>
>> However, I found out that I can change
>> the cursor of a Gdk::Window using
>> a Gdk::Cursor object. Is there something
>> similar for a Gtk::Window.
>>
>> By the way, what's the difference of a Gtk::Window
>> and a Gdk::Window?
>
> Gdk::Window is an abstraction around the low level window object offered
> by the backend GUI system (X11, Quartz/Cocoa, GDI, DirectFB and more).
>
> Gtk::Window is a fully-fledged widget representing a window.
>
> Some widgets have their own Gdk::Window, many do not. The ones that do
> not draw into the Gdk::Window of their parent (or its parent, etc).
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]