Hello, Excuse me, everyone.I am creating an AAX plugin and want to add a full screen feature. I tried calling
setBounds (0, 0, getParentComponent() ->getParentWidth(), getParentComponent() ->getParentHeight())
in the plugin editor; How should I center it?
If you know the desired width and height of your plugin window, then you would subtract half of the width from the parent’s width/2, and half of the height from the parent’s height/2.
Or is there something more that you are asking? I was not certain from the description you gave.
In the macOS system, I want to implement a full screen display function for the plugin: click a button to make the plugin just cover my entire screen.
There are few issues to consider here. One is whether your plug-in is fully responsive, and can support different width to height ratios. If so, then you can resize your plug-in to take up the full screen. Otherwise you will need to restrict that. You can restrict this by using the
There are a few methods you can use to resize a plug-in, which are detailed elsewhere on the forum. Our plug-ins allow the use of the draggable corner, which is enabled by
If your code can handle adjustable resizing then the plug-in can certainly handle a full-screen function. The key in our plug-ins to easy resizing is that the child components need to handle the resizing as well. If your plug-in is “responsive” then the child components might change their layout when the plug-in takes over the full screen. If the width/height ratio is fixed, then the components might always have the same coordinates, and your “canvas” component will get scaled. Again, the methods for scaling are covered elsewhere in the forum.