]> git.tdb.fi Git - libs/gltk.git/commit
Rework how widget ownership works in Container master
authorMikko Rasa <tdb@tdb.fi>
Tue, 22 Aug 2023 20:07:49 +0000 (23:07 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 22 Aug 2023 20:43:45 +0000 (23:43 +0300)
commit3ac64a18ea1825174b84adb8570368df51e66231
tree09f5268b2798edbee41a7d3f53dffb7290f4d293
parent72de2dce79c76da9931e6bc80e59743526cc18fe
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.
16 files changed:
examples/widgetdemo/buttondemo.cpp
examples/widgetdemo/demoselector.cpp
examples/widgetdemo/dialogdemo.cpp
examples/widgetdemo/dropdowndemo.cpp
examples/widgetdemo/entrydemo.cpp
examples/widgetdemo/toggledemo.cpp
examples/widgetdemo/widgetdemo.cpp
examples/widgetdemo/widgetdemo.h
source/container.cpp
source/container.h
source/dialog.cpp
source/dialog.h
source/entry.cpp
source/panel.cpp
source/panel.h
source/root.cpp