Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is LAYOUT_SERIALIZATION fully supported? #40

Open
holyodin776 opened this issue Nov 10, 2021 · 2 comments
Open

Is LAYOUT_SERIALIZATION fully supported? #40

holyodin776 opened this issue Nov 10, 2021 · 2 comments

Comments

@holyodin776
Copy link

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

@thennequin
Copy link
Owner

thennequin commented Nov 15, 2021

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.

@holyodin776
Copy link
Author

that would be a greate help, thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants