> I will also need a way of toggling or, alternatively, to know whether
> an inset is open or closed. Is that possible?
> 
> JMarc

Does this cover it?
Angus

class dialogInset: public Inset {
public:
        /**Pass this reference from the daughter class c-tor
             E.g. from InsetCite pass 
             bv->owner()->getDialogs()->showCitation(this); */
        dialogInset(SigC::signal0<void> & sd )
        {
                showDialog_ = sd;
        }
        ///
        ~dialogInset()
        {
                hideDialog_();
        }
        ///
        void edit(BufferView * bv, int, int, unsigned int)
        {
                isDialogOpen_ = true;
                showDialog(this);
        }
        ///
        void close()
        {
                 isDialogOpen_= false;
                hideDialog_();
        }
        ///
        bool isDialogOpen() { return isDialogOpen_; }

private:
        ///
        bool isDialogOpen_;
        ///
        SigC::signal0<void> hideDialog_;
        ///
        SigC::signal0<void> & showDialog_;
};

Reply via email to