Re: insetcommand.h question

2000-05-18 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars> No, not really. You should read about "How Non-Member Functions | Lars> Improve Encapsulation" in development/Code-Rules/Rules. I have not | Lars> included the complete discussion there but just the guts of it. | | Ok. Thanks. | Now I have read t

Re: insetcommand.h question

2000-05-18 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | I've made bibitemMaxWidth() and bibitemWidthest() static member | functions of | InsetBibKey and all is fine. No, don't do that. Lgb

Re: insetcommand.h question

2000-05-18 Thread Angus Leeming
Lars> No, not really. You should read about "How Non-Member Functions Lars> Improve Encapsulation" in development/Code-Rules/Rules. I have not Lars> included the complete discussion there but just the guts of it. Ok. Thanks. Now I have read them, but I don't see why since the rule is here but not

Re: insetcommand.h question

2000-05-18 Thread Lars Gullik Bjønnes
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 accesse

Re: insetcommand.h question

2000-05-18 Thread Angus Leeming
I've made bibitemMaxWidth() and bibitemWidthest() static member functions of InsetBibKey and all is fine. I misunderstood PainterBase::rectText() etc. These are not and should not be const functions. class InsetBibKey: public InsetCommand { public: static int maxWidth(Painter &, LyXFont c

Re: insetcommand.h question

2000-05-18 Thread Angus Leeming
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

Re: insetcommand.h question

2000-05-18 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Very simple one: | | Can I propose changing the protected status of "command", "options", "contents" | in insetcommand.h to private? Can I also propose changing the name of "command" | to "cmdname"? Things as they stand are a little counter intuitive.