Re: Dynamic Macro - documentation and updated patch

2007-10-24 Thread Abdelrazak Younes
Stefan Schimanski wrote: When exactly is this updateLabels called? Each time a paragraph is created/deleted/merged/split. Hmm. This could be used maybe to trigger the Buffer::updateMacros call to update the paragraph numbers. But otherwise, don't see a way to get rid of the const_cast with

Re: Dynamic Macro - documentation and updated patch

2007-10-24 Thread Stefan Schimanski
When exactly is this updateLabels called? Each time a paragraph is created/deleted/merged/split. Hmm. This could be used maybe to trigger the Buffer::updateMacros call to update the paragraph numbers. But otherwise, don't see a way to get rid of the const_cast with that. The more I think a

Re: Dynamic Macro - documentation and updated patch

2007-10-24 Thread Abdelrazak Younes
Stefan Schimanski wrote: Am 23.10.2007 um 08:59 schrieb Jean-Marc Lasgouttes: Stefan Schimanski <[EMAIL PROTECTED]> writes: Well, I reorganize the insets in the MathData. Not sure if it makes sense to use mutable here. In fact this question suggests that updateMacros should be called from so

Re: Dynamic Macro - documentation and updated patch

2007-10-23 Thread Stefan Schimanski
Am 23.10.2007 um 08:59 schrieb Jean-Marc Lasgouttes: Stefan Schimanski <[EMAIL PROTECTED]> writes: Well, I reorganize the insets in the MathData. Not sure if it makes sense to use mutable here. In fact this question suggests that updateMacros should be called from somewhere else, not the metr

Re: Dynamic Macro - documentation and updated patch

2007-10-23 Thread Jean-Marc Lasgouttes
Abdelrazak Younes <[EMAIL PROTECTED]> writes: > That makes sense. The best solution would be to just update all > reference to the currently edited macro. Could you enlighten me as to > why this is not possible actually? This would mean that each macro > keeps its own list of reference but I don't

Re: Dynamic Macro - documentation and updated patch

2007-10-23 Thread Abdelrazak Younes
Jean-Marc Lasgouttes wrote: Stefan Schimanski <[EMAIL PROTECTED]> writes: Well, I reorganize the insets in the MathData. Not sure if it makes sense to use mutable here. In fact this question suggests that updateMacros should be called from somewhere else, not the metrics method. But of course I

Re: Dynamic Macro - documentation and updated patch

2007-10-23 Thread Jean-Marc Lasgouttes
Stefan Schimanski <[EMAIL PROTECTED]> writes: > Well, I reorganize the insets in the MathData. Not sure if it makes > sense to use mutable here. In fact this question suggests that > updateMacros should be called from somewhere else, not the metrics > method. But of course I don't want to integrat

Re: Dynamic Macro - documentation and updated patch

2007-10-22 Thread Stefan Schimanski
Hi! I updated the patch with some improvements in readability and coding style, and a bug fix to cache the dimension properly in the MathMacroTemplate. And I uploaded a file with test cases to the wiki http://wiki.lyx.org/ Devel/Macros (or directly here http://1stein.org/download/testcases

Re: Dynamic Macro - documentation and updated patch

2007-10-22 Thread Stefan Schimanski
Hi! Thanks for the comments about the coding style. Will fix that. @@ -248,35 +250,14 @@ return; } + const_cast(this)->updateMacros(mi); + Couldn't you declare some member variable _mutable_ instead of using const_cast? Well, I reorganize the insets in the Ma

Re: Dynamic Macro - documentation and updated patch

2007-10-22 Thread Andre Poenitz
On Mon, Oct 22, 2007 at 12:13:46PM +0200, Abdelrazak Younes wrote: > I think that putting the boolean operator at the beginning of the line > is clearer: > > return definition_ == x.definition_ > && numargs_ == x.numargs_ > && display_ ==

Re: Dynamic Macro - documentation and updated patch

2007-10-22 Thread Abdelrazak Younes
Stefan Schimanski wrote: Hi! I wrote a small documentation of my dynmacro patch. You can find the patch itself, in sync with r21100 from today, here: http://1stein.org/download/dynmacro.patch The documentation is linked from the wiki page for macros (http://wiki.lyx.org/Devel/Macros#toc8) a

Re: Dynamic Macro - documentation and updated patch

2007-10-21 Thread Stefan Schimanski
Am 21.10.2007 um 23:49 schrieb Pavel Sanda: Hi! I wrote a small documentation of my dynmacro patch. You can find the patch itself, in sync with r21100 from today, here: http://1stein.org/download/dynmacro.patch i guess you mean http://1stein.org/download/dynmacro16.patch Yes, right. T

Re: Dynamic Macro - documentation and updated patch

2007-10-21 Thread Pavel Sanda
> Hi! > > I wrote a small documentation of my dynmacro patch. You can find the patch > itself, in sync with r21100 from today, here: > http://1stein.org/download/dynmacro.patch i guess you mean http://1stein.org/download/dynmacro16.patch pavel

Dynamic Macro - documentation and updated patch

2007-10-21 Thread Stefan Schimanski
Hi! I wrote a small documentation of my dynmacro patch. You can find the patch itself, in sync with r21100 from today, here: http://1stein.org/ download/dynmacro.patch The documentation is linked from the wiki page for macros (http:// wiki.lyx.org/Devel/Macros#toc8) as lyx file or pdf. Wa