Rework how widget ownership works in Container The class now supports both owned and non-owned children. Owned children are passed in as unique_ptr or can be created by the container with the add_new() function template. This is likely to introduce memory leaks in existing code.
Refactor Dialog to separate the autodeletion functionality The base Dialog class now only hides itself, allowing reusable dialogs. There's a new AutoDialog class which can be used to create autodeleting dialogs, ensuring that they're allocated in the correct way.
Use std::unique_ptr for managing memory
Refactor Panel to create Layout internally on request The Panel always took ownership of the layout anyway, and there seems to be little point to replace an existing layout with a new one.
Style and comment updates
Use size_t to represent counts and indices
Use the override specifier when overriding a virtual function
Use nullptr instead of 0 for pointers
Simplify constructors with C++11 Use default member initializers, defaulted constructors and constructor delegation.
Add API declarations