-
-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with Menu
?
#843
Comments
ConstStringListRef
highly inflexible or am I missing something?Menu
?
This might be a bit costly to call the functor everytime we need to observe the list size. I was thinking adding an option to ConstStringListRef to provide class implementing the required functions. class ConstStringListRefAdapter {
virtual int Size() = 0;
virtual const std::string Entry(int index) = 0;
}
ConstStringListRef(ConstStringListRefAdapter* adapter);
ConstStringListRef(std::unique_ptr<ConstStringListRefAdapter> adapter); But I am not totally convinced. |
You're right the |
Hi,
I am trying create a
Menu
but the items I have are notstd::string
, I have, a list ofstruct A
and I want a field of the struct (which is a string) in the menu, do I need to keep a copy of them in anstd::vector<std::string>
for the Menu?I can't even use a vector of
char *
orstd::string_view
which would be way better.Or maybe we could add something like this
to convert entries to string each time you render,
thanks.
The text was updated successfully, but these errors were encountered: