From 29c82c7a4a7213d582a9fe04f57c1c6bc6e06467 Mon Sep 17 00:00:00 2001 From: Richard Powell Date: Wed, 1 Feb 2023 06:57:55 -0800 Subject: [PATCH] Issue #71: remove wxUI::details::Custom --- LATEST_RELEASE_NOTES.md | 1 + include/wxUI/Widget.h | 23 ----------------------- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/LATEST_RELEASE_NOTES.md b/LATEST_RELEASE_NOTES.md index 5e89cc1..d3d870e 100644 --- a/LATEST_RELEASE_NOTES.md +++ b/LATEST_RELEASE_NOTES.md @@ -11,4 +11,5 @@ Other changes: * [#59](../../issues/59) need BitmapToggleButton * [#65](../../issues/65) Custom controller should take a coroutine that generates wxWindows to be added to the sizer * [#70](../../issues/70) Widget::style() is odd, it should be withStyle() +* [#71](../../issues/71) remove wxUI::details::Custom diff --git a/include/wxUI/Widget.h b/include/wxUI/Widget.h index 14a940d..efabdc3 100644 --- a/include/wxUI/Widget.h +++ b/include/wxUI/Widget.h @@ -167,27 +167,4 @@ struct WidgetDetails { Underlying** windowHandle {}; }; -// function must be of type ([[maybe_unused]] wxWindow* parent, wxSizer* parentSizer, wxSizerFlags const& parentFlags); -template -struct Custom { - std::optional flags; - Function function; - - Custom(wxSizerFlags const& flags, Function const& function) - : flags(flags) - , function(function) - { - } - - explicit Custom(Function const& function) - : function(function) - { - } - - void createAndAdd(wxWindow* parent, wxSizer* parentSizer, wxSizerFlags const& parentFlags) const - { - function(parent, parentSizer, flags ? *flags : parentFlags); - } -}; - }