This adds some resource-ownership tracking.

Time to start spreading this out, more.
This commit is contained in:
2025-03-03 13:26:36 -05:00
parent a36901db50
commit fad3dbc39a
11 changed files with 47 additions and 43 deletions

View File

@ -5,6 +5,8 @@
# error Do not include this file directly, use "core.hh" instead.
#endif
#include <memory>
namespace dw {
namespace core {
@ -433,7 +435,7 @@ protected:
virtual int reliefXThickness () = 0;
virtual int reliefYThickness () = 0;
void init (Widget *widget);
void init (std::unique_ptr< Widget > widget);
public:
ComplexButtonResource ();
@ -582,7 +584,7 @@ class ResourceFactory: public lout::object::Object
public:
virtual LabelButtonResource *createLabelButtonResource (const char *label)
= 0;
virtual ComplexButtonResource *createComplexButtonResource (Widget *widget,
virtual ComplexButtonResource *createComplexButtonResource (std::unique_ptr< Widget > widget,
bool relief)
= 0;
virtual ListResource *createListResource (ListResource::SelectionMode