|
|
On 1/7/22 8:28 AM, Albrecht Schlosser
wrote:
I'm not sure if changing the meaning of the align() member is such
a good idea.
Right, realized that as I was implementing.
I was thinking the extra bits in align() could be
used, but yeah, perhaps that's a bad idea,
as the reserved FL_ALIGN_XXX bits might be used for
something else in the future, and there
isn't a FL_FREE_ALIGN (like we have for label types)
to identify where reserved bits start.
So I can think of a few ways to do it:
1. Add a new Fl_Align _input_align; member value, and
add an accessor pair to manage it:
void input_align(FL_ALIGN_LEFT|RIGHT);
Fl_Align input_align() const;
2. Use the accessor names in #1, but use the internal Fl_Input
widget's align() value to hold
the LEFT/RIGHT state (avoids creating a new member value),
since Fl_Input's label() is never shown.
Perhaps there's better ideas -- defining API's was never a
personal strong point.
However, this is a specialized widget and we could add another
flag member if necessary. It's now a good time to change the ABI
before FLTK 1.4.0 will be released.
Right, that's what I was thinking.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/9ca8bc13-abc0-8e1d-db00-f8f8b1aa4460%40seriss.com.
[ Direct Link to Message ] | |
|
| |