]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
promote MathMetricsInfo to MetricsInfo, change mathed accordingly
[lyx.git] / src / mathed / math_inset.C
index 065408881be4c724c456001a489c8c67b86bc039..48763a7526387c4ae9180cd9ba444aa0410696a8 100644 (file)
 using std::ostream;
 
 
+BufferView * MathInset::view() const
+{
+       if (!mathcursor)
+               return 0;
+       return mathcursor->formula()->view();
+}
+
+
 int MathInset::height() const
 {
        return ascent() + descent();
@@ -158,19 +166,19 @@ bool MathInset::idxBetween(idx_type idx, idx_type from, idx_type to) const
 }
 
 
-void MathInset::metrics(MathMetricsInfo &) const
+void MathInset::metrics(MetricsInfo &) const
 {
        lyxerr << "MathInset::metrics() called directly!\n";
 }
 
 
-void MathInset::draw(MathPainterInfo &, int, int) const
+void MathInset::draw(PainterInfo &, int, int) const
 {
        lyxerr << "MathInset::draw() called directly!\n";
 }
 
 
-void MathInset::drawSelection(MathPainterInfo &,
+void MathInset::drawSelection(PainterInfo &,
        idx_type, pos_type, idx_type, pos_type) const
 {
        lyxerr << "MathInset::drawSelection() called directly!\n";
@@ -297,8 +305,3 @@ ostream & operator<<(ostream & os, MathAtom const & at)
        return os;
 }
 
-
-Dialogs & getDialogs()
-{
-       return mathcursor->formula()->view()->owner()->getDialogs();
-}