Commit Graph

65 Commits

Author SHA1 Message Date
Abdelrazak Younes
5ed7e7a03c PreparePrepare for independent decoration drawing and correct a CoordCache bug: Previously, only the math insets containing the cursor were put in the cache. I believe this was the reason for some of the weird problems with cursors in math (egg: cursor trapped in a fraction).
* insetbase.C
  - drawMarkers(): draw the decoration in any case (but visible only in editing mode). Fill-in the CoordCache in any case.
  - drawMarkers2(): ditto.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16773 a592a061-630c-0410-9148-cb99ea01b6c8
2007-01-20 01:15:05 +00:00
Georg Baum
e35725d5c0 New nomenclature inset from Ugras
* src/LyXAction.C
	(LyXAction::init): Add LFUN_NOMENCL_INSERT and LFUN_NOMENCL_PRINT

	* src/insets/insetbase.C
	(build_translator): ditto

	* src/LaTeXFeatures.C
	(LaTeXFeatures::getPackages): Add nomencl

	* src/insets/insetnomencl.[Ch]: new insets InsetNomencl and
	InsetPrintNomencl

	* src/insets/insetbase.h: Add NOMENCL_CODE and NOMENCL_PRINT_CODE

	* src/insets/insetcommandparams.C
	(InsetCommandParams::findInfo): Add nomenclature and printnomenclature
	(InsetCommandParams::getCommand): Extend end of command protection to
	cover commands with only optional arguments like printnomenclature

	* src/insets/insetert.C
	(InsetERT::getStatus): disable LFUN_NOMENCL_INSERT and
	LFUN_NOMENCL_PRINT

	* src/insets/Makefile.am: Add new files
	* src/frontends/qt4/Makefile.dialogs: ditto
	* src/frontends/qt4/Makefile.am: ditto

	* src/factory.C
	(createInset): Handle InsetNomencl and InsetPrintNomencl
	(readInset): ditto

	* src/buffer.C
	(LYX_FORMAT): increase

	* src/lyxfunc.C
	(LyXFunc::dispatch): Handle nomenclature

	* src/LaTeX.C
	(LaTeX::deleteFilesOnError): Delete .nls file
	(LaTeX::run): Run makeindex for nomenclature
	(LaTeX::runMakeIndex): handle nomenclature options
	(LaTeX::deplog): Recognize nomenclature file

	* src/frontends/qt4/QNomenclDialog.[Ch]: new
	* src/frontends/qt4/QNomencl.[Ch]: ditto
	* src/frontends/qt4/ui/QNomenclUi.ui: ditto

	* src/frontends/qt4/Dialogs.C
	(Dialogs::build): handle nomenclature dialog

	* src/text3.C
	(LyXText::dispatch): Handle LFUN_NOMENCL_INSERT and
	LFUN_NOMENCL_PRINT
	(LyXText::getStatus): Ditto

	* src/lfuns.h
	(kb_action): Add LFUN_NOMENCL_INSERT and LFUN_NOMENCL_PRINT

	* lib/lyx2lyx/LyX.py
	(format_relation): Update 1.5 format range

	* lib/lyx2lyx/lyx_1_5.py
	(revert_nomenclature): New
	(revert_printnomenclature): ditto

	* lib/chkconfig.ltx: Test for nomencl package

	* lib/doc/LaTeXConfig.lyx.in: Add nomencl package

	* lib/doc/Extended.lyx: Add documentation for nomencl

	* lib/ui/stdtoolbars.ui
	(Toolbar "extra" "Extra"): Add nomencl-insert

	* lib/ui/classic.ui: Add nomencl-insert and nomencl-print
	* lib/ui/stdmenus.ui: ditto

	* development/scons/scons_manifest.py: Add new files

	* development/FORMAT: Describe new format


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15739 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-04 17:55:36 +00:00
Abdelrazak Younes
eb651c3d61 Move BufferView cached pointer out of LyXText:
* LyXText
  - bv(), bv_owner, : deleted.
  - These methods now need a (Buffer const &) argument: getFont(), applyOuterFont(), getLayoutFont(), getLabelFont(), setCharFont(), setLayout(), singleWidth(), leftMargin(), rightMargin(), computeRowMetrics(), isMainText(), spacing(), isRTL(), cursorX(), rowBreakPoint(), setRowWidth(), labelFill(), labelEnd().
  - These methods now need a (BufferView const &) argument and are propably candidates for future removal when 1.6 is opened for development: redoParagraph(), x2pos(), getRowNearY(), getColumnNearX(), checkInsetHit(), setHeightOfRow().
  - recUndo(): now need a LCursor argument.
 
* CoordCache::get(LyXText const *, pit_type):
  - now const.
  - use const_iterator instead of iterator.

* FontIterator:
  - add (Buffer const &) argument to ctor
  - buffer_: new const reference to applicable BufferView.

* InsetBase
  - xo(), yo(), covers() and neverIndent() are now const.

* InsetText::setViewCache(): deleted

All other changes are due to the LyXText and InsetBase API changes.



 
  

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15618 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 12:45:33 +00:00
Asger Ottar Alstrup
37e164c6f9 - rework update handling, make cursor movement faster,
fixing lots of navigation problems.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15470 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 11:46:36 +00:00
André Pönitz
de6418f377 use more unicode in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15462 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-22 10:15:23 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Michael Schmitt
c3a9c54632 change tracking:
* src/insets/insetbase.h: replace markErased(...) by
        setChange(...)
        * src/insets/insettext.h: replace markErased(...) and
        markNew(...) by setChange(...)
        * src/insets/insettabular.h: replace markErased(...) by
        setChange(...)
        * src/insets/insettabular.C:
        * src/insets/insetbase.C:
        * src/insets/insettext.C:
        * src/paragraph_pimpl.C:
        * src/tabular.C: adjust properly


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15392 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-20 09:29:19 +00:00
Lars Gullik Bjønnes
0d449056ef Output docbook as utf8. Probably quite a bit more work needed, but then help form a docbook person is needed.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15387 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-19 21:00:33 +00:00
Georg Baum
8b67659646 Use UTF8 for LaTeX export.
Known problems:
- No space is output after a \hfill. I probably broke this with the
  InsetCommand patch. I'll have a look later.
- Although the encoding is now UTF8 the arguments of the inputenc package
  are still the old ones, so LaTeX will not run.
- Labels and references with non-ASCII characters are broken. This needs to
  be fixed in lyx::support::escape(), but this is a file format change.
- Something seems to be wrong with index entries, but this is probably also
  due to the InsetCommand changes.

Have fun!


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15378 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-19 16:51:30 +00:00
Abdelrazak Younes
4cc7a7708e This commit fixes a crash when accessing a math inset. This was due to an invalid CursorSlice::text() null pointer accessed in InsetMathNest::cursorPos():
CoordCache & coord_cache = sl.text()->bv()->coordCache();

As you can see, I used this indirection to access the BufferView::CoordCache(). Bad luck, the passed CursorSlice was not completely valid inside a mathed inset, hence the crash. My solution is to pass BufferView to InsetBase::cursorPos() and all its derivative.

* InsetBase::cursorPos(): pass BufferView const &

* bufferview_funcs::coordOffset(): ditto.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15356 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-17 16:23:27 +00:00
Abdelrazak Younes
d37fae169c In order to support multiple LyXView each BufferView needs its own CoordCache. This is what's implemented in this commit.
theCoords is now a thing of the past and all CoordCache accesses are done via BufferView::coordCache() now. I had to modify a number of methods to pass BufferView.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15324 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-13 16:44:44 +00:00
Georg Baum
34b7650cbb Introduce wide streams. This fixes the remaining problems of plain text
export (e.g. the ToC) and the navigate menu.

	* src/insets/insetbase.h
	(InsetBase::plaintext): output to a docstream
	(InsetBase::textString): ditto

	* src/mathed/TextPainter.h
	(TextPainter::show): ditto

	* src/support/docstream.[Ch] New file and string streams for
	docstring. The file streams convert to UTF8 on the fly.

	* many more files: Adjust to the changes above


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15301 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-11 19:40:50 +00:00
Lars Gullik Bjønnes
edd81011ce Change editMessage to return a docstring, change functions to not use to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14953 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 18:52:00 +00:00
Lars Gullik Bjønnes
43b77ba2d7 Change _() to return a docstring. Fixup callers with the help of lyx::to_utf8.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14952 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-09 15:27:44 +00:00
Michael Schmitt
f0d215f752 drop linuxdoc support (part 1)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14816 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-23 10:41:43 +00:00
Jean-Marc Lasgouttes
bc6cf52e9f * src/BufferView_pimpl.C (getStatus, dispatch): do not handle
LFUN_GOTOERROR.

	* src/bufferview_funcs.C (findInset): exit early when at end of
	document (and avoid a crash).

	* src/insets/insetbase.[Ch]: remove ERROR_CODE



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14706 a592a061-630c-0410-9148-cb99ea01b6c8
2006-08-16 21:06:40 +00:00
Lars Gullik Bjønnes
3b9338a3a8 Whitespace cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13565 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-05 23:56:29 +00:00
Jean-Marc Lasgouttes
52a2eb2c52 John&JMarc's change tracking patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10424 a592a061-630c-0410-9148-cb99ea01b6c8
2005-09-07 10:37:05 +00:00
Lars Gullik Bjønnes
1d5ee03bdf add missing include
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10336 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-18 21:19:23 +00:00
Lars Gullik Bjønnes
7a23f39975 small lyxerr fix, version to 1.4.0pre1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10328 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-18 15:12:15 +00:00
André Pönitz
008dad0e3a clean up
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10265 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-17 01:13:36 +00:00
André Pönitz
41ecabf519 make boundary property an iterator property instead of a CursorSlice property
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10214 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 15:49:40 +00:00
André Pönitz
1a9992c796 partial fix for bug 622, cosmetic rest remains open
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10195 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-15 00:39:44 +00:00
Georg Baum
3682fa502a fix bug 1879 (first part, not completely fixed yet)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9948 a592a061-630c-0410-9148-cb99ea01b6c8
2005-05-17 11:11:45 +00:00
Georg Baum
a1ba34bef9 disable open dialogs if applying them is not allowed
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9811 a592a061-630c-0410-9148-cb99ea01b6c8
2005-04-13 09:43:58 +00:00
Angus Leeming
e22c5f4d97 Asger's commentary, const-correct and bug-squashing little beauty.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9558 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-31 16:29:48 +00:00
Angus Leeming
c9f9ba315c Asger's exchanging of the class and struct keywords.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9502 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-19 15:03:31 +00:00
Lars Gullik Bjønnes
94aa0bdda4 remove all trace if idxUpDown2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9335 a592a061-630c-0410-9148-cb99ea01b6c8
2004-12-03 16:39:59 +00:00
Alfredo Braunstein
a2cd656e25 CoordBranch merge
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9325 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-30 01:59:49 +00:00
Lars Gullik Bjønnes
183239b7de rename priv_dispatch to doDispatch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9301 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-24 21:58:42 +00:00
Lars Gullik Bjønnes
59413be9a0 clone NVI, other small stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9295 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-23 23:04:52 +00:00
André Pönitz
02ebc072b0 remove per-inset position cahce, use new external map instead.
this allows us to bomb early on uninitialized cache values.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8923 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-14 14:03:42 +00:00
Jean-Marc Lasgouttes
9e20808369 constify the various incarnations of editXY
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8907 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-13 19:14:17 +00:00
André Pönitz
6d5b622a8a handle framewidths != 1
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8904 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-13 15:08:25 +00:00
Jean-Marc Lasgouttes
6b89c145fd fix toggling of collapsable insets with the mouse (bug 1558)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8901 a592a061-630c-0410-9148-cb99ea01b6c8
2004-08-13 14:56:06 +00:00
Angus Leeming
c4762f9452 Whitespace, only whitespace...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8682 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-20 08:51:15 +00:00
André Pönitz
b3eefc106e fix the cursor-y problem in math
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8646 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-13 12:47:48 +00:00
André Pönitz
b447408de2 macro rework
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8644 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-13 06:27:29 +00:00
André Pönitz
2bdaf96dfb the Paragraph::inInset() changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8632 a592a061-630c-0410-9148-cb99ea01b6c8
2004-04-08 15:03:33 +00:00
Angus Leeming
991b0ec589 A slightly buggy lfun all-insets-toggle.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8564 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-30 12:36:33 +00:00
André Pönitz
b634b3eb3b split LyXFunc::getStatus() into inset specific chunks
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8500 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-18 13:57:20 +00:00
André Pönitz
5198e1d9a3 The Buffer::LyXText -> Buffer::InsetText patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8498 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-18 12:53:43 +00:00
André Pönitz
fc52df8243 the DocIterator stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8472 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-01 17:12:09 +00:00
André Pönitz
e6b54c9fb6 * dispatchresult.h: rename 'FINISHED' to 'FINISHED_LEFT'
* cursor.[Ch]: prepare for localized getStatus()

	* lyxtext.h:
	* tabular.C:
	* text.C:
	* text2.C:
	* text3.C:  streamlines the LyXText cursor movement handlers a bit.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8453 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-20 17:19:53 +00:00
André Pönitz
357a3741c0 * insettabular.[Ch]: remove remains of the 'update' mechanism,
simplify cursor moving function,
	  re-enable horizontal scrolling for large tables

	* insetbase.C:
	* insetbase.[Ch]: remove explicit 'DispatchResult' return type and
	  implicitly assume 'DispatchResult(true, true) with exception of
	  InsetBase::priv_dispatch which does the equivalent of
	  'retrun DispatchResult(false)'

	* inset*.[Ch] (priv_dispatch): adjust


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8435 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-16 11:58:51 +00:00
André Pönitz
7a0b5603e5 more IU as advertised
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8431 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-13 13:51:12 +00:00
André Pönitz
6af06846fd remove cursor::drawSelection() plus some math reorganization (move the
'width' cache from MathAtom)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8383 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-02 17:32:56 +00:00
André Pönitz
99aacdad5c more IU
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8376 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-30 11:41:12 +00:00
André Pönitz
1eaa3eb913 more IU
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8371 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-26 10:13:15 +00:00
André Pönitz
ccc5d55764 Part of IU.
####################################################################

          1.4.0cvs is now NOT fit for any serious use

####################################################################


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8363 a592a061-630c-0410-9148-cb99ea01b6c8
2004-01-20 14:25:24 +00:00