Discussion:
[Wt-interest] Custom WLayout
Tolga HOŞGÖR
2015-01-10 11:15:25 UTC
Permalink
Is there a way to do this?

Regards.
Tolga HOŞGÖR
2015-01-10 11:21:39 UTC
Permalink
Hello,

Despite my research, I couldn't manage to create a custom WLayout. I tried
using wtResize on the container object but there is not way to block layout
behavior (such as returning false from the function maybe). Instead, I
naturally get a mixed result that uses both i.e. WHBoxLayout modifications
and my vertical modifications on the child widgets. I guess there is no way
to implement a custom WLayout as WContainerWidget uses some dynamic_cast
(which is a very bad way to do it) to decide which layout item impl class
it will create and use based on the given layout.

Somehow getting wtResize event in JS without using WLayout would also be
fine.

Is there a way to do this?

Regards.
Koen Deforche
2015-01-24 21:34:08 UTC
Permalink
Hey Tolga,

No, there's no way to create a custom layout (easily). Layout management
inside html/css is simply too nasty for us to provide a meaningful API on
which you can build.

If you want to do custom layout, you need to put the 'container' inside a
layout manager. Within this container you can then control the layout
inside it by providing a 'wtResize' function. Your own layout manager then
does not inherit from WLayout but could still act like one.

Regards,
koen
Post by Tolga HOŞGÖR
Hello,
Despite my research, I couldn't manage to create a custom WLayout. I tried
using wtResize on the container object but there is not way to block layout
behavior (such as returning false from the function maybe). Instead, I
naturally get a mixed result that uses both i.e. WHBoxLayout modifications
and my vertical modifications on the child widgets. I guess there is no way
to implement a custom WLayout as WContainerWidget uses some dynamic_cast
(which is a very bad way to do it) to decide which layout item impl class
it will create and use based on the given layout.
Somehow getting wtResize event in JS without using WLayout would also be
fine.
Is there a way to do this?
Regards.
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is
your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
witty-interest mailing list
https://lists.sourceforge.net/lists/listinfo/witty-interest
Loading...