Changeset View
Changeset View
Standalone View
Standalone View
src/render/katelinelayout.h
Show First 20 Lines • Show All 88 Lines • ▼ Show 20 Line(s) | 42 | public: | |||
---|---|---|---|---|---|
89 | // dynamic wrapping mode: | 89 | // dynamic wrapping mode: | ||
90 | // first viewLine of a line: the X position of the first non-whitespace char | 90 | // first viewLine of a line: the X position of the first non-whitespace char | ||
91 | // subsequent viewLines: the X offset from the left of the display. | 91 | // subsequent viewLines: the X offset from the left of the display. | ||
92 | // | 92 | // | ||
93 | // this is used to provide a dynamic-wrapping-retains-indent feature. | 93 | // this is used to provide a dynamic-wrapping-retains-indent feature. | ||
94 | int shiftX() const; | 94 | int shiftX() const; | ||
95 | void setShiftX(int shiftX); | 95 | void setShiftX(int shiftX); | ||
96 | 96 | | |||
97 | // this contains only the right part of shiftX which comes after the real indentation width | ||||
98 | // the real indentation width is thus shiftX()-shiftXRightOnly() | ||||
99 | int shiftXRightOnly() const; | ||||
100 | void setShiftXRightOnly(int shiftXRightOnly); | ||||
101 | | ||||
97 | QTextLayout *layout() const; | 102 | QTextLayout *layout() const; | ||
98 | void setLayout(QTextLayout *layout); | 103 | void setLayout(QTextLayout *layout); | ||
99 | void invalidateLayout(); | 104 | void invalidateLayout(); | ||
100 | 105 | | |||
101 | bool isLayoutDirty() const; | 106 | bool isLayoutDirty() const; | ||
102 | void setLayoutDirty(bool dirty = true); | 107 | void setLayoutDirty(bool dirty = true); | ||
103 | 108 | | |||
104 | bool usePlainTextLine() const; | 109 | bool usePlainTextLine() const; | ||
105 | void setUsePlainTextLine(bool plain = true); | 110 | void setUsePlainTextLine(bool plain = true); | ||
106 | 111 | | |||
107 | private: | 112 | private: | ||
108 | // Disable copy | 113 | // Disable copy | ||
109 | KateLineLayout(const KateLineLayout ©); | 114 | KateLineLayout(const KateLineLayout ©); | ||
110 | 115 | | |||
111 | QTextLayout *takeLayout() const; | 116 | QTextLayout *takeLayout() const; | ||
112 | 117 | | |||
113 | KateRenderer &m_renderer; | 118 | KateRenderer &m_renderer; | ||
114 | mutable Kate::TextLine m_textLine; | 119 | mutable Kate::TextLine m_textLine; | ||
115 | int m_line; | 120 | int m_line; | ||
116 | int m_virtualLine; | 121 | int m_virtualLine; | ||
117 | int m_shiftX; | 122 | int m_shiftX; | ||
123 | int m_shiftXRightOnly; | ||||
118 | 124 | | |||
119 | QTextLayout *m_layout; | 125 | QTextLayout *m_layout; | ||
120 | QList<bool> m_dirtyList; | 126 | QList<bool> m_dirtyList; | ||
121 | 127 | | |||
122 | bool m_layoutDirty; | 128 | bool m_layoutDirty; | ||
123 | bool m_usePlainTextLine; | 129 | bool m_usePlainTextLine; | ||
124 | }; | 130 | }; | ||
125 | 131 | | |||
126 | typedef QExplicitlySharedDataPointer<KateLineLayout> KateLineLayoutPtr; | 132 | typedef QExplicitlySharedDataPointer<KateLineLayout> KateLineLayoutPtr; | ||
127 | 133 | | |||
128 | #endif | 134 | #endif |