Private gadget under a Virtual: no GM_HANDLEINPUT and wrong clipping coords.

Online Status

I'm trying to put a "private gadget" done with MakeClass() and a dispatcher, in a vertical layout under a "Virtual scroller".
- My gadget code may not be 100% compliant, but i'm looking forward for that. -
I draw things with OM_RENDER, and receive mouse clicks with GM_HANDLEINPUT.
For testing purpose, the vertical layout has 3 elements: 2 buttons and an instance of my private gadget.

I have 2 problems so far, I didn't have when I was using my private gadget outside Virtual:

1. When the main window is big enough for the Virtual to not have scrollers, my gadget receive GM_HANDLEINPUT events. If I resize the window smaller, at some point the Virtual scrollers show up, my gadget is still drawn, but no GM_HANDLEINPUT at all are sent to my gadget. tracing things, it doesnt even reach GM_HITTEST (which return always GMR_GADGETHIT in all cases). Yet, the 2 buttons in the same layout of my gadgets are reacting to clicks !

Is there something I'm missing to tell my gadget should receive clicks also in that case ? a GA_XXX property ? some rectangle to initiate in GM_layout to tell I should be mouse tested ?

2. I draw ellipsis inside my gadget, and this must be clipped with the rectangle of my gadget or it draws upon the neighbours. outside virtual this used to work with:

ClearRegion(gdata->_clipRegion);
OrRectRegion(gdata->_clipRegion, &gdata->_framerec);
oldClipRegion = InstallClipRegion( rp->Layer, gdata->_clipRegion);
(draw)
InstallClipRegion( rp->Layer,oldClipRegion);

... but inside a virtual, there is a "shift" of the clipping rectangle, that seems to be the position of the virtual itself. That said, drawing rectangle is correct and correspond exactly to gdata->_framerec.
Some idea fro the way I should manage my "additional rectangle clipping" ?

gadget code at:
(edited: exe and sources 2 posts below)

I'm actually testing some layout to do some clone of audacity, and the gadget should display audio track at some point .

Edit: Because I need infinite scrolling and scroll view management more close to "list" management, I stopped using Virtual, that can be adapted to a regular layout gadget but not my current project... Yet I didn't understand why my private gadget wouldnt have its legitimate GM_HANDLEINPUT in that case, so I let this post as it is; But I should have done a branch on the github, because the links up there are not using Virtual anymore.

Online Status

Do you have a binary for testing? I could at least check for you whether the issue has been fixed in the current 3.3 beta.

Online Status

Hello, I could revert and did a little package for testing:
http://victorien.ferry.free.fr/privGadUnderVirtual.lha
executable with a private gadget that interacts under a Virtual is "aukadicty"
source corresponding to the executable is in "source", main source is in aukboopsi.c, private gadget dispatcher and functions are under TrackGadget/
the makefile is a CMakelist, I crosscompile from my linux with bebbo gcc 6.5, but it's C99 like, so not so far to compile with gcc2.95 on amiga.

.. my InstallClippingRegion thing has been disabled, to focus on the "no handleinput" problem.

Online Status

Just a thought about my clipping problem.
Isn't the problem just that when GM_RENDER is sent under scroll mode, gpRender->gpr_RPort->Layer continue to be the same as the "outside" layout, with the clipping region of the outside, instead of coordinates relative to the inside ?

Online Status

Sorry, I have been busier than anticipated over the Christmas period, but I expect these bugs are as you described.

Online Status

Seems to be fixed for OS3.2.4/3.3.