Re: TreeView::append_column_numeric() format?



> pks timing com writes:
>  >
>  >   append_column_numeric(modelcolumn, Gtk::FixedDecimals(3));

So far I think:
1. I don't think it would be a good idea to add a whole generic numeric
formatting framework to gtkmm just for use by this convenience method.
2. If this was not used in any other part of the API, then people would
never become familiar with it, so it would make this method far too
difficult to use.

>  >   append_column_numeric(modelcolumn, User::DerivedFormat(anything,
> they_need, to_format));

3. Providing a sigc::slot, as we already do with set_cell_data_func() is
probably easier than deriving and overriding virtual functions.

I think I'll allow a sprintf-style format string, and add an override with
a sigc::slot cell_data_func parameter. I hoped that we'd find something
better in the standard C++ library.

If only boost was API-stable.

Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]