Externals - jgraphics vs JUCE

    Oct 17 2012 | 12:49 pm
    Are there examples of externals written using JUCE? If I want to build externals that are GUI controls, should I be using JUCE or jgraphics? Does the latter have event management?
    What are the best practices for this stuff in Max5 and Max 6?
    Thanks, D

    • Oct 17 2012 | 5:52 pm
      as far as I know, you can't directly embed JUCE calls in an external. On the other hand, jgraphics does that for you through the Cairo API. As an example for jgraphics, you could check out my latest external called [sadam.canvas], which is basically a re-implementation of the vanilla [lcd] object using jgraphics (see https://cycling74.com/forums/announce-the-sadam-library-version-2012-10-08 ).
      I'm not completely sure what you mean by 'event management'. If you refer strictly to mouse events, they are accessible via the usual 'notify' mechanism of Max. To see how this works, you should check out the 'uisimp' example of the Max SDK.
      Hope this helps, Ádám
    • Oct 17 2012 | 10:34 pm
      By event management, I'm talking about such things as WM_... messages in Windows and the NSWindowDelegate messages in Cocoa, i.e, if I move or resize a window or control, drag/drop something, mouse and key presses, and so forth.
      The nice thing about JUCE is that they have already built a bunch of nice GUI controls and I'd like to be able to use those things in my own externals.
      I have not looked at jgraphics so don't yet know what it can do.
      I was aware of your library but last time I looked at it, there was no source code so I wasn't able to see how stuff was implemented there.