changing cursor

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

changing cursor

Marty  Moore
Hi All,

I'm stuck trying to:

a. change the cursor.

b. trying  to change cursor size.

I can change the cursor using a mix of gdk3 and gdkmm code, but it's
messy. What is the proper way to change the cursor in gtkmm3?

Secondly, that is the proper way to change the cursor size? I need large
cursors, but can't find any info on this topic.


Please point me in the right direction. A working example would be
wonderful.

Thank you.

Marty

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: changing cursor

Gtkmm mailing list
Why not show what you tried...


On Fri, 11 Jan 2019 at 02:30, Marty Moore <[hidden email]> wrote:
Hi All,

I'm stuck trying to:

a. change the cursor.

b. trying  to change cursor size.

I can change the cursor using a mix of gdk3 and gdkmm code, but it's
messy. What is the proper way to change the cursor in gtkmm3?

Secondly, that is the proper way to change the cursor size? I need large
cursors, but can't find any info on this topic.


Please point me in the right direction. A working example would be
wonderful.

Thank you.

Marty

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: changing cursor

Marty  Moore

Hi again,

Sorry, I forgot to add the code segment... Probably trying to do too many things at once... Here's where I am right now:

    // the following code workds
    guint *w, *h;
    Glib::RefPtr<Gdk::Display> display =
        GLW->get_display();
    Glib::RefPtr<Gdk::Window> win =
         GLW->get_window();

        Glib::RefPtr<Gdk::Cursor> cursor =
        Gdk::Cursor::create(display, Gdk::CROSSHAIR);
    win->set_cursor(cursor);

// the folling code  doesn't work
    gdk_display_get_maximal_cursor_size(
        display->gobj(),  w, h);
No idea on how to change the cursor size yet. I've set the cursor size of my gnome cusor to 64 or so, but it doesn't affect the gdk cursor that I've created above.

Thanks again,

Marty



On 1/11/19 2:44 AM, Daniel Boles via gtkmm-list wrote:
Why not show what you tried...


On Fri, 11 Jan 2019 at 02:30, Marty Moore <[hidden email]> wrote:
Hi All,

I'm stuck trying to:

a. change the cursor.

b. trying  to change cursor size.

I can change the cursor using a mix of gdk3 and gdkmm code, but it's
messy. What is the proper way to change the cursor in gtkmm3?

Secondly, that is the proper way to change the cursor size? I need large
cursors, but can't find any info on this topic.


Please point me in the right direction. A working example would be
wonderful.

Thank you.

Marty

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list
Reply | Threaded
Open this post in threaded view
|

Re: changing cursor

Gtkmm mailing list
On Fri, 11 Jan 2019 at 21:28, Marty Moore <[hidden email]> wrote:
    // the following code workds
    guint *w, *h;
    Glib::RefPtr<Gdk::Display> display =
        GLW->get_display();
    Glib::RefPtr<Gdk::Window> win =
         GLW->get_window();

        Glib::RefPtr<Gdk::Cursor> cursor =
        Gdk::Cursor::create(display, Gdk::CROSSHAIR);
    win->set_cursor(cursor);

// the folling code  doesn't work
    gdk_display_get_maximal_cursor_size(
        display->gobj(),  w, h);
No idea on how to change the cursor size yet. I've set the cursor size of my gnome cusor to 64 or so, but it doesn't affect the gdk cursor that I've created above.


Can you define "doesn't work"? Are `w` and `h` not set to a valid cursor size?

but then maybe that's the real point: if you're trying to *set* the size, why call *get*_maximal_cursor_size()?


_______________________________________________
gtkmm-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtkmm-list