Skip to content

Commit

Permalink
Merge branch 'main' into dev/make_private
Browse files Browse the repository at this point in the history
  • Loading branch information
rmpowell77 authored Feb 1, 2023
2 parents 34c0dd7 + a0ce3f9 commit 3381039
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
1 change: 1 addition & 0 deletions LATEST_RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ 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
* [#72](../../issues/72) consider making WidgetDetails member values private

23 changes: 0 additions & 23 deletions include/wxUI/Widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,27 +188,4 @@ struct WidgetDetails {
Underlying** windowHandle {};
};

// function must be of type ([[maybe_unused]] wxWindow* parent, wxSizer* parentSizer, wxSizerFlags const& parentFlags);
template <CreateAndAddFunction Function>
struct Custom {
std::optional<wxSizerFlags> 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);
}
};

}

0 comments on commit 3381039

Please sign in to comment.