ImWindow icon indicating copy to clipboard operation
ImWindow copied to clipboard

Is LAYOUT_SERIALIZATION fully supported?

Open holyodin776 opened this issue 4 years ago • 2 comments

It seems that functions like "SaveLayoutToFile" and "LoadLayoutFromFile" are implemented but never used in any sample? and other related interfaces like "CreateWindowByClassName" or "GetWindowClassName" are simply return null

holyodin776 avatar Nov 10 '21 02:11 holyodin776

The layout system works (except for special windows, but coming soon) and you need a custom RTTI system to support dynamic class creation.

The functions CreateWindowByClassName and GetWindowClassName are not implemented in ImWindow, because standard C++ RTTI is not enough for a generic serialisation system, so you need to implement your own RTTI system.

In our case the function GetWindowClassName need to return the class name, we can use typeid(*pWindow).name(), but in CreateWindowByClassName you can't dynamically create class instance via the type name.

I will commit soon (week(s) ?) a sample with a simple RTTI system to allow the Layout serialisation.

thennequin avatar Nov 15 '21 12:11 thennequin

that would be a greate help, thank you

holyodin776 avatar Nov 22 '21 01:11 holyodin776