Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Changing mouse shape
Changing mouse shape [message #29481] |
Fri, 22 October 2010 22:20 |
|
koldo
Messages: 3357 Registered: August 2008
|
Senior Veteran |
|
|
Hello Mirek
I wanted to change mouse shape using existing OS one, not supported now by U++ like Image::Arrow().
In this case the final code would be:
INTERLOCKED {
#ifdef PLATFORM_WIN32
static Image img = Win32Cursor(IDC_SIZEALL);
#else
static Image img = X11Cursor(XC_fleur);
#endif
mouseImg = Ctrl::OverrideCursor(img);
}
As probably you do not want to include more mouse shapes, the code above would serve. The problem is that Win32Cursor() is public but X11Cursor() (some similar function) is not.
My proposal is:
- Rename actual function sX11Cursor__() to X11Cursor(). It is more clear and similar to its Windows counterpart
- Set X11Cursor accesible including it in Image.h, for example, here:
...
Image Win32Cursor(int id);
HICON IconWin32(const Image& img, bool cursor = false);
Image Win32DllIcon(const char *dll, int ii, bool large);
#endif
#endif
#ifdef PLATFORM_X11
void *X11Cursor(const Image& img);
Image X11Cursor(int c); // NEW
#endif
Best regards
Iñaki
|
|
|
|
|
Goto Forum:
Current Time: Thu Apr 25 13:59:56 CEST 2024
Total time taken to generate the page: 0.02650 seconds
|