From: Lars Gullik Bjønnes Date: Thu, 28 Jun 2001 10:25:20 +0000 (+0000) Subject: change a lot of methods to begin with small char X-Git-Tag: 1.6.10~21163 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=85a5ea7bfc80e179a61a99f2955455e84d3384cc;p=features.git change a lot of methods to begin with small char git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2150 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView2.C b/src/BufferView2.C index 0269bf9c36..3db22eb0f5 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -411,7 +411,7 @@ bool BufferView::lockInset(UpdatableInset * inset) theLockingInset(inset); return true; } else if (inset) { - return theLockingInset()->LockInsetInInset(this, inset); + return theLockingInset()->lockInsetInInset(this, inset); } return false; } @@ -425,12 +425,12 @@ void BufferView::showLockedInsetCursor(int x, int y, int asc, int desc) (cursor.par()->getChar(cursor.pos() - 1) == Paragraph::META_INSET) && (cursor.par()->getInset(cursor.pos() - 1) == - theLockingInset()->GetLockingInset())) + theLockingInset()->getLockingInset())) text->setCursor(this, cursor, cursor.par(), cursor.pos() - 1); LyXScreen::Cursor_Shape shape = LyXScreen::BAR_SHAPE; LyXText * txt = getLyXText(); - if (theLockingInset()->GetLockingInset()->LyxCode() == + if (theLockingInset()->getLockingInset()->lyxCode() == Inset::TEXT_CODE && (txt->real_current_font.language() != buffer()->params.language @@ -439,7 +439,7 @@ void BufferView::showLockedInsetCursor(int x, int y, int asc, int desc) shape = (txt->real_current_font.isVisibleRightToLeft()) ? LyXScreen::REVERSED_L_SHAPE : LyXScreen::L_SHAPE; - y += cursor.y() + theLockingInset()->InsetInInsetY(); + y += cursor.y() + theLockingInset()->insetInInsetY(); pimpl_->screen_->ShowManualCursor(text, x, y, asc, desc, shape); } @@ -457,7 +457,7 @@ void BufferView::hideLockedInsetCursor() void BufferView::fitLockedInsetCursor(int x, int y, int asc, int desc) { if (theLockingInset() && available()) { - y += text->cursor.y() + theLockingInset()->InsetInInsetY(); + y += text->cursor.y() + theLockingInset()->insetInInsetY(); if (pimpl_->screen_->FitManualCursor(text, this, x, y, asc, desc)) updateScrollbar(); } @@ -467,12 +467,12 @@ void BufferView::fitLockedInsetCursor(int x, int y, int asc, int desc) int BufferView::unlockInset(UpdatableInset * inset) { if (inset && theLockingInset() == inset) { - inset->InsetUnlock(this); + inset->insetUnlock(this); theLockingInset(0); text->finishUndo(); return 0; } else if (inset && theLockingInset() && - theLockingInset()->UnlockInsetInInset(this, inset)) { + theLockingInset()->unlockInsetInInset(this, inset)) { text->finishUndo(); return 0; } @@ -512,7 +512,7 @@ bool BufferView::ChangeInsets(Inset::Code code, bool flag2 = false; for (Paragraph::inset_iterator it = par->inset_iterator_begin(); it != par->inset_iterator_end(); ++it) { - if ((*it)->LyxCode() == code) { + if ((*it)->lyxCode() == code) { InsetCommand * inset = static_cast(*it); if (inset->getContents() == from) { inset->setContents(to); diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index 600eef68c3..6e58bf1141 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -529,7 +529,7 @@ void BufferView::Pimpl::workAreaMotionNotify(int x, int y, unsigned int state) ? cursor.x() - width : cursor.x(); int start_x = inset_x + bv_->theLockingInset()->scroll(); bv_->theLockingInset()-> - InsetMotionNotify(bv_, + insetMotionNotify(bv_, x - start_x, y - cursor.y() + bv_->text->first, state); @@ -583,7 +583,7 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos, otherwise give the event to the inset */ if (inset_hit == bv_->theLockingInset()) { bv_->theLockingInset()-> - InsetButtonPress(bv_, + insetButtonPress(bv_, xpos, ypos, button); return; @@ -615,14 +615,14 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos, // Single left click in math inset? if ((inset_hit != 0) && - (inset_hit->Editable()==Inset::HIGHLY_EDITABLE)) { + (inset_hit->editable()==Inset::HIGHLY_EDITABLE)) { // Highly editable inset, like math UpdatableInset * inset = static_cast(inset_hit); selection_possible = false; owner_->updateLayoutChoice(); - owner_->message(inset->EditMessage()); - inset->InsetButtonPress(bv_, xpos, ypos, button); - inset->Edit(bv_, xpos, ypos, button); + owner_->message(inset->editMessage()); + inset->insetButtonPress(bv_, xpos, ypos, button); + inset->edit(bv_, xpos, ypos, button); return; } @@ -744,9 +744,9 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y, /* LyX does a kind of work-area grabbing for insets. Only a ButtonPress Event outside the inset will - force a InsetUnlock. */ + force a insetUnlock. */ bv_->theLockingInset()-> - InsetButtonRelease(bv_, x, y, button); + insetButtonRelease(bv_, x, y, button); return; } @@ -778,19 +778,19 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y, // (Joacim) // ...or maybe the SetCursorParUndo() // below isn't necessary at all anylonger? - if (inset_hit->LyxCode() == Inset::REF_CODE) { + if (inset_hit->lyxCode() == Inset::REF_CODE) { bv_->text->setCursorParUndo(buffer_); } - owner_->message(inset_hit->EditMessage()); + owner_->message(inset_hit->editMessage()); - if (inset_hit->Editable()==Inset::HIGHLY_EDITABLE) { + if (inset_hit->editable()==Inset::HIGHLY_EDITABLE) { // Highly editable inset, like math UpdatableInset *inset = (UpdatableInset *)inset_hit; - inset->InsetButtonRelease(bv_, x, y, button); + inset->insetButtonRelease(bv_, x, y, button); } else { - inset_hit->InsetButtonRelease(bv_, x, y, button); - inset_hit->Edit(bv_, x, y, button); + inset_hit->insetButtonRelease(bv_, x, y, button); + inset_hit->edit(bv_, x, y, button); } return; } @@ -819,7 +819,7 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y, bibitemMaxWidth(bv_, textclasslist. TextClass(buffer_-> params.textclass).defaultfont())) { - bv_->text->cursor.par()->bibkey->Edit(bv_, 0, 0, 0); + bv_->text->cursor.par()->bibkey->edit(bv_, 0, 0, 0); } return; @@ -847,7 +847,7 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y, if (cursor.pos() < cursor.par()->size() && cursor.par()->getChar(cursor.pos()) == Paragraph::META_INSET && cursor.par()->getInset(cursor.pos()) - && cursor.par()->getInset(cursor.pos())->Editable()) { + && cursor.par()->getInset(cursor.pos())->editable()) { // Check whether the inset really was hit Inset * tmpinset = cursor.par()->getInset(cursor.pos()); @@ -873,7 +873,7 @@ Inset * BufferView::Pimpl::checkInsetHit(LyXText * text, int & x, int & y, if ((cursor.pos() - 1 >= 0) && (cursor.par()->getChar(cursor.pos()-1) == Paragraph::META_INSET) && (cursor.par()->getInset(cursor.pos() - 1)) && - (cursor.par()->getInset(cursor.pos() - 1)->Editable())) { + (cursor.par()->getInset(cursor.pos() - 1)->editable())) { Inset * tmpinset = cursor.par()->getInset(cursor.pos()-1); LyXFont font = text->getFont(buffer_, cursor.par(), cursor.pos()-1); @@ -1008,7 +1008,7 @@ void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f) text->fullRebreak(bv_); if (text->inset_owner) { - text->inset_owner->SetUpdateStatus(bv_, InsetText::NONE); + text->inset_owner->setUpdateStatus(bv_, InsetText::NONE); updateInset(text->inset_owner, true); } else update(); @@ -1050,7 +1050,7 @@ void BufferView::Pimpl::cursorToggle() if (!bv_->theLockingInset()) { screen_->CursorToggle(bv_->text, bv_); } else { - bv_->theLockingInset()->ToggleInsetCursor(bv_); + bv_->theLockingInset()->toggleInsetCursor(bv_); } cursor_timeout.restart(); @@ -1202,8 +1202,8 @@ void BufferView::Pimpl::setState() void BufferView::Pimpl::insetSleep() { if (bv_->theLockingInset() && !inset_slept) { - bv_->theLockingInset()->GetCursorPos(bv_, bv_->slx, bv_->sly); - bv_->theLockingInset()->InsetUnlock(bv_); + bv_->theLockingInset()->getCursorPos(bv_, bv_->slx, bv_->sly); + bv_->theLockingInset()->insetUnlock(bv_); inset_slept = true; } } @@ -1212,7 +1212,7 @@ void BufferView::Pimpl::insetSleep() void BufferView::Pimpl::insetWakeup() { if (bv_->theLockingInset() && inset_slept) { - bv_->theLockingInset()->Edit(bv_, bv_->slx, bv_->sly, 0); + bv_->theLockingInset()->edit(bv_, bv_->slx, bv_->sly, 0); inset_slept = false; } } @@ -1222,7 +1222,7 @@ void BufferView::Pimpl::insetUnlock() { if (bv_->theLockingInset()) { if (!inset_slept) - bv_->theLockingInset()->InsetUnlock(bv_); + bv_->theLockingInset()->insetUnlock(bv_); bv_->theLockingInset(0); bv_->text->finishUndo(); inset_slept = false; @@ -1354,7 +1354,7 @@ Inset * BufferView::Pimpl::getInsetByCode(Inset::Code code) find_if(Buffer::inset_iterator( cursor.par(), cursor.pos()), buffer_->inset_iterator_end(), - lyx::compare_memfun(&Inset::LyxCode, code)); + lyx::compare_memfun(&Inset::lyxCode, code)); return it != buffer_->inset_iterator_end() ? (*it) : 0; } @@ -1425,6 +1425,9 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filen) bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { + lyxerr[Debug::ACTION] << "BufferView::Pimpl::Dispatch: action[" + << action <<"] arg[" << argument << "]" << endl; + switch (action) { // --- Misc ------------------------------------------- case LFUN_APPENDIX: @@ -1465,7 +1468,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) } else { // this is need because you don't use a inset->Edit() updateInset(new_inset, true); - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); } break; } @@ -1805,9 +1808,9 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) && lt->cursor.par()->getChar(lt->cursor.pos()) == Paragraph::META_INSET && lt->cursor.par()->getInset(lt->cursor.pos()) - && lt->cursor.par()->getInset(lt->cursor.pos())->Editable() == Inset::HIGHLY_EDITABLE){ + && lt->cursor.par()->getInset(lt->cursor.pos())->editable() == Inset::HIGHLY_EDITABLE){ Inset * tmpinset = lt->cursor.par()->getInset(lt->cursor.pos()); - owner_->getLyXFunc()->setMessage(tmpinset->EditMessage()); + owner_->getLyXFunc()->setMessage(tmpinset->editMessage()); int y = 0; if (is_rtl) { LyXFont const font = @@ -1816,7 +1819,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) lt->cursor.pos()); y = tmpinset->descent(bv_,font); } - tmpinset->Edit(bv_, 0, y, 0); + tmpinset->edit(bv_, 0, y, 0); break; } if (!is_rtl) @@ -1844,17 +1847,17 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) (lt->cursor.par()->getChar(lt->cursor.pos()) == Paragraph::META_INSET) && lt->cursor.par()->getInset(lt->cursor.pos()) && - (lt->cursor.par()->getInset(lt->cursor.pos())->Editable() + (lt->cursor.par()->getInset(lt->cursor.pos())->editable() == Inset::HIGHLY_EDITABLE)) { Inset * tmpinset = lt->cursor.par()->getInset(lt->cursor.pos()); - owner_->getLyXFunc()->setMessage(tmpinset->EditMessage()); + owner_->getLyXFunc()->setMessage(tmpinset->editMessage()); LyXFont const font = lt->getFont(buffer_, lt->cursor.par(), lt->cursor.pos()); int y = is_rtl ? 0 : tmpinset->descent(bv_,font); - tmpinset->Edit(bv_, + tmpinset->edit(bv_, tmpinset->x() + tmpinset->width(bv_,font), y, 0); @@ -2668,7 +2671,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetText * new_inset = new InsetText; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2678,7 +2681,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetERT * new_inset = new InsetERT; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2688,7 +2691,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetExternal * new_inset = new InsetExternal; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2698,7 +2701,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetFoot * new_inset = new InsetFoot; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2708,7 +2711,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetMarginal * new_inset = new InsetMarginal; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2718,7 +2721,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetMinipage * new_inset = new InsetMinipage; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2730,7 +2733,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) if (floatList.typeExist(argument)) { InsetFloat * new_inset = new InsetFloat(argument); if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } else { @@ -2748,7 +2751,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) InsetFloat * new_inset = new InsetFloat(argument); new_inset->wide(true); if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } else { @@ -2763,7 +2766,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetList * new_inset = new InsetList; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2773,7 +2776,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) { InsetTheorem * new_inset = new InsetTheorem; if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2784,14 +2787,14 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) // Do we have a locking inset... if (bv_->theLockingInset()) { lyxerr << "Locking inset code: " - << static_cast(bv_->theLockingInset()->LyxCode()); + << static_cast(bv_->theLockingInset()->lyxCode()); InsetCaption * new_inset = new InsetCaption; new_inset->setOwner(bv_->theLockingInset()); - new_inset->SetAutoBreakRows(true); - new_inset->SetDrawFrame(0, InsetText::LOCKED); - new_inset->SetFrameColor(0, LColor::captionframe); + new_inset->setAutoBreakRows(true); + new_inset->setDrawFrame(0, InsetText::LOCKED); + new_inset->setFrameColor(0, LColor::captionframe); if (insertInset(new_inset)) - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); else delete new_inset; } @@ -2914,7 +2917,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) if (available()) { if (open_new_inset(new InsetFormula, false)) { bv_->theLockingInset() - ->LocalDispatch(bv_, action, argument); + ->localDispatch(bv_, action, argument); } } } @@ -2927,7 +2930,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) InsetFormula * f = new InsetFormula(LM_OT_EQUATION); open_new_inset(f); - f->LocalDispatch(bv_, LFUN_INSERT_MATH, argument); + f->localDispatch(bv_, LFUN_INSERT_MATH, argument); } break; @@ -2989,7 +2992,7 @@ bool BufferView::Pimpl::Dispatch(kb_action action, string const & argument) if (insertInset(inset)) { if (argument.empty()) - inset->Edit(bv_, 0, 0, 0); + inset->edit(bv_, 0, 0, 0); } else delete inset; } @@ -3327,7 +3330,7 @@ void BufferView::Pimpl::insertNote() { InsetInfo * new_inset = new InsetInfo(); insertInset(new_inset); - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); } @@ -3344,9 +3347,9 @@ bool BufferView::Pimpl::open_new_inset(UpdatableInset * new_inset, bool behind) } if (behind) { LyXFont & font = lt->real_current_font; - new_inset->Edit(bv_, new_inset->width(bv_, font), 0, 0); + new_inset->edit(bv_, new_inset->width(bv_, font), 0, 0); } else - new_inset->Edit(bv_, 0, 0, 0); + new_inset->edit(bv_, 0, 0, 0); return true; } @@ -3356,8 +3359,8 @@ bool BufferView::Pimpl::insertInset(Inset * inset, string const & lout) // if we are in a locking inset we should try to insert the // inset there otherwise this is a illegal function now if (bv_->theLockingInset()) { - if (bv_->theLockingInset()->InsertInsetAllowed(inset)) - return bv_->theLockingInset()->InsertInset(bv_, inset); + if (bv_->theLockingInset()->insertInsetAllowed(inset)) + return bv_->theLockingInset()->insertInset(bv_, inset); return false; } @@ -3428,7 +3431,7 @@ void BufferView::Pimpl::updateInset(Inset * inset, bool mark_dirty) updateScrollbar(); return; } - } else if (bv_->theLockingInset()->UpdateInsetInInset(bv_, inset)) { + } else if (bv_->theLockingInset()->updateInsetInInset(bv_, inset)) { if (bv_->text->updateInset(bv_, bv_->theLockingInset())) { update(); @@ -3473,7 +3476,7 @@ void BufferView::Pimpl::gotoInset(vector const & codes, if (same_content && bv_->text->cursor.par()->getChar(bv_->text->cursor.pos()) == Paragraph::META_INSET) { Inset const * inset = bv_->text->cursor.par()->getInset(bv_->text->cursor.pos()); - if (find(codes.begin(), codes.end(), inset->LyxCode()) + if (find(codes.begin(), codes.end(), inset->lyxCode()) != codes.end()) contents = static_cast(inset)->getContents(); diff --git a/src/buffer.C b/src/buffer.C index 5cb9a3ca88..8f09fd92b2 100644 --- a/src/buffer.C +++ b/src/buffer.C @@ -385,7 +385,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, checkminipage = true; } else if (token == "\\i") { Inset * inset = new InsetLatexAccent; - inset->Read(this, lex); + inset->read(this, lex); par->insertInset(pos, inset, font); ++pos; } else if (token == "\\layout") { @@ -565,7 +565,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, istringstream istr(old_float.str()); LyXLex nylex(0, 0); nylex.setStream(istr); - inset->Read(this, nylex); + inset->read(this, nylex); par->insertInset(pos, inset, font); ++pos; } else if (token == "\\begin_deeper") { @@ -999,7 +999,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, } } else { Inset * inset = new InsetSpecialChar; - inset->Read(this, lex); + inset->read(this, lex); par->insertInset(pos, inset, font); } ++pos; @@ -1008,7 +1008,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, ++pos; } else if (token == "\\LyXTable") { Inset * inset = new InsetTabular(*this); - inset->Read(this, lex); + inset->read(this, lex); par->insertInset(pos, inset, font); ++pos; // because of OLD_TABULAR_READ where tabulars have been @@ -1037,7 +1037,7 @@ Buffer::parseSingleLyXformat2Token(LyXLex & lex, Paragraph *& par, InsetCommandParams p("bibitem", "dummy"); par->bibkey = new InsetBibKey(p); } - par->bibkey->Read(this, lex); + par->bibkey->read(this, lex); } else if (token == "\\backslash") { par->insertChar(pos, '\\', font); ++pos; @@ -1221,7 +1221,7 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par, // test the different insets if (tmptok == "LatexCommand") { InsetCommandParams inscmd; - inscmd.Read(lex); + inscmd.read(lex); string const cmdName = inscmd.getCmdName(); @@ -1307,7 +1307,7 @@ void Buffer::readInset(LyXLex & lex, Paragraph *& par, inset = new InsetFloatList; } - if (inset) inset->Read(this, lex); + if (inset) inset->read(this, lex); } if (inset) { @@ -1670,7 +1670,7 @@ string const Buffer::asciiParagraph(Paragraph const * par, { Inset const * inset = par->getInset(i); if (inset) { - if (!inset->Ascii(this, buffer)) { + if (!inset->ascii(this, buffer)) { string dummy; string const s = rsplit(buffer.str().c_str(), @@ -2412,7 +2412,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only) // treat as a special case for compatibility with old code if (par->getChar(0) == Paragraph::META_INSET) { Inset * inset = par->getInset(0); - Inset::Code lyx_code = inset->LyxCode(); + Inset::Code lyx_code = inset->lyxCode(); if (lyx_code == Inset::TOC_CODE){ string const temp = "toc"; sgmlOpenTag(ofs, depth, temp); @@ -2445,7 +2445,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only) case LATEX_COMMAND: if (depth!= 0) - LinuxDocError(par, 0, + linuxDocError(par, 0, _("Error : Wrong depth for" " LatexType Command.\n")); @@ -2499,7 +2499,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only) break; } - SimpleLinuxDocOnePar(ofs, par, depth); + simpleLinuxDocOnePar(ofs, par, depth); par = par->next(); @@ -2533,7 +2533,7 @@ void Buffer::makeLinuxDocFile(string const & fname, bool nice, bool body_only) } -void Buffer::DocBookHandleCaption(ostream & os, string & inner_tag, +void Buffer::docBookHandleCaption(ostream & os, string & inner_tag, Paragraph::depth_type depth, int desc_on, Paragraph * & par) { @@ -2548,7 +2548,7 @@ void Buffer::DocBookHandleCaption(ostream & os, string & inner_tag, "Caption").second) { sgmlOpenTag(os, depth + 1, inner_tag); string extra_par; - SimpleDocBookOnePar(os, extra_par, tpar, + simpleDocBookOnePar(os, extra_par, tpar, desc_on, depth + 2); sgmlCloseTag(os, depth+1, inner_tag); if (!extra_par.empty()) @@ -2615,7 +2615,7 @@ void reset(PAR_TAG & p1, PAR_TAG const & p2) // Handle internal paragraph parsing -- layout already processed. -void Buffer::SimpleLinuxDocOnePar(ostream & os, +void Buffer::simpleLinuxDocOnePar(ostream & os, Paragraph * par, Paragraph::depth_type /*depth*/) { @@ -2759,7 +2759,7 @@ void Buffer::SimpleLinuxDocOnePar(ostream & os, if (c == Paragraph::META_INSET) { Inset * inset = par->getInset(i); - inset->Linuxdoc(this, os); + inset->linuxdoc(this, os); font_old = font; continue; } @@ -2812,7 +2812,7 @@ void Buffer::SimpleLinuxDocOnePar(ostream & os, // Print an error message. -void Buffer::LinuxDocError(Paragraph * par, int pos, +void Buffer::linuxDocError(Paragraph * par, int pos, string const & message) { // insert an error marker in text @@ -2938,7 +2938,7 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) case LATEX_COMMAND: if (depth != 0) - LinuxDocError(par, 0, + linuxDocError(par, 0, _("Error : Wrong depth for " "LatexType Command.\n")); @@ -2972,7 +2972,7 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) // more WYSIWYM handling. if (par->getChar(0) == Paragraph::META_INSET) { Inset * inset = par->getInset(0); - Inset::Code lyx_code = inset->LyxCode(); + Inset::Code lyx_code = inset->lyxCode(); if (lyx_code == Inset::LABEL_CODE){ command_name += " id=\""; command_name += (static_cast(inset))->getContents(); @@ -3056,7 +3056,7 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) } string extra_par; - SimpleDocBookOnePar(ofs, extra_par, par, desc_on, + simpleDocBookOnePar(ofs, extra_par, par, desc_on, depth + 1 + command_depth); par = par->next(); @@ -3122,7 +3122,7 @@ void Buffer::makeDocBookFile(string const & fname, bool nice, bool only_body) } -void Buffer::SimpleDocBookOnePar(ostream & os, string & extra, +void Buffer::simpleDocBookOnePar(ostream & os, string & extra, Paragraph * par, int & desc_on, Paragraph::depth_type depth) const { @@ -3158,7 +3158,7 @@ void Buffer::SimpleDocBookOnePar(ostream & os, string & extra, if (c == Paragraph::META_INSET) { Inset * inset = par->getInset(i); std::ostringstream ost; - inset->DocBook(this, ost); + inset->docBook(this, ost); string tmp_out = ost.str().c_str(); // @@ -3360,7 +3360,7 @@ string const Buffer::getIncludeonlyList(char delim) string lst; for (inset_iterator it = inset_iterator_begin(); it != inset_iterator_end(); ++it) { - if ((*it)->LyxCode() == Inset::INCLUDE_CODE) { + if ((*it)->lyxCode() == Inset::INCLUDE_CODE) { InsetInclude * insetinc = static_cast(*it); if (insetinc->isIncludeOnly()) { @@ -3429,7 +3429,7 @@ Buffer::Lists const Buffer::getLists() const par->inset_iterator_end(); for (; it != end; ++it) { - if ((*it)->LyxCode() == Inset::FLOAT_CODE) { + if ((*it)->lyxCode() == Inset::FLOAT_CODE) { InsetFloat * il = static_cast(*it); @@ -3485,11 +3485,11 @@ vector > const Buffer::getBibkeyList() for (inset_iterator it = inset_iterator_begin(); it != inset_iterator_end(); ++it) { // Search for Bibtex or Include inset - if ((*it)->LyxCode() == Inset::BIBTEX_CODE) { + if ((*it)->lyxCode() == Inset::BIBTEX_CODE) { vector > tmp = static_cast(*it)->getKeys(this); keys.insert(keys.end(), tmp.begin(), tmp.end()); - } else if ((*it)->LyxCode() == Inset::INCLUDE_CODE) { + } else if ((*it)->lyxCode() == Inset::INCLUDE_CODE) { vector > const tmp = static_cast(*it)->getKeys(); keys.insert(keys.end(), tmp.begin(), tmp.end()); @@ -3534,18 +3534,18 @@ void Buffer::markDepClean(string const & name) } -bool Buffer::Dispatch(string const & command) +bool Buffer::dispatch(string const & command) { // Split command string into command and argument string cmd; string line = frontStrip(command); string const arg = strip(frontStrip(split(line, cmd, ' '))); - return Dispatch(lyxaction.LookupFunc(cmd), arg); + return dispatch(lyxaction.LookupFunc(cmd), arg); } -bool Buffer::Dispatch(int action, string const & argument) +bool Buffer::dispatch(int action, string const & argument) { bool dispatched = true; switch (action) { @@ -3577,7 +3577,7 @@ void Buffer::redraw() } -void Buffer::ChangeLanguage(Language const * from, Language const * to) +void Buffer::changeLanguage(Language const * from, Language const * to) { Paragraph * par = paragraph; @@ -3607,12 +3607,12 @@ Buffer::inset_iterator::inset_iterator(Paragraph * paragraph, it = par->InsetIterator(pos); if (it == par->inset_iterator_end()) { par = par->next(); - SetParagraph(); + setParagraph(); } } -void Buffer::inset_iterator::SetParagraph() +void Buffer::inset_iterator::setParagraph() { while (par) { it = par->inset_iterator_begin(); diff --git a/src/buffer.h b/src/buffer.h index ddc23bea7a..ae9cbb0ce2 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -75,10 +75,10 @@ public: /** High-level interface to buffer functionality. This function parses a command string and executes it */ - bool Dispatch(string const & command); + bool dispatch(string const & command); /// Maybe we know the function already by number... - bool Dispatch(int ac, string const & argument); + bool dispatch(int ac, string const & argument); /// void resizeInsets(BufferView *); @@ -155,7 +155,7 @@ public: Paragraph * endpar, TexRow & texrow) const; /// - void SimpleDocBookOnePar(std::ostream &, string & extra, + void simpleDocBookOnePar(std::ostream &, string & extra, Paragraph * par, int & desc_on, Paragraph::depth_type depth) const ; @@ -170,7 +170,7 @@ public: bool nice, bool only_body = false); /// returns the main language for the buffer (document) - Language const * GetLanguage() const; + Language const * getLanguage() const; /// bool isLyxClean() const; /// @@ -274,7 +274,7 @@ public: BufferView * getUser() const; /// - void ChangeLanguage(Language const * from, Language const * to); + void changeLanguage(Language const * from, Language const * to); /// bool isMultiLingual(); @@ -311,7 +311,7 @@ public: TexRow texrow; private: /// - void DocBookHandleCaption(std::ostream & os, string & inner_tag, + void docBookHandleCaption(std::ostream & os, string & inner_tag, Paragraph::depth_type depth, int desc_on, Paragraph * & par); /// Open SGML/XML tag. @@ -321,10 +321,10 @@ private: void sgmlCloseTag(std::ostream & os, Paragraph::depth_type depth, string const & latexname) const; /// - void LinuxDocError(Paragraph * par, int pos, + void linuxDocError(Paragraph * par, int pos, string const & message); /// - void SimpleLinuxDocOnePar(std::ostream & os, Paragraph * par, + void simpleLinuxDocOnePar(std::ostream & os, Paragraph * par, Paragraph::depth_type depth); /// is save needed @@ -371,7 +371,7 @@ public: inset_iterator() : par(0) /*, it(0)*/ {} // inset_iterator(Paragraph * paragraph) : par(paragraph) { - SetParagraph(); + setParagraph(); } /// inset_iterator(Paragraph * paragraph, @@ -382,7 +382,7 @@ public: ++it; if (it == par->inset_iterator_end()) { par = par->next(); - SetParagraph(); + setParagraph(); } } return *this; @@ -394,7 +394,7 @@ public: ++it; if (it == par->inset_iterator_end()) { par = par->next(); - SetParagraph(); + setParagraph(); } } return tmp; @@ -412,7 +412,7 @@ public: inset_iterator const & iter2); private: /// - void SetParagraph(); + void setParagraph(); /// Paragraph * par; /// @@ -445,7 +445,7 @@ void Buffer::delUser(BufferView *) inline -Language const * Buffer::GetLanguage() const +Language const * Buffer::getLanguage() const { return params.language; } diff --git a/src/bufferlist.C b/src/bufferlist.C index a7ce2a9270..83a5ad8977 100644 --- a/src/bufferlist.C +++ b/src/bufferlist.C @@ -95,7 +95,7 @@ bool BufferList::empty() const } -bool BufferList::QwriteAll() +bool BufferList::qwriteAll() { bool askMoreConfirmation = false; string unsaved; diff --git a/src/bufferlist.h b/src/bufferlist.h index 8452221588..198f46e552 100644 --- a/src/bufferlist.h +++ b/src/bufferlist.h @@ -96,7 +96,7 @@ public: bool empty() const; /// - bool QwriteAll(); + bool qwriteAll(); /// Close all open buffers. void closeAll(); diff --git a/src/bufferview_funcs.C b/src/bufferview_funcs.C index f9b9689a5d..fde594460b 100644 --- a/src/bufferview_funcs.C +++ b/src/bufferview_funcs.C @@ -255,7 +255,7 @@ void ToggleAndShow(BufferView * bv, LyXFont const & font, bool toggleall) { if (bv->available()) { if (bv->theLockingInset()) { - bv->theLockingInset()->SetFont(bv, font, toggleall); + bv->theLockingInset()->setFont(bv, font, toggleall); return; } LyXText * text = bv->getLyXText(); diff --git a/src/figureForm.C b/src/figureForm.C index 6707866851..3721def9bf 100644 --- a/src/figureForm.C +++ b/src/figureForm.C @@ -55,7 +55,7 @@ void FigureApplyCB(FL_OBJECT *, long) InsetFig * new_inset = new InsetFig(100, 20, *buffer); current_view->insertInset(new_inset); current_view->owner()->message(_("Figure inserted")); - new_inset->Edit(current_view, 0, 0, 0); + new_inset->edit(current_view, 0, 0, 0); return; } @@ -93,7 +93,7 @@ void FigureApplyCB(FL_OBJECT *, long) Inset * new_inset = new InsetFig(100, 100, *buffer); current_view->insertInset(new_inset); - new_inset->Edit(current_view, 0, 0, 0); + new_inset->edit(current_view, 0, 0, 0); current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR); current_view->owner()->message(_("Figure inserted")); current_view->text->unFreezeUndo(); diff --git a/src/frontends/controllers/ControlExternal.C b/src/frontends/controllers/ControlExternal.C index d5df5b7186..3207a2869a 100644 --- a/src/frontends/controllers/ControlExternal.C +++ b/src/frontends/controllers/ControlExternal.C @@ -72,7 +72,7 @@ void ControlExternal::editExternal() // Create a local copy of the inset and initialise it with this // params struct. boost::scoped_ptr ie; - ie.reset(static_cast(inset()->Clone(*lv_.buffer()))); + ie.reset(static_cast(inset()->clone(*lv_.buffer()))); ie->setFromParams(params()); ie->editExternal(); @@ -83,7 +83,7 @@ void ControlExternal::viewExternal() view().apply(); boost::scoped_ptr ie; - ie.reset(static_cast(inset()->Clone(*lv_.buffer()))); + ie.reset(static_cast(inset()->clone(*lv_.buffer()))); ie->setFromParams(params()); ie->viewExternal(); @@ -94,7 +94,7 @@ void ControlExternal::updateExternal() view().apply(); boost::scoped_ptr ie; - ie.reset(static_cast(inset()->Clone(*lv_.buffer()))); + ie.reset(static_cast(inset()->clone(*lv_.buffer()))); ie->setFromParams(params()); ie->updateExternal(); diff --git a/src/frontends/xforms/FormDocument.C b/src/frontends/xforms/FormDocument.C index 9242973071..05d96eefaf 100644 --- a/src/frontends/xforms/FormDocument.C +++ b/src/frontends/xforms/FormDocument.C @@ -543,7 +543,7 @@ bool FormDocument::language_apply() if (old_language != new_language && old_language->RightToLeft() == new_language->RightToLeft() && !lv_->buffer()->isMultiLingual()) - lv_->buffer()->ChangeLanguage(old_language, new_language); + lv_->buffer()->changeLanguage(old_language, new_language); if (old_language != new_language) { redo = true; } diff --git a/src/frontends/xforms/FormTabular.C b/src/frontends/xforms/FormTabular.C index 0657681b41..fc124e9524 100644 --- a/src/frontends/xforms/FormTabular.C +++ b/src/frontends/xforms/FormTabular.C @@ -136,7 +136,7 @@ void FormTabular::update() string pwidth; string special; - int cell = inset_->GetActCell(); + int cell = inset_->getActCell(); actCell_ = cell; int column = tabular->column_of_cell(cell)+1; fl_set_object_label(dialog_->text_warning,""); @@ -354,7 +354,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) LyXTabular::Feature num = LyXTabular::LAST_ACTION; string special;; - int cell = inset_->GetActCell(); + int cell = inset_->getActCell(); if (actCell_ != cell) { update(); fl_set_object_label(dialog_->text_warning, @@ -376,7 +376,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) fl_show_object(dialog_->text_warning); return false; } - inset_->TabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH,str); + inset_->tabularFeatures(lv_->view(), LyXTabular::SET_PWIDTH,str); update(); // update for alignment return true; } @@ -388,7 +388,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) fl_show_object(dialog_->text_warning); return false; } - inset_->TabularFeatures(lv_->view(), LyXTabular::SET_MPWIDTH,str); + inset_->tabularFeatures(lv_->view(), LyXTabular::SET_MPWIDTH,str); update(); // update for alignment return true; } @@ -519,7 +519,7 @@ bool FormTabular::input(FL_OBJECT * ob, long) else return false; - inset_->TabularFeatures(lv_->view(), num, special); + inset_->tabularFeatures(lv_->view(), num, special); update(); return true; diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 89c71ae003..34fef6c4ca 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2001-06-28 Lars Gullik Bjønnes + + * Change a lot of method names to begin with a small char. + Changes to a lot of files because of this. + 2001-06-27 Lars Gullik Bjønnes * insetfloatlist.C (Write): std:: qualify ostream diff --git a/src/insets/figinset.C b/src/insets/figinset.C index fa11c2a78d..f2d17b3b85 100644 --- a/src/insets/figinset.C +++ b/src/insets/figinset.C @@ -1050,9 +1050,9 @@ void InsetFig::draw(BufferView * bv, LyXFont const & f, } -void InsetFig::Write(Buffer const *, ostream & os) const +void InsetFig::write(Buffer const *, ostream & os) const { - Regenerate(); + regenerate(); os << "Figure size " << wid << " " << hgh << "\n"; if (!fname.empty()) { string buf1 = OnlyPath(owner->fileName()); @@ -1069,7 +1069,7 @@ void InsetFig::Write(Buffer const *, ostream & os) const } -void InsetFig::Read(Buffer const *, LyXLex & lex) +void InsetFig::read(Buffer const *, LyXLex & lex) { string buf; bool finished = false; @@ -1148,35 +1148,35 @@ void InsetFig::Read(Buffer const *, LyXLex & lex) thtype = htype; } } - Regenerate(); - Recompute(); + regenerate(); + recompute(); } -int InsetFig::Latex(Buffer const *, ostream & os, +int InsetFig::latex(Buffer const *, ostream & os, bool /* fragile*/, bool /* fs*/) const { - Regenerate(); + regenerate(); if (!cmd.empty()) os << cmd << " "; return 0; } -int InsetFig::Ascii(Buffer const *, ostream &, int) const +int InsetFig::ascii(Buffer const *, ostream &, int) const { return 0; } -int InsetFig::Linuxdoc(Buffer const *, ostream &) const +int InsetFig::linuxdoc(Buffer const *, ostream &) const { return 0; } -int InsetFig::DocBook(Buffer const *, ostream & os) const +int InsetFig::docBook(Buffer const *, ostream & os) const { - string buf1 = OnlyPath(owner->fileName()); + string const buf1 = OnlyPath(owner->fileName()); string figurename = MakeRelPath(fname, buf1); if (suffixIs(figurename, ".eps")) @@ -1187,35 +1187,35 @@ int InsetFig::DocBook(Buffer const *, ostream & os) const } -void InsetFig::Validate(LaTeXFeatures & features) const +void InsetFig::validate(LaTeXFeatures & features) const { features.graphics = true; if (subfigure) features.subfigure = true; } -Inset::EDITABLE InsetFig::Editable() const +Inset::EDITABLE InsetFig::editable() const { return IS_EDITABLE; } -bool InsetFig::Deletable() const +bool InsetFig::deletable() const { return false; } -string const InsetFig::EditMessage() const +string const InsetFig::editMessage() const { return _("Opened figure"); } -void InsetFig::Edit(BufferView * bv, int, int, unsigned int) +void InsetFig::edit(BufferView * bv, int, int, unsigned int) { lyxerr[Debug::INFO] << "Editing InsetFig." << endl; - Regenerate(); + regenerate(); // We should have RO-versions of the form instead. // The actual prevention of altering a readonly doc @@ -1230,7 +1230,7 @@ void InsetFig::Edit(BufferView * bv, int, int, unsigned int) fl_set_object_return(form->Width, FL_RETURN_ALWAYS); fl_set_object_return(form->Height, FL_RETURN_ALWAYS); } - RestoreForm(); + restoreForm(); if (form->Figure->visible) { fl_raise_form(form->Figure); } else { @@ -1241,7 +1241,7 @@ void InsetFig::Edit(BufferView * bv, int, int, unsigned int) } -Inset * InsetFig::Clone(Buffer const & buffer) const +Inset * InsetFig::clone(Buffer const & buffer) const { InsetFig * tmp = new InsetFig(100, 100, buffer); @@ -1284,12 +1284,12 @@ Inset * InsetFig::Clone(Buffer const & buffer) const tmp->subcaption = subcaption; tmp->changedfname = false; tmp->owner = owner; - tmp->Regenerate(); + tmp->regenerate(); return tmp; } -Inset::Code InsetFig::LyxCode() const +Inset::Code InsetFig::lyxCode() const { return Inset::GRAPHICS_CODE; } @@ -1323,11 +1323,13 @@ string const stringify(InsetFig::HWTYPE hw, float f, string suffix) } // namespace anon -void InsetFig::Regenerate() const +void InsetFig::regenerate() const { string cmdbuf; - string resizeW, resizeH; - string rotate, recmd; + string resizeW; + string resizeH; + string rotate; + string recmd; if (fname.empty()) { cmd = "\\fbox{\\rule[-0.5in]{0pt}{1in}"; @@ -1380,11 +1382,13 @@ void InsetFig::Regenerate() const } -void InsetFig::TempRegenerate() +void InsetFig::tempRegenerate() { string cmdbuf; - string resizeW, resizeH; - string rotate, recmd; + string resizeW; + string resizeH; + string rotate; + string recmd; char const * tfname = fl_get_input(form->EpsFile); string tsubcap = fl_get_input(form->Subcaption); @@ -1437,7 +1441,7 @@ void InsetFig::TempRegenerate() } -void InsetFig::Recompute() +void InsetFig::recompute() { if (!lyxrc.use_gui) return; @@ -1445,7 +1449,7 @@ void InsetFig::Recompute() bool changed = changedfname; int newx, newy, nraw_x, nraw_y; - if (changed) GetPSSizes(); + if (changed) getPSSizes(); float sin_a = sin(angle / DEG2PI); /* rotation; H. Zeller 021296 */ float cos_a = cos(angle / DEG2PI); @@ -1556,7 +1560,7 @@ void InsetFig::Recompute() } -void InsetFig::GetPSSizes() +void InsetFig::getPSSizes() { /* get %%BoundingBox: from postscript file */ @@ -1622,7 +1626,7 @@ void InsetFig::GetPSSizes() } -void InsetFig::CallbackFig(long arg) +void InsetFig::callbackFig(long arg) { bool regen = false; char const * p; @@ -1725,12 +1729,12 @@ void InsetFig::CallbackFig(long arg) regen = true; /* regenerate command */ break; case 0: /* browse file */ - BrowseFile(); + browseFile(); regen = true; break; case 1: /* preview */ p = fl_get_input(form->EpsFile); - Preview(p); + preview(p); break; case 7: /* apply */ case 8: /* ok (apply and close) */ @@ -1753,8 +1757,8 @@ void InsetFig::CallbackFig(long arg) } subcaption = fl_get_input(form->Subcaption); - Regenerate(); - Recompute(); + regenerate(); + recompute(); /* now update inset */ if (lyxerr.debugging()) { lyxerr << "Update: [" @@ -1792,7 +1796,7 @@ void InsetFig::CallbackFig(long arg) break; } - if (regen) TempRegenerate(); + if (regen) tempRegenerate(); } @@ -1870,7 +1874,7 @@ void EnableFigurePanel(FD_Figure * const form) } -void InsetFig::RestoreForm() +void InsetFig::restoreForm() { EnableFigurePanel(form); @@ -1922,11 +1926,11 @@ void InsetFig::RestoreForm() if (current_view->buffer()->isReadonly()) DisableFigurePanel(form); - TempRegenerate(); + tempRegenerate(); } -void InsetFig::Preview(string const & p) +void InsetFig::preview(string const & p) { string tfname = p; if (GetExtension(tfname).empty()) @@ -1938,7 +1942,7 @@ void InsetFig::Preview(string const & p) } -void InsetFig::BrowseFile() +void InsetFig::browseFile() { static string current_figure_path; static int once; @@ -2017,7 +2021,7 @@ void GraphicsCB(FL_OBJECT * obj, long arg) lyxerr << "Calling back figure " << (*it) << endl; } - (*it)->inset->CallbackFig(arg); + (*it)->inset->callbackFig(arg); return; } } @@ -2033,6 +2037,6 @@ void HideFiguresPopups() lyxerr << "Hiding figure " << (*it) << endl; } // hide and free the form - (*it)->inset->CallbackFig(9); + (*it)->inset->callbackFig(9); } } diff --git a/src/insets/figinset.h b/src/insets/figinset.h index cd1c005264..3deaf532dc 100644 --- a/src/insets/figinset.h +++ b/src/insets/figinset.h @@ -33,52 +33,55 @@ public: /// void draw(BufferView *, LyXFont const &, int, float &, bool) const; /// - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// - void Read(Buffer const *, LyXLex & lex); + void read(Buffer const *, LyXLex & lex); /// - int Latex(Buffer const *, std::ostream &, bool fragile, bool free_space) const; + int latex(Buffer const *, std::ostream &, bool fragile, bool free_space) const; /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - int Linuxdoc(Buffer const *, std::ostream &) const; + int linuxdoc(Buffer const *, std::ostream &) const; /// - int DocBook(Buffer const *, std::ostream &) const; + int docBook(Buffer const *, std::ostream &) const; /// Updates needed features for this inset. - void Validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const; /// what appears in the minibuffer when opening - string const EditMessage() const; + string const editMessage() const; /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); /// - EDITABLE Editable() const; + EDITABLE editable() const; /// - bool Deletable() const; + bool deletable() const; /// - Inset::Code LyxCode() const; + Inset::Code lyxCode() const; /// - Inset * Clone(Buffer const &) const; + Inset * clone(Buffer const &) const; /// - void CallbackFig(long arg); + void callbackFig(long arg); /// - void Preview(string const & p); + void preview(string const & p); /// browse for file - void BrowseFile(); + void browseFile(); /// form for user input FD_Figure * form; /// width and height in pixels on screen - int wid, hgh; + int wid; + int hgh; /// width and height in postscript units (1/72 inch) - int pswid, pshgh; + int pswid; + int pshgh; /// width of raw figure w/o rotation int raw_wid; /// heigt of raw figure w/o rotation int raw_hgh; /// x and y coordinate in ps units - int psx, psy; + int psx; + int psy; /// .eps file name string fname; @@ -111,7 +114,8 @@ public: HWTYPE thtype; /// width and height - float xwid, xhgh; + float xwid; + float xhgh; /// rotation angle float angle; @@ -141,15 +145,15 @@ private: /// Buffer const * owner; /// restore values on the form - void RestoreForm(); + void restoreForm(); /// recompute screen params - void Recompute(); + void recompute(); /// regenerate \includegraphics{} command - void Regenerate() const; + void regenerate() const; /// regenerate \inlcudegraphics{} command in temporary buffer - void TempRegenerate(); + void tempRegenerate(); /// get sizes from .eps file - void GetPSSizes(); + void getPSSizes(); /// Redraw connection. SigC::Connection r_; }; diff --git a/src/insets/inset.C b/src/insets/inset.C index 5fe9644487..23bdff5354 100644 --- a/src/insets/inset.C +++ b/src/insets/inset.C @@ -28,45 +28,45 @@ using std::endl; // Insets default methods -bool Inset::Deletable() const +bool Inset::deletable() const { return true; } -bool Inset::DirectWrite() const +bool Inset::directWrite() const { return false; } -Inset::EDITABLE Inset::Editable() const +Inset::EDITABLE Inset::editable() const { return NOT_EDITABLE; } -void Inset::Validate(LaTeXFeatures &) const +void Inset::validate(LaTeXFeatures &) const {} -bool Inset::AutoDelete() const +bool Inset::autoDelete() const { return false; } -void Inset::Edit(BufferView *, int, int, unsigned int) +void Inset::edit(BufferView *, int, int, unsigned int) {} -LyXFont const Inset::ConvertFont(LyXFont const & font) const +LyXFont const Inset::convertFont(LyXFont const & font) const { return LyXFont(font); } -string const Inset::EditMessage() const +string const Inset::editMessage() const { return _("Opened inset"); } @@ -83,59 +83,59 @@ LyXText * Inset::getLyXText(BufferView const * bv, bool const) const // some stuff for inset locking -void UpdatableInset::InsetButtonPress(BufferView *, int x, int y, int button) +void UpdatableInset::insetButtonPress(BufferView *, int x, int y, int button) { lyxerr[Debug::INFO] << "Inset Button Press x=" << x << ", y=" << y << ", button=" << button << endl; } -void UpdatableInset::InsetButtonRelease(BufferView *, int x, int y, int button) +void UpdatableInset::insetButtonRelease(BufferView *, int x, int y, int button) { lyxerr[Debug::INFO] << "Inset Button Release x=" << x << ", y=" << y << ", button=" << button << endl; } -void UpdatableInset::InsetKeyPress(XKeyEvent *) +void UpdatableInset::insetKeyPress(XKeyEvent *) { lyxerr[Debug::INFO] << "Inset Keypress" << endl; } -void UpdatableInset::InsetMotionNotify(BufferView *, int x, int y, int state) +void UpdatableInset::insetMotionNotify(BufferView *, int x, int y, int state) { lyxerr[Debug::INFO] << "Inset Motion Notify x=" << x << ", y=" << y << ", state=" << state << endl; } -void UpdatableInset::InsetUnlock(BufferView *) +void UpdatableInset::insetUnlock(BufferView *) { lyxerr[Debug::INFO] << "Inset Unlock" << endl; } // An updatable inset is highly editable by definition -Inset::EDITABLE UpdatableInset::Editable() const +Inset::EDITABLE UpdatableInset::editable() const { return HIGHLY_EDITABLE; } -void UpdatableInset::ToggleInsetCursor(BufferView *) +void UpdatableInset::toggleInsetCursor(BufferView *) {} -void UpdatableInset::ShowInsetCursor(BufferView *, bool) +void UpdatableInset::showInsetCursor(BufferView *, bool) {} -void UpdatableInset::HideInsetCursor(BufferView *) +void UpdatableInset::hideInsetCursor(BufferView *) {} -void UpdatableInset::Edit(BufferView *, int, int, unsigned int) +void UpdatableInset::edit(BufferView *, int, int, unsigned int) {} @@ -150,7 +150,7 @@ void UpdatableInset::draw(BufferView *, LyXFont const &, } -void UpdatableInset::SetFont(BufferView *, LyXFont const &, bool, bool ) +void UpdatableInset::setFont(BufferView *, LyXFont const &, bool, bool ) {} @@ -212,7 +212,7 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const /// An updatable inset could handle lyx editing commands UpdatableInset::RESULT -UpdatableInset::LocalDispatch(BufferView * bv, +UpdatableInset::localDispatch(BufferView * bv, kb_action action, string const & arg) { if (!arg.empty() && (action==LFUN_SCROLL_INSET)) { diff --git a/src/insets/inset.h b/src/insets/inset.h index a332baecf7..9bc531b8c7 100644 --- a/src/insets/inset.h +++ b/src/insets/inset.h @@ -140,61 +140,61 @@ public: virtual void update(BufferView *, LyXFont const &, bool = false) {} /// - virtual LyXFont const ConvertFont(LyXFont const & font) const; + virtual LyXFont const convertFont(LyXFont const & font) const; /// what appears in the minibuffer when opening - virtual string const EditMessage() const; + virtual string const editMessage() const; /// - virtual void Edit(BufferView *, int x, int y, unsigned int button); + virtual void edit(BufferView *, int x, int y, unsigned int button); /// - virtual EDITABLE Editable() const; + virtual EDITABLE editable() const; /// This is called when the user clicks inside an inset - virtual void InsetButtonPress(BufferView *, int, int, int) {} + virtual void insetButtonPress(BufferView *, int, int, int) {} /// This is called when the user releases the button inside an inset - virtual void InsetButtonRelease(BufferView *, int, int, int) {} + virtual void insetButtonRelease(BufferView *, int, int, int) {} /// This is caleld when the user moves the mouse inside an inset - virtual void InsetMotionNotify(BufferView *, int , int , int) {} + virtual void insetMotionNotify(BufferView *, int , int , int) {} /// - virtual bool IsTextInset() const { return false; } + virtual bool isTextInset() const { return false; } /// virtual bool doClearArea() const { return true; } /// - virtual bool AutoDelete() const; + virtual bool autoDelete() const; /// - virtual void Write(Buffer const *, std::ostream &) const = 0; + virtual void write(Buffer const *, std::ostream &) const = 0; /// - virtual void Read(Buffer const *, LyXLex & lex) = 0; + virtual void read(Buffer const *, LyXLex & lex) = 0; /** returns the number of rows (\n's) of generated tex code. fragile == true means, that the inset should take care about fragile commands by adding a \protect before. If the free_spc (freespacing) variable is set, then this inset is in a free-spacing paragraph. */ - virtual int Latex(Buffer const *, std::ostream &, bool fragile, + virtual int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const = 0; /// - virtual int Ascii(Buffer const *, + virtual int ascii(Buffer const *, std::ostream &, int linelen = 0) const = 0; /// - virtual int Linuxdoc(Buffer const *, std::ostream &) const = 0; + virtual int linuxdoc(Buffer const *, std::ostream &) const = 0; /// - virtual int DocBook(Buffer const *, std::ostream &) const = 0; + virtual int docBook(Buffer const *, std::ostream &) const = 0; /// Updates needed features for this inset. - virtual void Validate(LaTeXFeatures & features) const; + virtual void validate(LaTeXFeatures & features) const; /// - virtual bool Deletable() const; + virtual bool deletable() const; /// returns LyX code associated with the inset. Used for TOC, ...) - virtual Inset::Code LyxCode() const { return NO_CODE; } + virtual Inset::Code lyxCode() const { return NO_CODE; } virtual std::vector const getLabelList() const { return std::vector(); } /// - virtual Inset * Clone(Buffer const &) const = 0; + virtual Inset * clone(Buffer const &) const = 0; /// returns true to override begin and end inset in file - virtual bool DirectWrite() const; + virtual bool directWrite() const; /// Returns true if the inset should be centered alone virtual bool display() const { return false; } @@ -205,7 +205,7 @@ public: /// virtual bool needFullRow() const { return false; } /// - virtual bool InsertInsetAllowed(Inset *) const { return false; } + virtual bool insertInsetAllowed(Inset *) const { return false; } /// void setInsetName(string const & s) { name = s; } /// @@ -265,7 +265,7 @@ private: * * During the lock, all button and keyboard events will be modified * and send to the inset through the following inset-features. Note that - * Inset::InsetUnlock will be called from inside UnlockInset. It is meant + * Inset::insetUnlock will be called from inside UnlockInset. It is meant * to contain the code for restoring the menus and things like this. * * If a inset wishes any redraw and/or update it just has to call @@ -307,69 +307,69 @@ public: UpdatableInset() : cursor_visible_(false), block_drawing_(false) {} /// - virtual EDITABLE Editable() const; + virtual EDITABLE editable() const; /// may call ToggleLockedInsetCursor - virtual void ToggleInsetCursor(BufferView *); + virtual void toggleInsetCursor(BufferView *); /// - virtual void ShowInsetCursor(BufferView *, bool show = true); + virtual void showInsetCursor(BufferView *, bool show = true); /// - virtual void HideInsetCursor(BufferView *); + virtual void hideInsetCursor(BufferView *); /// - virtual void GetCursorPos(BufferView *, int &, int &) const {} + virtual void getCursorPos(BufferView *, int &, int &) const {} /// - virtual void InsetButtonPress(BufferView *, int x, int y, int button); + virtual void insetButtonPress(BufferView *, int x, int y, int button); /// - virtual void InsetButtonRelease(BufferView *, + virtual void insetButtonRelease(BufferView *, int x, int y, int button); /// - virtual void InsetKeyPress(XKeyEvent * ev); + virtual void insetKeyPress(XKeyEvent * ev); /// - virtual void InsetMotionNotify(BufferView *, int x, int y, int state); + virtual void insetMotionNotify(BufferView *, int x, int y, int state); /// - virtual void InsetUnlock(BufferView *); + virtual void insetUnlock(BufferView *); /// - virtual void Edit(BufferView *, int x, int y, unsigned int button); + virtual void edit(BufferView *, int x, int y, unsigned int button); /// virtual void draw(BufferView *, LyXFont const &, int baseline, float & x, bool cleared) const; /// - virtual void SetFont(BufferView *, LyXFont const &, + virtual void setFont(BufferView *, LyXFont const &, bool toggleall = false, bool selectall = false); /// - virtual bool InsertInset(BufferView *, Inset *) { return false; } + virtual bool insertInset(BufferView *, Inset *) { return false; } /// - virtual bool InsertInsetAllowed(Inset *) const { return true; } + virtual bool insertInsetAllowed(Inset *) const { return true; } /// - virtual UpdatableInset * GetLockingInset() { return this; } + virtual UpdatableInset * getLockingInset() { return this; } /// - virtual UpdatableInset * GetFirstLockingInsetOfType(Inset::Code c) - { return (c == LyxCode()) ? this : 0; } + virtual UpdatableInset * getFirstLockingInsetOfType(Inset::Code c) + { return (c == lyxCode()) ? this : 0; } /// - virtual unsigned int InsetInInsetY() { return 0; } + virtual unsigned int insetInInsetY() { return 0; } /// - virtual bool UpdateInsetInInset(BufferView *, Inset *) + virtual bool updateInsetInInset(BufferView *, Inset *) { return false; } /// - virtual bool LockInsetInInset(BufferView *, UpdatableInset *) + virtual bool lockInsetInInset(BufferView *, UpdatableInset *) { return false; } /// - virtual bool UnlockInsetInInset(BufferView *, UpdatableInset *, + virtual bool unlockInsetInInset(BufferView *, UpdatableInset *, bool /*lr*/ = false) { return false; } /// An updatable inset could handle lyx editing commands - virtual RESULT LocalDispatch(BufferView *, kb_action, string const &); + virtual RESULT localDispatch(BufferView *, kb_action, string const &); /// bool isCursorVisible() const { return cursor_visible_; } /// virtual int getMaxWidth(BufferView * bv, UpdatableInset const *) const; /// - int scroll(bool recursive=true) const { + int scroll(bool recursive = true) const { // We need this method to not clobber the real method in Inset return Inset::scroll(recursive); } /// - virtual bool ShowInsetDialog(BufferView *) const { return false; } + virtual bool showInsetDialog(BufferView *) const { return false; } /// virtual void nodraw(bool b) { block_drawing_ = b; diff --git a/src/insets/insetbib.C b/src/insets/insetbib.C index 4823ecf04c..13c5786cc7 100644 --- a/src/insets/insetbib.C +++ b/src/insets/insetbib.C @@ -47,7 +47,7 @@ InsetBibKey::~InsetBibKey() } -Inset * InsetBibKey::Clone(Buffer const &) const +Inset * InsetBibKey::clone(Buffer const &) const { InsetBibKey * b = new InsetBibKey(params()); b->setCounter(counter); @@ -65,7 +65,7 @@ void InsetBibKey::setCounter(int c) // as a LyX 2.x command, and lyxlex is not enough smart to understand // real LaTeX commands. Yes, that could be fixed, but would be a waste // of time cause LyX3 won't use lyxlex anyway. (ale) -void InsetBibKey::Write(Buffer const *, ostream & os) const +void InsetBibKey::write(Buffer const *, ostream & os) const { os << "\\bibitem "; if (! getOptions().empty()) { @@ -79,7 +79,7 @@ void InsetBibKey::Write(Buffer const *, ostream & os) const // This is necessary here because this is written without begin_inset // This should be changed!!! (Jug) -void InsetBibKey::Read(Buffer const *, LyXLex & lex) +void InsetBibKey::read(Buffer const *, LyXLex & lex) { string token; @@ -108,7 +108,7 @@ string const InsetBibKey::getScreenLabel() const } -void InsetBibKey::Edit(BufferView * bv, int, int, unsigned int) +void InsetBibKey::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showBibitem(this); } @@ -130,7 +130,7 @@ string const InsetBibtex::getScreenLabel() const } -int InsetBibtex::Latex(Buffer const * buffer, ostream & os, +int InsetBibtex::latex(Buffer const * buffer, ostream & os, bool /*fragile*/, bool/*fs*/) const { // If we generate in a temp dir, we might need to give an @@ -212,7 +212,7 @@ vector > const InsetBibtex::getKeys(Buffer const * buffer) } -void InsetBibtex::Edit(BufferView * bv, int, int, unsigned int) +void InsetBibtex::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showBibtex(this); } diff --git a/src/insets/insetbib.h b/src/insets/insetbib.h index 09dd296431..e5d5c9d562 100644 --- a/src/insets/insetbib.h +++ b/src/insets/insetbib.h @@ -33,23 +33,23 @@ public: /// ~InsetBibKey(); /// - Inset * Clone(Buffer const &) const; + Inset * clone(Buffer const &) const; /** Currently \bibitem is used as a LyX2.x command, so we need this method. */ - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// - void Read(Buffer const *, LyXLex & lex); + void read(Buffer const *, LyXLex & lex); /// virtual string const getScreenLabel() const; /// - void Edit(BufferView *, int x, int y, unsigned int button); + void edit(BufferView *, int x, int y, unsigned int button); /// - EDITABLE Editable() const { + EDITABLE editable() const { return IS_EDITABLE; } /// A user can't neither insert nor delete this inset - bool Deletable() const { + bool deletable() const { return false; } /// @@ -83,19 +83,19 @@ public: /// ~InsetBibtex(); /// - Inset * Clone(Buffer const &) const { + Inset * clone(Buffer const &) const { return new InsetBibtex(params()); } /// string const getScreenLabel() const; /// - EDITABLE Editable() const { return IS_EDITABLE; } + EDITABLE editable() const { return IS_EDITABLE; } /// - Inset::Code LyxCode() const { return Inset::BIBTEX_CODE; } + Inset::Code lyxCode() const { return Inset::BIBTEX_CODE; } /// - void Edit(BufferView *, int x, int y, unsigned int button); + void edit(BufferView *, int x, int y, unsigned int button); /// - int Latex(Buffer const *, std::ostream &, + int latex(Buffer const *, std::ostream &, bool fragile, bool freespace) const; /// std::vector > const getKeys(Buffer const *) const; diff --git a/src/insets/insetbutton.C b/src/insets/insetbutton.C index 7787c63483..8b0d3d6d5f 100644 --- a/src/insets/insetbutton.C +++ b/src/insets/insetbutton.C @@ -37,7 +37,7 @@ int InsetButton::ascent(BufferView * bv, LyXFont const &) const int descent; string const s = getScreenLabel(); - if (Editable()) { + if (editable()) { bv->painter().buttonText(0, 0, s, font, false, width, ascent, descent); } else { @@ -61,7 +61,7 @@ int InsetButton::descent(BufferView * bv, LyXFont const &) const int descent; string const s = getScreenLabel(); - if (Editable()) { + if (editable()) { bv->painter().buttonText(0, 0, s, font, false, width, ascent, descent); } else { @@ -85,7 +85,7 @@ int InsetButton::width(BufferView * bv, LyXFont const &) const int descent; string const s = getScreenLabel(); - if (Editable()) { + if (editable()) { bv->painter().buttonText(0, 0, s, font, false, width, ascent, descent); } else { @@ -110,7 +110,7 @@ void InsetButton::draw(BufferView * bv, LyXFont const &, int width; string const s = getScreenLabel(); - if (Editable()) { + if (editable()) { pain.buttonText(int(x) + 2, baseline, s, font, true, width); } else { pain.rectText(int(x) + 2, baseline, s, font, diff --git a/src/insets/insetcaption.C b/src/insets/insetcaption.C index 02af2b6714..17a5197c2c 100644 --- a/src/insets/insetcaption.C +++ b/src/insets/insetcaption.C @@ -29,21 +29,21 @@ using std::endl; InsetCaption::InsetCaption() : InsetText() { - SetAutoBreakRows(true); - SetDrawFrame(0, InsetText::LOCKED); - SetFrameColor(0, LColor::captionframe); + setAutoBreakRows(true); + setDrawFrame(0, InsetText::LOCKED); + setFrameColor(0, LColor::captionframe); } -void InsetCaption::Write(Buffer const * buf, ostream & os) const +void InsetCaption::write(Buffer const * buf, ostream & os) const { os << "Caption\n"; - WriteParagraphData(buf, os); + writeParagraphData(buf, os); } -void InsetCaption::Read(Buffer const * buf, LyXLex & lex) +void InsetCaption::read(Buffer const * buf, LyXLex & lex) { #if 0 // We will enably this check again when the compability @@ -54,11 +54,11 @@ void InsetCaption::Read(Buffer const * buf, LyXLex & lex) << endl; } #endif - InsetText::Read(buf, lex); + InsetText::read(buf, lex); } -string const InsetCaption::EditMessage() const +string const InsetCaption::editMessage() const { return _("Opened Caption Inset"); } @@ -96,7 +96,7 @@ void InsetCaption::draw(BufferView * bv, LyXFont const & f, } -int InsetCaption::Latex(Buffer const * buf, ostream & os, +int InsetCaption::latex(Buffer const * buf, ostream & os, bool fragile, bool free_spc) const { // This is a bit too simplistic to take advantage of @@ -105,13 +105,13 @@ int InsetCaption::Latex(Buffer const * buf, ostream & os, // \caption{...}, later we will make it take advantage // of the one of the caption packages. (Lgb) ostringstream ost; - int const l = InsetText::Latex(buf, ost, fragile, free_spc); + int const l = InsetText::latex(buf, ost, fragile, free_spc); os << "\\caption{" << ost.str() << "}\n"; return l + 1; } -int InsetCaption::Ascii(Buffer const * /*buf*/, +int InsetCaption::ascii(Buffer const * /*buf*/, ostream & /*os*/, int /*linelen*/) const { #ifdef WITH_WARNINGS @@ -121,7 +121,7 @@ int InsetCaption::Ascii(Buffer const * /*buf*/, } -int InsetCaption::DocBook(Buffer const * /*buf*/, ostream & /*os*/) const +int InsetCaption::docBook(Buffer const * /*buf*/, ostream & /*os*/) const { #ifdef WITH_WARNINGS #warning Implement me! diff --git a/src/insets/insetcaption.h b/src/insets/insetcaption.h index 01f2969119..986bde07f2 100644 --- a/src/insets/insetcaption.h +++ b/src/insets/insetcaption.h @@ -26,9 +26,9 @@ public: /// InsetCaption(); /// - void Write(Buffer const * buf, std::ostream & os) const; + void write(Buffer const * buf, std::ostream & os) const; /// - void Read(Buffer const * buf, LyXLex & lex); + void read(Buffer const * buf, LyXLex & lex); /// virtual bool display() const; @@ -37,24 +37,24 @@ public: bool needFullRow() const; /// virtual - Inset::Code LyxCode() const; + Inset::Code lyxCode() const; /// virtual - string const EditMessage() const; + string const editMessage() const; /// virtual void draw(BufferView * bv, LyXFont const & f, int baseline, float & x, bool cleared) const; /// virtual - int Latex(Buffer const * buf, std::ostream & os, + int latex(Buffer const * buf, std::ostream & os, bool fragile, bool free_spc) const; /// virtual - int Ascii(Buffer const * buf, std::ostream & os, int linelen) const; + int ascii(Buffer const * buf, std::ostream & os, int linelen) const; /// virtual - int DocBook(Buffer const * buf, std::ostream & os) const; + int docBook(Buffer const * buf, std::ostream & os) const; protected: private: }; @@ -75,7 +75,7 @@ bool InsetCaption::needFullRow() const inline -Inset::Code InsetCaption::LyxCode() const +Inset::Code InsetCaption::lyxCode() const { return CAPTION_CODE; } diff --git a/src/insets/insetcite.C b/src/insets/insetcite.C index e138f1b19a..321141a4b6 100644 --- a/src/insets/insetcite.C +++ b/src/insets/insetcite.C @@ -56,13 +56,13 @@ string const InsetCitation::getScreenLabel() const } -void InsetCitation::Edit(BufferView * bv, int, int, unsigned int) +void InsetCitation::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showCitation(this); } -int InsetCitation::Ascii(Buffer const *, std::ostream & os, int) const +int InsetCitation::ascii(Buffer const *, std::ostream & os, int) const { os << "[" << getContents() << "]"; return 0; diff --git a/src/insets/insetcite.h b/src/insets/insetcite.h index b8ec6f347f..9c5c8671b5 100644 --- a/src/insets/insetcite.h +++ b/src/insets/insetcite.h @@ -24,19 +24,19 @@ public: /// InsetCitation(InsetCommandParams const &); /// - Inset * Clone(Buffer const &) const { + Inset * clone(Buffer const &) const { return new InsetCitation(params()); } /// string const getScreenLabel() const; /// - EDITABLE Editable() const { return IS_EDITABLE; } + EDITABLE editable() const { return IS_EDITABLE; } /// - Inset::Code LyxCode() const { return Inset::CITE_CODE; } + Inset::Code lyxCode() const { return Inset::CITE_CODE; } /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; }; #endif // INSET_CITE_H diff --git a/src/insets/insetcollapsable.C b/src/insets/insetcollapsable.C index 66abb44326..9bd46db48a 100644 --- a/src/insets/insetcollapsable.C +++ b/src/insets/insetcollapsable.C @@ -39,9 +39,9 @@ InsetCollapsable::InsetCollapsable() collapsed = false; label = "Label"; autocollapse = true; - inset.SetAutoBreakRows(true); - inset.SetDrawFrame(0, InsetText::ALWAYS); - inset.SetFrameColor(0, LColor::collapsableframe); + inset.setAutoBreakRows(true); + inset.setDrawFrame(0, InsetText::ALWAYS); + inset.setFrameColor(0, LColor::collapsableframe); button_length = button_top_y = button_bottom_y = 0; setInsetName("Collapsable"); widthCollapsed = oldWidth = 0; @@ -49,26 +49,26 @@ InsetCollapsable::InsetCollapsable() } -bool InsetCollapsable::InsertInset(BufferView * bv, Inset * in) +bool InsetCollapsable::insertInset(BufferView * bv, Inset * in) { - if (!InsertInsetAllowed(in)) { + if (!insertInsetAllowed(in)) { lyxerr << "InsetCollapsable::InsertInset: " "Unable to insert inset." << endl; return false; } - return inset.InsertInset(bv, in); + return inset.insertInset(bv, in); } -void InsetCollapsable::Write(Buffer const * buf, ostream & os) const +void InsetCollapsable::write(Buffer const * buf, ostream & os) const { os << "collapsed " << tostr(collapsed) << "\n"; - inset.WriteParagraphData(buf, os); + inset.writeParagraphData(buf, os); } -void InsetCollapsable::Read(Buffer const * buf, LyXLex & lex) +void InsetCollapsable::read(Buffer const * buf, LyXLex & lex) { if (lex.IsOK()) { lex.next(); @@ -81,7 +81,7 @@ void InsetCollapsable::Read(Buffer const * buf, LyXLex & lex) << endl; } } - inset.Read(buf, lex); + inset.read(buf, lex); } @@ -191,7 +191,7 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f, #if 1 // we don't need anymore to clear here we just have to tell // the underlying LyXText that it should do the RowClear! - inset.SetUpdateStatus(bv, InsetText::FULL); + inset.setUpdateStatus(bv, InsetText::FULL); bv->text->status = LyXText::CHANGED_IN_DRAW; return; #else @@ -224,26 +224,26 @@ void InsetCollapsable::draw(BufferView * bv, LyXFont const & f, } -void InsetCollapsable::Edit(BufferView * bv, int xp, int yp, +void InsetCollapsable::edit(BufferView * bv, int xp, int yp, unsigned int button) { - UpdatableInset::Edit(bv, xp, yp, button); + UpdatableInset::edit(bv, xp, yp, button); if (collapsed && autocollapse) { collapsed = false; if (!bv->lockInset(this)) return; bv->updateInset(this, false); - inset.Edit(bv, 0, 0, button); + inset.edit(bv, 0, 0, button); } else if (!collapsed) { if (!bv->lockInset(this)) return; - inset.Edit(bv, xp, yp + (top_baseline - inset.y()), button); + inset.edit(bv, xp, yp + (top_baseline - inset.y()), button); } } -Inset::EDITABLE InsetCollapsable::Editable() const +Inset::EDITABLE InsetCollapsable::editable() const { if (collapsed) return IS_EDITABLE; @@ -251,36 +251,36 @@ Inset::EDITABLE InsetCollapsable::Editable() const } -void InsetCollapsable::InsetUnlock(BufferView * bv) +void InsetCollapsable::insetUnlock(BufferView * bv) { if (autocollapse) { collapsed = true; } - inset.InsetUnlock(bv); + inset.insetUnlock(bv); if (scroll()) scroll(bv, 0.0F); bv->updateInset(this, false); } -void InsetCollapsable::InsetButtonPress(BufferView * bv, int x, int y, +void InsetCollapsable::insetButtonPress(BufferView * bv, int x, int y, int button) { if (!collapsed && (y > button_bottom_y)) { - inset.InsetButtonPress(bv, x, y + (top_baseline - inset.y()), + inset.insetButtonPress(bv, x, y + (top_baseline - inset.y()), button); } } -void InsetCollapsable::InsetButtonRelease(BufferView * bv, +void InsetCollapsable::insetButtonRelease(BufferView * bv, int x, int y, int button) { if ((x >= 0) && (x < button_length) && (y >= button_top_y) && (y <= button_bottom_y)) { if (collapsed) { collapsed = false; - inset.InsetButtonRelease(bv, 0, 0, button); + inset.insetButtonRelease(bv, 0, 0, button); bv->updateInset(this, false); } else { collapsed = true; @@ -288,32 +288,32 @@ void InsetCollapsable::InsetButtonRelease(BufferView * bv, bv->updateInset(this, false); } } else if (!collapsed && (y > button_top_y)) { - inset.InsetButtonRelease(bv, x, y + (top_baseline-inset.y()), + inset.insetButtonRelease(bv, x, y + (top_baseline-inset.y()), button); } } -void InsetCollapsable::InsetMotionNotify(BufferView * bv, +void InsetCollapsable::insetMotionNotify(BufferView * bv, int x, int y, int state) { if (x > button_bottom_y) { - inset.InsetMotionNotify(bv, x, y + (top_baseline - inset.y()), + inset.insetMotionNotify(bv, x, y + (top_baseline - inset.y()), state); } } -void InsetCollapsable::InsetKeyPress(XKeyEvent * xke) +void InsetCollapsable::insetKeyPress(XKeyEvent * xke) { - inset.InsetKeyPress(xke); + inset.insetKeyPress(xke); } -int InsetCollapsable::Latex(Buffer const * buf, ostream & os, +int InsetCollapsable::latex(Buffer const * buf, ostream & os, bool fragile, bool free_spc) const { - return inset.Latex(buf, os, fragile, free_spc); + return inset.latex(buf, os, fragile, free_spc); } @@ -364,88 +364,88 @@ void InsetCollapsable::update(BufferView * bv, LyXFont const & font, UpdatableInset::RESULT -InsetCollapsable::LocalDispatch(BufferView * bv, kb_action action, +InsetCollapsable::localDispatch(BufferView * bv, kb_action action, string const & arg) { - UpdatableInset::RESULT result = inset.LocalDispatch(bv, action, arg); + UpdatableInset::RESULT result = inset.localDispatch(bv, action, arg); if (result == FINISHED) bv->unlockInset(this); return result; } -bool InsetCollapsable::LockInsetInInset(BufferView * bv, UpdatableInset * in) +bool InsetCollapsable::lockInsetInInset(BufferView * bv, UpdatableInset * in) { if (&inset == in) return true; - return inset.LockInsetInInset(bv, in); + return inset.lockInsetInInset(bv, in); } -bool InsetCollapsable::UnlockInsetInInset(BufferView * bv, UpdatableInset * in, +bool InsetCollapsable::unlockInsetInInset(BufferView * bv, UpdatableInset * in, bool lr) { if (&inset == in) { bv->unlockInset(this); return true; } - return inset.UnlockInsetInInset(bv, in, lr); + return inset.unlockInsetInInset(bv, in, lr); } -bool InsetCollapsable::UpdateInsetInInset(BufferView * bv, Inset *in) +bool InsetCollapsable::updateInsetInInset(BufferView * bv, Inset *in) { if (&inset == in) return true; - return inset.UpdateInsetInInset(bv, in); + return inset.updateInsetInInset(bv, in); } -unsigned int InsetCollapsable::InsetInInsetY() +unsigned int InsetCollapsable::insetInInsetY() { - return inset.InsetInInsetY() - (top_baseline - inset.y()); + return inset.insetInInsetY() - (top_baseline - inset.y()); } -void InsetCollapsable::Validate(LaTeXFeatures & features) const +void InsetCollapsable::validate(LaTeXFeatures & features) const { - inset.Validate(features); + inset.validate(features); } -void InsetCollapsable::GetCursorPos(BufferView * bv, int & x, int & y) const +void InsetCollapsable::getCursorPos(BufferView * bv, int & x, int & y) const { - inset.GetCursorPos(bv, x , y); + inset.getCursorPos(bv, x , y); } -void InsetCollapsable::ToggleInsetCursor(BufferView * bv) +void InsetCollapsable::toggleInsetCursor(BufferView * bv) { - inset.ToggleInsetCursor(bv); + inset.toggleInsetCursor(bv); } -UpdatableInset * InsetCollapsable::GetLockingInset() +UpdatableInset * InsetCollapsable::getLockingInset() { - UpdatableInset * in = inset.GetLockingInset(); + UpdatableInset * in = inset.getLockingInset(); if (&inset == in) return this; return in; } -UpdatableInset * InsetCollapsable::GetFirstLockingInsetOfType(Inset::Code c) +UpdatableInset * InsetCollapsable::getFirstLockingInsetOfType(Inset::Code c) { - if (c == LyxCode()) + if (c == lyxCode()) return this; - return inset.GetFirstLockingInsetOfType(c); + return inset.getFirstLockingInsetOfType(c); } -void InsetCollapsable::SetFont(BufferView * bv, LyXFont const & font, +void InsetCollapsable::setFont(BufferView * bv, LyXFont const & font, bool toggleall, bool selectall) { - inset.SetFont(bv, font, toggleall, selectall); + inset.setFont(bv, font, toggleall, selectall); } diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index a645a0cdbc..1bf9e5a57a 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -42,9 +42,9 @@ public: /// InsetCollapsable(); /// - void Read(Buffer const *, LyXLex &); + void read(Buffer const *, LyXLex &); /// - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// int ascent(BufferView *, LyXFont const &) const; /// @@ -56,60 +56,60 @@ public: /// void update(BufferView *, LyXFont const &, bool =false); /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); /// - EDITABLE Editable() const; + EDITABLE editable() const; /// - bool InsertInset(BufferView *, Inset * inset); + bool insertInset(BufferView *, Inset * inset); /// - bool IsTextInset() const { return true; } + bool isTextInset() const { return true; } /// bool doClearArea() const; /// - void InsetUnlock(BufferView *); + void insetUnlock(BufferView *); /// bool needFullRow() const { return !collapsed; } /// - bool LockInsetInInset(BufferView *, UpdatableInset *); + bool lockInsetInInset(BufferView *, UpdatableInset *); /// - bool UnlockInsetInInset(BufferView *, UpdatableInset *, + bool unlockInsetInInset(BufferView *, UpdatableInset *, bool lr = false); /// - bool UpdateInsetInInset(BufferView *, Inset *); + bool updateInsetInInset(BufferView *, Inset *); /// - unsigned int InsetInInsetY(); + unsigned int insetInInsetY(); /// - void InsetButtonRelease(BufferView *, int, int, int); + void insetButtonRelease(BufferView *, int, int, int); /// - void InsetButtonPress(BufferView *, int, int, int); + void insetButtonPress(BufferView *, int, int, int); /// - void InsetMotionNotify(BufferView *, int, int, int); + void insetMotionNotify(BufferView *, int, int, int); /// - void InsetKeyPress(XKeyEvent *); + void insetKeyPress(XKeyEvent *); /// - UpdatableInset::RESULT LocalDispatch(BufferView *, kb_action, + UpdatableInset::RESULT localDispatch(BufferView *, kb_action, string const &); /// - int Latex(Buffer const *, std::ostream &, + int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; /// - int Ascii(Buffer const *, std::ostream &, int) const { return 0; } + int ascii(Buffer const *, std::ostream &, int) const { return 0; } /// - int Linuxdoc(Buffer const *, std::ostream &) const { return 0; } + int linuxdoc(Buffer const *, std::ostream &) const { return 0; } /// - int DocBook(Buffer const *, std::ostream &) const { return 0; } + int docBook(Buffer const *, std::ostream &) const { return 0; } /// - void Validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const; /// - void GetCursorPos(BufferView *, int & x, int & y) const; + void getCursorPos(BufferView *, int & x, int & y) const; /// - void ToggleInsetCursor(BufferView *); + void toggleInsetCursor(BufferView *); /// - UpdatableInset * GetLockingInset(); + UpdatableInset * getLockingInset(); /// - UpdatableInset * GetFirstLockingInsetOfType(Inset::Code); + UpdatableInset * getFirstLockingInsetOfType(Inset::Code); /// - void SetFont(BufferView *, LyXFont const &, bool toggleall = false, + void setFont(BufferView *, LyXFont const &, bool toggleall = false, bool selectall = false); /// void setLabel(string const & l) { label = l; } diff --git a/src/insets/insetcommand.C b/src/insets/insetcommand.C index ce5a2b4ea8..3a05f45556 100644 --- a/src/insets/insetcommand.C +++ b/src/insets/insetcommand.C @@ -140,7 +140,7 @@ void InsetCommandParams::scanCommand(string const & cmd) // This function will not be necessary when lyx3 -void InsetCommandParams::Read(LyXLex & lex) +void InsetCommandParams::read(LyXLex & lex) { string token; @@ -162,7 +162,7 @@ void InsetCommandParams::Read(LyXLex & lex) } -void InsetCommandParams::Write(ostream & os) const +void InsetCommandParams::write(ostream & os) const { os << "LatexCommand " << getCommand() << "\n"; } @@ -191,7 +191,7 @@ void InsetCommand::setParams(InsetCommandParams const & p ) } -int InsetCommand::Latex(Buffer const *, ostream & os, +int InsetCommand::latex(Buffer const *, ostream & os, bool /*fragile*/, bool/*fs*/) const { os << getCommand(); @@ -199,19 +199,19 @@ int InsetCommand::Latex(Buffer const *, ostream & os, } -int InsetCommand::Ascii(Buffer const *, ostream &, int) const +int InsetCommand::ascii(Buffer const *, ostream &, int) const { return 0; } -int InsetCommand::Linuxdoc(Buffer const *, ostream &) const +int InsetCommand::linuxdoc(Buffer const *, ostream &) const { return 0; } -int InsetCommand::DocBook(Buffer const *, ostream &) const +int InsetCommand::docBook(Buffer const *, ostream &) const { return 0; } diff --git a/src/insets/insetcommand.h b/src/insets/insetcommand.h index dfe0b21f29..7095f9c783 100644 --- a/src/insets/insetcommand.h +++ b/src/insets/insetcommand.h @@ -40,11 +40,11 @@ public: /// bool operator!=(InsetCommandParams const &) const; /// - void Read(LyXLex &); + void read(LyXLex &); /// Parse the command void scanCommand(string const &); /// - void Write(std::ostream &) const; + void write(std::ostream &) const; /// Build the complete LaTeX command string const getCommand() const; /// @@ -82,24 +82,24 @@ public: /// virtual ~InsetCommand() { hideDialog(); } /// - void Write(Buffer const *, std::ostream & os) const - { p_.Write( os ); } + void write(Buffer const *, std::ostream & os) const + { p_.write( os ); } /// - virtual void Read(Buffer const *, LyXLex & lex) - { p_.Read( lex ); } + virtual void read(Buffer const *, LyXLex & lex) + { p_.read( lex ); } /// Can remove one InsetBibKey is modified void scanCommand(string const & c) { p_.scanCommand( c ); }; /// - virtual int Latex(Buffer const *, std::ostream &, + virtual int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - virtual int Linuxdoc(Buffer const *, std::ostream &) const; + virtual int linuxdoc(Buffer const *, std::ostream &) const; /// - virtual int DocBook(Buffer const *, std::ostream &) const; + virtual int docBook(Buffer const *, std::ostream &) const; /// - Inset::Code LyxCode() const { return Inset::NO_CODE; } + Inset::Code lyxCode() const { return Inset::NO_CODE; } /** Get the label that appears at screen. diff --git a/src/insets/inseterror.C b/src/insets/inseterror.C index 9fa6b281d0..43ceb17842 100644 --- a/src/insets/inseterror.C +++ b/src/insets/inseterror.C @@ -79,13 +79,13 @@ void InsetError::draw(BufferView * bv, LyXFont const & font, } -string const InsetError::EditMessage() const +string const InsetError::editMessage() const { return _("Opened error"); } -void InsetError::Edit(BufferView * bv, int, int, unsigned int) +void InsetError::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showError( this ); } diff --git a/src/insets/inseterror.h b/src/insets/inseterror.h index 07212d0c2e..95cd3ee1cb 100644 --- a/src/insets/inseterror.h +++ b/src/insets/inseterror.h @@ -41,31 +41,31 @@ public: /// void draw(BufferView *, LyXFont const &, int, float &, bool) const; /// - void Write(Buffer const *, std::ostream &) const {} + void write(Buffer const *, std::ostream &) const {} /// - void Read(Buffer const *, LyXLex &) {} + void read(Buffer const *, LyXLex &) {} /// - int Latex(Buffer const *, std::ostream &, bool, bool) const { return 0; } + int latex(Buffer const *, std::ostream &, bool, bool) const { return 0; } /// - int Ascii(Buffer const *, std::ostream &, int) const { return 0; } + int ascii(Buffer const *, std::ostream &, int) const { return 0; } /// - int Linuxdoc(Buffer const *, std::ostream &) const { return 0; } + int linuxdoc(Buffer const *, std::ostream &) const { return 0; } /// - int DocBook(Buffer const *, std::ostream &) const { return 0; } + int docBook(Buffer const *, std::ostream &) const { return 0; } /// - bool AutoDelete() const { return true; } + bool autoDelete() const { return true; } /// what appears in the minibuffer when opening - string const EditMessage() const; + string const editMessage() const; /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); /// - EDITABLE Editable() const { return IS_EDITABLE; } + EDITABLE editable() const { return IS_EDITABLE; } /// - Inset * Clone(Buffer const &) const { return new InsetError(contents); } + Inset * clone(Buffer const &) const { return new InsetError(contents); } /// - Inset::Code LyxCode() const { return Inset::ERROR_CODE; } + Inset::Code lyxCode() const { return Inset::ERROR_CODE; } /// We don't want "begin" and "end inset" in lyx-file - bool DirectWrite() const { return true; }; + bool directWrite() const { return true; }; /// string const & getContents() const { return contents; } /// diff --git a/src/insets/insetert.C b/src/insets/insetert.C index 8160e7416b..5aefa67161 100644 --- a/src/insets/insetert.C +++ b/src/insets/insetert.C @@ -39,14 +39,14 @@ InsetERT::InsetERT() : InsetCollapsable() } -void InsetERT::Write(Buffer const * buf, ostream & os) const +void InsetERT::write(Buffer const * buf, ostream & os) const { os << getInsetName() << "\n"; - InsetCollapsable::Write(buf, os); + InsetCollapsable::write(buf, os); } -Inset * InsetERT::Clone(Buffer const &) const +Inset * InsetERT::clone(Buffer const &) const { InsetERT * result = new InsetERT; result->inset.init(&inset); @@ -56,19 +56,19 @@ Inset * InsetERT::Clone(Buffer const &) const } -string const InsetERT::EditMessage() const +string const InsetERT::editMessage() const { return _("Opened ERT Inset"); } -bool InsetERT::InsertInset(BufferView *, Inset *) +bool InsetERT::insertInset(BufferView *, Inset *) { return false; } -void InsetERT::SetFont(BufferView *, LyXFont const &, bool, bool selectall) +void InsetERT::setFont(BufferView *, LyXFont const &, bool, bool selectall) { // if selectall is activated then the fontchange was an outside general // fontchange and this messages is not needed @@ -79,9 +79,9 @@ void InsetERT::SetFont(BufferView *, LyXFont const &, bool, bool selectall) } -void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button) +void InsetERT::edit(BufferView * bv, int x, int y, unsigned int button) { - InsetCollapsable::Edit(bv, x, y, button); + InsetCollapsable::edit(bv, x, y, button); #ifndef NO_LATEX LyXFont font(LyXFont::ALL_SANE); font.setLatex (LyXFont::ON); @@ -89,7 +89,7 @@ void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button) } -int InsetERT::Latex(Buffer const *, std::ostream & os, bool /*fragile*/, +int InsetERT::latex(Buffer const *, std::ostream & os, bool /*fragile*/, bool /*free_spc*/) const { Paragraph::size_type siz = inset.par->size(); @@ -100,20 +100,20 @@ int InsetERT::Latex(Buffer const *, std::ostream & os, bool /*fragile*/, } -int InsetERT::Ascii(Buffer const *, +int InsetERT::ascii(Buffer const *, std::ostream &, int /*linelen*/) const { return 0; } -int InsetERT::Linuxdoc(Buffer const *, std::ostream &) const +int InsetERT::linuxdoc(Buffer const *, std::ostream &) const { return 0; } -int InsetERT::DocBook(Buffer const *, std::ostream &) const +int InsetERT::docBook(Buffer const *, std::ostream &) const { return 0; } diff --git a/src/insets/insetert.h b/src/insets/insetert.h index d653b69316..4d6c550af8 100644 --- a/src/insets/insetert.h +++ b/src/insets/insetert.h @@ -30,28 +30,28 @@ public: /// InsetERT(); /// - virtual void Write(Buffer const * buf, std::ostream & os) const; + virtual void write(Buffer const * buf, std::ostream & os) const; /// - virtual Inset * Clone(Buffer const &) const; + virtual Inset * clone(Buffer const &) const; /// - virtual string const EditMessage() const; + virtual string const editMessage() const; /// - virtual bool InsertInset(BufferView *, Inset *); + virtual bool insertInset(BufferView *, Inset *); /// - virtual void SetFont(BufferView *, LyXFont const &, + virtual void setFont(BufferView *, LyXFont const &, bool toggleall = false, bool selectall = false); /// - virtual void Edit(BufferView *, int, int, unsigned int); + virtual void edit(BufferView *, int, int, unsigned int); /// - virtual int Latex(Buffer const *, std::ostream &, bool fragile, + virtual int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; /// - virtual int Ascii(Buffer const *, + virtual int ascii(Buffer const *, std::ostream &, int linelen = 0) const; /// - virtual int Linuxdoc(Buffer const *, std::ostream &) const; + virtual int linuxdoc(Buffer const *, std::ostream &) const; /// - virtual int DocBook(Buffer const *, std::ostream &) const; + virtual int docBook(Buffer const *, std::ostream &) const; }; #endif diff --git a/src/insets/insetexternal.C b/src/insets/insetexternal.C index dfabf446ca..172f9b6418 100644 --- a/src/insets/insetexternal.C +++ b/src/insets/insetexternal.C @@ -63,13 +63,13 @@ void InsetExternal::setFromParams(Params const & p) } -string const InsetExternal::EditMessage() const +string const InsetExternal::editMessage() const { return doSubstitution(0, params_.templ.guiName); } -void InsetExternal::Edit(BufferView * bv, +void InsetExternal::edit(BufferView * bv, int /*x*/, int /*y*/, unsigned int /*button*/) { view_ = bv; @@ -77,14 +77,14 @@ void InsetExternal::Edit(BufferView * bv, } -void InsetExternal::Write(Buffer const *, std::ostream & os) const +void InsetExternal::write(Buffer const *, std::ostream & os) const { os << "External " << params_.templ.lyxName << ",\"" << params_.filename << "\",\"" << params_.parameters << "\"\n"; } -void InsetExternal::Read(Buffer const *, LyXLex & lex) +void InsetExternal::read(Buffer const *, LyXLex & lex) { string format; string token; @@ -142,32 +142,32 @@ int InsetExternal::write(string const & format, } -int InsetExternal::Latex(Buffer const * buf, +int InsetExternal::latex(Buffer const * buf, std::ostream & os, bool, bool) const { return write("LaTeX", buf, os); } -int InsetExternal::Ascii(Buffer const * buf, std::ostream & os, int) const +int InsetExternal::ascii(Buffer const * buf, std::ostream & os, int) const { return write("Ascii", buf, os); } -int InsetExternal::Linuxdoc(Buffer const * buf, std::ostream & os) const +int InsetExternal::linuxdoc(Buffer const * buf, std::ostream & os) const { return write("LinuxDoc", buf, os); } -int InsetExternal::DocBook(Buffer const * buf, std::ostream & os) const +int InsetExternal::docBook(Buffer const * buf, std::ostream & os) const { return write("DocBook", buf, os); } -void InsetExternal::Validate(LaTeXFeatures & features) const +void InsetExternal::validate(LaTeXFeatures & features) const { ExternalTemplate const & et = params_.templ; ExternalTemplate::Formats::const_iterator cit = @@ -185,7 +185,7 @@ void InsetExternal::Validate(LaTeXFeatures & features) const } -Inset * InsetExternal::Clone(Buffer const &) const +Inset * InsetExternal::clone(Buffer const &) const { InsetExternal * inset = new InsetExternal(); inset->params_ = params_; diff --git a/src/insets/insetexternal.h b/src/insets/insetexternal.h index 8a339f6656..dc68effa30 100644 --- a/src/insets/insetexternal.h +++ b/src/insets/insetexternal.h @@ -42,15 +42,15 @@ public: /// virtual ~InsetExternal(); /// what appears in the minibuffer when opening - virtual string const EditMessage() const; + virtual string const editMessage() const; /// - virtual void Edit(BufferView *, int x, int y, unsigned int button); + virtual void edit(BufferView *, int x, int y, unsigned int button); /// - virtual EDITABLE Editable() const { return IS_EDITABLE; } + virtual EDITABLE editable() const { return IS_EDITABLE; } /// - virtual void Write(Buffer const *, std::ostream &) const; + virtual void write(Buffer const *, std::ostream &) const; /// - virtual void Read(Buffer const *, LyXLex & lex); + virtual void read(Buffer const *, LyXLex & lex); /** returns the number of rows (\n's) of generated tex code. fragile == true means, that the inset should take care about @@ -58,23 +58,23 @@ public: If the free_spc (freespacing) variable is set, then this inset is in a free-spacing paragraph. */ - virtual int Latex(Buffer const *, std::ostream &, bool fragile, + virtual int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; /// write ASCII output to the ostream - virtual int Ascii(Buffer const *, std::ostream &, int linelen) const; + virtual int ascii(Buffer const *, std::ostream &, int linelen) const; /// write LinuxDoc output to the ostream - virtual int Linuxdoc(Buffer const *, std::ostream &) const; + virtual int linuxdoc(Buffer const *, std::ostream &) const; /// write DocBook output to the ostream - virtual int DocBook(Buffer const *, std::ostream &) const; + virtual int docBook(Buffer const *, std::ostream &) const; /// Updates needed features for this inset. - virtual void Validate(LaTeXFeatures & features) const; + virtual void validate(LaTeXFeatures & features) const; /// returns LyX code associated with the inset. Used for TOC, ...) - virtual Inset::Code LyxCode() const { return EXTERNAL_CODE; } + virtual Inset::Code lyxCode() const { return EXTERNAL_CODE; } /// - virtual Inset * Clone(Buffer const &) const; + virtual Inset * clone(Buffer const &) const; /// returns the text of the button virtual string const getScreenLabel() const; diff --git a/src/insets/insetfloat.C b/src/insets/insetfloat.C index f8d3293d9f..ed0236ef77 100644 --- a/src/insets/insetfloat.C +++ b/src/insets/insetfloat.C @@ -112,7 +112,7 @@ InsetFloat::InsetFloat(string const & type) } -void InsetFloat::Write(Buffer const * buf, ostream & os) const +void InsetFloat::write(Buffer const * buf, ostream & os) const { os << "Float " // getInsetName() << floatType_ << '\n'; @@ -129,11 +129,11 @@ void InsetFloat::Write(Buffer const * buf, ostream & os) const os << "wide false\n"; } - InsetCollapsable::Write(buf, os); + InsetCollapsable::write(buf, os); } -void InsetFloat::Read(Buffer const * buf, LyXLex & lex) +void InsetFloat::read(Buffer const * buf, LyXLex & lex) { if (lex.IsOK()) { lex.next(); @@ -159,18 +159,18 @@ void InsetFloat::Read(Buffer const * buf, LyXLex & lex) << endl; } } - InsetCollapsable::Read(buf, lex); + InsetCollapsable::read(buf, lex); } -void InsetFloat::Validate(LaTeXFeatures & features) const +void InsetFloat::validate(LaTeXFeatures & features) const { features.usedFloats.insert(floatType_); - InsetCollapsable::Validate(features); + InsetCollapsable::validate(features); } -Inset * InsetFloat::Clone(Buffer const &) const +Inset * InsetFloat::clone(Buffer const &) const { InsetFloat * result = new InsetFloat(floatType_); result->inset.init(&inset); @@ -180,13 +180,13 @@ Inset * InsetFloat::Clone(Buffer const &) const } -string const InsetFloat::EditMessage() const +string const InsetFloat::editMessage() const { return _("Opened Float Inset"); } -int InsetFloat::Latex(Buffer const * buf, +int InsetFloat::latex(Buffer const * buf, ostream & os, bool fragile, bool fp) const { string const tmptype = (wide_ ? floatType_ + "*" : floatType_); @@ -197,34 +197,34 @@ int InsetFloat::Latex(Buffer const * buf, os << "[" << floatPlacement_ << "]"; os << "%\n"; - int const i = inset.Latex(buf, os, fragile, fp); + int const i = inset.latex(buf, os, fragile, fp); os << "\\end{" << tmptype << "}%\n"; return i + 2; } -int InsetFloat::DocBook(Buffer const * buf, ostream & os) const +int InsetFloat::docBook(Buffer const * buf, ostream & os) const { os << "<" << floatType_ << ">"; - int const i = inset.DocBook(buf, os); + int const i = inset.docBook(buf, os); os << ""; return i; } -bool InsetFloat::InsertInsetAllowed(Inset * in) const +bool InsetFloat::insertInsetAllowed(Inset * in) const { - if ((in->LyxCode() == Inset::FOOT_CODE) || - (in->LyxCode() == Inset::MARGIN_CODE)) { + if ((in->lyxCode() == Inset::FOOT_CODE) || + (in->lyxCode() == Inset::MARGIN_CODE)) { return false; } return true; } -void InsetFloat::InsetButtonRelease(BufferView * bv, int x, int y, int button) +void InsetFloat::insetButtonRelease(BufferView * bv, int x, int y, int button) { if (x >= top_x && x < button_length @@ -236,7 +236,7 @@ void InsetFloat::InsetButtonRelease(BufferView * bv, int x, int y, int button) << endl; //bv->owner()->getDialogs()->showFloat(this); } else { - InsetCollapsable::InsetButtonRelease(bv, x, y, button); + InsetCollapsable::insetButtonRelease(bv, x, y, button); } } diff --git a/src/insets/insetfloat.h b/src/insets/insetfloat.h index 63fcf57dd8..ee0396d6fb 100644 --- a/src/insets/insetfloat.h +++ b/src/insets/insetfloat.h @@ -28,25 +28,25 @@ public: /// InsetFloat(string const &); /// - void Write(Buffer const * buf, std::ostream & os) const; + void write(Buffer const * buf, std::ostream & os) const; /// - void Read(Buffer const * buf, LyXLex & lex); + void read(Buffer const * buf, LyXLex & lex); /// - void Validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const; /// - Inset * Clone(Buffer const &) const; + Inset * clone(Buffer const &) const; /// - Inset::Code LyxCode() const { return Inset::FLOAT_CODE; } + Inset::Code lyxCode() const { return Inset::FLOAT_CODE; } /// - int Latex(Buffer const *, std::ostream &, bool fragile, bool fp) const; + int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const; /// - int DocBook(Buffer const *, std::ostream &) const; + int docBook(Buffer const *, std::ostream &) const; /// - string const EditMessage() const; + string const editMessage() const; /// - bool InsertInsetAllowed(Inset * inset) const; + bool insertInsetAllowed(Inset * inset) const; /// - void InsetButtonRelease(BufferView * bv, int x, int y, int button); + void insetButtonRelease(BufferView * bv, int x, int y, int button); /// string const & type() const; /// diff --git a/src/insets/insetfloatlist.C b/src/insets/insetfloatlist.C index 56be31185c..64ab198f3d 100644 --- a/src/insets/insetfloatlist.C +++ b/src/insets/insetfloatlist.C @@ -23,19 +23,19 @@ string const InsetFloatList::getScreenLabel() const } -Inset::Code InsetFloatList::LyxCode() const +Inset::Code InsetFloatList::lyxCode() const { return Inset::FLOAT_LIST_CODE; } -void InsetFloatList::Write(Buffer const *, std::ostream & os) const +void InsetFloatList::write(Buffer const *, std::ostream & os) const { os << "FloatList " << float_type << "\n"; } -void InsetFloatList::Read(Buffer const *, LyXLex & lex) +void InsetFloatList::read(Buffer const *, LyXLex & lex) { string token; @@ -57,7 +57,7 @@ void InsetFloatList::Read(Buffer const *, LyXLex & lex) } -void InsetFloatList::Edit(BufferView *, int, int, unsigned int) +void InsetFloatList::edit(BufferView *, int, int, unsigned int) { #ifdef WITH_WARNINGS #warning Implement me please. @@ -68,7 +68,7 @@ void InsetFloatList::Edit(BufferView *, int, int, unsigned int) } -int InsetFloatList::Latex(Buffer const *, std::ostream & os, bool, bool) const +int InsetFloatList::latex(Buffer const *, std::ostream & os, bool, bool) const { FloatList::const_iterator cit = floatList[float_type]; @@ -96,7 +96,7 @@ int InsetFloatList::Latex(Buffer const *, std::ostream & os, bool, bool) const } -int InsetFloatList::Ascii(Buffer const * buffer, std::ostream & os, int) const +int InsetFloatList::ascii(Buffer const * buffer, std::ostream & os, int) const { os << getScreenLabel() << "\n\n"; diff --git a/src/insets/insetfloatlist.h b/src/insets/insetfloatlist.h index 58d1f6aa0a..19e7d4b7aa 100644 --- a/src/insets/insetfloatlist.h +++ b/src/insets/insetfloatlist.h @@ -28,31 +28,31 @@ public: InsetFloatList(string const & type) : float_type(type) {} /// - Inset * Clone(Buffer const &) const { + Inset * clone(Buffer const &) const { return new InsetFloatList(*this); } /// string const getScreenLabel() const; /// - void Edit(BufferView * bv, int, int, unsigned int); + void edit(BufferView * bv, int, int, unsigned int); /// - EDITABLE Editable() const { return IS_EDITABLE; } + EDITABLE editable() const { return IS_EDITABLE; } /// bool display() const { return true; } /// - Inset::Code LyxCode() const; + Inset::Code lyxCode() const; /// - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// - void Read(Buffer const *, LyXLex &); + void read(Buffer const *, LyXLex &); /// - int Latex(Buffer const *, std::ostream &, bool, bool) const; + int latex(Buffer const *, std::ostream &, bool, bool) const; /// - int Linuxdoc(Buffer const *, std::ostream &) const { return 0; } + int linuxdoc(Buffer const *, std::ostream &) const { return 0; } /// - int DocBook(Buffer const *, std::ostream &) const { return 0; } + int docBook(Buffer const *, std::ostream &) const { return 0; } /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; private: string float_type; }; diff --git a/src/insets/insetfoot.C b/src/insets/insetfoot.C index cd94e5c2f4..358c3ef9e1 100644 --- a/src/insets/insetfoot.C +++ b/src/insets/insetfoot.C @@ -32,7 +32,7 @@ InsetFoot::InsetFoot() } -Inset * InsetFoot::Clone(Buffer const &) const +Inset * InsetFoot::clone(Buffer const &) const { InsetFoot * result = new InsetFoot; result->inset.init(&inset); @@ -42,28 +42,28 @@ Inset * InsetFoot::Clone(Buffer const &) const } -string const InsetFoot::EditMessage() const +string const InsetFoot::editMessage() const { return _("Opened Footnote Inset"); } -int InsetFoot::Latex(Buffer const * buf, +int InsetFoot::latex(Buffer const * buf, std::ostream & os, bool fragile, bool fp) const { os << "\\footnote{%\n"; - int const i = inset.Latex(buf, os, fragile, fp); + int const i = inset.latex(buf, os, fragile, fp); os << "}\n"; return i + 2; } -bool InsetFoot::InsertInsetAllowed(Inset * in) const +bool InsetFoot::insertInsetAllowed(Inset * in) const { - if ((in->LyxCode() == Inset::FOOT_CODE) || - (in->LyxCode() == Inset::MARGIN_CODE)) { + if ((in->lyxCode() == Inset::FOOT_CODE) || + (in->lyxCode() == Inset::MARGIN_CODE)) { return false; } return true; diff --git a/src/insets/insetfoot.h b/src/insets/insetfoot.h index 26b7f2f7fa..5892ec07e2 100644 --- a/src/insets/insetfoot.h +++ b/src/insets/insetfoot.h @@ -28,15 +28,15 @@ public: /// InsetFoot(); /// - Inset * Clone(Buffer const &) const; + Inset * clone(Buffer const &) const; /// - Inset::Code LyxCode() const { return Inset::FOOT_CODE; } + Inset::Code lyxCode() const { return Inset::FOOT_CODE; } /// - int Latex(Buffer const *, std::ostream &, bool fragile, bool fp) const; + int latex(Buffer const *, std::ostream &, bool fragile, bool fp) const; /// - string const EditMessage() const; + string const editMessage() const; /// - bool InsertInsetAllowed(Inset * inset) const; + bool insertInsetAllowed(Inset * inset) const; }; #endif diff --git a/src/insets/insetfootlike.C b/src/insets/insetfootlike.C index 0e5c7f6b0a..09639ba8ee 100644 --- a/src/insets/insetfootlike.C +++ b/src/insets/insetfootlike.C @@ -33,8 +33,8 @@ InsetFootlike::InsetFootlike() } -void InsetFootlike::Write(Buffer const * buf, std::ostream & os) const +void InsetFootlike::write(Buffer const * buf, std::ostream & os) const { os << getInsetName() << "\n"; - InsetCollapsable::Write(buf, os); + InsetCollapsable::write(buf, os); } diff --git a/src/insets/insetfootlike.h b/src/insets/insetfootlike.h index c0e98fe94b..b028d8062c 100644 --- a/src/insets/insetfootlike.h +++ b/src/insets/insetfootlike.h @@ -30,7 +30,7 @@ public: /// InsetFootlike(); /// - void Write(Buffer const * buf, std::ostream & os) const; + void write(Buffer const * buf, std::ostream & os) const; }; #endif diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index fb7defde2b..4f5c82d049 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -300,19 +300,19 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font, } -void InsetGraphics::Edit(BufferView *bv, int, int, unsigned int) +void InsetGraphics::edit(BufferView *bv, int, int, unsigned int) { bv->owner()->getDialogs()->showGraphics(this); } -Inset::EDITABLE InsetGraphics::Editable() const +Inset::EDITABLE InsetGraphics::editable() const { return IS_EDITABLE; } -void InsetGraphics::Write(Buffer const * buf, ostream & os) const +void InsetGraphics::write(Buffer const * buf, ostream & os) const { os << "GRAPHICS FormatVersion 1\n"; @@ -320,7 +320,7 @@ void InsetGraphics::Write(Buffer const * buf, ostream & os) const } -void InsetGraphics::Read(Buffer const * buf, LyXLex & lex) +void InsetGraphics::read(Buffer const * buf, LyXLex & lex) { bool finished = false; @@ -462,8 +462,8 @@ InsetGraphics::prepareFile(Buffer const *buf) const } -int InsetGraphics::Latex(Buffer const *buf, ostream & os, - bool /*fragile*/, bool/*fs*/) const +int InsetGraphics::latex(Buffer const *buf, ostream & os, + bool /*fragile*/, bool/*fs*/) const { // MISSING: We have to decide how to do the order of the options // that is dependent of order, like width, height, angle. Should @@ -529,7 +529,7 @@ int InsetGraphics::Latex(Buffer const *buf, ostream & os, } -int InsetGraphics::Ascii(Buffer const *, ostream &, int) const +int InsetGraphics::ascii(Buffer const *, ostream &, int) const { // No graphics in ascii output. Possible to use gifscii to convert // images to ascii approximation. @@ -541,7 +541,7 @@ int InsetGraphics::Ascii(Buffer const *, ostream &, int) const } -int InsetGraphics::Linuxdoc(Buffer const *, ostream &) const +int InsetGraphics::linuxdoc(Buffer const *, ostream &) const { // No graphics in LinuxDoc output. Should check how/what to add. return 0; @@ -551,7 +551,7 @@ int InsetGraphics::Linuxdoc(Buffer const *, ostream &) const // For explanation on inserting graphics into DocBook checkout: // http://linuxdoc.org/LDP/LDP-Author-Guide/inserting-pictures.html // See also the docbook guide at http://www.docbook.org/ -int InsetGraphics::DocBook(Buffer const * buf, ostream & os) const +int InsetGraphics::docBook(Buffer const * buf, ostream & os) const { // Change the path to be relative to the main file. string const buffer_dir = OnlyPath(buf->fileName()); @@ -565,7 +565,7 @@ int InsetGraphics::DocBook(Buffer const * buf, ostream & os) const } -void InsetGraphics::Validate(LaTeXFeatures & features) const +void InsetGraphics::validate(LaTeXFeatures & features) const { // If we have no image, we should not require anything. if (params.filename.empty()) @@ -621,7 +621,7 @@ InsetGraphicsParams InsetGraphics::getParams() const } -Inset * InsetGraphics::Clone(Buffer const &) const +Inset * InsetGraphics::clone(Buffer const &) const { #ifdef WITH_WARNINGS #warning use the copy constructor instead. (Lgb) diff --git a/src/insets/insetgraphics.h b/src/insets/insetgraphics.h index 4e8a48c951..042b8941a9 100644 --- a/src/insets/insetgraphics.h +++ b/src/insets/insetgraphics.h @@ -48,37 +48,37 @@ public: /// void draw(BufferView *, LyXFont const &, int, float &, bool) const; /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); /// - EDITABLE Editable() const; + EDITABLE editable() const; /// - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// - void Read(Buffer const *, LyXLex & lex); + void read(Buffer const *, LyXLex & lex); /** returns the number of rows (\n's) of generated tex code. #fragile == true# means, that the inset should take care about fragile commands by adding a #\protect# before. */ - int Latex(Buffer const *, std::ostream &, + int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - int Linuxdoc(Buffer const *, std::ostream &) const; + int linuxdoc(Buffer const *, std::ostream &) const; /// - int DocBook(Buffer const *, std::ostream &) const; + int docBook(Buffer const *, std::ostream &) const; /** Tell LyX what the latex features you need i.e. what latex packages you need to be included. */ - void Validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const; /// returns LyX code associated with the inset. Used for TOC, ...) - Inset::Code LyxCode() const { return Inset::GRAPHICS_CODE; } + Inset::Code lyxCode() const { return Inset::GRAPHICS_CODE; } /// - Inset * Clone(Buffer const &) const; + virtual Inset * clone(Buffer const &) const; /** Set the inset parameters, used by the GUIndependent dialog. Return true of new params are different from what was so far. @@ -102,13 +102,11 @@ private: string const createLatexOptions() const; /// Convert the file if needed, and return the location of the file. string const prepareFile(Buffer const * buf) const; - /// The graphics cache handle. mutable boost::shared_ptr cacheHandle; - /// is the pixmap initialized? mutable bool imageLoaded; - + /// InsetGraphicsParams params; }; diff --git a/src/insets/insetinclude.C b/src/insets/insetinclude.C index 9c1652f81a..01cd2530ba 100644 --- a/src/insets/insetinclude.C +++ b/src/insets/insetinclude.C @@ -112,7 +112,7 @@ void InsetInclude::set(Params const & p) } -Inset * InsetInclude::Clone(Buffer const & buffer) const +Inset * InsetInclude::clone(Buffer const & buffer) const { Params p(params_); p.masterFilename_ = buffer.fileName(); @@ -121,21 +121,21 @@ Inset * InsetInclude::Clone(Buffer const & buffer) const } -void InsetInclude::Edit(BufferView * bv, int, int, unsigned int) +void InsetInclude::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showInclude(this); } -void InsetInclude::Write(Buffer const *, ostream & os) const +void InsetInclude::write(Buffer const *, ostream & os) const { os << "Include " << params_.cparams.getCommand() << "\n"; } -void InsetInclude::Read(Buffer const *, LyXLex & lex) +void InsetInclude::read(Buffer const *, LyXLex & lex) { - params_.cparams.Read(lex); + params_.cparams.read(lex); if (params_.cparams.getCmdName() == "include") params_.flag = INCLUDE; @@ -215,7 +215,7 @@ bool InsetInclude::loadIfNeeded() const } -int InsetInclude::Latex(Buffer const * buffer, ostream & os, +int InsetInclude::latex(Buffer const * buffer, ostream & os, bool /*fragile*/, bool /*fs*/) const { string incfile(params_.cparams.getContents()); @@ -285,7 +285,7 @@ int InsetInclude::Latex(Buffer const * buffer, ostream & os, } -int InsetInclude::Ascii(Buffer const *, std::ostream & os, int) const +int InsetInclude::ascii(Buffer const *, std::ostream & os, int) const { if (isVerbatim()) os << GetFileContents(getFileName()); @@ -293,7 +293,7 @@ int InsetInclude::Ascii(Buffer const *, std::ostream & os, int) const } -int InsetInclude::Linuxdoc(Buffer const * buffer, ostream & os) const +int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const { string incfile(params_.cparams.getContents()); @@ -332,7 +332,7 @@ int InsetInclude::Linuxdoc(Buffer const * buffer, ostream & os) const } -int InsetInclude::DocBook(Buffer const * buffer, ostream & os) const +int InsetInclude::docBook(Buffer const * buffer, ostream & os) const { string incfile(params_.cparams.getContents()); @@ -370,7 +370,7 @@ int InsetInclude::DocBook(Buffer const * buffer, ostream & os) const } -void InsetInclude::Validate(LaTeXFeatures & features) const +void InsetInclude::validate(LaTeXFeatures & features) const { string incfile(params_.cparams.getContents()); diff --git a/src/insets/insetinclude.h b/src/insets/insetinclude.h index 2fa0040fef..2a21c2976e 100644 --- a/src/insets/insetinclude.h +++ b/src/insets/insetinclude.h @@ -69,34 +69,35 @@ public: void set(Params const & params); /// - Inset * Clone(Buffer const &) const; + virtual Inset * clone(Buffer const &) const; /// - Inset::Code LyxCode() const { return Inset::INCLUDE_CODE; } + Inset::Code lyxCode() const { return Inset::INCLUDE_CODE; } /// This returns the list of labels on the child buffer std::vector const getLabelList() const; /// This returns the list of bibkeys on the child buffer std::vector< std::pair > const getKeys() const; /// - void Edit(BufferView *, int x, int y, unsigned int button); + void edit(BufferView *, int x, int y, unsigned int button); /// - EDITABLE Editable() const + EDITABLE editable() const { return IS_EDITABLE; } /// With lyx3 we won't overload these 3 methods - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// - void Read(Buffer const *, LyXLex &); + void read(Buffer const *, LyXLex &); /// - int Latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; + int latex(Buffer const *, std::ostream &, + bool fragile, bool free_spc) const; /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - int Linuxdoc(Buffer const *, std::ostream &) const; + int linuxdoc(Buffer const *, std::ostream &) const; /// - int DocBook(Buffer const *, std::ostream &) const; + int docBook(Buffer const *, std::ostream &) const; /// - void Validate(LaTeXFeatures &) const; + void validate(LaTeXFeatures &) const; /** Input inserts anything inside a paragraph. Display can give some visual feedback diff --git a/src/insets/insetindex.C b/src/insets/insetindex.C index f13c8db9fd..18d79e5551 100644 --- a/src/insets/insetindex.C +++ b/src/insets/insetindex.C @@ -22,7 +22,7 @@ string const InsetIndex::getScreenLabel() const } -void InsetIndex::Edit(BufferView * bv, int, int, unsigned int) +void InsetIndex::edit(BufferView * bv, int, int, unsigned int) { bv->owner()->getDialogs()->showIndex( this ); } @@ -38,13 +38,13 @@ string const InsetPrintIndex::getScreenLabel() const } -void InsetPrintIndex::Validate(LaTeXFeatures & features) const +void InsetPrintIndex::validate(LaTeXFeatures & features) const { features.makeidx = true; } -Inset::Code InsetPrintIndex::LyxCode() const +Inset::Code InsetPrintIndex::lyxCode() const { return Inset::INDEX_CODE; } diff --git a/src/insets/insetindex.h b/src/insets/insetindex.h index d4e0852957..598ae99f3c 100644 --- a/src/insets/insetindex.h +++ b/src/insets/insetindex.h @@ -27,15 +27,15 @@ public: /// InsetIndex(InsetCommandParams const &); /// - Inset * Clone(Buffer const &) const { + virtual Inset * clone(Buffer const &) const { return new InsetIndex(params()); } /// string const getScreenLabel() const; /// - EDITABLE Editable() const { return IS_EDITABLE; } + EDITABLE editable() const { return IS_EDITABLE; } /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); }; @@ -44,19 +44,19 @@ public: /// InsetPrintIndex(InsetCommandParams const &); /// - Inset * Clone(Buffer const &) const { + virtual Inset * clone(Buffer const &) const { return new InsetPrintIndex(params()); } /// Updates needed features for this inset. - void Validate(LaTeXFeatures & features) const; + void validate(LaTeXFeatures & features) const; /// - void Edit(BufferView *, int, int, unsigned int) {} + void edit(BufferView *, int, int, unsigned int) {} /// - EDITABLE Editable() const{ return NOT_EDITABLE; } + EDITABLE editable() const{ return NOT_EDITABLE; } /// bool display() const { return true; } /// - Inset::Code LyxCode() const; + Inset::Code lyxCode() const; /// string const getScreenLabel() const; }; diff --git a/src/insets/insetinfo.C b/src/insets/insetinfo.C index 148b677b23..0aabb9b22e 100644 --- a/src/insets/insetinfo.C +++ b/src/insets/insetinfo.C @@ -108,13 +108,13 @@ void InsetInfo::draw(BufferView * bv, LyXFont const &, } -void InsetInfo::Write(Buffer const *, ostream & os) const +void InsetInfo::write(Buffer const *, ostream & os) const { os << "Info\n" << contents; } -void InsetInfo::Read(Buffer const *, LyXLex & lex) +void InsetInfo::read(Buffer const *, LyXLex & lex) { string tmp = lex.GetString(); // should be "Info" if (tmp != "Info") @@ -141,38 +141,38 @@ void InsetInfo::Read(Buffer const *, LyXLex & lex) } -int InsetInfo::Latex(Buffer const *, ostream &, +int InsetInfo::latex(Buffer const *, ostream &, bool /*fragile*/, bool /*free_spc*/) const { return 0; } -int InsetInfo::Ascii(Buffer const *, ostream &, int) const +int InsetInfo::ascii(Buffer const *, ostream &, int) const { return 0; } -int InsetInfo::Linuxdoc(Buffer const *, ostream &) const +int InsetInfo::linuxdoc(Buffer const *, ostream &) const { return 0; } -int InsetInfo::DocBook(Buffer const *, ostream &) const +int InsetInfo::docBook(Buffer const *, ostream &) const { return 0; } -Inset::EDITABLE InsetInfo::Editable() const +Inset::EDITABLE InsetInfo::editable() const { return IS_EDITABLE; } -void InsetInfo::CloseInfoCB(FL_OBJECT * ob, long) +void InsetInfo::closeInfoCB(FL_OBJECT * ob, long) { InsetInfo * inset = static_cast(ob->u_vdata); string tmp = fl_get_input(inset->strobj); @@ -193,17 +193,17 @@ void InsetInfo::CloseInfoCB(FL_OBJECT * ob, long) extern "C" void C_InsetInfo_CloseInfoCB(FL_OBJECT * ob, long data) { - InsetInfo::CloseInfoCB(ob, data); + InsetInfo::closeInfoCB(ob, data); } -string const InsetInfo::EditMessage() const +string const InsetInfo::editMessage() const { return _("Opened note"); } -void InsetInfo::Edit(BufferView *bv, int, int, unsigned int) +void InsetInfo::edit(BufferView *bv, int, int, unsigned int) { static int ow = -1; static int oh; @@ -243,13 +243,13 @@ void InsetInfo::Edit(BufferView *bv, int, int, unsigned int) } -Inset * InsetInfo::Clone(Buffer const &) const +Inset * InsetInfo::clone(Buffer const &) const { return new InsetInfo(contents); } -Inset::Code InsetInfo::LyxCode() const +Inset::Code InsetInfo::lyxCode() const { return Inset::IGNORE_CODE; } diff --git a/src/insets/insetinfo.h b/src/insets/insetinfo.h index 2049847fc1..cbc7a01362 100644 --- a/src/insets/insetinfo.h +++ b/src/insets/insetinfo.h @@ -47,30 +47,30 @@ public: /// void draw(BufferView *, LyXFont const &, int, float &, bool) const; /// - void Write(Buffer const *, std::ostream &) const; + void write(Buffer const *, std::ostream &) const; /// - void Read(Buffer const *, LyXLex & lex); + void read(Buffer const *, LyXLex & lex); /// - int Latex(Buffer const *, std::ostream &, + int latex(Buffer const *, std::ostream &, bool fragile, bool free_spc) const; /// - int Ascii(Buffer const *, std::ostream &, int linelen) const; + int ascii(Buffer const *, std::ostream &, int linelen) const; /// - int Linuxdoc(Buffer const *, std::ostream &) const; + int linuxdoc(Buffer const *, std::ostream &) const; /// - int DocBook(Buffer const *, std::ostream &) const; + int docBook(Buffer const *, std::ostream &) const; /// what appears in the minibuffer when opening - string const EditMessage() const; + string const editMessage() const; /// - void Edit(BufferView *, int, int, unsigned int); + void edit(BufferView *, int, int, unsigned int); /// - EDITABLE Editable() const; + EDITABLE editable() const; /// - Inset::Code LyxCode() const; + Inset::Code lyxCode() const; /// - Inset * Clone(Buffer const &) const; + virtual Inset * clone(Buffer const &) const; /// - static void CloseInfoCB(FL_OBJECT *, long data); + static void closeInfoCB(FL_OBJECT *, long data); private: /// string contents; diff --git a/src/insets/insetlabel.C b/src/insets/insetlabel.C index ff3fa02cb5..cb1cc921fb 100644 --- a/src/insets/insetlabel.C +++ b/src/insets/insetlabel.C @@ -42,7 +42,7 @@ vector const InsetLabel::getLabelList() const } -void InsetLabel::Edit(BufferView * bv, int, int, unsigned int) +void InsetLabel::edit(BufferView * bv, int, int, unsigned int) { if (bv->buffer()->isReadonly()) { WarnReadonly(bv->buffer()->fileName()); @@ -69,28 +69,28 @@ void InsetLabel::Edit(BufferView * bv, int, int, unsigned int) } -int InsetLabel::Latex(Buffer const *, ostream & os, +int InsetLabel::latex(Buffer const *, ostream & os, bool /*fragile*/, bool /*fs*/) const { os << escape(getCommand()); return 0; } -int InsetLabel::Ascii(Buffer const *, ostream & os, int) const +int InsetLabel::ascii(Buffer const *, ostream & os, int) const { os << "<" << getContents() << ">"; return 0; } -int InsetLabel::Linuxdoc(Buffer const *, ostream & os) const +int InsetLabel::linuxdoc(Buffer const *, ostream & os) const { os << "