mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-28 20:45:47 +00:00
Broadwood fixes from Garst; toc/ref menus fixes
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@763 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e33924c4eb
commit
f807fe1d6c
24
ChangeLog
24
ChangeLog
@ -1,3 +1,25 @@
|
|||||||
|
2000-05-22 Garst R. Reese <reese@isn.net>
|
||||||
|
|
||||||
|
* layouts/hollywood.layout, broadway.layout : move Dialogue to top
|
||||||
|
of list, change all references to Environment to Command
|
||||||
|
* tex/hollywood.cls : rewrite environments as commands, add
|
||||||
|
\uppercase to interiorshot and exteriorshot to force uppecase.
|
||||||
|
* tex/broadway.cls : rewrite environments as commands. Tweak
|
||||||
|
whitespace.
|
||||||
|
|
||||||
|
2000-05-22 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||||
|
|
||||||
|
* src/menus.C (Add_to_toc_menu): fix the code which limits the
|
||||||
|
size of items: use a constant intead of the hardcoded 40, and more
|
||||||
|
importantly do not remove the %m and %x tags added at the end.
|
||||||
|
(Add_to_refs_menu): use vector::size_type instead of
|
||||||
|
unsigned int as basic types for the variables. _Please_ do not
|
||||||
|
assume that size_t is equal to unsigned int. On an alpha, this is
|
||||||
|
unsigned long, which is _not_ the same.
|
||||||
|
|
||||||
|
* src/language.C (initL): remove language "hungarian", since it
|
||||||
|
seems that "magyar" is better.
|
||||||
|
|
||||||
2000-05-22 Juergen Vigna <jug@sad.it>
|
2000-05-22 Juergen Vigna <jug@sad.it>
|
||||||
|
|
||||||
* src/CutAndPaste.C: hopefully fixed memory the problem defenitively!
|
* src/CutAndPaste.C: hopefully fixed memory the problem defenitively!
|
||||||
@ -29,9 +51,7 @@
|
|||||||
2000-05-19 Dekel Tsur <dekel@math.tau.ac.il>
|
2000-05-19 Dekel Tsur <dekel@math.tau.ac.il>
|
||||||
|
|
||||||
* src/commandtags.h
|
* src/commandtags.h
|
||||||
|
|
||||||
* src/LyXAction.C
|
* src/LyXAction.C
|
||||||
|
|
||||||
* src/lyxfunc.C (Dispatch): Added LFUN_LOFVIEW, LFUN_LOTVIEW
|
* src/lyxfunc.C (Dispatch): Added LFUN_LOFVIEW, LFUN_LOTVIEW
|
||||||
and LFUN_LOAVIEW
|
and LFUN_LOAVIEW
|
||||||
|
|
||||||
|
@ -22,23 +22,24 @@ DefaultFont
|
|||||||
Color None
|
Color None
|
||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
# Dialogue style definition. Actor dialog
|
||||||
# Standard style definition (I kept this one to provide a general case)
|
Style Dialogue
|
||||||
Style Standard
|
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Paragraph
|
LatexType Command
|
||||||
LatexName dummy
|
LatexName dialogue
|
||||||
ParIndent ""
|
LeftMargin MMMMMMM
|
||||||
ParSkip 0.4
|
RightMargin MMMMMMM
|
||||||
Align Left
|
Align Left
|
||||||
AlignPossible Block, Left, Right, Center
|
AlignPossible Left
|
||||||
Labeltype No_Label
|
LabelType No_Label
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Narrative description of Scene
|
# Narrative description of Scene
|
||||||
Style Narrative
|
Style Narrative
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Environment
|
LatexType Command
|
||||||
LatexName narrative
|
LatexName narrative
|
||||||
ParIndent ""
|
ParIndent ""
|
||||||
ParSkip 0.8
|
ParSkip 0.8
|
||||||
@ -71,7 +72,7 @@ End
|
|||||||
|
|
||||||
|
|
||||||
Style SCENE
|
Style SCENE
|
||||||
Margin Static
|
Margin Dynamic
|
||||||
LatexType Command
|
LatexType Command
|
||||||
LatexName scene
|
LatexName scene
|
||||||
ParIndent ""
|
ParIndent ""
|
||||||
@ -115,7 +116,7 @@ End
|
|||||||
# Speaker style definition, identifies speaker ALL CAPS
|
# Speaker style definition, identifies speaker ALL CAPS
|
||||||
Style Speaker
|
Style Speaker
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Environment
|
LatexType Command
|
||||||
LatexName speaker
|
LatexName speaker
|
||||||
ParSkip 0.4
|
ParSkip 0.4
|
||||||
TopSep 0.4
|
TopSep 0.4
|
||||||
@ -128,9 +129,10 @@ End
|
|||||||
# The ( and ) will automatically appear on screen, so don't type any.
|
# The ( and ) will automatically appear on screen, so don't type any.
|
||||||
Style Parenthetical
|
Style Parenthetical
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Environment
|
LatexType Command
|
||||||
LatexName parenthetical
|
LatexName parenthetical
|
||||||
LeftMargin MMMMMMMMMMMMMMMMM
|
LeftMargin MMMMMMMMMMMMM
|
||||||
|
RightMargin MMMM
|
||||||
TopSep 0.0
|
TopSep 0.0
|
||||||
BottomSep 0.0
|
BottomSep 0.0
|
||||||
ParSkip 0.0
|
ParSkip 0.0
|
||||||
@ -158,17 +160,6 @@ LabelFont
|
|||||||
EndFont
|
EndFont
|
||||||
End
|
End
|
||||||
|
|
||||||
# Dialogue style definition. Actor dialog
|
|
||||||
Style Dialogue
|
|
||||||
Margin Static
|
|
||||||
LatexType Environment
|
|
||||||
LatexName dialogue
|
|
||||||
LeftMargin MM
|
|
||||||
RightMargin MM
|
|
||||||
Align Left
|
|
||||||
AlignPossible Left
|
|
||||||
LabelType No_Label
|
|
||||||
End
|
|
||||||
|
|
||||||
Style CURTAIN
|
Style CURTAIN
|
||||||
Margin Static
|
Margin Static
|
||||||
@ -184,6 +175,18 @@ Style CURTAIN
|
|||||||
LabelString "CURTAIN"
|
LabelString "CURTAIN"
|
||||||
End
|
End
|
||||||
|
|
||||||
|
# Standard style definition (I kept this one to provide a general case)
|
||||||
|
Style Standard
|
||||||
|
Margin Static
|
||||||
|
LatexType Paragraph
|
||||||
|
LatexName dummy
|
||||||
|
ParIndent ""
|
||||||
|
ParSkip 0.4
|
||||||
|
Align Left
|
||||||
|
AlignPossible Block, Left, Right, Center
|
||||||
|
Labeltype No_Label
|
||||||
|
End
|
||||||
|
|
||||||
Style Title
|
Style Title
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Command
|
LatexType Command
|
||||||
|
@ -35,23 +35,26 @@ DefaultFont
|
|||||||
EndFont
|
EndFont
|
||||||
|
|
||||||
|
|
||||||
# Standard style definition (I kept this one to provide a general case)
|
# Dialogue style definition. Actor dialog
|
||||||
Style Standard
|
Style Dialogue
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Paragraph
|
LatexType Command
|
||||||
LatexName dummy
|
LatexName dialogue
|
||||||
ParIndent ""
|
LeftMargin MMMMMMMMMMMM
|
||||||
ParSkip 0.4
|
RightMargin MMMMMMMMMMMM
|
||||||
|
ParSkip 0.0
|
||||||
|
TopSep 0.0
|
||||||
|
BottomSep 0.0
|
||||||
Align Left
|
Align Left
|
||||||
AlignPossible Block, Left, Right, Center
|
AlignPossible Left
|
||||||
Labeltype No_Label
|
LabelType No_Label
|
||||||
End
|
End
|
||||||
|
|
||||||
|
|
||||||
# Narrative description of Scene
|
# Narrative description of Scene
|
||||||
Style Narrative
|
Style Narrative
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Environment
|
LatexType Command
|
||||||
LatexName narrative
|
LatexName narrative
|
||||||
ParIndent ""
|
ParIndent ""
|
||||||
ParSkip 0.8
|
ParSkip 0.8
|
||||||
@ -111,7 +114,7 @@ End
|
|||||||
# Speaker style definition, identifies speaker ALL CAPS
|
# Speaker style definition, identifies speaker ALL CAPS
|
||||||
Style Speaker
|
Style Speaker
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Environment
|
LatexType Command
|
||||||
LatexName speaker
|
LatexName speaker
|
||||||
LeftMargin MMMMMMMMMMMMMMMMMMMMMM
|
LeftMargin MMMMMMMMMMMMMMMMMMMMMM
|
||||||
ParSkip 0.0
|
ParSkip 0.0
|
||||||
@ -126,7 +129,7 @@ End
|
|||||||
# The ( and ) will automatically appear on screen, so don't type any.
|
# The ( and ) will automatically appear on screen, so don't type any.
|
||||||
Style Parenthetical
|
Style Parenthetical
|
||||||
Margin Static
|
Margin Static
|
||||||
LatexType Environment
|
LatexType Command
|
||||||
LatexName parenthetical
|
LatexName parenthetical
|
||||||
LeftMargin MMMMMMMMMMMMMMMMM
|
LeftMargin MMMMMMMMMMMMMMMMM
|
||||||
TopSep 0.0
|
TopSep 0.0
|
||||||
@ -149,20 +152,6 @@ EndFont
|
|||||||
|
|
||||||
End
|
End
|
||||||
|
|
||||||
# Dialogue style definition. Actor dialog
|
|
||||||
Style Dialogue
|
|
||||||
Margin Static
|
|
||||||
LatexType Environment
|
|
||||||
LatexName dialogue
|
|
||||||
LeftMargin MMMMMMMMMMMM
|
|
||||||
RightMargin MMMMMMMMMMMM
|
|
||||||
ParSkip 0.0
|
|
||||||
TopSep 0.0
|
|
||||||
BottomSep 0.0
|
|
||||||
Align Left
|
|
||||||
AlignPossible Left
|
|
||||||
LabelType No_Label
|
|
||||||
End
|
|
||||||
|
|
||||||
# Transition style definition ALL CAPS
|
# Transition style definition ALL CAPS
|
||||||
Style Transition
|
Style Transition
|
||||||
@ -188,9 +177,20 @@ Style FADE_OUT:
|
|||||||
AlignPossible Left
|
AlignPossible Left
|
||||||
KeepEmpty 1
|
KeepEmpty 1
|
||||||
LabelType Static
|
LabelType Static
|
||||||
LabelString "FADE OUT: "
|
LabelString "FADE OUT"
|
||||||
End
|
End
|
||||||
|
|
||||||
|
# Standard style definition (I kept this one to provide a general case)
|
||||||
|
Style Standard
|
||||||
|
Margin Static
|
||||||
|
LatexType Paragraph
|
||||||
|
LatexName dummy
|
||||||
|
ParIndent ""
|
||||||
|
ParSkip 0.4
|
||||||
|
Align Left
|
||||||
|
AlignPossible Block, Left, Right, Center
|
||||||
|
Labeltype No_Label
|
||||||
|
End
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,53 +173,36 @@
|
|||||||
\newcommand{\TheTitle}{}
|
\newcommand{\TheTitle}{}
|
||||||
\newcommand{\Title}[1]{\renewcommand{\TheTitle}{#1}}
|
\newcommand{\Title}[1]{\renewcommand{\TheTitle}{#1}}
|
||||||
|
|
||||||
\newenvironment{dialogue}%
|
\newcommand{\dialogue}[1]%
|
||||||
{\raggedright
|
{\raggedright
|
||||||
\begin{list}{}{%
|
\hspace{1in}
|
||||||
\setlength{\leftmargin}{.5in}
|
\parbox{4in}{#1}
|
||||||
\setlength{\rightmargin}{.5in}
|
}
|
||||||
\setlength{\parsep}{0mm}
|
|
||||||
\setlength{\topsep}{0mm}}
|
|
||||||
\item[] \ignorespaces}
|
|
||||||
{\unskip \end{list}}%
|
|
||||||
|
|
||||||
\newenvironment{narrative}%
|
\newcommand{\narrative}[1]%
|
||||||
{\raggedright
|
|
||||||
\filbreak
|
|
||||||
\fontshape{it}\selectfont{}
|
|
||||||
\begin{list}{}{%
|
|
||||||
\setlength{\leftmargin}{0in}
|
|
||||||
\setlength{\rightmargin}{0in}
|
|
||||||
\setlength{\parsep}{2mm}
|
|
||||||
\setlength{\topsep}{2mm}}
|
|
||||||
\item[] \ignorespaces}
|
|
||||||
{\unskip \end{list}}
|
|
||||||
|
|
||||||
\newenvironment{speaker}%
|
|
||||||
{\filbreak
|
{\filbreak
|
||||||
\begin{center}{}{%
|
\raggedright{#1}
|
||||||
\center
|
}
|
||||||
\setlength{\parsep}{0mm}
|
|
||||||
\setlength{\topsep}{2mm}}
|
\newcommand{\speaker}[1]%
|
||||||
\vspace{-24bp}
|
{\filbreak
|
||||||
\item[] \ignorespaces}
|
\vspace{12pt}
|
||||||
{\unskip \end{center}}
|
\hspace{2.25in}{#1}
|
||||||
|
\vspace{6pt}
|
||||||
|
}
|
||||||
|
|
||||||
|
\newcommand{\parenthetical}[1]%
|
||||||
|
{\raggedright
|
||||||
|
\hspace{1.75in}
|
||||||
|
\parbox{3in}{(#1)}
|
||||||
|
\vspace{6pt}}
|
||||||
|
|
||||||
\newenvironment{parenthetical}%
|
|
||||||
{\fontshape{it}\selectfont{}
|
|
||||||
\begin{center}{}{%
|
|
||||||
\center
|
|
||||||
\vspace{-30bp}
|
|
||||||
\setlength{\parsep}{0mm}
|
|
||||||
\setlength{\topsep}{0mm}}
|
|
||||||
\item[](\ignorespaces}
|
|
||||||
{\unskip )\end{center}}
|
|
||||||
\newcounter{actctr}
|
\newcounter{actctr}
|
||||||
\newcounter{scenectr}[actctr]
|
\newcounter{scenectr}[actctr]
|
||||||
\renewcommand{\theactctr}{\Roman{actctr}}
|
\renewcommand{\theactctr}{\Roman{actctr}}
|
||||||
\renewcommand{\thescenectr}{\arabic{scenectr}}
|
\renewcommand{\thescenectr}{\arabic{scenectr}}
|
||||||
\providecommand{\atrise}{\par\raggedright AT RISE: }%
|
\providecommand{\atrise}[1]{\par\raggedright AT RISE: #1 }%
|
||||||
\providecommand{\scenestar}{\filbreak\par\centering SCENE }%
|
\providecommand{\scenestar}[1]{\filbreak\par\centering SCENE #1 }%
|
||||||
\providecommand{\scene}{%
|
\providecommand{\scene}{%
|
||||||
\filbreak\par\stepcounter{scenectr}\centering SCENE \thescenectr}%
|
\filbreak\par\stepcounter{scenectr}\centering SCENE \thescenectr}%
|
||||||
\providecommand{\act}{%
|
\providecommand{\act}{%
|
||||||
|
@ -15,6 +15,10 @@
|
|||||||
\DeclareOption{letterpaper}
|
\DeclareOption{letterpaper}
|
||||||
{\setlength\paperheight {11in}%
|
{\setlength\paperheight {11in}%
|
||||||
\setlength\paperwidth {8.5in}}
|
\setlength\paperwidth {8.5in}}
|
||||||
|
\DeclareFontFamily{OT1}{pcr}{\hyphenchar\font=-1}
|
||||||
|
\DeclareFontShape{OT1}{pcr}{m}{n}{<12> pcrr7t}{}
|
||||||
|
\DeclareFontFamily{T1}{pcr}{\hyphenchar\font=-1}
|
||||||
|
\DeclareFontShape{T1}{pcr}{m}{n}{<12> pcrr8t}{}
|
||||||
\DeclareOption{12pt}{\renewcommand\@ptsize{0}}
|
\DeclareOption{12pt}{\renewcommand\@ptsize{0}}
|
||||||
\DeclareOption{12pt}{\renewcommand\@ptsize{1}}
|
\DeclareOption{12pt}{\renewcommand\@ptsize{1}}
|
||||||
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
|
\DeclareOption{12pt}{\renewcommand\@ptsize{2}}
|
||||||
@ -176,50 +180,38 @@
|
|||||||
% hyphenation, but I do not remember how.
|
% hyphenation, but I do not remember how.
|
||||||
% That's good because we -do not- want any hyphenation.
|
% That's good because we -do not- want any hyphenation.
|
||||||
\sloppy
|
\sloppy
|
||||||
\newcommand{\fadein}{\filbreak\raggedright\par FADE IN: }%
|
\newcommand{\fadein}[1]{\filbreak\raggedright\par FADE IN: \uppercase{#1}}%
|
||||||
\newcommand{\fadeout}{\filbreak\raggedright\par FADE OUT }%
|
\newcommand{\fadeout}{\filbreak\raggedright\par FADE OUT }%
|
||||||
\newcommand{\interiorshot}{\filbreak\raggedright\par INT. }%
|
\newcommand{\interiorshot}[1]{\filbreak\raggedright\par INT. \uppercase{#1}}%
|
||||||
\newcommand{\exteriorshot}{\filbreak\raggedright\par EXT. }%
|
\newcommand{\exteriorshot}[1]{\filbreak\raggedright\par EXT. \uppercase{#1}}%
|
||||||
\newenvironment{dialogue}%
|
|
||||||
|
\newcommand{\dialogue}[1]%
|
||||||
{\raggedright
|
{\raggedright
|
||||||
\begin{list}{}{%
|
\hspace{1in}
|
||||||
\setlength{\leftmargin}{1.2in}
|
\parbox{4in}{#1}
|
||||||
\setlength{\rightmargin}{1.2in}
|
\vspace{6pt}
|
||||||
\setlength{\parsep}{0mm}
|
}
|
||||||
\setlength{\topsep}{0mm}}
|
|
||||||
\item[] \ignorespaces}
|
|
||||||
{\unskip \end{list}}
|
|
||||||
|
|
||||||
\newenvironment{narrative}%
|
\newcommand{\narrative}[1]%
|
||||||
{\filbreak
|
{\filbreak
|
||||||
\raggedright
|
\vspace{6pt}
|
||||||
\begin{list}{}{%
|
\raggedright{#1}
|
||||||
\leftmargin \rightmargin
|
\vspace{6pt}
|
||||||
\setlength{\parsep}{2mm}
|
}
|
||||||
\setlength{\topsep}{2mm}}
|
|
||||||
\item[] \ignorespaces}
|
|
||||||
{\unskip \end{list}}
|
|
||||||
|
|
||||||
\newenvironment{speaker}%
|
|
||||||
|
\newcommand{\speaker}[1]%
|
||||||
{\filbreak
|
{\filbreak
|
||||||
\begin{list}{}{%
|
\vspace{12pt}
|
||||||
\setlength{\leftmargin}{2.5in}
|
\hspace{2.25in}{#1}
|
||||||
\setlength{\partopsep}{4mm}
|
\vspace{6pt}
|
||||||
\setlength{\parsep}{0mm}
|
}
|
||||||
\setlength{\topsep}{0mm}}
|
|
||||||
\item[] \ignorespaces}
|
|
||||||
{\unskip \end{list}}
|
|
||||||
|
|
||||||
\newenvironment{parenthetical}%
|
|
||||||
{\begin{list}{}{%
|
|
||||||
\setlength{\leftmargin}{2in}
|
|
||||||
\setlength{\parsep}{0mm}
|
|
||||||
\setlength{\topsep}{0mm}}
|
|
||||||
\item[](\ignorespaces}
|
|
||||||
{\unskip)\end{list}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
\newcommand{\parenthetical}[1]%
|
||||||
|
{\raggedright
|
||||||
|
\hspace{1.75in}
|
||||||
|
\parbox{3in}{(#1)}
|
||||||
|
\vspace{6pt}}
|
||||||
|
|
||||||
\endinput
|
\endinput
|
||||||
%%
|
%%
|
||||||
|
@ -69,7 +69,11 @@ void LangInit::initL()
|
|||||||
{ "german", N_("German"), false },
|
{ "german", N_("German"), false },
|
||||||
{ "greek", N_("Greek"), false },
|
{ "greek", N_("Greek"), false },
|
||||||
{ "hebrew", N_("Hebrew"), true },
|
{ "hebrew", N_("Hebrew"), true },
|
||||||
{ "hungarian", N_("Hungarian"), false },
|
/* According to Zrubecz Laszlo <zrubi@k2.jozsef.kando.hu>,
|
||||||
|
"magyar" is better. I kept it here in case we want
|
||||||
|
to provide aliasing of languages. (JMarc)
|
||||||
|
*/
|
||||||
|
//{ "hungarian", N_("Hungarian"), false },
|
||||||
{ "irish", N_("Irish"), false },
|
{ "irish", N_("Irish"), false },
|
||||||
{ "italian", N_("Italian"), false },
|
{ "italian", N_("Italian"), false },
|
||||||
{ "lsorbian", N_("Lsorbian"), false },
|
{ "lsorbian", N_("Lsorbian"), false },
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
struct Row;
|
struct Row;
|
||||||
|
|
||||||
/** All these variavles should be explained. Matthias?
|
/** All these variables should be explained. Matthias?
|
||||||
*/
|
*/
|
||||||
struct LyXCursor {
|
struct LyXCursor {
|
||||||
///
|
///
|
||||||
|
31
src/menus.C
31
src/menus.C
@ -1288,14 +1288,15 @@ void Add_to_toc_menu(vector<Buffer::TocItem> const & toclist,
|
|||||||
int menu, vector<int> & menus, FL_OBJECT * ob)
|
int menu, vector<int> & menus, FL_OBJECT * ob)
|
||||||
{
|
{
|
||||||
unsigned int const max_number_of_items = 25;
|
unsigned int const max_number_of_items = 25;
|
||||||
|
unsigned int const max_item_length = 40;
|
||||||
if (to - from <= max_number_of_items) {
|
if (to - from <= max_number_of_items) {
|
||||||
for (unsigned int i = from; i < to; ++i) {
|
for (unsigned int i = from; i < to; ++i) {
|
||||||
|
|
||||||
string line(4 * max(0, toclist[i].depth - depth),' ');
|
string line(4 * max(0, toclist[i].depth - depth),' ');
|
||||||
line += toclist[i].str;
|
line += toclist[i].str;
|
||||||
line += "%x";
|
string entry(line, 0, max_item_length);
|
||||||
line += tostr(i + 1);
|
entry += "%x";
|
||||||
string entry(line, 0, 40);
|
entry += tostr(i + 1);
|
||||||
|
|
||||||
fl_addtopup(menu, entry.c_str());
|
fl_addtopup(menu, entry.c_str());
|
||||||
}
|
}
|
||||||
@ -1309,9 +1310,9 @@ void Add_to_toc_menu(vector<Buffer::TocItem> const & toclist,
|
|||||||
if (new_pos == pos + 1) {
|
if (new_pos == pos + 1) {
|
||||||
string line(4 * max(0, toclist[pos].depth - depth), ' ');
|
string line(4 * max(0, toclist[pos].depth - depth), ' ');
|
||||||
line += toclist[pos].str;
|
line += toclist[pos].str;
|
||||||
line += "%x";
|
string entry(line, 0, max_item_length);
|
||||||
line += tostr(pos + 1);
|
entry += "%x";
|
||||||
string entry(line, 0, 40);
|
entry += tostr(pos + 1);
|
||||||
|
|
||||||
fl_addtopup(menu, entry.c_str());
|
fl_addtopup(menu, entry.c_str());
|
||||||
} else {
|
} else {
|
||||||
@ -1321,8 +1322,9 @@ void Add_to_toc_menu(vector<Buffer::TocItem> const & toclist,
|
|||||||
depth + 1, menu2, menus,ob);
|
depth + 1, menu2, menus,ob);
|
||||||
string line(4 * max(0, toclist[pos].depth - depth), ' ');
|
string line(4 * max(0, toclist[pos].depth - depth), ' ');
|
||||||
line += toclist[pos].str;
|
line += toclist[pos].str;
|
||||||
line += "%m";
|
string entry(line, 0, max_item_length);
|
||||||
string entry(line, 0, 40);
|
entry += "%m";
|
||||||
|
|
||||||
fl_addtopup(menu, entry.c_str(), menu2);
|
fl_addtopup(menu, entry.c_str(), menu2);
|
||||||
}
|
}
|
||||||
pos = new_pos;
|
pos = new_pos;
|
||||||
@ -1394,22 +1396,23 @@ void Menus::ShowTocMenu(FL_OBJECT * ob, long)
|
|||||||
void Add_to_refs_menu(vector<string> const & label_list, int offset,
|
void Add_to_refs_menu(vector<string> const & label_list, int offset,
|
||||||
int menu, vector<int> & menus, FL_OBJECT * ob)
|
int menu, vector<int> & menus, FL_OBJECT * ob)
|
||||||
{
|
{
|
||||||
unsigned int const max_number_of_items = 25;
|
typedef vector<string>::size_type size_type;
|
||||||
unsigned int const max_number_of_items2 = 20;
|
size_type const max_number_of_items = 25;
|
||||||
|
size_type const max_number_of_items2 = 20;
|
||||||
|
|
||||||
if (label_list.size() <= max_number_of_items)
|
if (label_list.size() <= max_number_of_items)
|
||||||
for (unsigned int i = 0; i < label_list.size(); ++i)
|
for (size_type i = 0; i < label_list.size(); ++i)
|
||||||
fl_addtopup(menu,
|
fl_addtopup(menu,
|
||||||
(label_list[i] + "%x"
|
(label_list[i] + "%x"
|
||||||
+tostr(i+offset)).c_str());
|
+tostr(i+offset)).c_str());
|
||||||
else
|
else
|
||||||
for (unsigned int i = 0; i < label_list.size();
|
for (size_type i = 0; i < label_list.size();
|
||||||
i += max_number_of_items2) {
|
i += max_number_of_items2) {
|
||||||
unsigned int j = std::min(label_list.size(),
|
size_type j = std::min(label_list.size(),
|
||||||
i+max_number_of_items2);
|
i+max_number_of_items2);
|
||||||
int menu2 = fl_newpup(FL_ObjWin(ob));
|
int menu2 = fl_newpup(FL_ObjWin(ob));
|
||||||
menus.push_back(menu2);
|
menus.push_back(menu2);
|
||||||
for (unsigned int k = i; k < j; ++k)
|
for (size_type k = i; k < j; ++k)
|
||||||
fl_addtopup(menu2,
|
fl_addtopup(menu2,
|
||||||
(label_list[k] + "%x"
|
(label_list[k] + "%x"
|
||||||
+ tostr(k+offset)).c_str());
|
+ tostr(k+offset)).c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user