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 » U++ Library support » U++ Library : Other (not classified elsewhere) » Changing mouse shape
Changing mouse shape [message #29481] Fri, 22 October 2010 22:20 Go to next message
koldo is currently offline  koldo
Messages: 3356
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
Re: Changing mouse shape [message #29482 is a reply to message #29481] Sat, 23 October 2010 10:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Done. I have only changed the name of second "system" function to "CursorX11" (not the new one...).

Mirek
Re: Changing mouse shape [message #29489 is a reply to message #29482] Sat, 23 October 2010 22:13 Go to previous message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Thank you Smile

Best regards
Iñaki
Previous Topic: HttpClient Execute vs ExecuteRedirect
Next Topic: [FEATURE] OSC for U++?
Goto Forum:
  


Current Time: Tue Apr 16 15:10:24 CEST 2024

Total time taken to generate the page: 0.01846 seconds