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
This commit is contained in:
Martin Vermeer 2006-04-28 07:28:10 +00:00
parent 7cff3d5d5e
commit be0dd89019
5 changed files with 36 additions and 31 deletions

View File

@ -1235,21 +1235,21 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
}
case LFUN_OUTLINE_UP:
lyx::toc::outline(lyx::toc::UP, cursor_);
lyx::toc::outline(lyx::toc::Up, cursor_);
cursor_.text()->setCursor(cursor_, cursor_.pit(), 0);
updateLabels(*buffer_);
break;
case LFUN_OUTLINE_DOWN:
lyx::toc::outline(lyx::toc::DOWN, cursor_);
lyx::toc::outline(lyx::toc::Down, cursor_);
cursor_.text()->setCursor(cursor_, cursor_.pit(), 0);
updateLabels(*buffer_);
break;
case LFUN_OUTLINE_IN:
lyx::toc::outline(lyx::toc::IN, cursor_);
lyx::toc::outline(lyx::toc::In, cursor_);
updateLabels(*buffer_);
break;
case LFUN_OUTLINE_OUT:
lyx::toc::outline(lyx::toc::OUT, cursor_);
lyx::toc::outline(lyx::toc::Out, cursor_);
updateLabels(*buffer_);
break;

View File

@ -45,22 +45,27 @@ bool ControlToc::canOutline(string const & type)
}
void ControlToc::outline(toc::OutlineOp op)
void ControlToc::outlineUp()
{
switch (op) {
case toc::UP:
kernel().dispatch(FuncRequest(LFUN_OUTLINE_UP));
break;
case toc::DOWN:
kernel().dispatch(FuncRequest(LFUN_OUTLINE_DOWN));
break;
case toc::IN:
kernel().dispatch(FuncRequest(LFUN_OUTLINE_IN));
break;
case toc::OUT:
kernel().dispatch(FuncRequest(LFUN_OUTLINE_OUT));
break;
}
kernel().dispatch(FuncRequest(LFUN_OUTLINE_UP));
}
void ControlToc::outlineDown()
{
kernel().dispatch(FuncRequest(LFUN_OUTLINE_DOWN));
}
void ControlToc::outlineIn()
{
kernel().dispatch(FuncRequest(LFUN_OUTLINE_IN));
}
void ControlToc::outlineOut()
{
kernel().dispatch(FuncRequest(LFUN_OUTLINE_OUT));
}

View File

@ -223,28 +223,28 @@ void QToc::set_depth(int depth)
void QToc::moveup()
{
controller().outline(toc::UP);
controller().outlineUp();
updateToc(depth_);
}
void QToc::movedn()
{
controller().outline(toc::DOWN);
controller().outlineDown();
updateToc(depth_);
}
void QToc::movein()
{
controller().outline(toc::IN);
controller().outlineIn();
updateToc(depth_);
}
void QToc::moveout()
{
controller().outline(toc::OUT);
controller().outlineOut();
updateToc(depth_);
}

View File

@ -143,7 +143,7 @@ void outline(OutlineOp mode, LCursor & cur)
int const thistoclevel = s->layout()->toclevel;
int toclevel;
switch (mode) {
case UP: {
case Up: {
if (p != end)
++p;
for (; p != end; ++p) {
@ -175,7 +175,7 @@ void outline(OutlineOp mode, LCursor & cur)
pars.erase(s, t);
break;
}
case DOWN: {
case Down: {
if (p != end)
++p;
for (; p != end; ++p) {
@ -206,7 +206,7 @@ void outline(OutlineOp mode, LCursor & cur)
pars.erase(s, t);
break;
}
case IN:
case In:
for (; lit != lend; ++lit) {
if ((*lit)->toclevel == thistoclevel + 1 &&
s->layout()->labeltype == (*lit)->labeltype) {
@ -215,7 +215,7 @@ void outline(OutlineOp mode, LCursor & cur)
}
}
break;
case OUT:
case Out:
for (; lit != lend; ++lit) {
if ((*lit)->toclevel == thistoclevel - 1 &&
s->layout()->labeltype == (*lit)->labeltype) {

View File

@ -56,10 +56,10 @@ std::string const getGuiName(std::string const & type, Buffer const &);
/// the type of outline operation
enum OutlineOp {
UP, // Move this header with text down
DOWN, // Move this header with text up
IN, // Make this header deeper
OUT // Make this header shallower
Up, // Move this header with text down
Down, // Move this header with text up
In, // Make this header deeper
Out // Make this header shallower
};