Angus Leeming <[EMAIL PROTECTED]> writes:

| In InsetCommand, I've changed the name of string command to cmdname and changed
| the status of cmdname, options and contents to private.
| 
| I can't change the status of getCmdName(), setCmdName() etc to
| protected
| because these methods are accessed by the global xforms claaback functions,
| e.g. extern "C" void bibitem_cb().
| This will change with the GUI-independence stuff, so then is the time to change
| the status.
| 
| I have a new question, concerning insetbib.C.
| This contains two global functions, 
|       int bibitemMaxWidth(Painter &, LyXFont const &);
|       string bibitemWidthest(Painter &)
| 
| bibitemMaxWidth() returns the width of the widest InsetBibKey
| bibitemWidthest() returns the text of the widest InsetBibKey
| 
| Two small questions.
| * Should these not become static member functions of InsetBibKey?

No, not really. You should read about "How Non-Member Functions
Improve Encapsulation" in development/Code-Rules/Rules. I have not
included the complete discussion there but just the guts of it.

Unfortunately we cannot use his algorithm properly yet since we do not
use namespaces.

| * The Painter & arguments passed to these functions are not const because 
| PainterBase & rectText() and PainterBase & buttonText() are not const. However,
| they should be, I think. Shall I fix this too?

No, leave this one for the time beeing. Note that there are no public
variables in the Painter classes so (close to) no harm can be done. It
is likely that all Painter methods should be const, but we can look at
that later.

        
| 
| Angus

Reply via email to