Re: [gtkmm] gtkmm 2.4 questions



Hello!

You would expect get_size() to be const. Therefore the implementation
should probably be const.

Following your argumentation render_vfunc must be const too (as it just
display something, it don't change the instance).

It kind of changes whether or not its rendered.

If you mean that it renders _into_ one of the method's arguments, then
yes, it might be a candidate for constness. However, I'm not sure what
it actually does.

Sure, it renders to the widget and window method arguments.

Or I'm wrong here (and if yes, why?).

You don't understand the const or mutable keywords.

Until now I used const for all methods of an object that don't change the state or member data of it (e.g. methods that should be working on an const instance of that object).

I'm just curious that such complex tasks like get_size_vfunc and render_vfunc need to fullfill such requirements even if they are subject of object specialization (for a maximum of flexible usage).


Regards,
Frank



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