Dekel's depth bars and assorted fixlets

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@696 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2000-04-26 14:56:50 +00:00
parent 23b1cd2218
commit 5fb5569a13
9 changed files with 58 additions and 10 deletions

View File

@ -1,3 +1,20 @@
2000-04-26 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/insets/insettabular.[Ch]: fix the Clone() declaration.
* src/menus.C: revert the change of naming (Figure->Graphic...)
from 2000-04-11. It was incomplete and bad.
* src/LColor.[Ch]: add LColor::depthbar.
* src/text.C (GetVisibleRow): use it.
* README: update the languages list.
2000-04-25 Dekel Tsur <dekel@math.tau.ac.il>
* src/text.C (GetVisibleRow): show the depth of paragraphs using
vertical bars.
2000-04-26 Lars Gullik Bjønnes <larsbj@lyx.org>
* README: remove sections that were just wrong.

2
NEWS
View File

@ -19,6 +19,8 @@ User-visible changes:
- More accurate error reporting from LaTeX runs.
- Much faster spellchecking (50x faster!).
- Better definition for LyXList style.
- A couple of changes to the LyX format, so that files written with

2
README
View File

@ -107,12 +107,14 @@ Does LyX have support for non-English speakers/writers/readers?
Spanish (es)
Finnish (fi)
French (fr) *
Hebrew (he)
Hungarian (hu) *
Italian (it)
Dutch (nl)
Norwegian (no)
Polish (pl)
Portuguese (pt) *
Romanian (ro)
Russian (ru)
Slovenian (sl)
Swedish (sv) *

View File

@ -56,6 +56,7 @@ LColor::LColor()
fill(note, _("note"), "note", "black", "note");
fill(notebg, _("note background"), "notebg", "yellow", "notebg");
fill(noteframe, _("note frame"), "noteframe", "black", "noteframe");
fill(depthbar, _("depth bar"), "depthbar", "IndianRed", "depthbar");
fill(command, _("command-inset"), "command", "black", "command");
fill(commandbg, _("command-inset background"), "commandbg", "grey80", "commandbg");
fill(commandframe, _("inset frame"), "commandframe", "black", "commandframe");

View File

@ -76,6 +76,9 @@ public:
noteframe,
/// Color for the depth bars in the margin
depthbar,
/// Text color for command insets
command,
/// Background color for command insets

View File

@ -76,7 +76,7 @@ InsetTabular::~InsetTabular()
}
InsetTabular * InsetTabular::Clone() const
Inset * InsetTabular::Clone() const
{
InsetTabular * t = new InsetTabular(*this, buffer);
return t;

View File

@ -68,7 +68,7 @@ public:
///
~InsetTabular();
///
InsetTabular * InsetTabular::Clone() const;
Inset * Clone() const;
///
void Read(LyXLex &);
///

View File

@ -1277,11 +1277,11 @@ void Menus::ShowInsertMenu(FL_OBJECT * ob, long)
int SubInsertFloatList = fl_defpup(FL_ObjWin(ob),
_("Floats%t"
"|Figure%x71"
"|Table%x72"
"|Wide Figure%x73"
"|Wide Table%l%x74"
"|Algorithm%x75"));
"|Figure Float%x71"
"|Table Float%x72"
"|Wide Figure Float%x73"
"|Wide Table Float%l%x74"
"|Algorithm Float%x75"));
fl_setpup_shortcut(SubInsertFloatList, 71, scex(_("IMF|gG#g#G")));
fl_setpup_shortcut(SubInsertFloatList, 72, scex(_("IMF|Tt#t#T")));
@ -1310,14 +1310,14 @@ void Menus::ShowInsertMenu(FL_OBJECT * ob, long)
fl_setpup_shortcut(SubInsertSpecial, 38, scex(_("IMS|Mm#m#M")));
int InsertMenu = fl_defpup(FL_ObjWin(ob),
_("Graphic..."
"|Table Box...%l"
_("Figure..."
"|Table...%l"
"|Include File..."
"|Import ASCII File%m"
"|Insert LyX File...%l"
"|Footnote"
"|Margin Note"
"|Floating Material%m%l"
"|Floats%m%l"
"|Lists & TOC%m%l"
"|Special Character%m%l"
"|Note..."

View File

@ -3736,6 +3736,29 @@ void LyXText::GetVisibleRow(int offset, Row * row_ptr, long y)
LColor::appendixline);
}
int depth = row_ptr->par->GetDepth();
if (depth > 0) {
int next_depth = (row_ptr->next)
? next_depth = row_ptr->next->par->GetDepth() : 0;
int prev_depth = (row_ptr->previous)
? row_ptr->previous->par->GetDepth() : 0;
for (int i = 1; i <= depth; ++i)
pain.line(4*i, offset,
4*i, offset + row_ptr->height - 1 - (i-next_depth-1)*3,
LColor::depthbar);
for (int i = prev_depth + 1; i <= depth; ++i)
pain.fillRectangle(4*i, offset,
4, 2,
LColor::depthbar);
for (int i = next_depth + 1; i <= depth; ++i)
pain.fillRectangle(4*i, offset + row_ptr->height - 2 - (i-next_depth-1)*3,
4, 2,
LColor::depthbar);
}
if (row_ptr->par->pextra_type == LyXParagraph::PEXTRA_MINIPAGE) {
/* draw a marker at the left margin! */
LyXFont font = GetFont(row_ptr->par, 0);