Commit Graph

176 Commits

Author SHA1 Message Date
Abdelrazak Younes
6564e9bb4e Fix this bug:
1. scroll a bit so that the cursor is not visible anymore
2. hit the keyboard arrow keys to move the cursor or type something

The problem was that TextMetrics::parMetric() automatically creates a new parmetrics on const access. This was needed in the old architecture but I don't think anymore.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23126 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 11:07:41 +00:00
Richard Heck
a8317afc4b This is the first of a series of commits that will make InsetLayout a real class.
In this commit, we do the minimal amount of work necessary to protect our data.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23116 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-22 02:32:52 +00:00
Dov Feldstern
deb86513df Fix typing of digits in RTL text, which was broken way back during the Font/Language separation (r21240).
The problem was that when typing a digit in RTL text, the language was being 
switched to LTR, which is wrong.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23037 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-16 18:39:20 +00:00
Abdelrazak Younes
371ed5aff5 * doInsertInset(): cosmetics
* Text::dispatch(): call updateLabels() where it makes sense.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22972 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-13 12:10:18 +00:00
Richard Heck
040f3431e7 Fix bug 4037 and related problems. The patch has been cleaned up a bit
from the one posted to the list.

The basic idea has two parts. First, we hard code an "empty layout"
(called PlainLayout, for want of a better name) in TextClass and read it
before doing anything else. It can therefore be customized by classes,
if they want---say, to make it left-aligned. Second, InsetText's are
divided into three types: (i) normal ones, that use the "default" layout
defined by the text class; (ii) highly restrictive ones, such as ERT and
(not quite an inset) table cells, which demand the empty layout; (iii)
middling ones, which default to an empty layout and use the empty layout
in place of the default. (This is so we don't get the same problem we
had with ERT in e.g. footnotes.) The type of inset is signaled by new
methods InsetText::forceEmptyLayout() and InsetText::useEmptyLayout().
(The latter might better be called: useEmptyLayoutInsteadOfDefault(),
but that's silly.) The old InsetText::forceDefaultParagraphs() has been
split into these, plus a new method InsetText::allowParagraphCustomization(). 
A lot of the changes just adapt to this change.

The other big change is in GuiToolbar: We want to show LyXDefault and
the "default" layout only when they're active.

There are a handful of places where I'm not entirely sure whether we
should be using forceEmptyLayout or !allowParagraphCustomization() or
both. The InsetCaption is one of these. These places, and some others,
are marked with FIXMEs, so I'd appreciate it if people would search
through the patch and let me know whether these need changing. If they
don't, the FIXMEs can be deleted.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22966 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-12 17:31:07 +00:00
Dov Feldstern
11a6b3c4c7 visual mode for bidi cursor movement
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22929 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-10 19:52:45 +00:00
Abdelrazak Younes
bd8cba506f * doInsertInset(): return early.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22891 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 10:45:49 +00:00
André Pönitz
225bf49cf9 some refactoring.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22890 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-09 10:41:49 +00:00
Stefan Schimanski
cf333f5ab4 * Support for graphics pasting (with most code in the frontend's GuiClipboard)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22762 a592a061-630c-0410-9148-cb99ea01b6c8
2008-02-03 10:43:03 +00:00
Stefan Schimanski
f85fccef65 * newlyxcommand support as LaTeX feature
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22281 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-23 16:32:00 +00:00
Stefan Schimanski
36dbec4506 * Lazy MathData to avoid unneeded interpretation of macro definitions
* DocIterator as MacroPosition
* Iterative search for macro in scope until a visible one is found.
This include the ability to resolve macro inside nested text insets.
* Speed up macro lookups by factor 2: only getMacro(name) call, no
further hasMacro(name) call before
* Both way child/master support
* Correct macro scope for multi-paragraph environments
* Correct macro scope for multi-depth-paragraphs
* Buffer::updateMacros made const
* Update macros when loaded (of master and child)
* Do not remove too many braces when unfolding a macro. This could
lead to a data loss because the relationship between arguments of
macros can be mixed up if nested macros are unfold at once.
* Reduce dependencies to MetricsInfo in MathMacro   
* Update macros when needed. Normally it's done just before doing
metrics. But in cases without a brace around some constructs (like
\left(bla\right)) there is some help needed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22241 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 20:42:46 +00:00
Abdelrazak Younes
96d2d6fc50 * LyXFunc::dispatch(): invert BufferView::dispatch() and cursor::dispatch() calling.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22227 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-21 10:42:59 +00:00
Bo Peng
8d7ea1ceaa Add buffer name/path/class to InsetInfo
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22213 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-19 18:09:00 +00:00
Jürgen Spitzmüller
8672364e1e * fix bug 4055, overdue patch from Stefan Schimanski:
"The idea of the beforeDispX/Y_ variables in the Cursor is to hold the position
of the cursor on screen before the lyxfunc is dispatched. But to get this the
metrics must be valid. It's updated in Cursor::dispatch before the dispatch
loop.
After inserting/deleting stuff (like when deleting the selected text before
inserting the alpha) the metrics are invalid. But the handler for the alpha
calls Cursor::dispatch after the deletion and hence the crash with your second
patch.

Here is a patch fixing that:

The beforeDispatchXY variable do not belong into the Cursor::dispatch because
Cursor::dispatch is often called "manually" by many handlers to some followup
action. So this logic must go somewhere else where it is sure that is not
updated after the metrics got invalidated."

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22193 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-17 18:13:02 +00:00
Abdelrazak Younes
e7bb71ff4e header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22178 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-16 22:09:28 +00:00
Abdelrazak Younes
7c392af6ea getting rid of superfluous lyx::support:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22106 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:57:42 +00:00
Abdelrazak Younes
9abb7db468 getting rid of superfluous std:: statements.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22104 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 19:28:07 +00:00
Abdelrazak Younes
b89cc942eb 'using namespace lyx::support' instead of 'using support::xxx'
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22103 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-12 18:57:56 +00:00
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
Jürgen Spitzmüller
61e1643821 Support for \slash and \nobreakdash-
* src/lfuns.h:
* src/Text3.cpp:
* src/insets/InsetMathNest.cpp:
* src/insets/insetCollapsable:
	- new LFUN_SPECIALCHAR_INSERT
	- nuke LFUN_HYPHENATION_POINT_INSERT, 
	  LFUN_LIGATURE_BREAK_INSERT,
	  LFUN_DOTS_INSERT,
               LFUN_END_OF_SENTENCE_PERIOD_INSERT,
	  LFUN_MENU_SEPARATOR_INSERT
	  (functions now handled as arguments of the above)

* src/insets/InsetSpecialChar.{cpp,h}:
	- implement \slash and \nobreakdash-

* src/Buffer.cpp:
	- increment format to 307.
* lib/lyx2lyx/LyX.py:
* lib/lyx2lyx/lyx_1_6.py:
	- reversion methods for SpecialChar \slash{} and
	  SpecialChar \nobreakdash-
* development/FORMAT:
	- document file format change

* lib/ui/stdmenus.inc:
* lib/ui/classic.ui:
	- add new SpecialChars to the menus, adapt lfuns to new scheme

* lib/bind/aqua.bind:
* lib/bind/cua.bind:
* lib/bind/emacs.bind:
* lib/bind/fi/menus.bind:
* lib/bind/mac.bind:
* lib/bind/menus.bind:
* lib/bind/sciword.bind:
* lib/bind/xemacs.bind:
	- add shortcuts for new SpecialChars, adapt lfuns to new scheme

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21989 a592a061-630c-0410-9148-cb99ea01b6c8
2007-12-06 11:04:56 +00:00
André Pönitz
2506e0d643 assimilate BOOST_CURRENT_FUNCTION
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21867 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-29 21:10:35 +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
Uwe Stöhr
12f7869ac0 support for \linebreak:
- fileformat change
- tex2lyx support
- rename LFUN_BREAK_LINE to LFUN_NEW_LINE because this is what the lfun does and to avoid confusions
- new menu entry
- new shortcut C-S-Return

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21778 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-25 18:34:37 +00:00
Uwe Stöhr
97aa558cac support for \pagebreak:
- rename former "pagebreak" to "newpage" since it produces a \newpage
- new LFUN
- menu entry
- tex2lyx support
- fileformat change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21732 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-23 02:10:00 +00:00
André Pönitz
d5fc2425a9 consolidate showDialog() incarnations
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21662 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-18 00:39:15 +00:00
Abdelrazak Younes
bdf33a2a32 Fix mouse selection drawing by brute force.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21655 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 18:17:19 +00:00
Abdelrazak Younes
926abae753 Simplify single par drawing:
* ParagraphMetrics::computeRowSignature(): Integrate row's dimensions and selection status in the row signature.
* TextMetrics::drawParagraph(): compute the row signature here and rely on that to decide if a redraw is needed or not.
* BufferView::Private: get rid of the ViewMetricsInfo member. Just keep the ScreenUpdateStrategy.
* BufferView::draw(): full screen update even for singlePar case because the row signature will detect if something needs to be redrawn.
* Text3.cpp: get rid of hack following architecture update.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21650 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-17 11:27:03 +00:00
André Pönitz
e1ce2f92db reduce line noise
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21631 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 20:04:51 +00:00
Abdelrazak Younes
f46454fb7a Avoid unnecessary redraw when selecting text.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21629 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-15 18:01:04 +00:00
Abdelrazak Younes
3ab1031f97 Fix wrong setting of language when only font change is requested.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21610 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-14 15:07:08 +00:00
Martin Vermeer
979239a248 Make URL a standard inset
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21576 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-13 10:03:16 +00:00
Abdelrazak Younes
cdf1378200 Introducing TextClassPtr.h to minimize header dependencies.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21506 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-07 23:25:08 +00:00
Jürgen Spitzmüller
ddbcee01ac * src/BufferView.cpp:
- move the LFUN_OUTLINE_*'s out of here ...
* src/Text3.cpp:
	- to this place. This fixes a crash (bug 4330).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21475 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 17:13:43 +00:00
Abdelrazak Younes
e660f44001 Current update architecture doesn't need multiParSel() special case anymore.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21467 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-06 09:34:16 +00:00
Dov Feldstern
ddd82f7aa4 Getting rid of LTR bias --- part 3/4
This is a continuation of r21128, r21244


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21448 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 19:41:16 +00:00
Abdelrazak Younes
c1afc30a8a Fix bug 4317 and update comment WRT current situation of trunk.
http://bugzilla.lyx.org/show_bug.cgi?id=4317

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21435 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-05 12:04:47 +00:00
André Pönitz
09b7e6e60a some std::string -> filename changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21404 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-03 17:37:37 +00:00
Abdelrazak Younes
d45d7de8c3 Further cleanup of collapsable insets. The layouts are now properly read and applied.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21392 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 21:27:41 +00:00
Abdelrazak Younes
c5f981f34c Fix initial numbering of foot notes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21385 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-02 18:19:45 +00:00
Stefan Schimanski
1231489798 * dynamic macros as described in http://1stein.org/download/dynmacro.pdf
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21328 a592a061-630c-0410-9148-cb99ea01b6c8
2007-11-01 11:13:07 +00:00
André Pönitz
41f6e7ee54 unbreak font panel
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21272 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-29 22:03:59 +00:00
Dov Feldstern
b4372a37d9 Getting rid of LTR bias --- part 2/?
This is a continuation of r21128. This round fixes the "Word" movement
functions and LFUNS.

Behavior should remain unchanged by this fix.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21244 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-28 20:35:57 +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
1026a87b72 * InsetList: introducing find() and count()
* Paragraph:
- erase numberOfOptArgs() and bibitem()
- move onlyText() to Private.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21180 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-24 15:32:43 +00:00
Abdelrazak Younes
92908b6ecf I forgot to commit this in 21167.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21170 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-24 08:40:38 +00:00
Dov Feldstern
662b58497e Getting rid of LTR bias --- part 1/?
This is the first patch in a series meant to remove LTR bias from the code.
Currently, there are many places in the code where "right" and "left" are used,
but where we actually mean "forward" and "backwards" --- which is the same 
thing in LTR text, but not in RTL/Bidi text.

See full details in http://permalink.gmane.org/gmane.editors.lyx.devel/97550.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21128 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-22 22:18:52 +00:00
André Pönitz
f934b86850 cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21097 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-21 10:50:56 +00:00
André Pönitz
f762cbf3c6 mainly cosmetics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21079 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-20 10:03:45 +00:00
Richard Heck
e158e07c29 InsetCommandParams() now takes an InsetCode rather than a string.
These changes are just adaptations to the new signature.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21072 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-19 17:22:55 +00:00
Abdelrazak Younes
55beda376a Refactor Undo/Redo framework into an Undo class owned by a Buffer. This reduces header dependencies from Undo.h which was including lots of stuff previously. This also solves the bug where undo/redo were reset upon buffer switching. Now, each buffer has a truly independant undo/redo architecture.
In the future, when Cursor has been fixed to work correctly with multiple views of the same Buffer, we could transfer the Undo owner from Buffer to Cursor.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-18 11:51:17 +00:00
Bo Peng
4385c156e2 Allow the input of an InsetInfo using command buffer (e.g. "info-insert menu paste"). Document this change in InsetInfo.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20961 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-14 00:47:52 +00:00
Uwe Stöhr
7075eaadef The huge URL patch:
- rename the lfun to href-insert.png
- rename the files to Hyperlink...
- the former URLUi produces now \href commands (hyperref)

Only missing thing is the lyx2lyx conversion routine - this will be done by Richard

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20950 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 19:06:09 +00:00
Martin Vermeer
1ecd2189f2 Dissolve CharStyle initial implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20944 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 12:59:44 +00:00
Martin Vermeer
ee038db36d Safer code for allowMultiPar(), thx Angus
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20939 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:14:49 +00:00
Abdelrazak Younes
f7b1c86393 Move Inset::Code to InsetCode.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20936 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-13 09:04:52 +00:00
Bo Peng
62c98f2ffc InsetInfo: add InsetInfo (core)
* src/insets/Inset.cpp: add InsetInfo
	* src/insets/Inset.h
	* src/insets/InsetInfo.cpp
	* src/insets/InsetInfo.h
	* src/LyXAction.cpp: add LFUN_INFO_INSERT
	* src/lfuns.h
	* src/BufferView.cpp: 
	* src/factory.cpp
	* src/Text3.cpp: insert InsetInfo with selected text
	* development/scons/scons_manifest.py: build tools update
	* src/Makefile.am


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20904 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:52:00 +00:00
Abdelrazak Younes
a800da1bfe initial support for shift + right-mouse-click selection.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20903 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 14:46:53 +00:00
Martin Vermeer
04ee2d87fc Introduce allowMultiPar()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20898 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 10:13:45 +00:00
Abdelrazak Younes
9a458ec6e9 Move private part of BufferView to a private implementation.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20896 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-11 09:59:01 +00:00
Martin Vermeer
74d5587268 Oops
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20889 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-10 13:42:34 +00:00
Martin Vermeer
0f4d519108 A saner way to reset paragraphs to default when inserting inset around selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20888 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-10 13:25:37 +00:00
Jean-Marc Lasgouttes
1a53e1099a * src/paragraph_funcs.cpp (breakParagraph): change parameter 'flag' to
simpler 'keep_layout'

	* src/Text.cpp (breakParagraph): change parameter keep_layout to 
	inverse_logic.

	* src/Text3.cpp (dispatch): remove LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT;
	implement "inverse" flag to LFUN_BREAK_PARAGRAPH.

	* src/LyXAction.cpp:
	* src/insets/InsetCaption.cpp (doDispatch):
	* src/insets/InsetFlex.cpp (doDispatch):
	* src/insets/InsetTabular.cpp (doDispatch): 
	* src/insets/InsetIndex.cpp (doDispatch):
	* src/lfuns.h: remove all traces of LFUN_BREAK_PARAGRAPH_KEEP_LAYOUT.

	* lib/bind/cua.bind:
	* lib/bind/xemacs.bind: 
	* lib/bind/emacs.bind:
	* lib/bind/mac.bind: adapt bindings.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20846 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-08 13:17:15 +00:00
Martin Vermeer
d21a3bb445 Index as collapsible, preserving existing feature set
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20699 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-03 13:38:19 +00:00
Abdelrazak Younes
3ca9ddb6ed Move most of the Gui specific code in Toolbars to its new qt4 specialization GuiToolbars.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20644 a592a061-630c-0410-9148-cb99ea01b6c8
2007-10-01 20:45:50 +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
André Pönitz
5aaf4dce20 move font related stuff from bufferview_funcs to Font
delete bufferview_funcs, since it's now empty


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20579 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-29 11:00:18 +00:00
Dov Feldstern
4c8544239e Upon exiting an inset, set the font back to what it was when entering.
This is related to the move of current_font from text to cursor (r19999).
Specifically, after r20261, this is necessary in order that the font not
remain in "latex_language" when exiting an ERT inset.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20477 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-24 22:20:03 +00:00
Abdelrazak Younes
f75e4d3c4b Revert unintentionally committed change.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20421 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-21 20:57:00 +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
André Pönitz
82309f0c2d Remove a few includes from Text.h
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20386 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 20:44:08 +00:00
Richard Heck
aa01777060 Change LFUN_FONT_CODE to LFUN_FONT_TYPEWERITER, possibly in preparation for a move to character-style-based font changes, etc.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20381 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-20 18:02:39 +00:00
Abdelrazak Younes
8d52aa5638 Give PageDown/Up scrolling a sane behaviour. Does not work with selection yet...
* BufferView:
- new scroll(), scrollDown() and scrollUp() method for pixel scrolling.
- new LFUN_SCREEN_UP/DOWN handling.
 
* TextMetrics: new helper and access methods.




git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20283 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-15 12:28:41 +00:00
Jean-Marc Lasgouttes
32398d5165 Text::breakParagraph wants a bool as second parameter, not an int
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20274 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-14 08:00:12 +00:00
Jürgen Spitzmüller
59c2e75e41 * src/insets/InsetCommand.{cpp,h}:
- implement edit function that opens the inset's dialog.
* src/BufferView.cpp (doDispatch):
	- call inset->edit (i.e. open dialog) for EDITABLE insets on next-inset-toggle (bug 2907)
* src/Text3.cpp (doDispatch: INDEX_INSERT):
	- move inset->edit to where it belongs.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20193 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-10 16:06:01 +00:00
Martin Vermeer
d24f392c40 Prevent inserting illegal flex insets from minibuffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20140 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-08 13:11:10 +00:00
Martin Vermeer
fe0f7858c2 Renaming CharStyle -> Flex, finishing touch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20076 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 18:40:56 +00:00
Martin Vermeer
12e1d4bc8d Name change CharStyle -> Flex
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20072 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-05 15:29:04 +00:00
Alfredo Braunstein
a8ed1add4d rename Paragraph::isRightToLeftPar -> isRTL for the sake of consistence
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20031 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-04 10:27:55 +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
af06ed5ff1 Transfer current_font and real_current_font from Text to Cursor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19999 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 13:35:48 +00:00
Abdelrazak Younes
13e8185afa header cleanup.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19997 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:46:05 +00:00
Abdelrazak Younes
502b048246 Transfer metrics and screen related methods from Text to TextMetrics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19994 a592a061-630c-0410-9148-cb99ea01b6c8
2007-09-02 11:21:33 +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
aa5c8a844f MacOS compil fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19832 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 13:12:51 +00:00
Abdelrazak Younes
8750d351da Lyx crashed after inserting, deleting and inserting float object.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19827 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-27 09:03:18 +00:00
Martin Vermeer
6c74eefd9f One more changeover charstyle -> insetlayout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19788 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-25 12:18:23 +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
Richard Heck
de373da67b Add LFUN_PARAGRAPH_PARAMS (= paragraph-params), used for changing a paragraph's alignment, spacing, etc. This is complementary to LFUN_PARAGRAPH_PARAMS_APPLY, which sets the parameters. The difference is that APPLY over-rides all existing parameters, setting any not given to the default, whereas this one simply changes those that are given. So
paragraph-params \align right
will align the paragraph right, leaving spacing, etc, as they were, whereas
  paragraph-params-apply \align right
will align the paragraph right but also reset all other parameters to defaults. Note, by the way, that this means that
  paragraph-params-apply
sets everything to default.

Some new arguments have also been introduced. These are:
  \indent
  \indent-toggle
  \spacing default
Of course, none of these are found in valid LyX files, but they are useful in menu bindings, etc.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19581 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-15 02:21:09 +00:00
Abdelrazak Younes
32268e2632 cosmetics + move frontends/* to frontend namespace.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19553 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-14 09:54:59 +00:00
André Pönitz
848c89564f remove lyxrc dependence from support/*
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19441 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-11 22:37:09 +00:00
Christian Ridderström
1050cc4471 Converted '#warning ...' into FIXME-comments
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19397 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 11:47:12 +00:00
Jean-Marc Lasgouttes
35fa399edd Syncronize with 1.5. This stuff was uncommitted in y tree actually.
* src/BufferView.cpp (workAreaDispatch): set selection status here

	* src/Text3.cpp (dispatch):
	* src/InsetTabular.cpp (doDispatch): and not here


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19396 a592a061-630c-0410-9148-cb99ea01b6c8
2007-08-10 10:21:09 +00:00
Jean-Marc Lasgouttes
1c7d395197 * CutAndPaste.cpp (pasteSelection): do not set the selection after
pasting.

	* Text3.cpp (doDispatch/LFUN_MOUSE_PRESS): reorganize the code to make 
	sure that mouseSetCursor gets called (and therefore persistent selection
	stored as needed).


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19252 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-31 13:34:09 +00:00
Jürgen Spitzmüller
6b87509156 * src/Text3.cpp (doDispatch):
- always replace selected text when inserting an inset (bug 672)
	- inset selected text in inserted URL inset (bug 683)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19231 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-30 10:33:43 +00:00
Bo Peng
3ac3578e2d Fix Bug 4053: Update other controls allows invalid listings parameters to be passed in listings-related dialogs.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19224 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-27 18:17:00 +00:00
Bo Peng
afdf83f235 quick fix for bug: "select, select, middle-button paste" pastes the first selection
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19199 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-25 05:12:52 +00:00
Jürgen Spitzmüller
bf1af7e3c2 * src/Text3.cpp:
- quick fix for bug 4055 (with FIXME comments)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19185 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-24 15:18:21 +00:00
Abdelrazak Younes
1f70aa50d4 Fix assertion when using paragraph-up/down. This code was wrongly erased in revision 19040.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19069 a592a061-630c-0410-9148-cb99ea01b6c8
2007-07-13 16:12:44 +00:00