Re: How to restore cursor?



James Durie wrote:

> On Wed, 2002-08-28 at 12:51, Andrew E. Makeev wrote:
> > Hi,
> >
> > I've tried to play with window cursor for toplevel window:
> >
> > Anyway, I would to know how to do it using
> > gtkmm?
> >
> >
> > thanks in advance,
> > -andrew
>
> Here is a snippet from a bit of code I've been working on:
>
> Guide::SetCursor(const char *name) {
>     static GdkCursor * hglass = gdk_cursor_new(GDK_WATCH);
>
>     GdkWindow *w = window->window;
>     if( strcmp(name, "hourglass") == 0 ) {
>         gdk_window_set_cursor(w, hglass);
>         gtk_widget_set_sensitive(this->window, false);
>     } else {
>         gdk_window_set_cursor(w, NULL);
>         gtk_widget_set_sensitive(this->window, true);
>     }
> }
>
> James

Thanks, you 've proved that GTK itself works fine :).
I just was wondering if GTKMM has simple way to do this, also.
For example, someone could provide a patch with another override for
set_cursor() in Gdk::Window:

namespace Gdk {

class Window
{
public:
    void set_cursor ();
}

void Window::set_cursor ()
{
    gdk_window_set_cursor (gobj (), 0);
}

}

Guess, everyone is very busy, just like I am :).

Regards,
-andrew





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