]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetert.C
move inset related stuff from src/graphics to src/inset/
[lyx.git] / src / insets / insetert.C
index 9f6581e5f589afbcba43087a885e761c2177cefa..a7f743cf344f9662660c67d60ebdc9068486baf3 100644 (file)
@@ -19,7 +19,7 @@
 #include "language.h"
 #include "buffer.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "lyxtext.h"
 #include "debug.h"
 #include "lyxtextclasslist.h"
@@ -263,10 +263,9 @@ void InsetERT::updateStatus(BufferView * bv, bool swap) const
        }
 }
 
-
-void InsetERT::edit(BufferView * bv, int x, int y, unsigned int button)
+void InsetERT::edit(BufferView * bv, int x, int y, mouse_button::state button)
 {
-       if (button == 3)
+       if (button == mouse_button::button3)
                return;
 
        if (status_ == Inlined) {
@@ -300,7 +299,7 @@ void InsetERT::edit(BufferView * bv, bool front)
 
 
 void InsetERT::insetButtonPress(BufferView * bv,
-                                       int x, int y, int button)
+       int x, int y, mouse_button::state button)
 {
        if (status_ == Inlined) {
                inset.insetButtonPress(bv, x, y, button);
@@ -310,9 +309,10 @@ void InsetERT::insetButtonPress(BufferView * bv,
 }
 
 
-bool InsetERT::insetButtonRelease(BufferView * bv, int x, int y, int button)
+bool InsetERT::insetButtonRelease(BufferView * bv, int x, int y, 
+       mouse_button::state button)
 {
-       if (button == 3) {
+       if (button == mouse_button::button3) {
                showInsetDialog(bv);
                return true;
        }
@@ -338,7 +338,7 @@ bool InsetERT::insetButtonRelease(BufferView * bv, int x, int y, int button)
 
 
 void InsetERT::insetMotionNotify(BufferView * bv,
-                                        int x, int y, int state)
+       int x, int y, mouse_button::state state)
 {
        if (status_ == Inlined) {
                inset.insetMotionNotify(bv, x, y, state);
@@ -492,7 +492,7 @@ string const InsetERT::get_new_label() const
                la += inset.paragraph()->getChar(j);
                ++i;
        }
-       if (inset.paragraph()->next() || (i > 0 && j < p_siz)) {
+       if (i > 0 && j < p_siz) {
                la += "...";
        }
        if (la.empty()) {
@@ -709,15 +709,3 @@ int InsetERT::getMaxWidth(BufferView * bv, UpdatableInset const * in) const
                return -1;
        return w;
 }
-
-
-void InsetERT::update(BufferView * bv, LyXFont const & font,
-                      bool reinit)
-{
-       if (inset.need_update & InsetText::INIT ||
-               inset.need_update & InsetText::FULL)
-       {
-               setButtonLabel();
-       }
-       InsetCollapsable::update(bv, font, reinit);
-}