Xojo Conferences
MBSOct2019CologneDE

custom HIView in plugin (Real Studio Plugins Mailinglist archive)

Back to the thread list
Previous thread: dylibs, function loading and getting the wrong one called
Next thread: #pragma StackOverflowChecking false for plugin?


macosx and unix paths   -   GOLD
  custom HIView in plugin   -   Alexander Cohen
   Re: custom HIView in plugin   -   Alfred Van Hoek
   Re: custom HIView in plugin   -   Alexander Cohen
   Re: custom HIView in plugin   -   Alfred Van Hoek
   Re: custom HIView in plugin   -   Alexander Cohen
   Re: custom HIView in plugin   -   Alfred Van Hoek
   Re: custom HIView in plugin   -   Alexander Cohen

custom HIView in plugin
Date: 23.10.06 16:45 (Mon, 23 Oct 2006 11:45:53 -0400)
From: Alexander Cohen
Hi,

Im creating a custom HIView in a class in a plugin. Its not a control
its a class. I have all the correct handlers on the HIView to receive
tracking events and hit testing. I add the custom HIView to a rb
window and all is good, it draws correctly and responds to everything
except the tracking events. If i use the same HIView in a window that
i create in the plugin, i receive the tracking events. Is there
anything i need to know about tracking events in the HIView? Does rb
intercept the HitTest and tracking events within its windows? Any
ideas why im not receiving these events?

thanks

Alex
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: custom HIView in plugin
Date: 23.10.06 17:32 (Mon, 23 Oct 2006 12:32:49 -0400)
From: Alfred Van Hoek

On Oct 23, 2006, at 11:45 AM, Alexander Cohen wrote:

>
> Im creating a custom HIView in a class in a plugin. Its not a
> control its a class. I have all the correct handlers on the HIView
> to receive tracking events and hit testing. I add the custom HIView
> to a rb window and all is good, it draws correctly and responds to
> everything except the tracking events. If i use the same HIView in
> a window that i create in the plugin, i receive the tracking
> events. Is there anything i need to know about tracking events in
> the HIView? Does rb intercept the HitTest and tracking events
> within its windows? Any ideas why im not receiving these events?

You need to install an eventhandler on the window rb provides, or
grab the handle from the canvas and install an event handler on that
handle. In the latter case, unfortunately, when the canvas lives on a
window with the composite flag set, it won't work because the canvas'
handle is nil.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: custom HIView in plugin
Date: 23.10.06 18:29 (Mon, 23 Oct 2006 13:29:43 -0400)
From: Alexander Cohen

On 23-Oct-06, at 12:32 PM, Alfred Van Hoek wrote:

>
> On Oct 23, 2006, at 11:45 AM, Alexander Cohen wrote:
>
>>
>> Im creating a custom HIView in a class in a plugin. Its not a
>> control its a class. I have all the correct handlers on the HIView
>> to receive tracking events and hit testing. I add the custom
>> HIView to a rb window and all is good, it draws correctly and
>> responds to everything except the tracking events. If i use the
>> same HIView in a window that i create in the plugin, i receive the
>> tracking events. Is there anything i need to know about tracking
>> events in the HIView? Does rb intercept the HitTest and tracking
>> events within its windows? Any ideas why im not receiving these
>> events?
>
> You need to install an eventhandler on the window rb provides, or
> grab the handle from the canvas and install an event handler on
> that handle. In the latter case, unfortunately, when the canvas
> lives on a window with the composite flag set, it won't work
> because the canvas' handle is nil.

Im not using a canvas. Im actually creating a class that handles a
HIView. Im adding it programmatically to to the windows content view.
I installed an event handler on that HIView but im not receiving the
tracking events.

AC
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: custom HIView in plugin
Date: 23.10.06 18:33 (Mon, 23 Oct 2006 13:33:11 -0400)
From: Alfred Van Hoek

On Oct 23, 2006, at 1:29 PM, Alexander Cohen wrote:

> an event handler on that HIView

install on the window a handler to send messages and install on your
hiview a handler to receive it. That'll do it.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: custom HIView in plugin
Date: 23.10.06 19:17 (Mon, 23 Oct 2006 14:17:28 -0400)
From: Alexander Cohen
But why do i need to do that. Is rb really messing that much with the
hierarchy?

AC

On 23-Oct-06, at 1:33 PM, Alfred Van Hoek wrote:

>
> On Oct 23, 2006, at 1:29 PM, Alexander Cohen wrote:
>
>> an event handler on that HIView
>
> install on the window a handler to send messages and install on
> your hiview a handler to receive it. That'll do it.
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: custom HIView in plugin
Date: 23.10.06 21:21 (Mon, 23 Oct 2006 16:21:00 -0400)
From: Alfred Van Hoek

On Oct 23, 2006, at 2:17 PM, Alexander Cohen wrote:

> But why do i need to do that. Is rb really messing that much with
> the hierarchy?

Yes, RB requires us to give a valid HIViewRef (ControlRef) from the
custom REALcontrol (it fails to do so whether or not the REALcontrol
lives on a composite or non composite window. Subclassing the canvas
is a slightly better alternative, given that a valid ControlRef is
provided when in non-composite mode.

Thus, this limit you to create yourself a HIView using OS_API's only.
If you have an underlying REALcontrol you can use the REAlcontrol
callbacks to create messages that you would send to your HIView
handler (this is a safer way), or do it your way, directly on the
REALwindow. However, this will cause you a lot of grief, given that
your HIView is the last in the control order and if your HIView is
focus aware, all bets are off.

Note that on Windows you will not have these troubles, given that the
REALcontrol always provide you with a valid HWND. So I would urge you
to make the point that the Mac target in the plugin SDK is not in par
with the WIn target in the plugin SDK. Therefore, REAL should give a
very high priority to mature the Mac target.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: custom HIView in plugin
Date: 23.10.06 21:41 (Mon, 23 Oct 2006 16:41:38 -0400)
From: Alexander Cohen

On 23-Oct-06, at 4:21 PM, Alfred Van Hoek wrote:

>
> On Oct 23, 2006, at 2:17 PM, Alexander Cohen wrote:
>
>> But why do i need to do that. Is rb really messing that much with
>> the hierarchy?
>
> Yes, RB requires us to give a valid HIViewRef (ControlRef) from the
> custom REALcontrol (it fails to do so whether or not the
> REALcontrol lives on a composite or non composite window.
> Subclassing the canvas is a slightly better alternative, given that
> a valid ControlRef is provided when in non-composite mode.
>
> Thus, this limit you to create yourself a HIView using OS_API's
> only. If you have an underlying REALcontrol you can use the
> REAlcontrol callbacks to create messages that you would send to
> your HIView handler (this is a safer way), or do it your way,
> directly on the REALwindow. However, this will cause you a lot of
> grief, given that your HIView is the last in the control order and
> if your HIView is focus aware, all bets are off.
>
> Note that on Windows you will not have these troubles, given that
> the REALcontrol always provide you with a valid HWND. So I would
> urge you to make the point that the Mac target in the plugin SDK is
> not in par with the WIn target in the plugin SDK. Therefore, REAL
> should give a very high priority to mature the Mac target.

Ive actually tried a few things such as removing all rb custom
HIView's that they installed... still not getting my tracking events.
Moving myself to the front of the z-Order... still no clicks. Ive
gotta say that i have a feeling that rb is doing something that is
not very kosher with the window or the view hierarchy. I wish they
could actually respond and give some sort of hint of what i need to
do to get this working. RS, i know your listening! :)

AC
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>