Got it.

  The behavior of a container inside a layout is not the same as a pure
> canvas.
>

What will be the difference here?

I want to have a canvas where I want to also add controls inside like
iupplot. I assume IupBackgroundbox would be perfect for it. What things
should I watch out for differences with iupcanvas?


Thanks,
Milind







Also you are adding an overhead to your application that will never be used
> if it is just drawing in the canvas.
>
> > Continuing it seems that all functionality of IupCanvas,
> IupBackgroundBox, IupGLCanvas can be provided by IupGLBackground.
>
>   Sort of, now you are increasing the overhead by adding OpenGL. Even if
> you don't use OpenGL, there will be calls to OpenGL functions so the
> IupGLCanvas can be initialized.
>
> > So if I always use IupGLCanvasBox I should never need to use the others.
>
>   The IupGLCanvasBox container is not implemented in the same way as the
> IupGLBackgroundBox. The overhead of other libraries and dependencies is
> increased. IupGLCanvasBox is inside IupGLControls that is dependent from
> FTGL and Freetype.
>
>   I would never recommend such simplification.
>
> Best,
> Scuri
>
>
>
>
> Em sáb., 13 de jun. de 2020 às 17:47, Milind Gupta <milind.gu...@gmail.com>
> escreveu:
>
>> Thanks for the summary. I had read their documentation and what I
>> understood and still seem to think from your summary is that:
>>
>> All functionality of IupCanvas can also be provided by IupBackgroundBox.
>> It provides additional functionality of serving as a container. So in
>> theory I can choose to always use IupBackgroundBox over IupCanvas.
>>
>> Continuing it seems that all functionality of IupCanvas,
>> IupBackgroundBox, IupGLCanvas can be provided by IupGLBackground.
>>
>> Also it seems that IupGLCanvasBox can provide all functionality of all
>> the above combined and add functionality to display the OpenGL based
>> controls.
>>
>> So if I always use IupGLCanvasBox I should never need to use the others.
>> This is what I understood from the documentation and from your summary as
>> well. I think I am missing cases where say IupCanvas would be a better
>> choice than IupGLCanvasBox. What are those cases?
>>
>> Thanks,
>> Milind
>>
>> On Sat, Jun 13, 2020 at 11:39 AM Antonio Scuri <antonio.sc...@gmail.com>
>> wrote:
>>
>>>   Hi,
>>>
>>>   You got to take a look at their documentation. But here is a quick
>>> glimpse:
>>>
>>> * IupCanvas - the main control, where you can draw, all others inherit
>>> from this one
>>> * IupBackgroundBox - inherits from IupCanvas, but it is a container. So
>>> it is a container where you can draw or simply control the background color
>>> below other controls.
>>> * IupGLCanvas - inherits from IupCanvas, but adds OpenGL support.
>>> * IupGLBackground - inherits from IupGLCanvas, but it is a container
>>> like IupBackgroundBox. Same purpose but with OpenGL support.
>>> * IupGLCanvasBox - same as IupGLBackground, but it is designed for being
>>> the parent of a set of OpenGL based controls in the IupGLControls library.
>>> It has a more complex implementation than IupGLBackground so we decided to
>>> leave it as a separate control
>>> * IupGLSubCanvas - a virtual canvas used for the OpenGL based controls.
>>> It is not actually a canvas, it is a region inside the IupGLCanvasBox used
>>> as base for the IupGLControls library elements.
>>>
>>> Best,
>>> Scuri
>>>
>>>
>>>
>>>
>>> Em sáb., 13 de jun. de 2020 às 01:09, Milind Gupta <
>>> milind.gu...@gmail.com> escreveu:
>>>
>>>> Hi Antonio,
>>>>         I am a little confused about all the canvas options in IUP. I
>>>> found these:
>>>>
>>>> * iupcanvas
>>>> * IupBackgroundBox
>>>> * IupGLCanvas
>>>> * IupGLBackground
>>>> * IupGLCanvasBox
>>>> * IupGLSubCanvas
>>>>
>>>> All of them can act like a canvas I believe. What are the specific
>>>> instances when each of them should be used?
>>>>
>>>> Regards,
>>>> Milind
>>>> _______________________________________________
>>>> Iup-users mailing list
>>>> Iup-users@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>>
>>> _______________________________________________
>>> Iup-users mailing list
>>> Iup-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>>
>> _______________________________________________
>> Iup-users mailing list
>> Iup-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/iup-users
>>
> _______________________________________________
> Iup-users mailing list
> Iup-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/iup-users
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to