Re: string -> pointer question

2002-02-20 Thread Juergen Vigna
On 20-Feb-2002 Jean-Marc Lasgouttes wrote: > This is what I had in mind, indeed. You've got to find a bufferview > somewhere. And probably an inset should be able to know in which > bufferviews it belongs (I assume it could do that by knowing in which > document it belongs) Yes document or we w

Re: string -> pointer question

2002-02-20 Thread Jean-Marc Lasgouttes
> "Juergen" == Juergen Vigna <[EMAIL PROTECTED]> writes: Juergen> On 20-Feb-2002 Jean-Marc Lasgouttes wrote: >> What bufferview would you use with your lfun solution? If you know >> that, you can just use the same... Juergen> This doesn't matter as in the case of multiple bufferviews Juerge

Re: string -> pointer question

2002-02-20 Thread Juergen Vigna
On 20-Feb-2002 Jean-Marc Lasgouttes wrote: > What bufferview would you use with your lfun solution? If you know > that, you can just use the same... This doesn't matter as in the case of multiple bufferviews the lyxfunc aproach would also be wrong: owner()->view() which view??? We now have only

Re: string -> pointer question

2002-02-20 Thread Angus Leeming
On Wednesday 20 February 2002 3:30 pm, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > > Angus> Should I modify GCache::update from void > Angus> GCache::update(InsetGraphics const &); to void > Angus> GCache::update(InsetGraphics const &, BufferView

Re: string -> pointer question

2002-02-20 Thread Angus Leeming
On Wednesday 20 February 2002 2:16 pm, Juergen Vigna wrote: > On 20-Feb-2002 Angus Leeming wrote: > > > So how should I proceed. Somehow I need to tell the underlying bufferview > > that the inset has changed. That is, I'll have to call > > BufferView::updateInset(Inset *, false) > > > >

Re: string -> pointer question

2002-02-20 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Should I modify GCache::update from void Angus> GCache::update(InsetGraphics const &); to void Angus> GCache::update(InsetGraphics const &, BufferView const *); Angus> and store which BufferView the inset is to be found in. Only

Re: string -> pointer question

2002-02-20 Thread Juergen Vigna
On 20-Feb-2002 Angus Leeming wrote: > So how should I proceed. Somehow I need to tell the underlying bufferview > that the inset has changed. That is, I'll have to call > BufferView::updateInset(Inset *, false) > > The question is how? I would say as proove of concept you can use curren

Re: string -> pointer question

2002-02-20 Thread Angus Leeming
On Wednesday 20 February 2002 2:45 pm, Jean-Marc Lasgouttes wrote: > > "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: > > Angus> When the loading status of a graphics file changes, I need to > Angus> inform LyX. I do this with: > > Angus> LyXFunc::dispatch(LFUN_GRAPHICS_CHANGED_STATE,

Re: string -> pointer question

2002-02-20 Thread Juergen Vigna
On 20-Feb-2002 Jean-Marc Lasgouttes wrote: > Why can't you signal the insets directly? It looks like a case where > the lyxfunc think is really not appropriate... It looks like you could > just call some InsetGraphics::fileChanged method directly. You got a point there, but we have to provide a

Re: string -> pointer question

2002-02-20 Thread Angus Leeming
On Wednesday 20 February 2002 1:32 pm, Angus Leeming wrote: Actually, that was a bit premature. This doesn't work! Has anybody any idea about how to write isStrPtr(str), strToPtr(str)? Should I use the C library function strtoul? Angus > When the loading status of a graphics file changes, I n

Re: string -> pointer question

2002-02-20 Thread Jean-Marc Lasgouttes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> When the loading status of a graphics file changes, I need to Angus> inform LyX. I do this with: Angus> LyXFunc::dispatch(LFUN_GRAPHICS_CHANGED_STATE, argument); Angus> where argument is a list of insets as a space-separated stri

string -> pointer question

2002-02-20 Thread Angus Leeming
When the loading status of a graphics file changes, I need to inform LyX. I do this with: LyXFunc::dispatch(LFUN_GRAPHICS_CHANGED_STATE, argument); where argument is a list of insets as a space-separated string. I split the string up and convert each substring back to a pointer with: bool isSt