Re: Making the mouse pointer invisible



SaiKamesh Rathinasabapathy wrote:
> Hi,
> 
> I am creating a desktop application in c++. I am using gtkmm to create
> user interfaces. This application is going to be deployed in touch
> screen. So the mouse pointer should be disabled through out the
> application. I am using Gtk::Window to create screens. please give me
> some ideas to do this.

http://gtkmm.sourceforge.net/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1Window.html#bb73b1f599ce6cb72d2e184c63610fd0

you need to create a pixmap without pixels and use
gdk_cursor_new_from_pixmap() ( in the C library, i belive it's not been
ported to gdkmm, so you'll need to use Cursor (GdkCursor* gobject, bool
make_a_copy=true) to create the actual object ) to create an empty
cursor and then use set_cursor( cursor ) to assign it to the window (in
your case the top-level)

There is however also 	Cursor (const Glib::RefPtr<Display>& display,
const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y)  but I'm not sure
whether that will produce an empty cursor with an empty pixbuf.

-Bartek




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