On Wednesday 11 July 2001 13:58, Jean-Marc Lasgouttes wrote:
> >>>>> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
>
> Angus> On Wednesday 11 July 2001 13:32, Jean-Marc Lasgouttes wrote:
> >> Is there a way, for insets which have a popup associated to them,
> >> to send a 'close' signal to the popup? Could we have a toggle-open
> >> method in insets that just does the right thing (also for
> >> insetcollapsable)?
>
> Angus> These insets (the GUI-I ones anyway) have a SigC::Signal0<void>
> Angus> hideDialog So far, this has been triggered by the inset's
> Angus> d-tor, but you could use it here also I believe.
>
> In fact, (1) not all of the insets have this
Because having a hideDialog signal or close() method makes sense only for
those methods that have a popup.
Perhaps you could make a
class dialogInset: public Inset{
public
///
virtual ~dialogInset() { hideDialog(); }
///
SigC::signal0<void> hideDialog;
};
and derive all the insets with a dialog from this.
and (2) they are defined
> one by one, not directly in Inset. Would it be possible to assume that
> this signal exists for everybody (the popup for math would be the
> panel) or would it be better to add a close() (or maybe a toggle())
> method to Inset?
This is the alternative, I guess. close() would default to
close() {}
for insets without a dialog.
Maybe a combination of both these ideas is best (would reduce code-bloat
anyway).
Angus