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 » Developing U++ » U++ Developers corner » Precisions on keyflags value in MouseMove
Precisions on keyflags value in MouseMove [message #35900] Sun, 01 April 2012 10:06 Go to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Hi,

virtual void  MouseMove(Point p, dword keyflags);


In the Ctrl:: help, keyflags is said to contain only SHIFT/TAB/CTRL flags. But when watching the value I noticed that it also contained the mouse buttons (which I was searching for).

Question:
- Is this behaviour OS dependant (I'm on linux).
- If not, then where are the defines/enums associated to the individal bits (mouse left=0x800000, mouse right=0x400000, ....). The ones defined int CtrlCore.h do not fit

[Updated on: Sun, 01 April 2012 10:06]

Report message to a moderator

Re: Precisions on keyflags value in MouseMove [message #35903 is a reply to message #35900] Sun, 01 April 2012 16:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Sun, 01 April 2012 04:06

Hi,

virtual void  MouseMove(Point p, dword keyflags);


In the Ctrl:: help, keyflags is said to contain only SHIFT/TAB/CTRL flags. But when watching the value I noticed that it also contained the mouse buttons (which I was searching for).

Question:
- Is this behaviour OS dependant (I'm on linux).



Should work on both.

Quote:


- If not, then where are the defines/enums associated to the individal bits (mouse left=0x800000, mouse right=0x400000, ....). The ones defined int CtrlCore.h do not fit



That is interesting. The code for linux is based on this piece in CtrlCore/X11Proc.cpp:

bool GetMouseLeft() { GuiLock __; return sModState & Button1Mask; }
bool GetMouseRight() { GuiLock __; return sModState & (Ctrl::Xbuttons >= 3 ? Button3Mask : Button2Mask); }
bool GetMouseMiddle() { GuiLock __; return sModState & (Ctrl::Xbuttons >= 3 ? Button2Mask : 0); }
Re: Precisions on keyflags value in MouseMove [message #35905 is a reply to message #35903] Sun, 01 April 2012 20:14 Go to previous messageGo to next message
Didier is currently offline  Didier
Messages: 680
Registered: November 2008
Location: France
Contributor
Thank's

In fact what I was searching for is : K_MOUSELEFT, K_MOUSERIGHT, ...

I didn't see where just aside K_CTRL, K_SHIFT, ..... Embarassed
But thank's to you're reply, I found them Razz

Maybe doc could be updated to explicit keyflags values (add a page for it)

[Updated on: Sun, 01 April 2012 20:16]

Report message to a moderator

Re: Precisions on keyflags value in MouseMove [message #35912 is a reply to message #35905] Mon, 02 April 2012 18:42 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Didier wrote on Sun, 01 April 2012 14:14

Thank's

In fact what I was searching for is : K_MOUSELEFT, K_MOUSERIGHT, ...



Ah, I just wanted to point out to the code that does actual reading of those key states; K_MOUSELEFT etc.. are set based on above routines. Just in case it does not work as supposed, as starting point to find a problem...
Previous Topic: Print raw data (direct print)
Next Topic: Introducing OSVGS
Goto Forum:
  


Current Time: Tue Apr 23 21:03:47 CEST 2024

Total time taken to generate the page: 0.02099 seconds