1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \author Jürgen Vigna, jug@sad.it
11 * \author Angus Leeming, a.leeming@ic.ac.uk
17 #pragma implementation
21 #include "ButtonControllerBase.h"
22 #include "ControlERT.h"
26 #include "BufferView.h"
31 // sorry this is just a temporary hack we should include vspace.h! (Jug)
32 extern const char * stringFromUnit(int);
34 ControlERT::ControlERT(LyXView & lv, Dialogs & d)
35 : ControlInset<InsetERT, ERTParams>(lv, d)
37 d_.showERT.connect(slot(this, &ControlERT::showInset));
39 // We could have an extra method updateInset that calls
40 // view().update() rather than view().show(), but I don't see why
41 // it is really needed.
42 d_.updateERT.connect(slot(this, &ControlERT::showInset));
46 void ControlERT::applyParamsToInset()
48 inset()->status(lv_.view(), params().status);
52 void ControlERT::applyParamsNoInset()
57 ERTParams const ControlERT::getParams(InsetERT const & inset)
59 return ERTParams(inset);
63 ERTParams::ERTParams()
64 : status(InsetERT::Collapsed)
67 ERTParams::ERTParams(InsetERT const & inset)
68 : status(inset.status())
72 bool operator==(ERTParams const & p1, ERTParams const & p2)
74 return (p1.status == p2.status);
78 bool operator!=(ERTParams const & p1, ERTParams const & p2)