Commit Graph

61 Commits

Author SHA1 Message Date
Abdelrazak Younes
454bf36bc3 Patch from Martin V.: Fix Undo/Redo bugs with outline.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15948 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-16 12:20:50 +00:00
Abdelrazak Younes
479e9054db * Buffer
- new pimpled TocBackend member and associated accessors.

* toc.[Ch]: delete all toc related methods except outline.

* TocBackend:
  - goTo(): deleted, this gets rid of the LyXView dependency
  - made all accessors const.

* ControlToc: 
  - rework the controller to work exclusively with TocBackend.
  - goTo(): now call LyXView::dispatch() directly

all other files: update with the TocBackend or ControlToc API changes.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15852 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-11 00:35:14 +00:00
Georg Baum
c6e22bc6bf remove obsolete includes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15835 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-09 18:21:51 +00:00
Abdelrazak Younes
65354d63a7 small cosmetic cleanups:
* delete some comments
* use lyxerr instead of cout in PanelStack
* move PanelStack into lyx::frontend namespace


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15623 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-30 14:39:05 +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
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
Abdelrazak Younes
b171e5f150 Free BufferView from LyXView!
* BufferView
  - layoutChanged: new boost signal.
  - LyXView owner(), owner_: deleted

* text3.C
  - emit BufferView::layoutChanged instead of calling LyXView::setLayout directly
  - LFUN_MOUSE_RELEASE: delete LyXView updateMenubar() and updateToolbars() direct calls.
    The update is of both bars is done in WorkArea::dispatch().

* WorkArea.C
  - dispatch(): add LyXView updateMenubar() call.

* LyXView
  - connects to BufferView::layoutChanged directly to Toolbars::setLayout()
  - setLayout(): deleted.

* qt4/GuiImplementation: modify BufferView construction (without LyXView).

All other files: cleanup header declaration of LyXView.h


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15153 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-26 10:06:46 +00:00
Martin Vermeer
be0dd89019 Change capitalization for outline (DOWN -> Down etc.)
* BufferView_pimpl.C
	(BufferView::Pimpl::dispatch): change

	* frontends/controllers/ControlToc.C
	(ControlToc::outline): replace by outlineUp ... outlineOut

	* toc.[Ch]
	(outline): change

	* frontends/qt3/QToc.C
	(QToc::set_depth): change



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13772 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-28 07:28:10 +00:00
Martin Vermeer
71f356c372 Outlining improvements/fixes
* LyXAction.C
	(LyXAction::init): add LFUN_OUTLINE_(UP|DOWN|IN|OUT)

	* BufferView_pimpl.C
	(BufferView::Pimpl::getStatus):
	(BufferView::Pimpl::dispatch): handling of new LFUNS

	* frontends/controllers/ControlToc.C
	(ControlToc::canOutline): modify dispatch logic

	* lfuns.h
	(kb_action): add LFUNs

	* toc.[Ch]
	(outline): changes

	* TocBackend.h: modifify == operator for Item



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13751 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-26 17:43:03 +00:00
Abdelrazak Younes
8c0bd3a77b * TocBackend.[Ch]: new files defining class TocBackend. This class contains adapted code from former toc.C
* toc.[Ch]:
    - rewritten to take advantage of new TocBackend class. The toc
    cache is implemented as a static variable:
    static map<Buffer const *, lyx::TocBackend> toc_backend_;

* buffer_funcs.C:
    updateLabels(Buffer const & buf) now calls
    "lyx::toc::updateToc(buf);"

* pariterator.h: added default constructor
    ParConstIterator(): DocIterator() {}

* insetfloat.C: added pit parameter to TocItem construction

* insetwrap.C: added pit parameter to TocItem construction

* MenuBackend.C: use a const ref instead of a copy of TocList

* ControlToc.[Ch]: optimisation of the API by using const reference instead of copy.

* qt4/TocPanel.[Ch]:
    - optimisation of the API by using const reference instead of
    copy
    - directly use of TocBackend::TocIterator instead of identification by paragraph contents.

* qt4/QToc.C:
    - optimisation of the API by using const reference instead of
    copy
    - makes use of TocBackend::Item::uid()

* qt2/QToc.C:
    - use TocItem::depth() and TocItem::str() instead of public member access.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13713 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-22 18:48:28 +00:00
Abdelrazak Younes
fc57e5e4ad Two ways toc navigation:
* Toc.[Ch]: new function getCurrentTocItem()
* ControlToc.[Ch]: new function getCurrentTocItem()
* QToc.[Ch]: new function getCurrentIndex()
* QTocDialog.C
  - QTocDialog::update() calls QToc::getCurrentIndex()



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13695 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-19 14:48:22 +00:00
Lars Gullik Bjønnes
cf4293824f * Change several freestanding and class methods with first letter
capitalized to have first letter lowercased.
* Adjust all affected files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13605 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-09 00:26:19 +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
Martin Vermeer
c0b204c0a8 Add outlining functionality to the TOC dialog.
* LyXAction.C
	(LyXAction::init): define command

	* BufferView_pimpl.C
	(BufferView::Pimpl::getStatus): 
	(BufferView::Pimpl::dispatch): add handling code

	* frontends/qt2/QTocDialog.C: add connections, adapters

	* frontends/qt2/ui/QTocDialogBase.ui: add pushbuttons

	* frontends/qt2/QTocDialog.h: add adapters

	* frontends/qt2/QToc.[Ch]
	(QToc::updateToc): 
	(QToc::select): add code for TOC window positioning, and 
	outlining methods 

	* frontends/controllers/ControlToc.[Ch]: implement methods

	* lfuns.h
	(kb_action {): define LFUN

	* toc.[Ch]: implement up, down, in and out operations in Outline
	method



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13521 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-29 05:08:42 +00:00
Jean-Marc Lasgouttes
048ac3e82f fix TOC when no section headings are defined in the layout
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10575 a592a061-630c-0410-9148-cb99ea01b6c8
2005-10-25 13:43:50 +00:00
Jürgen Spitzmüller
7d978a119f Do not use localized strings internally (bug 1870)
Someone please check the gtk TOC dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10363 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-27 15:22:08 +00:00
Jürgen Spitzmüller
200435f2d9 fix bug 1870 (List of tables windows shows list of figures)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10125 a592a061-630c-0410-9148-cb99ea01b6c8
2005-07-04 13:05:03 +00:00
Angus Leeming
70572847e2 Whitespace, only whitespace. s/ +$//
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10024 a592a061-630c-0410-9148-cb99ea01b6c8
2005-06-09 09:58:08 +00:00
Jean-Marc Lasgouttes
2b6b957d3e various toc-related fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9938 a592a061-630c-0410-9148-cb99ea01b6c8
2005-05-12 10:16:04 +00:00
Lars Gullik Bjønnes
9c2ba3c4ff rename tostr.[Ch] to convert.[Ch]
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9448 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 16:39:35 +00:00
Lars Gullik Bjønnes
6a55be9506 tostr -> convert and some bformat work
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9446 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-06 15:40:49 +00:00
Lars Gullik Bjønnes
686f1e276f InsetOld -> InsetBase renaming
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9310 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-25 19:13:07 +00:00
Alfredo Braunstein
3e80b0b318 the pariterator stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8554 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-28 22:00:22 +00:00
André Pönitz
0d43ba149a the stuff from the sneak preview:
For one, it still contains a few things that are already in CVS (the
'brown paperbag' changes).

Secondly, this changes the ParagraphList to a std::vector but does not
yet take full advantage of it except removing LyXText::parOffset() and
similar.

I had an extensive talk with my profiler and we are happy nevertheless.

This also moves almost all Cut&Paste specific stuff from text.C to
CutAndPaste.C. Much smaller interface now... Namespace CutAndPaste is
now  lyx::cap::. Was inconsistent with the rest....

Make ParagraphList a proper class. We'll need this later for a
specialized erase/insert.

Remove some unneeded prototypes and function declarations

Use ParameterStruct directly instead of ShareContainer<ParameterStruct>

Inline a few accesses to CursorSlice members as suggested by the profiler.

Fix commandline conversion crash reported by Kayvan.

Replace PosIterator by DocumentIterator. The latter can also iterate
through math and nested text in math...

Remove math specific hack from Documentiterator

Derive InsetCollapsable from InsetText instead of using an InsetText
member. This give us the opportunity to get rid of the InsetOld::owner_
backpointer.

Cosmetics in CutAndPaste.C and cursor.C. Fix nasty crash (popping slices
off an empty selection anchor). Add a few asserts.

Remove all 'manual' update calls. We do now one per user interaction which
is completely sufficient.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8527 a592a061-630c-0410-9148-cb99ea01b6c8
2004-03-25 09:16:36 +00:00
André Pönitz
fd48fefe0e * lyxtext.h:
* text.C (isLastRow, isFirstRow): new functions

	* paragraph.h: new width cache member

	* rowpainter.C: replace RowList::iterator with Row & where possible

	* lyxfunc.C: replace several view()->text with a single call

	* toc.C: fix 'unused' warning


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7960 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-23 08:15:57 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Lars Gullik Bjønnes
2994fe5511 Get rid of Pseudo Actions
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7799 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-21 18:57:15 +00:00
André Pönitz
f1f8ce2d1f the toc fix plus layout stuff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7761 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-15 15:51:48 +00:00
André Pönitz
92a24f6f99 the automatic label patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7739 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-12 17:13:22 +00:00
Angus Leeming
e835c9477b Pimpl Buffer.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7719 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 11:24:33 +00:00
Angus Leeming
fd36f5ad76 Make buffer's member variables private; use accessor functions.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7717 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 09:47:59 +00:00
Angus Leeming
4c6e0fe422 Removed all redundant using directives from the source.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7704 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-08 00:33:41 +00:00
Angus Leeming
462eca7d1a Remove a couple of #includes from buffer.h
Reorder #includes in lots of files into some semblence of a coherent order.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7695 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 18:38:02 +00:00
Angus Leeming
f3bff9d5d8 Move depth_type to support/types.h.
Remove paragraph.h from buffer.h, paragraph_funcs.h.
Add paragraph.h to a heap of .C files.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7694 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-06 17:23:08 +00:00
Angus Leeming
91de22ef34 Strip 320 #includes from the files in src.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7684 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 16:31:30 +00:00
Angus Leeming
1dffc5cfe4 Move #includes out of header files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7659 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-04 03:54:04 +00:00
Lars Gullik Bjønnes
b881ed2d5a Use Buffer const reference in most placees possible.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7623 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-28 07:41:31 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00
Lars Gullik Bjønnes
20b42535af put namespace toc inside namespace lxy
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7384 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-27 13:18:55 +00:00
Lars Gullik Bjønnes
2e57f2ff0a rename Inset to InsetOld
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7360 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-25 21:20:24 +00:00
André Pönitz
596dec6592 return a Paragraph & from ParIterator::operator*()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7161 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-12 11:09:55 +00:00
Lars Gullik Bjønnes
0d90321817 simplify InsetList a bit and constify a bit too
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7062 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-29 01:13:18 +00:00
Lars Gullik Bjønnes
d605c30d8c iterators-2.diff + some whitespace changes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6995 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-21 21:20:50 +00:00
André Pönitz
dbef37d522 non-templated tostr in separate files
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6955 a592a061-630c-0410-9148-cb99ea01b6c8
2003-05-13 14:36:24 +00:00
John Levon
f413754ef5 fix bug 913 (toc crash)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6233 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-22 20:05:13 +00:00
Lars Gullik Bjønnes
99d1627a47 dont use pragma impementation and interface anymore
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6138 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-13 16:53:15 +00:00
Lars Gullik Bjønnes
b016d9d773 use boost::format
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5694 a592a061-630c-0410-9148-cb99ea01b6c8
2002-11-21 18:33:09 +00:00
John Levon
ef87c26b55 Lar's ParConstIterator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5602 a592a061-630c-0410-9148-cb99ea01b6c8
2002-11-08 01:08:27 +00:00
John Levon
125a79c569 two fixes (posted to list)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5594 a592a061-630c-0410-9148-cb99ea01b6c8
2002-11-07 00:37:09 +00:00
Dekel Tsur
36617cee5f Fix insetwrap
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5339 a592a061-630c-0410-9148-cb99ea01b6c8
2002-09-24 18:36:20 +00:00