Re: TreeView::append_column_numeric() format?

On Tue, 2004-11-23 at 10:23 +0100, Murray Cumming wrote:
> > 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,

I've done that now, in gtkmm 2.5. When parsing data in editable cells,
it only understand decimal numbers, but I don't think that's a huge

I'd welcome any criticism. 

>  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.

Murray Cumming
murrayc murrayc com

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