]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettext.h
Translate labels for float:algorithm, float:figure and float:table.
[lyx.git] / src / insets / insettext.h
index 55aea7d4e9c7a4475aedc38886fe7c08c2c96fc3..1229044b5271bf9b23bcf2777abfcfba5d1b47de 100644 (file)
@@ -1,7 +1,7 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
  *
  *           Copyright 1998 The LyX Team.
@@ -30,6 +30,7 @@
 class Painter;
 class BufferView;
 class Buffer;
+class BufferParams;
 class LyXCursor;
 class LyXText;
 class LyXScreen;
@@ -37,7 +38,7 @@ class Row;
 
 /**
  A text inset is like a TeX box to write full text
- (including styles and other insets) in a given space. 
+ (including styles and other insets) in a given space.
  @author: Jürgen Vigna
  */
 class InsetText : public UpdatableInset {
@@ -73,7 +74,7 @@ public:
                ALWAYS
        };
        ///
-       InsetText();
+       InsetText(BufferParams const &);
        ///
        explicit
        InsetText(InsetText const &, bool same_id = false);
@@ -149,7 +150,7 @@ public:
        ///
        void getCursorPos(BufferView *, int & x, int & y) const;
        ///
-       unsigned int insetInInsetY();
+       int insetInInsetY() const;
        ///
        void toggleInsetCursor(BufferView *);
        ///
@@ -169,7 +170,7 @@ public:
        ///
        void setFont(BufferView *, LyXFont const &,
                     bool toggleall = false,
-                    bool selectall = false);
+                    bool selectall = false);
        ///
        int getMaxWidth(BufferView *, UpdatableInset const *) const;
        ///
@@ -179,7 +180,7 @@ public:
        ///
        void setParagraphData(Paragraph *, bool same_id = false);
        ///
-       void setText(string const &);
+       void setText(string const &, LyXFont const &);
        ///
        void setAutoBreakRows(bool);
        ///
@@ -239,15 +240,17 @@ public:
        void toggleSelection(BufferView *, bool kill_selection);
        ///
        bool searchForward(BufferView *, string const &,
-                          bool = true, bool = false);
+                          bool = true, bool = false);
        ///
        bool searchBackward(BufferView *, string const &,
-                           bool = true, bool = false);
+                           bool = true, bool = false);
        ///
        bool checkInsertChar(LyXFont &);
        ///
        void getDrawFont(LyXFont &) const;
        ///
+       void appendParagraphs(BufferParams const & bparams, Paragraph *);
+       ///
        //
        // Public structures and variables
        ///
@@ -256,7 +259,9 @@ public:
 protected:
        ///
        void updateLocal(BufferView *, int what, bool mark_dirty) const;
-       ///
+       /// set parameters for an initial lock of this inset
+       void lockInset(BufferView *);
+       /// lock an inset inside this one
        void lockInset(BufferView *, UpdatableInset *);
        ///
        mutable int drawTextXOffset;
@@ -294,11 +299,11 @@ private:
                                        bool activate_inset = true,
                                        bool selecting = false);
        ///
-       UpdatableInset::RESULT moveRightIntern(BufferView *, bool behind,
+       UpdatableInset::RESULT moveRightIntern(BufferView *, bool front,
                                               bool activate_inset = true,
                                               bool selecting = false);
        ///
-       UpdatableInset::RESULT moveLeftIntern(BufferView *, bool behind, 
+       UpdatableInset::RESULT moveLeftIntern(BufferView *, bool front,
                                              bool activate_inset = true,
                                              bool selecting = false);
 
@@ -309,17 +314,21 @@ private:
        ///
        void setCharFont(Buffer const *, int pos, LyXFont const & font);
        ///
-       bool checkAndActivateInset(BufferView * bv, bool behind);
+       bool checkAndActivateInset(BufferView * bv, bool front);
        ///
        bool checkAndActivateInset(BufferView * bv, int x = 0, int y = 0,
-                                  int button = 0);
+                                  int button = 0);
        ///
        void removeNewlines();
        ///
        int cx(BufferView *) const;
        ///
+       int cix(BufferView *) const;
+       ///
        int cy(BufferView *) const;
        ///
+       int ciy(BufferView *) const;
+       ///
        lyx::pos_type cpos(BufferView *) const;
        ///
        Paragraph * cpar(BufferView *) const;
@@ -340,8 +349,8 @@ private:
        ///
        void reinitLyXText() const;
        ///
-       void collapseParagraphs(BufferParams const & bparams) const;
-       
+       void collapseParagraphs(BufferView *) const;
+
        /* Private structures and variables */
        ///
        Paragraph * par;
@@ -402,7 +411,7 @@ private:
        };
        ///
        mutable save_state sstate;
-       
+
        ///
        // this is needed globally so we know that we're using it actually and
        // so the LyXText-Cache is not erased until used!