]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_charinset.h
enable direct input of #1...#9; some whitespace changes
[lyx.git] / src / mathed / math_charinset.h
index 718faab5b5c030a97f640015f6329e33aa3e08c0..20d5e472f1f3fc6a95653fd4af2b31082e7d2138 100644 (file)
 
 class MathCharInset : public MathInset {
 public:
+       ///
+       explicit MathCharInset(char c);
        ///
        MathCharInset(char c, MathTextCodes t);
        ///
        MathInset * clone() const;
        ///
-       void draw(Painter &, int x, int baseline);
+       static MathTextCodes nativeCode(char c);
+       ///
+       void metrics(MathMetricsInfo const & st) const;
+       ///
+       void draw(Painter &, int x, int y) const;
+       ///
+       void write(WriteStream & os) const;
+       ///
+       void writeHeader(std::ostream &) const;
+       ///
+       void writeTrailer(std::ostream &) const;
        ///
-       void write(std::ostream &, bool fragile) const;
+       void writeRaw(std::ostream &) const;
        ///
-       void writeNormal(std::ostream &) const;
+       void normalize(NormalStream &) const;
        /// 
        int ascent() const;
        ///
@@ -31,12 +43,24 @@ public:
        ///
        int width() const;
        /// identifies Charinsets
-       bool isCharInset() const { return true; }
+       MathCharInset const * asCharInset() const { return this; }
        ///
        char getChar() const { return char_; }
+       ///
+       MathTextCodes code() const { return code_; }
+       ///
+       bool isRelOp() const;
+       ///
+       void handleFont(MathTextCodes t);
+       ///
+       bool match(MathInset *) const;
 
 private:
        /// the character
        char char_;
+       /// the font to be used on screen
+       MathTextCodes code_;
+       ///
+       mutable MathMetricsInfo mi_;
 };
 #endif