Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
128 user(s) are online (110 user(s) are browsing Forums)

Members: 0
Guests: 128

more...

Support us!

Headlines

 
  Register To Post  

« 1 (2)
Re: Popup menus in 4.x
Just popping in
Just popping in


See User information
@Orgin

BTW, you don't have to reply the Msg provided by the hook, it is handled by window.class.

Go to top
Re: Popup menus in 4.x
Supreme Council
Supreme Council


See User information
@centaurz

Uhm, okey, that should probably be mentioned in the autodoc somewhere then if it isn't already.

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: Popup menus in 4.x
Just popping in
Just popping in


See User information
@orgin

And use IIntuition->GadgetBox() to check if you're over thelistbrowser.

Edit: As for the listbrowser node, if it isn't selected first with the LMB I doubt that you can identify it. Some kind of LBM_HITTEST method would help here.

Go to top
Re: Popup menus in 4.x
Supreme Council
Supreme Council


See User information
@centaurz

Okey, half way there then. 'Just' need to figure out which of the nodes in the listbrowser that was right clicked.

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: Popup menus in 4.x
Supreme Council
Supreme Council


See User information
@centaurz

Best thing would of course be to have an updated listbrowser gadget with an "GA_RMBSelect (BOOL)" option. If set it would select the node under the RMB click before opening the menu. Without de-selecting any other nodes in a multi select listbrowser.



(Ironically the 'listbrowser' used in the workbench lister mode has just this behaviour. It's a pity that it is not a gadget.)

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: Popup menus in 4.x
Just can't stay away
Just can't stay away


See User information
@orgin + centaurz

What's that GM_HITTEST of gadget.class ? Is it any help ?

One idea: enable RMB trap when mouse pointer is over your window and disable it when mouse pointer is somewhere else to get normal menus (SetWindowAttrs()). Use the last selected item in listbrowser no matter where pointer is. Or make the popup menu to apply to all selections (not a single file) (you want it that way for cut-copy-paste .

I've wanted to ask OS4 devs to create a drawer.gadget. But I've been trying to learn how to make my own gadget classes lately so if I could make a drawer.gadget myself. (But I'm not working on anything too much currently. I'm too tired to do much coding, too many projects of my own, motivation low and I have many other things to do in my life.)

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: Popup menus in 4.x
Just can't stay away
Just can't stay away


See User information
@TSK

GM_HITTEST will only tell you if the point is "inside" the gadget or not.

Before you can use GM_HITTEST you have to check that the point is within the gadget's hit box by comparing against values obtained from GadgetBox() because most gadgets which do not have an irregular shape will always return GMR_GADGETHIT on GM_HITTEST no matter what the coordinates are.

Also the coordinates passed to GM_HITTEST should be relative to the gadget's upper left corner (LeftEdge, TopEdge).

Go to top
Re: Popup menus in 4.x
Supreme Council
Supreme Council


See User information
@salass00/TSK

Just remember that we are talking about rows in a listbrowser, not the listbrowser gadget itself.

Vacca foeda. Sum, ergo edo

Mr Bobo Cornwater
Go to top
Re: Popup menus in 4.x
Just popping in
Just popping in


See User information
@orgin + TSK
I mentioned the LBM_HITTEST thing because rachy's piechart.gadget has a similar method to identify the slice under the mouse pointer (maybe other Reaction classes do).

Go to top

  Register To Post
« 1 (2)

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project