Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Changing cursor
Re: Changing cursor [message #43120 is a reply to message #43119] Thu, 08 May 2014 19:47 Go to previous messageGo to previous message
Klugier is currently offline  Klugier
Messages: 1100
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello xawery,

You can override your cursor image readily. Here is sample code:
Image MyCoolCtrl::CursorImage(Point p, dword keyflags)
{
    return Image::Hand(); // <- Hand cursor image depending on operating system theme.
}


In your header file you will need also to override "CursorImage" virtual method:
class MyCoolCtrl : public Ctrl {
public:
    virtual Image CursorImage(Point p, dword keyflags);
};


Moreover, I enclosed stock cursor list that you can use in your applications (Based on CtrlCore/ImageX11.cpp source file):
Image Image::Arrow()
Image Image::Wait()
Image Image::IBeam()
Image Image::No()
Image Image::SizeAll()
Image Image::SizeHorz() 
Image Image::SizeVert()
Image Image::SizeTopLeft()
Image Image::SizeTop()
Image Image::SizeTopRight()
Image Image::SizeLeft() 
Image Image::SizeRight() 
Image Image::SizeBottomLeft() 
Image Image::SizeBottom() 
Image Image::SizeBottomRight()
Image Image::Cross()
Image Image::Hand()


BTW, I think that this list should be included in U++ documentation. It will help a lot.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Thu, 08 May 2014 19:48]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Heap leaks with fluidsynth on Ubuntu 12.04
Next Topic: OpenCV example on Linux/Ubuntu
Goto Forum:
  


Current Time: Sun Jul 06 13:51:45 CEST 2025

Total time taken to generate the page: 0.03902 seconds