Commit Graph

52 Commits

Author SHA1 Message Date
Abdelrazak Younes
9383f4c3c6 'using namespace std' instead of 'using std::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 10:16:00 +00:00
Abdelrazak Younes
55a9524e99 Cleanup Hfill metrics and painting. InsetHFill is now treated almost like any other inset.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21980 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-05 22:25:07 +00:00
André Pönitz
9d0ea8aeff Move debug.{cpp,h}, Messages.{cpp,h} and gettext.{cpp,h} to support/.
Now support/* should have no dependencies on src/* anymore.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21851 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 07:04:28 +00:00
André Pönitz
150cf11651 hand-crafted LyXErr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21849 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-28 22:12:03 +00:00
Abdelrazak Younes
c201e0dde7 Fix crash with InsetHFill. The inset position was not cached in the CoordCache.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-24 07:47:01 +00:00
Abdelrazak Younes
cff2f03285 RowPainter::paintForeignMark(): take a Language instead of a Font.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21253 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 08:52:13 +00:00
Abdelrazak Younes
d58f8cf7f6 Add some const and avoid implicit constructions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21252 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 08:47:19 +00:00
Abdelrazak Younes
d6f380eac1 Undo some Font -> FontInfo moves.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21248 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 22:49:49 +00:00
Abdelrazak Younes
5ddc612b73 Splitup Font in saner bits:
* Font::FontBits -> FontInfo
* Font::FONT_XXX -> all enums transfered to FontEnums.h and renamed to FontXxx

I've replaced Font uses with FontInfo were the language() member was not needed, basically all draw() and metrics methods. There's one problematic cases with InsetQuotes which I solved by taking the Buffer main language.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21240 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 18:51:54 +00:00
Abdelrazak Younes
eea79637c7 Move Color::color enum to ColorCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21198 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-25 12:41:02 +00:00
Abdelrazak Younes
6725b2db59 Reduce header dependencies in Paragraph.h
- Move Changes.h out of Paragraph.h
- pimpl the inset list.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21033 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 15:29:51 +00:00
Abdelrazak Younes
589170bd4b Remove mostly unused function.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20943 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 12:58:43 +00:00
André Pönitz
cd72af583f cosmetics
(maily move layout related enums into a header of there own to remov
include dependencies, alos rename a few things)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20598 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 20:02:32 +00:00
Abdelrazak Younes
237c132c1e * Inset:
- get rid of the cached Dimension. Text inset dimensions are saved in ParagraphMetrics and mathed maintain their own dimension where needed.
- width(), ascent(), descent(): deleted.
- dimension(): now needs a valid BufferView.
- metrics(): now void.

* BufferView::getCoveringInset(): simplify.

* ParagraphMetrics(): now cache inset dimensions.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20420 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-21 20:39:47 +00:00
Abdelrazak Younes
74acf6b528 Cleanup the TEXT_TO_INSET_OFFSET mess. This correction is done now once in InsetText. Various other cleanup resulting from this change. In particular, pave the way to the removal of Dimension Inset::dim_ member by registering the inset dimension in RowPainter::paintInset() instead of InsetXXX::draw().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20326 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-17 21:45:14 +00:00
Abdelrazak Younes
2ea432bab1 * TextMetrics: getDisplayFont() and isRTLBoundary() takes pit instead of Paragraph.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20015 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 22:28:49 +00:00
Abdelrazak Younes
d35d25460b * Text: Move some more stuff from Text to TextMetrics:
- getFont() becomes TextMetrics::getDisplayFont()
- setCharFont() now needs a display font.
- setInsetFont() and setFont() now needs a BufferView, will be transferred to TextMetrics too.
- isRTL(): moved to TextMetrics
- isRTLBoundary(): ditto
- font_: ditto

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20014 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 21:48:49 +00:00
Abdelrazak Younes
cb796d31b0 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19995 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:27:19 +00:00
Abdelrazak Younes
4048448236 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19991 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 09:44:08 +00:00
Abdelrazak Younes
7d97e555fc Transfer Paragraph::hfillExpansion() to ParagraphMetrics. This also reduce the dependency to Row.h which is probably going to change in the near future.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19951 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-31 14:46:13 +00:00
Abdelrazak Younes
a904d97565 stupid copy&paste bug fix.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19915 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 14:26:52 +00:00
Abdelrazak Younes
ed1487dd8e * RowPainter: store PainterInfo reference instead of creating one.
* PainterInfo: new full_repaint member.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19913 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 13:53:02 +00:00
Abdelrazak Younes
97f66c07f6 * RowPainter:
- paintOnlyInsets(): new public method for inset painting only in case the inset dimension didn't change within a Row.
- paintInset(): put out everything not strictly related to the inset painting itself.
- paintHfill(): new private method to cut the reduce code in paintText().

* TextMetrics::drawParagraph(): use paintOnlyInsets() when the Row text nor it's dimension changed.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19912 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 13:19:24 +00:00
Abdelrazak Younes
3ee543a64e * RowPainter::paintFromPos(): transfer inset part to paintInset()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19910 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-30 09:01:30 +00:00
Abdelrazak Younes
be8de62ae2 Merge the Row and RowMetrics class. Those classes were separated in the 1.4 code base because the Row list was part of Paragraph. As it is now in ParagraphMetrics, there is no need to separate them. Also, only compute the rowmetrics once when the containing paragraph is redone.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19858 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 15:47:53 +00:00
Abdelrazak Younes
971c543b34 - Transfer rowpainter.cpp:paintPar() to TextMetrics::drawParagraph()
- move RowPainter class out of the anonymous namespace so that it can be used by TextMetrics::drawParagraph().


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19848 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-28 08:57:13 +00:00
Abdelrazak Younes
a43e822c98 Transfer rowpainter.cpp:paintText() to BufferView::draw()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19843 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 22:53:16 +00:00
Abdelrazak Younes
55f184563e - Transfer rowpainter.cpp:paintTextInset() to TextMetrics::draw()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19842 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 22:36:20 +00:00
Abdelrazak Younes
f88feb9548 I may have gone a bit too far in revision 19834: restore the selection painting.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19835 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 14:59:23 +00:00
Abdelrazak Younes
3c92c2ab13 Remove the wide() hack. This simplifies quite a few things...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19834 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 14:38:29 +00:00
André Pönitz
39c7e2faf0 rename Layout_ptr into LayoutPtr
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19758 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-23 19:59:07 +00:00
Abdelrazak Younes
0fcae6cc10 * BufferView::buffer() returns a reference instead of a pointer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19691 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-21 13:03:55 +00:00
Abdelrazak Younes
f91f682ef9 * Text:
- singleWidth(Buffer...): transfered to TextMetrics.
- singleWidth(Paragraph...): transfered to ParagraphMetrics.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19639 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 21:17:10 +00:00
Abdelrazak Younes
98008dc568 * Layout.h
- leftMargin, rightMargin, labelsep, labelindent, parindent are now docstring.

* TextClass.h:
- leftMargin() and rightMargin(): now return a docstring.

All other files: adapt to change above.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19633 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-18 13:21:12 +00:00
Jürgen Spitzmüller
f521c4601d Fix inset drawing issues (bug 3582)
* src/rowpainter.cpp:
	- inNarrowInset: fix method
	- paintPar: repaint if we are in a narrow inset.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19111 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-18 09:54:38 +00:00
Jürgen Spitzmüller
9d89b98987 * src/rowpainter.cpp:
- draw appendix frame only for the main text.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19100 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-17 13:35:32 +00:00
Dov Feldstern
72535633e3 Fix bug 3889 (justification of Bidi text in the GUI)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19016 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-09 17:18:35 +00:00
Uwe Stöhr
d8993d2d6c - Fileformat change: rename "arabic" to "arabic_arabtex"
- Split the language Arabic into "arabic_arabi" that uses the arabi-package and "arabic-arabtex" that uses the arabTeX-package to typeset Arabic. This is needed because both packages have some advantages over the other people need.
(This change is a consequence of a long and fruitful discussion with Mostafa, Dov, and me.)

Patch by Dov and me.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18887 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-26 00:11:03 +00:00
Stefan Schimanski
22421dffb3 * do not draw grey bars if another update strategy is active than fullscreen
(fixes http://bugzilla.lyx.org/show_bug.cgi?id=3231). See
  http://thread.gmane.org/gmane.editors.lyx.devel/87296 for discussion.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18741 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-11 18:22:00 +00:00
Stefan Schimanski
048a38b66c * small fix to r18706: Better be more defensive in assuming that RowPainter has
a singleton behavior. In fact I think it has not for nested Text insets.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18710 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-08 05:14:49 +00:00
Stefan Schimanski
6daaf5388b * local_bidi.patch: The bidi object in the class Text is only used in
places now where a ParagraphMetrics::computeRowMetrics call comes
before. And this function the Bidi object is updated. So it is a
little step now to remove the Text::bidi completely and use local
Bidi objects instead without more work to do.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18706 a592a061-630c-0410-9148-cb99ea01b6c8
2007-06-07 20:39:14 +00:00
José Matox
35eb5ddb22 Add support for Farsi (thanks to Mostafa Vahedi).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18599 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-31 18:53:01 +00:00
Lars Gullik Bjønnes
897436efbb Whitespace cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18550 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-28 22:27:45 +00:00
José Matox
8283c6f5b2 Mark spaces which belong to a foreign language in the same manner that non-whitespace is marked (from Dov).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18387 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-17 21:20:34 +00:00
Michael Schmitt
8684c07664 output changes by means of xcolor and soul
- when exporting with pdflatex 
  - when exporting with latex and dvipost is not available
rename two colors (strikeout => deletedtext, newtext => addedtext)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18284 a592a061-630c-0410-9148-cb99ea01b6c8
2007-05-13 15:17:57 +00:00
André Pönitz
e0d54dd3b4 LyXText -> Text
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 23:33:02 +00:00
André Pönitz
0bf9ac02a8 rename LyXLayout into Layout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18096 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:58:28 +00:00
André Pönitz
fc6ce7cd08 rename LyXFont to Font except in tex2lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18095 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 18:17:15 +00:00
André Pönitz
32871c1284 rename InsetBase to Inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18089 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-29 13:39:47 +00:00
André Pönitz
5008ee540f rename LColor into Color
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8
2007-04-26 17:34:20 +00:00