theLockingInset(inset);
return true;
} else if (inset) {
- return theLockingInset()->LockInsetInInset(this, inset);
+ return theLockingInset()->lockInsetInInset(this, inset);
}
return false;
}
(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
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);
}
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();
}
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;
}
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<InsetCommand *>(*it);
if (inset->getContents() == from) {
inset->setContents(to);
? 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);
otherwise give the event to the inset */
if (inset_hit == bv_->theLockingInset()) {
bv_->theLockingInset()->
- InsetButtonPress(bv_,
+ insetButtonPress(bv_,
xpos, ypos,
button);
return;
// 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<UpdatableInset *>(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;
}
/* 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;
}
// (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;
}
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;
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());
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);
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();
if (!bv_->theLockingInset()) {
screen_->CursorToggle(bv_->text, bv_);
} else {
- bv_->theLockingInset()->ToggleInsetCursor(bv_);
+ bv_->theLockingInset()->toggleInsetCursor(bv_);
}
cursor_timeout.restart();
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;
}
}
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;
}
}
{
if (bv_->theLockingInset()) {
if (!inset_slept)
- bv_->theLockingInset()->InsetUnlock(bv_);
+ bv_->theLockingInset()->insetUnlock(bv_);
bv_->theLockingInset(0);
bv_->text->finishUndo();
inset_slept = false;
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;
}
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:
} 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;
}
&& 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 =
lt->cursor.pos());
y = tmpinset->descent(bv_,font);
}
- tmpinset->Edit(bv_, 0, y, 0);
+ tmpinset->edit(bv_, 0, y, 0);
break;
}
if (!is_rtl)
(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);
{
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;
}
{
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;
}
{
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;
}
{
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;
}
{
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;
}
{
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;
}
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 {
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 {
{
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;
}
{
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;
}
// Do we have a locking inset...
if (bv_->theLockingInset()) {
lyxerr << "Locking inset code: "
- << static_cast<int>(bv_->theLockingInset()->LyxCode());
+ << static_cast<int>(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;
}
if (available()) {
if (open_new_inset(new InsetFormula, false)) {
bv_->theLockingInset()
- ->LocalDispatch(bv_, action, argument);
+ ->localDispatch(bv_, action, 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;
if (insertInset(inset)) {
if (argument.empty())
- inset->Edit(bv_, 0, 0, 0);
+ inset->edit(bv_, 0, 0, 0);
} else
delete inset;
}
{
InsetInfo * new_inset = new InsetInfo();
insertInset(new_inset);
- new_inset->Edit(bv_, 0, 0, 0);
+ new_inset->edit(bv_, 0, 0, 0);
}
}
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;
}
// 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;
}
updateScrollbar();
return;
}
- } else if (bv_->theLockingInset()->UpdateInsetInInset(bv_, inset)) {
+ } else if (bv_->theLockingInset()->updateInsetInInset(bv_, inset)) {
if (bv_->text->updateInset(bv_,
bv_->theLockingInset())) {
update();
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<InsetCommand const *>(inset)->getContents();
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") {
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") {
}
} else {
Inset * inset = new InsetSpecialChar;
- inset->Read(this, lex);
+ inset->read(this, lex);
par->insertInset(pos, inset, font);
}
++pos;
++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
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;
// test the different insets
if (tmptok == "LatexCommand") {
InsetCommandParams inscmd;
- inscmd.Read(lex);
+ inscmd.read(lex);
string const cmdName = inscmd.getCmdName();
inset = new InsetFloatList;
}
- if (inset) inset->Read(this, lex);
+ if (inset) inset->read(this, lex);
}
if (inset) {
{
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(),
// treat <toc> 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);
case LATEX_COMMAND:
if (depth!= 0)
- LinuxDocError(par, 0,
+ linuxDocError(par, 0,
_("Error : Wrong depth for"
" LatexType Command.\n"));
break;
}
- SimpleLinuxDocOnePar(ofs, par, depth);
+ simpleLinuxDocOnePar(ofs, par, depth);
par = par->next();
}
-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)
{
"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())
// Handle internal paragraph parsing -- layout already processed.
-void Buffer::SimpleLinuxDocOnePar(ostream & os,
+void Buffer::simpleLinuxDocOnePar(ostream & os,
Paragraph * par,
Paragraph::depth_type /*depth*/)
{
if (c == Paragraph::META_INSET) {
Inset * inset = par->getInset(i);
- inset->Linuxdoc(this, os);
+ inset->linuxdoc(this, os);
font_old = font;
continue;
}
// 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
case LATEX_COMMAND:
if (depth != 0)
- LinuxDocError(par, 0,
+ linuxDocError(par, 0,
_("Error : Wrong depth for "
"LatexType Command.\n"));
// 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<InsetCommand *>(inset))->getContents();
}
string extra_par;
- SimpleDocBookOnePar(ofs, extra_par, par, desc_on,
+ simpleDocBookOnePar(ofs, extra_par, par, desc_on,
depth + 1 + command_depth);
par = par->next();
}
-void Buffer::SimpleDocBookOnePar(ostream & os, string & extra,
+void Buffer::simpleDocBookOnePar(ostream & os, string & extra,
Paragraph * par, int & desc_on,
Paragraph::depth_type depth) const
{
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();
//
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<InsetInclude *>(*it);
if (insetinc->isIncludeOnly()) {
par->inset_iterator_end();
for (; it != end; ++it) {
- if ((*it)->LyxCode() == Inset::FLOAT_CODE) {
+ if ((*it)->lyxCode() == Inset::FLOAT_CODE) {
InsetFloat * il =
static_cast<InsetFloat*>(*it);
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<pair<string,string> > tmp =
static_cast<InsetBibtex*>(*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<pair<string,string> > const tmp =
static_cast<InsetInclude*>(*it)->getKeys();
keys.insert(keys.end(), tmp.begin(), tmp.end());
}
-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) {
}
-void Buffer::ChangeLanguage(Language const * from, Language const * to)
+void Buffer::changeLanguage(Language const * from, Language const * to)
{
Paragraph * par = 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();
/** 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 *);
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 ;
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;
///
BufferView * getUser() const;
///
- void ChangeLanguage(Language const * from, Language const * to);
+ void changeLanguage(Language const * from, Language const * to);
///
bool isMultiLingual();
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.
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
inset_iterator() : par(0) /*, it(0)*/ {}
//
inset_iterator(Paragraph * paragraph) : par(paragraph) {
- SetParagraph();
+ setParagraph();
}
///
inset_iterator(Paragraph * paragraph,
++it;
if (it == par->inset_iterator_end()) {
par = par->next();
- SetParagraph();
+ setParagraph();
}
}
return *this;
++it;
if (it == par->inset_iterator_end()) {
par = par->next();
- SetParagraph();
+ setParagraph();
}
}
return tmp;
inset_iterator const & iter2);
private:
///
- void SetParagraph();
+ void setParagraph();
///
Paragraph * par;
///
inline
-Language const * Buffer::GetLanguage() const
+Language const * Buffer::getLanguage() const
{
return params.language;
}
}
-bool BufferList::QwriteAll()
+bool BufferList::qwriteAll()
{
bool askMoreConfirmation = false;
string unsaved;
bool empty() const;
///
- bool QwriteAll();
+ bool qwriteAll();
/// Close all open buffers.
void closeAll();
{
if (bv->available()) {
if (bv->theLockingInset()) {
- bv->theLockingInset()->SetFont(bv, font, toggleall);
+ bv->theLockingInset()->setFont(bv, font, toggleall);
return;
}
LyXText * text = bv->getLyXText();
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;
}
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();
// Create a local copy of the inset and initialise it with this
// params struct.
boost::scoped_ptr<InsetExternal> ie;
- ie.reset(static_cast<InsetExternal *>(inset()->Clone(*lv_.buffer())));
+ ie.reset(static_cast<InsetExternal *>(inset()->clone(*lv_.buffer())));
ie->setFromParams(params());
ie->editExternal();
view().apply();
boost::scoped_ptr<InsetExternal> ie;
- ie.reset(static_cast<InsetExternal *>(inset()->Clone(*lv_.buffer())));
+ ie.reset(static_cast<InsetExternal *>(inset()->clone(*lv_.buffer())));
ie->setFromParams(params());
ie->viewExternal();
view().apply();
boost::scoped_ptr<InsetExternal> ie;
- ie.reset(static_cast<InsetExternal *>(inset()->Clone(*lv_.buffer())));
+ ie.reset(static_cast<InsetExternal *>(inset()->clone(*lv_.buffer())));
ie->setFromParams(params());
ie->updateExternal();
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;
}
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,"");
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,
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;
}
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;
}
else
return false;
- inset_->TabularFeatures(lv_->view(), num, special);
+ inset_->tabularFeatures(lv_->view(), num, special);
update();
return true;
+2001-06-28 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * 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 <larsbj@birdstep.com>
* insetfloatlist.C (Write): std:: qualify ostream
}
-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());
}
-void InsetFig::Read(Buffer const *, LyXLex & lex)
+void InsetFig::read(Buffer const *, LyXLex & lex)
{
string buf;
bool finished = false;
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"))
}
-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
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 {
}
-Inset * InsetFig::Clone(Buffer const & buffer) const
+Inset * InsetFig::clone(Buffer const & buffer) const
{
InsetFig * tmp = new InsetFig(100, 100, buffer);
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;
}
} // 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}";
}
-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);
}
-void InsetFig::Recompute()
+void InsetFig::recompute()
{
if (!lyxrc.use_gui)
return;
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);
}
-void InsetFig::GetPSSizes()
+void InsetFig::getPSSizes()
{
/* get %%BoundingBox: from postscript file */
}
-void InsetFig::CallbackFig(long arg)
+void InsetFig::callbackFig(long arg)
{
bool regen = false;
char const * p;
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) */
}
subcaption = fl_get_input(form->Subcaption);
- Regenerate();
- Recompute();
+ regenerate();
+ recompute();
/* now update inset */
if (lyxerr.debugging()) {
lyxerr << "Update: ["
break;
}
- if (regen) TempRegenerate();
+ if (regen) tempRegenerate();
}
}
-void InsetFig::RestoreForm()
+void InsetFig::restoreForm()
{
EnableFigurePanel(form);
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())
}
-void InsetFig::BrowseFile()
+void InsetFig::browseFile()
{
static string current_figure_path;
static int once;
lyxerr << "Calling back figure "
<< (*it) << endl;
}
- (*it)->inset->CallbackFig(arg);
+ (*it)->inset->callbackFig(arg);
return;
}
}
lyxerr << "Hiding figure " << (*it) << endl;
}
// hide and free the form
- (*it)->inset->CallbackFig(9);
+ (*it)->inset->callbackFig(9);
}
}
///
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;
HWTYPE thtype;
/// width and height
- float xwid, xhgh;
+ float xwid;
+ float xhgh;
/// rotation angle
float angle;
///
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_;
};
// 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");
}
// 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)
{}
}
-void UpdatableInset::SetFont(BufferView *, LyXFont const &, bool, bool )
+void UpdatableInset::setFont(BufferView *, LyXFont const &, bool, bool )
{}
/// 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)) {
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<string> const getLabelList() const {
return std::vector<string>();
}
///
- 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; }
///
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; }
///
*
* 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
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;
}
-Inset * InsetBibKey::Clone(Buffer const &) const
+Inset * InsetBibKey::clone(Buffer const &) const
{
InsetBibKey * b = new InsetBibKey(params());
b->setCounter(counter);
// 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()) {
// 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;
}
-void InsetBibKey::Edit(BufferView * bv, int, int, unsigned int)
+void InsetBibKey::edit(BufferView * bv, int, int, unsigned int)
{
bv->owner()->getDialogs()->showBibitem(this);
}
}
-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
}
-void InsetBibtex::Edit(BufferView * bv, int, int, unsigned int)
+void InsetBibtex::edit(BufferView * bv, int, int, unsigned int)
{
bv->owner()->getDialogs()->showBibtex(this);
}
///
~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;
}
///
///
~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<std::pair<string,string> > const getKeys(Buffer const *) const;
int descent;
string const s = getScreenLabel();
- if (Editable()) {
+ if (editable()) {
bv->painter().buttonText(0, 0, s, font,
false, width, ascent, descent);
} else {
int descent;
string const s = getScreenLabel();
- if (Editable()) {
+ if (editable()) {
bv->painter().buttonText(0, 0, s, font,
false, width, ascent, descent);
} else {
int descent;
string const s = getScreenLabel();
- if (Editable()) {
+ if (editable()) {
bv->painter().buttonText(0, 0, s, font,
false, width, ascent, descent);
} else {
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,
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
<< endl;
}
#endif
- InsetText::Read(buf, lex);
+ InsetText::read(buf, lex);
}
-string const InsetCaption::EditMessage() const
+string const InsetCaption::editMessage() const
{
return _("Opened Caption Inset");
}
}
-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
// \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
}
-int InsetCaption::DocBook(Buffer const * /*buf*/, ostream & /*os*/) const
+int InsetCaption::docBook(Buffer const * /*buf*/, ostream & /*os*/) const
{
#ifdef WITH_WARNINGS
#warning Implement me!
///
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;
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:
};
inline
-Inset::Code InsetCaption::LyxCode() const
+Inset::Code InsetCaption::lyxCode() const
{
return CAPTION_CODE;
}
}
-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;
///
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
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;
}
-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();
<< endl;
}
}
- inset.Read(buf, lex);
+ inset.read(buf, lex);
}
#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
}
-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;
}
-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;
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);
}
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);
}
///
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;
///
///
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; }
// This function will not be necessary when lyx3
-void InsetCommandParams::Read(LyXLex & lex)
+void InsetCommandParams::read(LyXLex & lex)
{
string token;
}
-void InsetCommandParams::Write(ostream & os) const
+void InsetCommandParams::write(ostream & os) const
{
os << "LatexCommand " << getCommand() << "\n";
}
}
-int InsetCommand::Latex(Buffer const *, ostream & os,
+int InsetCommand::latex(Buffer const *, ostream & os,
bool /*fragile*/, bool/*fs*/) const
{
os << getCommand();
}
-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;
}
///
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;
///
///
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.
}
-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 );
}
///
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; }
///
}
-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);
}
-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
}
-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);
}
-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();
}
-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;
}
///
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
}
-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;
}
-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;
}
-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 =
}
-Inset * InsetExternal::Clone(Buffer const &) const
+Inset * InsetExternal::clone(Buffer const &) const
{
InsetExternal * inset = new InsetExternal();
inset->params_ = params_;
///
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
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;
}
-void InsetFloat::Write(Buffer const * buf, ostream & os) const
+void InsetFloat::write(Buffer const * buf, ostream & os) const
{
os << "Float " // getInsetName()
<< floatType_ << '\n';
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();
<< 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);
}
-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_);
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 << "</" << floatType_ << ">";
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
<< endl;
//bv->owner()->getDialogs()->showFloat(this);
} else {
- InsetCollapsable::InsetButtonRelease(bv, x, y, button);
+ InsetCollapsable::insetButtonRelease(bv, x, y, button);
}
}
///
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;
///
}
-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;
}
-void InsetFloatList::Edit(BufferView *, int, int, unsigned int)
+void InsetFloatList::edit(BufferView *, int, int, unsigned int)
{
#ifdef WITH_WARNINGS
#warning Implement me please.
}
-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];
}
-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";
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;
};
}
-Inset * InsetFoot::Clone(Buffer const &) const
+Inset * InsetFoot::clone(Buffer const &) const
{
InsetFoot * result = new InsetFoot;
result->inset.init(&inset);
}
-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;
///
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
}
-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);
}
///
InsetFootlike();
///
- void Write(Buffer const * buf, std::ostream & os) const;
+ void write(Buffer const * buf, std::ostream & os) const;
};
#endif
}
-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";
}
-void InsetGraphics::Read(Buffer const * buf, LyXLex & lex)
+void InsetGraphics::read(Buffer const * buf, LyXLex & lex)
{
bool finished = false;
}
-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
}
-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.
}
-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;
// 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());
}
-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())
}
-Inset * InsetGraphics::Clone(Buffer const &) const
+Inset * InsetGraphics::clone(Buffer const &) const
{
#ifdef WITH_WARNINGS
#warning use the copy constructor instead. (Lgb)
///
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.
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<GraphicsCacheItem> cacheHandle;
-
/// is the pixmap initialized?
mutable bool imageLoaded;
-
+ ///
InsetGraphicsParams params;
};
}
-Inset * InsetInclude::Clone(Buffer const & buffer) const
+Inset * InsetInclude::clone(Buffer const & buffer) const
{
Params p(params_);
p.masterFilename_ = buffer.fileName();
}
-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;
}
-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());
}
-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());
}
-int InsetInclude::Linuxdoc(Buffer const * buffer, ostream & os) const
+int InsetInclude::linuxdoc(Buffer const * buffer, ostream & os) const
{
string incfile(params_.cparams.getContents());
}
-int InsetInclude::DocBook(Buffer const * buffer, ostream & os) const
+int InsetInclude::docBook(Buffer const * buffer, ostream & os) const
{
string incfile(params_.cparams.getContents());
}
-void InsetInclude::Validate(LaTeXFeatures & features) const
+void InsetInclude::validate(LaTeXFeatures & features) const
{
string incfile(params_.cparams.getContents());
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<string> const getLabelList() const;
/// This returns the list of bibkeys on the child buffer
std::vector< std::pair<string,string> > 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
}
-void InsetIndex::Edit(BufferView * bv, int, int, unsigned int)
+void InsetIndex::edit(BufferView * bv, int, int, unsigned int)
{
bv->owner()->getDialogs()->showIndex( this );
}
}
-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;
}
///
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);
};
///
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;
};
}
-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")
}
-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<InsetInfo*>(ob->u_vdata);
string tmp = fl_get_input(inset->strobj);
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;
}
-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;
}
///
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;
}
-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());
}
-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 << "<label id=\"" << getContents() << "\" >";
return 0;
}
-int InsetLabel::DocBook(Buffer const *, ostream & os) const
+int InsetLabel::docBook(Buffer const *, ostream & os) const
{
os << "<anchor id=\"" << getContents() << "\" ></anchor>";
return 0;
///
InsetLabel(InsetCommandParams const &);
///
- Inset * Clone(Buffer const &) const { return new InsetLabel(params()); }
+ virtual Inset * clone(Buffer const &) const {
+ return new InsetLabel(params());
+ }
///
string const getScreenLabel() const { return getContents(); }
///
- EDITABLE Editable() const { return IS_EDITABLE; }
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- Inset::Code LyxCode() const { return Inset::LABEL_CODE; }
+ Inset::Code lyxCode() const { return Inset::LABEL_CODE; }
///
- void Edit(BufferView *, int, int, unsigned int);
+ void edit(BufferView *, int, int, unsigned int);
///
std::vector<string> const getLabelList() 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 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;
};
#endif
}
-int InsetLatexAccent::Lbearing(LyXFont const & font) const
+int InsetLatexAccent::lbearing(LyXFont const & font) const
{
return lyxfont::lbearing(ic, font);
}
-int InsetLatexAccent::Rbearing(LyXFont const & font) const
+int InsetLatexAccent::rbearing(LyXFont const & font) const
{
return lyxfont::rbearing(ic, font);
}
-bool InsetLatexAccent::DisplayISO8859_9(BufferView * bv, LyXFont const & font,
+bool InsetLatexAccent::displayISO8859_9(BufferView * bv, LyXFont const & font,
int baseline,
float & x) const
{
Painter & pain = bv->painter();
if (lyxrc.font_norm_type == LyXRC::ISO_8859_9)
- if (DisplayISO8859_9(bv, font0, baseline, x))
+ if (displayISO8859_9(bv, font0, baseline, x))
return;
/* draw it! */
int asc = ascent(bv, font);
int desc = descent(bv, font);
int wid = width(bv, font);
- float x2 = x + (Rbearing(font) - Lbearing(font)) / 2.0;
+ float x2 = x + (rbearing(font) - lbearing(font)) / 2.0;
float hg;
int y;
if (plusasc) {
}
-void InsetLatexAccent::Write(Buffer const *, ostream & os) const
+void InsetLatexAccent::write(Buffer const *, ostream & os) const
{
os << "\\i " << contents << "\n";
}
-void InsetLatexAccent::Read(Buffer const *, LyXLex & lex)
+void InsetLatexAccent::read(Buffer const *, LyXLex & lex)
{
lex.EatLine();
contents = lex.GetString();
}
-int InsetLatexAccent::Latex(Buffer const *, ostream & os,
+int InsetLatexAccent::latex(Buffer const *, ostream & os,
bool /*fragile*/, bool/*fs*/) const
{
os << contents;
}
-int InsetLatexAccent::Ascii(Buffer const *, ostream & os, int) const
+int InsetLatexAccent::ascii(Buffer const *, ostream & os, int) const
{
os << contents;
return 0;
}
-int InsetLatexAccent::Linuxdoc(Buffer const *, ostream & os) const
+int InsetLatexAccent::linuxdoc(Buffer const *, ostream & os) const
{
os << contents;
return 0;
}
-int InsetLatexAccent::DocBook(Buffer const *, ostream & os) const
+int InsetLatexAccent::docBook(Buffer const *, ostream & os) const
{
os << contents;
return 0;
}
-bool InsetLatexAccent::Deletable() const
+bool InsetLatexAccent::deletable() const
{
return true;
}
-bool InsetLatexAccent::DirectWrite() const
+bool InsetLatexAccent::directWrite() const
{
return true;
}
-Inset * InsetLatexAccent::Clone(Buffer const &) const
+Inset * InsetLatexAccent::clone(Buffer const &) const
{
return new InsetLatexAccent(contents);
}
-Inset::Code InsetLatexAccent::LyxCode() const
+Inset::Code InsetLatexAccent::lyxCode() const
{
return Inset::ACCENT_CODE;
}
///
void draw(BufferView *, LyXFont const &, int, float &, bool) const;
///
- int Lbearing(LyXFont const & font) const;
+ int lbearing(LyXFont const & font) const;
///
- int Rbearing(LyXFont const & font) const;
+ int rbearing(LyXFont const & font) const;
///
- bool DisplayISO8859_9(BufferView *, LyXFont const & font,
+ bool displayISO8859_9(BufferView *, LyXFont const & font,
int baseline, float & x) 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;
///
- bool Deletable() const;
+ bool deletable() const;
///
- bool DirectWrite() const;
+ bool directWrite() const;
///
- Inset * Clone(Buffer const &) const;
+ virtual Inset * clone(Buffer const &) const;
///
- Inset::Code LyxCode()const;
+ Inset::Code lyxCode()const;
///
- inline bool CanDisplay();
+ inline bool canDisplay();
/// all the accent types
enum ACCENT_TYPES{
///
};
-bool InsetLatexAccent::CanDisplay()
+bool InsetLatexAccent::canDisplay()
{
return candisp;
}
}
-void InsetList::Write(Buffer const * buf, ostream & os) const
+void InsetList::write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n";
- InsetCollapsable::Write(buf, os);
+ InsetCollapsable::write(buf, os);
}
-Inset * InsetList::Clone(Buffer const &) const
+Inset * InsetList::clone(Buffer const &) const
{
InsetList * result = new InsetList;
result->inset.init(&inset);
}
-string const InsetList::EditMessage() const
+string const InsetList::editMessage() const
{
return _("Opened List Inset");
}
-int InsetList::Latex(Buffer const * buf,
+int InsetList::latex(Buffer const * buf,
ostream & os, bool fragile, bool fp) const
{
os << "\\footnote{%\n";
- int i = inset.Latex(buf, os, fragile, fp);
+ int i = inset.latex(buf, os, fragile, fp);
os << "}%\n";
return i + 2;
}
-bool InsetList::InsertInsetAllowed(Inset * in) const
+bool InsetList::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;
///
InsetList();
///
- void Write(Buffer const * buf, std::ostream & os) const;
+ void write(Buffer const * buf, std::ostream & os) const;
///
- Inset * Clone(Buffer const &) const;
+ virtual 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
}
-Inset * InsetMarginal::Clone(Buffer const &) const
+Inset * InsetMarginal::clone(Buffer const &) const
{
InsetMarginal * result = new InsetMarginal;
result->inset.init(&inset);
}
-string const InsetMarginal::EditMessage() const
+string const InsetMarginal::editMessage() const
{
return _("Opened Marginal Note Inset");
}
-int InsetMarginal::Latex(Buffer const * buf,
+int InsetMarginal::latex(Buffer const * buf,
std::ostream & os, bool fragile, bool fp) const
{
os << "\\marginpar{%\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 InsetMarginal::InsertInsetAllowed(Inset * in) const
+bool InsetMarginal::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;
///
InsetMarginal();
///
- Inset * Clone(Buffer const &) const;
+ Inset * clone(Buffer const &) const;
///
- Inset::Code LyxCode() const { return Inset::MARGIN_CODE; }
+ Inset::Code lyxCode() const { return Inset::MARGIN_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
}
-void InsetMinipage::Write(Buffer const * buf, ostream & os) const
+void InsetMinipage::write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n"
<< "position " << pos_ << "\n"
<< "inner_position " << inner_pos_ << "\n"
<< "height \"" << height_ << "\"\n"
<< "width \"" << width_ << "\"\n";
- InsetCollapsable::Write(buf, os);
+ InsetCollapsable::write(buf, os);
}
-void InsetMinipage::Read(Buffer const * buf, LyXLex & lex)
+void InsetMinipage::read(Buffer const * buf, LyXLex & lex)
{
string token;
}
if (!token.empty())
lex.pushToken(token);
- InsetCollapsable::Read(buf, lex);
+ InsetCollapsable::read(buf, lex);
}
-Inset * InsetMinipage::Clone(Buffer const &) const
+Inset * InsetMinipage::clone(Buffer const &) const
{
InsetMinipage * result = new InsetMinipage;
result->inset.init(&inset);
}
-string const InsetMinipage::EditMessage() const
+string const InsetMinipage::editMessage() const
{
return _("Opened Minipage Inset");
}
-int InsetMinipage::Latex(Buffer const * buf,
+int InsetMinipage::latex(Buffer const * buf,
ostream & os, bool fragile, bool fp) const
{
string s_pos;
os << "\\begin{minipage}[" << s_pos << "]{"
<< LyXLength(width_).asLatexString() << "}%\n";
- int i = inset.Latex(buf, os, fragile, fp);
+ int i = inset.latex(buf, os, fragile, fp);
os << "\\end{minipage}%\n";
return i + 2;
}
-bool InsetMinipage::InsertInsetAllowed(Inset * in) const
+bool InsetMinipage::insertInsetAllowed(Inset * in) const
{
- if ((in->LyxCode() == Inset::FLOAT_CODE) ||
- (in->LyxCode() == Inset::MARGIN_CODE)) {
+ if ((in->lyxCode() == Inset::FLOAT_CODE) ||
+ (in->lyxCode() == Inset::MARGIN_CODE)) {
return false;
}
return true;
}
-bool InsetMinipage::ShowInsetDialog(BufferView * bv) const
+bool InsetMinipage::showInsetDialog(BufferView * bv) const
{
- if (!inset.ShowInsetDialog(bv))
+ if (!inset.showInsetDialog(bv))
bv->owner()->getDialogs()->showMinipage(const_cast<InsetMinipage *>(this));
return true;
}
-void InsetMinipage::InsetButtonRelease(BufferView * bv, int x, int y,
+void InsetMinipage::insetButtonRelease(BufferView * bv, int x, int y,
int button)
{
if (button == 3) {
- ShowInsetDialog(bv);
+ showInsetDialog(bv);
return;
}
- InsetCollapsable::InsetButtonRelease(bv, x, y, button);
+ InsetCollapsable::insetButtonRelease(bv, x, y, button);
}
///
~InsetMinipage();
///
- 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);
///
- Inset * Clone(Buffer const &) const;
+ virtual Inset * clone(Buffer const &) const;
///
int ascent(BufferView *, LyXFont const &) const;
///
int descent(BufferView *, LyXFont const &) const;
///
- Inset::Code LyxCode() const { return Inset::MINIPAGE_CODE; }
+ Inset::Code lyxCode() const { return Inset::MINIPAGE_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;
///
Position pos() const;
///
///
SigC::Signal0<void> hideDialog;
///
- void InsetButtonRelease(BufferView * bv, int x, int y, int button);
+ void insetButtonRelease(BufferView * bv, int x, int y, int button);
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
bool needFullRow() const { return false; }
///
- bool ShowInsetDialog(BufferView *) const;
+ bool showInsetDialog(BufferView *) const;
private:
///
Position pos_;
}
-void InsetParent::Edit(BufferView * bv, int, int, unsigned int)
+void InsetParent::edit(BufferView * bv, int, int, unsigned int)
{
bv->owner()->getLyXFunc()->
Dispatch(LFUN_CHILDOPEN, getContents());
// LaTeX must just ignore this command
-int InsetParent::Latex(Buffer const * buf, ostream & os,
+int InsetParent::latex(Buffer const * buf, ostream & os,
bool fragile, bool free_spc) const
{
os << "%%#{lyx}";
- InsetCommand::Latex(buf, os, fragile, free_spc);
+ InsetCommand::latex(buf, os, fragile, free_spc);
return 0;
}
///
InsetParent(InsetCommandParams const &, Buffer const &);
///
- Inset * Clone(Buffer const & buffer) const {
+ virtual Inset * clone(Buffer const & buffer) const {
return new InsetParent(params(), buffer);
}
///
string const getScreenLabel() const;
///
- EDITABLE Editable() const { return IS_EDITABLE; }
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- Inset::Code LyxCode() const { return Inset::PARENT_CODE; }
+ Inset::Code lyxCode() const { return Inset::PARENT_CODE; }
///
- void Edit(BufferView *, int, int, unsigned int);
+ void edit(BufferView *, int, int, unsigned int);
///
- int Latex(Buffer const *, std::ostream &,
+ int latex(Buffer const *, std::ostream &,
bool fragile, bool free_spc) const;
///
void setParent(string fn) { setContents(fn); }
InsetQuotes::InsetQuotes(string const & str)
{
- ParseString(str);
+ parseString(str);
}
}
-void InsetQuotes::ParseString(string const & s)
+void InsetQuotes::parseString(string const & s)
{
string str(s);
if (str.length() != 3) {
}
-string const InsetQuotes::DispString() const
+string const InsetQuotes::dispString() const
{
string disp;
disp += quote_char[quote_index[side][language]];
int InsetQuotes::width(BufferView *, LyXFont const & font) const
{
- string text = DispString();
+ string text = dispString();
int w = 0;
for (string::size_type i = 0; i < text.length(); ++i) {
}
-LyXFont const InsetQuotes::ConvertFont(LyXFont const & f) const
+LyXFont const InsetQuotes::convertFont(LyXFont const & f) const
{
LyXFont font(f);
#ifndef NO_LATEX
void InsetQuotes::draw(BufferView * bv, LyXFont const & font,
int baseline, float & x, bool) const
{
- string text = DispString();
+ string text = dispString();
bv->painter().text(int(x), baseline, text, font);
x += width(bv, font);
}
-void InsetQuotes::Write(Buffer const *, ostream & os) const
+void InsetQuotes::write(Buffer const *, ostream & os) const
{
string text;
text += language_char[language];
}
-void InsetQuotes::Read(Buffer const *, LyXLex & lex)
+void InsetQuotes::read(Buffer const *, LyXLex & lex)
{
lex.nextToken();
- ParseString(lex.GetString());
+ parseString(lex.GetString());
lex.next();
string tmp(lex.GetString());
if (tmp != "\\end_inset")
extern bool use_babel;
-int InsetQuotes::Latex(Buffer const * buf, ostream & os,
+int InsetQuotes::latex(Buffer const * buf, ostream & os,
bool /*fragile*/, bool) const
{
- string const doclang = buf->GetLanguage()->lang();
+ string const doclang = buf->getLanguage()->lang();
int quoteind = quote_index[side][language];
string qstr;
}
-int InsetQuotes::Ascii(Buffer const *, ostream & os, int) const
+int InsetQuotes::ascii(Buffer const *, ostream & os, int) const
{
os << "\"";
return 0;
}
-int InsetQuotes::Linuxdoc(Buffer const *, ostream & os) const
+int InsetQuotes::linuxdoc(Buffer const *, ostream & os) const
{
os << "\"";
return 0;
}
-int InsetQuotes::DocBook(Buffer const *, ostream & os) const
+int InsetQuotes::docBook(Buffer const *, ostream & os) const
{
if (times == InsetQuotes::DoubleQ) {
if (side == InsetQuotes::LeftQ)
}
-void InsetQuotes::Validate(LaTeXFeatures & features) const
+void InsetQuotes::validate(LaTeXFeatures & features) const
{
char type = quote_char[quote_index[side][language]];
}
-Inset * InsetQuotes::Clone(Buffer const &) const
+Inset * InsetQuotes::clone(Buffer const &) const
{
return new InsetQuotes(language, side, times);
}
-Inset::Code InsetQuotes::LyxCode() const
+Inset::Code InsetQuotes::lyxCode() const
{
return Inset::QUOTE_CODE;
}
///
void draw(BufferView *, LyXFont const &, int, float &, bool) const;
///
- LyXFont const ConvertFont(LyXFont const & font) const;
+ LyXFont const convertFont(LyXFont const & font) 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;
///
- void Validate(LaTeXFeatures &) const;
+ void validate(LaTeXFeatures &) const;
///
- Inset * Clone(Buffer const &) const;
+ virtual Inset * clone(Buffer const &) const;
///
- Inset::Code LyxCode() const;
+ Inset::Code lyxCode() const;
private:
///
quote_language language;
*/
InsetQuotes(quote_language l, quote_side s, quote_times t);
///
- void ParseString(string const &);
+ void parseString(string const &);
///
- string const DispString() const;
+ string const dispString() const;
};
#endif
: InsetCommand(p), isLatex(buf.isLatex())
{}
-void InsetRef::Edit(BufferView * bv, int, int, unsigned int button)
+void InsetRef::edit(BufferView * bv, int, int, unsigned int button)
{
// Eventually trigger dialog with button 3 not 1
if (button == 3 )
}
-int InsetRef::Latex(Buffer const *, ostream & os,
+int InsetRef::latex(Buffer const *, ostream & os,
bool /*fragile*/, bool /*fs*/) const
{
if (getOptions().empty())
}
-int InsetRef::Ascii(Buffer const *, ostream & os, int) const
+int InsetRef::ascii(Buffer const *, ostream & os, int) const
{
os << "[" << getContents() << "]";
return 0;
}
-int InsetRef::Linuxdoc(Buffer const *, ostream & os) const
+int InsetRef::linuxdoc(Buffer const *, ostream & os) const
{
os << "<ref id=\"" << getContents()
<< "\" name=\"" << getOptions() << "\" >";
}
-int InsetRef::DocBook(Buffer const *, ostream & os) const
+int InsetRef::docBook(Buffer const *, ostream & os) const
{
if (getOptions().empty()) {
os << "<xref linkend=\"" << getContents() << "\"/>";
}
-void InsetRef::Validate(LaTeXFeatures & features) const
+void InsetRef::validate(LaTeXFeatures & features) const
{
if (getCmdName() == "vref" || getCmdName() == "vpageref")
features.varioref = true;
///
InsetRef(InsetCommandParams const &, Buffer const &);
///
- Inset * Clone(Buffer const & buffer) const {
+ virtual Inset * clone(Buffer const & buffer) const {
return new InsetRef(params(), buffer);
}
///
string const getScreenLabel() const;
///
- EDITABLE Editable() const { return IS_EDITABLE; }
+ EDITABLE editable() const { return IS_EDITABLE; }
///
- Inset::Code LyxCode() const { return Inset::REF_CODE; }
+ Inset::Code lyxCode() const { return Inset::REF_CODE; }
///
- void Edit(BufferView *, int, int, unsigned int);
+ void edit(BufferView *, int, int, unsigned int);
///
bool display() const { return false; }
///
- 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;
///
- void Validate(LaTeXFeatures & features) const;
+ void validate(LaTeXFeatures & features) const;
private:
///
bool isLatex;
// In lyxf3 this will be just LaTeX
-void InsetSpecialChar::Write(Buffer const *, ostream & os) const
+void InsetSpecialChar::write(Buffer const *, ostream & os) const
{
string command;
switch (kind) {
// This function will not be necessary when lyx3
-void InsetSpecialChar::Read(Buffer const *, LyXLex & lex)
+void InsetSpecialChar::read(Buffer const *, LyXLex & lex)
{
lex.nextToken();
string const command = lex.GetString();
}
-int InsetSpecialChar::Latex(Buffer const *, ostream & os, bool /*fragile*/,
+int InsetSpecialChar::latex(Buffer const *, ostream & os, bool /*fragile*/,
bool free_space) const
{
switch (kind) {
return 0;
}
-int InsetSpecialChar::Ascii(Buffer const *, ostream & os, int) const
+
+int InsetSpecialChar::ascii(Buffer const *, ostream & os, int) const
{
switch (kind) {
case HYPHENATION: break;
}
-int InsetSpecialChar::Linuxdoc(Buffer const * buf, ostream & os) const
+int InsetSpecialChar::linuxdoc(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-int InsetSpecialChar::DocBook(Buffer const * buf, ostream & os) const
+int InsetSpecialChar::docBook(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-Inset * InsetSpecialChar::Clone(Buffer const &) const
+Inset * InsetSpecialChar::clone(Buffer const &) const
{
return new InsetSpecialChar(kind);
}
-void InsetSpecialChar::Validate(LaTeXFeatures & features) const
+void InsetSpecialChar::validate(LaTeXFeatures & features) const
{
if (kind == MENU_SEPARATOR) {
features.lyxarrow = true;
///
void draw(BufferView *, LyXFont const &, int, float &, bool) const;
///
- void Write(Buffer const *, std::ostream &) const;
+ void write(Buffer const *, std::ostream &) const;
/// Will not be used when lyxf3
- 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;
///
- Inset * Clone(Buffer const &) const;
+ virtual Inset * clone(Buffer const &) const;
///
- Inset::Code LyxCode() const
+ Inset::Code lyxCode() const
{
return Inset::SPECIALCHAR_CODE;
}
/// We don't need \begin_inset and \end_inset
- bool DirectWrite() const
+ bool directWrite() const
{
return true;
};
///
- void Validate(LaTeXFeatures &) const;
+ void validate(LaTeXFeatures &) const;
private:
/// And which kind is this?
Kind kind;
LyXTabular * paste_tabular = 0;
-struct tabular_features {
+struct TabularFeature {
LyXTabular::Feature action;
string feature;
};
//tabular_features * tabularFeatures = 0;
-tabular_features tabularFeatures[] =
+TabularFeature tabularFeature[] =
{
{ LyXTabular::APPEND_ROW, "append-row" },
{ LyXTabular::APPEND_COLUMN, "append-column" },
InsetTabular::~InsetTabular()
{
- //delete tabular;
hideDialog();
}
-Inset * InsetTabular::Clone(Buffer const & buf) const
+Inset * InsetTabular::clone(Buffer const & buf) const
{
InsetTabular * t = new InsetTabular(*this, buf);
- //delete t->tabular;
- //t->tabular = tabular->Clone(t);
- t->tabular.reset(tabular->Clone(t));
+ t->tabular.reset(tabular->clone(t));
return t;
}
-void InsetTabular::Write(Buffer const * buf, ostream & os) const
+void InsetTabular::write(Buffer const * buf, ostream & os) const
{
os << " Tabular" << endl;
tabular->Write(buf, os);
}
-void InsetTabular::Read(Buffer const * buf, LyXLex & lex)
+void InsetTabular::read(Buffer const * buf, LyXLex & lex)
{
bool const old_format = (lex.GetString() == "\\LyXTable");
if (first_visible_cell < 0)
first_visible_cell = cell;
if (hasSelection())
- DrawCellSelection(pain, nx, baseline, i, j, cell);
+ drawCellSelection(pain, nx, baseline, i, j, cell);
tabular->GetCellInset(cell)->draw(bv, font, baseline, cx,
cleared);
- DrawCellLines(pain, nx, baseline, i, cell);
+ drawCellLines(pain, nx, baseline, i, cell);
nx += tabular->GetWidthOfColumn(cell);
++cell;
}
}
-void InsetTabular::DrawCellLines(Painter & pain, int x, int baseline,
+void InsetTabular::drawCellLines(Painter & pain, int x, int baseline,
int row, int cell) const
{
int x2 = x + tabular->GetWidthOfColumn(cell);
}
-void InsetTabular::DrawCellSelection(Painter & pain, int x, int baseline,
+void InsetTabular::drawCellSelection(Painter & pain, int x, int baseline,
int row, int column, int cell) const
{
int cs = tabular->column_of_cell(sel_cell_start);
}
-string const InsetTabular::EditMessage() const
+string const InsetTabular::editMessage() const
{
return _("Opened Tabular Inset");
}
-void InsetTabular::Edit(BufferView * bv, int x, int y, unsigned int button)
+void InsetTabular::edit(BufferView * bv, int x, int y, unsigned int button)
{
- UpdatableInset::Edit(bv, x, y, button);
+ UpdatableInset::edit(bv, x, y, button);
if (!bv->lockInset(this)) {
lyxerr[Debug::INSETS] << "InsetTabular::Cannot lock inset" << endl;
setPos(bv, x, y);
sel_cell_start = sel_cell_end = actcell;
bv->text->finishUndo();
- if (InsetHit(bv, x, y) && (button != 3)) {
- ActivateCellInsetAbs(bv, x, y, button);
+ if (insetHit(bv, x, y) && (button != 3)) {
+ activateCellInsetAbs(bv, x, y, button);
}
// UpdateLocal(bv, NONE, false);
// bv->getOwner()->getPopups().updateFormTabular();
}
-void InsetTabular::InsetUnlock(BufferView * bv)
+void InsetTabular::insetUnlock(BufferView * bv)
{
if (the_locking_inset) {
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
the_locking_inset = 0;
}
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
no_selection = false;
oldcell = -1;
locked = false;
if (scroll(false)) {
scroll(bv, 0.0F);
}
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
}
}
-void InsetTabular::UpdateLocal(BufferView * bv, UpdateCodes what,
+void InsetTabular::updateLocal(BufferView * bv, UpdateCodes what,
bool mark_dirty) const
{
if (need_update < what) // only set this if it has greater update
}
-bool InsetTabular::LockInsetInInset(BufferView * bv, UpdatableInset * inset)
+bool InsetTabular::lockInsetInInset(BufferView * bv, UpdatableInset * inset)
{
lyxerr[Debug::INSETS] << "InsetTabular::LockInsetInInset("
<< inset << "): ";
inset_y = cursor.y();
} else if (the_locking_inset) {
lyxerr[Debug::INSETS] << "MAYBE" << endl;
- return the_locking_inset->LockInsetInInset(bv, inset);
+ return the_locking_inset->lockInsetInInset(bv, inset);
}
lyxerr[Debug::INSETS] << "NOT OK" << endl;
return false;
}
-bool InsetTabular::UnlockInsetInInset(BufferView * bv, UpdatableInset * inset,
+bool InsetTabular::unlockInsetInInset(BufferView * bv, UpdatableInset * inset,
bool lr)
{
if (!the_locking_inset)
return false;
if (the_locking_inset == inset) {
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
the_locking_inset = 0;
#ifdef WITH_WARNINGS
#warning fix scrolling when cellinset has requested a scroll (Jug)!!!
if (scroll(false))
scroll(bv, 0.0F);
#endif
- UpdateLocal(bv, CELL, false);
- ShowInsetCursor(bv, false);
+ updateLocal(bv, CELL, false);
+ showInsetCursor(bv, false);
return true;
}
- if (the_locking_inset->UnlockInsetInInset(bv, inset, lr)) {
- if (inset->LyxCode() == TABULAR_CODE &&
- !the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE)) {
+ if (the_locking_inset->unlockInsetInInset(bv, inset, lr)) {
+ if (inset->lyxCode() == TABULAR_CODE &&
+ !the_locking_inset->getFirstLockingInsetOfType(TABULAR_CODE)) {
bv->owner()->getDialogs()->updateTabular(this);
oldcell = actcell;
}
}
-bool InsetTabular::UpdateInsetInInset(BufferView * bv, Inset * inset)
+bool InsetTabular::updateInsetInInset(BufferView * bv, Inset * inset)
{
if (!the_locking_inset)
return false;
if (the_locking_inset != inset) {
- if (!the_locking_inset->UpdateInsetInInset(bv, inset))
+ if (!the_locking_inset->updateInsetInInset(bv, inset))
return false;
}
- UpdateLocal(bv, CELL, false);
+ updateLocal(bv, CELL, false);
return true;
}
-unsigned int InsetTabular::InsetInInsetY()
+unsigned int InsetTabular::insetInInsetY()
{
if (!the_locking_inset)
return 0;
- return inset_y + the_locking_inset->InsetInInsetY();
+ return inset_y + the_locking_inset->insetInInsetY();
}
-UpdatableInset * InsetTabular::GetLockingInset()
+UpdatableInset * InsetTabular::getLockingInset()
{
- return the_locking_inset ? the_locking_inset->GetLockingInset() : this;
+ return the_locking_inset ? the_locking_inset->getLockingInset() : this;
}
-UpdatableInset * InsetTabular::GetFirstLockingInsetOfType(Inset::Code c)
+UpdatableInset * InsetTabular::getFirstLockingInsetOfType(Inset::Code c)
{
- if (c == LyxCode())
+ if (c == lyxCode())
return this;
if (the_locking_inset)
- return the_locking_inset->GetFirstLockingInsetOfType(c);
+ return the_locking_inset->getFirstLockingInsetOfType(c);
return 0;
}
-bool InsetTabular::InsertInset(BufferView * bv, Inset * inset)
+bool InsetTabular::insertInset(BufferView * bv, Inset * inset)
{
if (the_locking_inset)
- return the_locking_inset->InsertInset(bv, inset);
+ return the_locking_inset->insertInset(bv, inset);
return false;
}
-void InsetTabular::InsetButtonPress(BufferView * bv, int x, int y, int button)
+void InsetTabular::insetButtonPress(BufferView * bv, int x, int y, int button)
{
if (hasSelection() && (button == 3))
return;
if (hasSelection()) {
clearSelection();
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
}
no_selection = false;
int const ocell = actcell;
int const orow = actrow;
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
setPos(bv, x, y);
if (actrow != orow)
- UpdateLocal(bv, NONE, false);
+ updateLocal(bv, NONE, false);
sel_cell_start = sel_cell_end = actcell;
if (button == 3) {
if ((ocell != actcell) && the_locking_inset) {
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
the_locking_inset = 0;
}
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
return;
}
- bool const inset_hit = InsetHit(bv, x, y);
+ bool const inset_hit = insetHit(bv, x, y);
if ((ocell == actcell) && the_locking_inset && inset_hit) {
resetPos(bv);
- the_locking_inset->InsetButtonPress(bv,
+ the_locking_inset->insetButtonPress(bv,
x - inset_x, y - inset_y,
button);
return;
} else if (the_locking_inset) {
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
}
the_locking_inset = 0;
if (button == 2) {
- LocalDispatch(bv, LFUN_PASTESELECTION, "paragraph");
+ localDispatch(bv, LFUN_PASTESELECTION, "paragraph");
return;
}
if (inset_hit && bv->theLockingInset()) {
- if (ActivateCellInsetAbs(bv, x, y, button))
- the_locking_inset->InsetButtonPress(bv,
+ if (activateCellInsetAbs(bv, x, y, button))
+ the_locking_inset->insetButtonPress(bv,
x - inset_x,
y - inset_y,
button);
return;
}
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
}
-void InsetTabular::InsetButtonRelease(BufferView * bv,
+void InsetTabular::insetButtonRelease(BufferView * bv,
int x, int y, int button)
{
if (button == 3) {
if (the_locking_inset) {
UpdatableInset * i;
- if ((i=the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE))) {
- i->InsetButtonRelease(bv, x, y, button);
+ if ((i = the_locking_inset->getFirstLockingInsetOfType(TABULAR_CODE))) {
+ i->insetButtonRelease(bv, x, y, button);
return;
}
}
return;
}
if (the_locking_inset) {
- the_locking_inset->InsetButtonRelease(bv,
+ the_locking_inset->insetButtonRelease(bv,
x - inset_x, y - inset_y,
button);
return;
}
-void InsetTabular::InsetMotionNotify(BufferView * bv, int x, int y, int button)
+void InsetTabular::insetMotionNotify(BufferView * bv, int x, int y, int button)
{
if (the_locking_inset) {
- the_locking_inset->InsetMotionNotify(bv,
+ the_locking_inset->insetMotionNotify(bv,
x - inset_x,
y - inset_y,
button);
return;
}
if (!no_selection) {
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
int const old_cell = actcell;
setPos(bv, x, y);
sel_cell_end = actcell;
if (sel_cell_end != old_cell)
- UpdateLocal(bv, SELECTION, false);
- ShowInsetCursor(bv);
+ updateLocal(bv, SELECTION, false);
+ showInsetCursor(bv);
}
no_selection = false;
}
-void InsetTabular::InsetKeyPress(XKeyEvent * xke)
+void InsetTabular::insetKeyPress(XKeyEvent * xke)
{
if (the_locking_inset) {
- the_locking_inset->InsetKeyPress(xke);
+ the_locking_inset->insetKeyPress(xke);
return;
}
}
UpdatableInset::RESULT
-InsetTabular::LocalDispatch(BufferView * bv,
+InsetTabular::localDispatch(BufferView * bv,
kb_action action,
string const & arg)
{
old_locking_inset = the_locking_inset;
no_selection = false;
UpdatableInset::RESULT result =
- UpdatableInset::LocalDispatch(bv, action, arg);
+ UpdatableInset::localDispatch(bv, action, arg);
if (result == DISPATCHED || result == DISPATCHED_NOUPDATE) {
resetPos(bv);
return result;
case LFUN_SHIFT_TAB:
case LFUN_TAB:
{
- if (GetFirstLockingInsetOfType(Inset::TABULAR_CODE) != this)
+ if (getFirstLockingInsetOfType(Inset::TABULAR_CODE) != this)
break;
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
if (the_locking_inset) {
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
the_locking_inset = 0;
}
if (action == LFUN_TAB)
movePrevCell(bv, old_locking_inset != 0);
sel_cell_start = sel_cell_end = actcell;
if (hs)
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
if (!the_locking_inset) {
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
return DISPATCHED_NOUPDATE;
}
return result;
}
if (the_locking_inset) {
- result=the_locking_inset->LocalDispatch(bv, action, arg);
+ result = the_locking_inset->localDispatch(bv, action, arg);
if (result == DISPATCHED_NOUPDATE) {
int sc = scroll();
resetPos(bv);
if (sc != scroll()) { // inset has been scrolled
- the_locking_inset->ToggleInsetCursor(bv);
- UpdateLocal(bv, FULL, false);
- the_locking_inset->ToggleInsetCursor(bv);
+ the_locking_inset->toggleInsetCursor(bv);
+ updateLocal(bv, FULL, false);
+ the_locking_inset->toggleInsetCursor(bv);
}
return result;
} else if (result == DISPATCHED) {
- the_locking_inset->ToggleInsetCursor(bv);
- UpdateLocal(bv, CELL, false);
- the_locking_inset->ToggleInsetCursor(bv);
+ the_locking_inset->toggleInsetCursor(bv);
+ updateLocal(bv, CELL, false);
+ the_locking_inset->toggleInsetCursor(bv);
return result;
} else if (result == FINISHED) {
}
}
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
result=DISPATCHED;
switch (action) {
// --- Cursor Movements ----------------------------------
break;
moveRight(bv, false);
sel_cell_end = actcell;
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_RIGHT:
result = moveRight(bv);
sel_cell_start = sel_cell_end = actcell;
if (hs)
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_LEFTSEL:
if (tabular->IsFirstCellInRow(actcell))
break;
moveLeft(bv, false);
sel_cell_end = actcell;
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_LEFT:
result = moveLeft(bv);
sel_cell_start = sel_cell_end = actcell;
if (hs)
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_DOWNSEL:
{
sel_cell_end = tabular->GetCellBelow(sel_cell_end);
else
sel_cell_end = tabular->GetLastCellBelow(sel_cell_end);
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
}
break;
case LFUN_DOWN:
result = moveDown(bv, old_locking_inset != 0);
sel_cell_start = sel_cell_end = actcell;
if (hs)
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_UPSEL:
{
sel_cell_end = tabular->GetCellAbove(sel_cell_end);
else
sel_cell_end = tabular->GetLastCellAbove(sel_cell_end);
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
}
break;
case LFUN_UP:
result = moveUp(bv, old_locking_inset != 0);
sel_cell_start = sel_cell_end = actcell;
if (hs)
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_NEXT: {
int column = actcol;
if (the_locking_inset) {
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
the_locking_inset = 0;
}
if (bv->text->first + bv->painter().paperHeight() <
(top_baseline + tabular->GetHeightOfTabular()))
{
bv->scrollCB(bv->text->first + bv->painter().paperHeight());
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
actcell = tabular->GetCellBelow(first_visible_cell) + column;
} else {
actcell = tabular->GetFirstCellInRow(tabular->rows() - 1) + column;
}
resetPos(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
}
case LFUN_PRIOR: {
int column = actcol;
if (the_locking_inset) {
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
the_locking_inset = 0;
}
if (top_baseline < 0) {
bv->scrollCB(bv->text->first - bv->painter().paperHeight());
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
if (top_baseline > 0)
actcell = column;
else
actcell = column;
}
resetPos(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
}
case LFUN_BACKSPACE:
}
break;
case LFUN_TABULAR_FEATURE:
- if (!TabularFeatures(bv, arg))
+ if (!tabularFeatures(bv, arg))
result = UNDISPATCHED;
break;
case LFUN_CUT:
bv->text->cursor.par()->previous(),
bv->text->cursor.par()->next());
cutSelection();
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LFUN_COPY:
if (!hasSelection())
break;
switch(clip[p]) {
case '\t':
- paste_tabular->GetCellInset(cell)->SetText(clip.substr(op, p-op));
+ paste_tabular->GetCellInset(cell)->setText(clip.substr(op, p-op));
++cols;
++cell;
break;
case '\n':
- paste_tabular->GetCellInset(cell)->SetText(clip.substr(op, p-op));
+ paste_tabular->GetCellInset(cell)->setText(clip.substr(op, p-op));
while(cols++ < maxCols)
++cell;
cols = 0;
}
// check for the last cell if there is no trailing '\n'
if ((cell < cells) && (op < len))
- paste_tabular->GetCellInset(cell)->SetText(clip.substr(op, len-op));
+ paste_tabular->GetCellInset(cell)->setText(clip.substr(op, len-op));
} else {
// so that the clipboard is used and it goes on
// to default
bv->text->cursor.par()->previous(),
bv->text->cursor.par()->next());
pasteSelection(bv);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
}
// ATTENTION: the function above has to be PASTE and PASTESELECTION!!!
if (the_locking_inset)
break;
nodraw(true);
- if (ActivateCellInset(bv)) {
+ if (activateCellInset(bv)) {
// reset need_update setted in above function!
need_update = NONE;
- result = the_locking_inset->LocalDispatch(bv, action, arg);
+ result = the_locking_inset->localDispatch(bv, action, arg);
if ((result == UNDISPATCHED) || (result == FINISHED)) {
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
nodraw(false);
the_locking_inset = 0;
// we need to update if this was requested before
- UpdateLocal(bv, NONE, false);
+ updateLocal(bv, NONE, false);
return UNDISPATCHED;
}
nodraw(false);
// the_locking_inset->ToggleInsetCursor(bv);
- UpdateLocal(bv, CELL, false);
+ updateLocal(bv, CELL, false);
// the_locking_inset->ToggleInsetCursor(bv);
return result;
}
}
if (result!=FINISHED) {
if (!the_locking_inset) {
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
}
} else
bv->unlockInset(this);
}
-int InsetTabular::Latex(Buffer const * buf, ostream & os,
+int InsetTabular::latex(Buffer const * buf, ostream & os,
bool fragile, bool fp) const
{
return tabular->Latex(buf, os, fragile, fp);
}
-int InsetTabular::Ascii(Buffer const * buf, ostream & os, int) const
+int InsetTabular::ascii(Buffer const * buf, ostream & os, int) const
{
// This should be changed to a real ascii export
return tabular->Ascii(buf, os);
}
-int InsetTabular::Linuxdoc(Buffer const *, ostream &) const
+int InsetTabular::linuxdoc(Buffer const *, ostream &) const
{
return 0;
}
-int InsetTabular::DocBook(Buffer const * buf, ostream & os) const
+int InsetTabular::docBook(Buffer const * buf, ostream & os) const
{
return tabular->DocBook(buf,os);
}
-void InsetTabular::Validate(LaTeXFeatures & features) const
+void InsetTabular::validate(LaTeXFeatures & features) const
{
tabular->Validate(features);
}
}
-void InsetTabular::GetCursorPos(BufferView *,
+void InsetTabular::getCursorPos(BufferView *,
int & x, int & y) const
{
x = cursor.x() - top_x;
}
-void InsetTabular::ToggleInsetCursor(BufferView * bv)
+void InsetTabular::toggleInsetCursor(BufferView * bv)
{
if (the_locking_inset) {
- the_locking_inset->ToggleInsetCursor(bv);
+ the_locking_inset->toggleInsetCursor(bv);
return;
}
}
-void InsetTabular::ShowInsetCursor(BufferView * bv, bool show)
+void InsetTabular::showInsetCursor(BufferView * bv, bool show)
{
if (!isCursorVisible()) {
LyXFont font; // = GetFont(par, cursor.pos);
}
-void InsetTabular::HideInsetCursor(BufferView * bv)
+void InsetTabular::hideInsetCursor(BufferView * bv)
{
if (isCursorVisible()) {
bv->hideLockedInsetCursor();
(tabular->GetWidthOfTabular() < bv->workWidth()-20))
{
scroll(bv, 0.0F);
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
} else if (the_locking_inset &&
(tabular->GetWidthOfColumn(actcell) > bv->workWidth()-20))
{
int xx = cursor.x() - offset + bv->text->getRealCursorX(bv);
if (xx > (bv->workWidth()-20)) {
scroll(bv, -(xx - bv->workWidth() + 60));
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
} else if (xx < 20) {
if (xx < 0)
xx = -xx + 60;
else
xx = 60;
scroll(bv, xx);
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
}
} else if ((cursor.x() - offset) > 20 &&
(cursor.x() - offset + tabular->GetWidthOfColumn(actcell))
> (bv->workWidth() - 20)) {
scroll(bv, -tabular->GetWidthOfColumn(actcell) - 20);
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
} else if ((cursor.x() - offset) < 20) {
scroll(bv, 20 - cursor.x() + offset);
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
} else if (scroll(false) && top_x > 20 &&
(top_x + tabular->GetWidthOfTabular()) > (bv->workWidth() - 20)) {
scroll(bv, old_x - cursor.x());
- UpdateLocal(bv, FULL, false);
+ updateLocal(bv, FULL, false);
}
if ((!the_locking_inset ||
- !the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE)) &&
+ !the_locking_inset->getFirstLockingInsetOfType(TABULAR_CODE)) &&
actcell != oldcell) {
InsetTabular * inset = const_cast<InsetTabular *>(this);
bv->owner()->getDialogs()->updateTabular(inset);
UpdatableInset::RESULT InsetTabular::moveRight(BufferView * bv, bool lock)
{
if (lock && !old_locking_inset) {
- if (ActivateCellInset(bv))
+ if (activateCellInset(bv))
return DISPATCHED;
} else {
bool moved = isRightToLeft(bv)
? movePrevCell(bv) : moveNextCell(bv);
if (!moved)
return FINISHED;
- if (lock && ActivateCellInset(bv))
+ if (lock && activateCellInset(bv))
return DISPATCHED;
}
resetPos(bv);
if (!moved)
return FINISHED;
if (lock) { // behind the inset
- if (ActivateCellInset(bv, 0, 0, 0, true))
+ if (activateCellInset(bv, 0, 0, 0, true))
return DISPATCHED;
}
resetPos(bv);
int x = 0;
int y = 0;
if (old_locking_inset) {
- old_locking_inset->GetCursorPos(bv, x, y);
+ old_locking_inset->getCursorPos(bv, x, y);
x -= cursor.x() + tabular->GetBeginningOfTextInCell(actcell);
}
- if (ActivateCellInset(bv, x, 0))
+ if (activateCellInset(bv, x, 0))
return DISPATCHED;
}
return DISPATCHED_NOUPDATE;
int x = 0;
int y = 0;
if (old_locking_inset) {
- old_locking_inset->GetCursorPos(bv, x, y);
+ old_locking_inset->getCursorPos(bv, x, y);
x -= cursor.x() + tabular->GetBeginningOfTextInCell(actcell);
}
- if (ActivateCellInset(bv, x, 0))
+ if (activateCellInset(bv, x, 0))
return DISPATCHED;
}
return DISPATCHED_NOUPDATE;
if (lock) {
bool rtl = tabular->GetCellInset(actcell)->par->
isRightToLeftPar(bv->buffer()->params);
- ActivateCellInset(bv, 0, 0, 0, !rtl);
+ activateCellInset(bv, 0, 0, 0, !rtl);
}
resetPos(bv);
return true;
if (lock) {
bool rtl = tabular->GetCellInset(actcell)->par->
isRightToLeftPar(bv->buffer()->params);
- ActivateCellInset(bv, 0, 0, 0, !rtl);
+ activateCellInset(bv, 0, 0, 0, !rtl);
}
resetPos(bv);
return true;
bool InsetTabular::Delete()
{
+#warning Is this func correctly named? Or should it be "deletable"?
return true;
}
-void InsetTabular::SetFont(BufferView * bv, LyXFont const & font, bool tall,
+void InsetTabular::setFont(BufferView * bv, LyXFont const & font, bool tall,
bool selectall)
{
if (selectall) {
int sel_col_start;
int sel_col_end;
getSelection(sel_row_start, sel_row_end, sel_col_start, sel_col_end);
- for(int i=sel_row_start; i <= sel_row_end; ++i) {
- for(int j=sel_col_start; j <= sel_col_end; ++j) {
- tabular->GetCellInset(i, j)->SetFont(bv, font, tall, true);
+ for(int i = sel_row_start; i <= sel_row_end; ++i) {
+ for(int j = sel_col_start; j <= sel_col_end; ++j) {
+ tabular->GetCellInset(i, j)->setFont(bv, font, tall, true);
}
}
if (!frozen)
bv->text->unFreezeUndo();
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
}
if (the_locking_inset)
- the_locking_inset->SetFont(bv, font, tall);
+ the_locking_inset->setFont(bv, font, tall);
}
-bool InsetTabular::TabularFeatures(BufferView * bv, string const & what)
+bool InsetTabular::tabularFeatures(BufferView * bv, string const & what)
{
LyXTabular::Feature action = LyXTabular::LAST_ACTION;
int i = 0;
- for (; tabularFeatures[i].action != LyXTabular::LAST_ACTION; ++i) {
- string const tmp = tabularFeatures[i].feature;
+ for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
+ string const tmp = tabularFeature[i].feature;
if (tmp == what.substr(0, tmp.length())) {
//if (!compare(tabularFeatures[i].feature.c_str(), what.c_str(),
//tabularFeatures[i].feature.length())) {
- action = tabularFeatures[i].action;
+ action = tabularFeature[i].action;
break;
}
}
return false;
string const val =
- frontStrip(what.substr(tabularFeatures[i].feature.length()));
- TabularFeatures(bv, action, val);
+ frontStrip(what.substr(tabularFeature[i].feature.length()));
+ tabularFeatures(bv, action, val);
return true;
}
-void InsetTabular::TabularFeatures(BufferView * bv,
+void InsetTabular::tabularFeatures(BufferView * bv,
LyXTabular::Feature feature,
string const & value)
{
- //int i;
- //int j;
int sel_col_start;
int sel_col_end;
int sel_row_start;
bool setLines = false;
LyXAlignment setAlign = LYX_ALIGN_LEFT;
LyXTabular::VAlignment setVAlign = LyXTabular::LYX_VALIGN_TOP;
- //int lineSet;
- //bool what;
switch (feature) {
case LyXTabular::M_ALIGN_LEFT:
tabular->GetCellInset(tabular->GetCellNumber(i, column))->
resizeLyXText(bv);
}
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
}
}
break;
tabular->GetCellInset(tabular->GetCellNumber(i, column))->
resizeLyXText(bv);
}
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
}
}
break;
break;
case LyXTabular::APPEND_ROW:
// append the row into the tabular
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
tabular->AppendRow(actcell);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::APPEND_COLUMN:
// append the column into the tabular
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
tabular->AppendColumn(actcell);
actcell = tabular->GetCellNumber(row, column);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::DELETE_ROW:
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
tabular->DeleteRow(tabular->row_of_cell(actcell));
if ((row+1) > tabular->rows())
--row;
actcell = tabular->GetCellNumber(row, column);
clearSelection();
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::DELETE_COLUMN:
- UnlockInsetInInset(bv, the_locking_inset);
+ unlockInsetInInset(bv, the_locking_inset);
tabular->DeleteColumn(tabular->column_of_cell(actcell));
if ((column+1) > tabular->columns())
--column;
actcell = tabular->GetCellNumber(row, column);
clearSelection();
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::M_TOGGLE_LINE_TOP:
flag = false;
tabular->SetTopLine(
tabular->GetCellNumber(i, j),
lineSet, flag);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
}
tabular->GetCellNumber(i, j),
lineSet,
flag);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
}
tabular->GetCellNumber(i,j),
lineSet,
flag);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
}
tabular->GetCellNumber(i,j),
lineSet,
flag);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
}
tabular->GetCellNumber(i, j),
setAlign,
flag);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::M_VALIGN_TOP:
case LyXTabular::M_VALIGN_BOTTOM:
tabular->SetVAlignment(
tabular->GetCellNumber(i, j),
setVAlign, flag);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::MULTICOLUMN:
{
// check wether we are completly in a multicol
if (tabular->IsMultiColumn(actcell)) {
tabular->UnsetMultiColumn(actcell);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
} else {
tabular->SetMultiColumn(actcell, 1);
- UpdateLocal(bv, CELL, true);
+ updateLocal(bv, CELL, true);
}
return;
}
tabular->SetMultiColumn(s_start, s_end - s_start + 1);
actcell = s_start;
sel_cell_end = sel_cell_start;
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
}
case LyXTabular::SET_ALL_LINES:
for (int j = sel_col_start; j <= sel_col_end; ++j)
tabular->SetAllLines(
tabular->GetCellNumber(i,j), setLines);
- UpdateLocal(bv, INIT, true);
+ updateLocal(bv, INIT, true);
break;
case LyXTabular::SET_LONGTABULAR:
tabular->SetLongTabular(true);
- UpdateLocal(bv, INIT, true); // because this toggles displayed
+ updateLocal(bv, INIT, true); // because this toggles displayed
break;
case LyXTabular::UNSET_LONGTABULAR:
tabular->SetLongTabular(false);
- UpdateLocal(bv, INIT, true); // because this toggles displayed
+ updateLocal(bv, INIT, true); // because this toggles displayed
break;
case LyXTabular::SET_ROTATE_TABULAR:
tabular->SetRotateTabular(true);
}
-bool InsetTabular::ActivateCellInset(BufferView * bv, int x, int y, int button,
+bool InsetTabular::activateCellInset(BufferView * bv, int x, int y, int button,
bool behind)
{
UpdatableInset * inset =
}
//inset_x = cursor.x() - top_x + tabular->GetBeginningOfTextInCell(actcell);
//inset_y = cursor.y();
- inset->Edit(bv, x, y, button);
+ inset->edit(bv, x, y, button);
if (!the_locking_inset)
return false;
- UpdateLocal(bv, CELL, false);
+ updateLocal(bv, CELL, false);
return (the_locking_inset != 0);
}
-bool InsetTabular::ActivateCellInsetAbs(BufferView * bv, int x, int y,
+bool InsetTabular::activateCellInsetAbs(BufferView * bv, int x, int y,
int button)
{
inset_x = cursor.x()
- top_x + tabular->GetBeginningOfTextInCell(actcell);
inset_y = cursor.y();
- return ActivateCellInset(bv, x - inset_x, y - inset_y, button);
+ return activateCellInset(bv, x - inset_x, y - inset_y, button);
}
-bool InsetTabular::InsetHit(BufferView *, int x, int) const
+bool InsetTabular::insetHit(BufferView *, int x, int) const
{
return (x + top_x)
> (cursor.x() + tabular->GetBeginningOfTextInCell(actcell));
// This returns paperWidth() if the cell-width is unlimited or the width
// in pixels if we have a pwidth for this cell.
-int InsetTabular::GetMaxWidthOfCell(BufferView * bv, int cell) const
+int InsetTabular::getMaxWidthOfCell(BufferView * bv, int cell) const
{
string const s = tabular->GetPWidth(cell);
return -1;
}
- int w = GetMaxWidthOfCell(bv, cell);
+ int w = getMaxWidthOfCell(bv, cell);
if (w > 0) {
// because the inset then subtracts it's top_x and owner->x()
w += (inset->x() - top_x);
}
-bool InsetTabular::ShowInsetDialog(BufferView * bv) const
+bool InsetTabular::showInsetDialog(BufferView * bv) const
{
- if (!the_locking_inset || !the_locking_inset->ShowInsetDialog(bv))
+ if (!the_locking_inset || !the_locking_inset->showInsetDialog(bv))
bv->owner()->getDialogs()
->showTabular(const_cast<InsetTabular *>(this));
return true;
}
-void InsetTabular::OpenLayoutDialog(BufferView * bv) const
+void InsetTabular::openLayoutDialog(BufferView * bv) const
{
if (the_locking_inset) {
InsetTabular * i = static_cast<InsetTabular *>
- (the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE));
+ (the_locking_inset->getFirstLockingInsetOfType(TABULAR_CODE));
if (i) {
- i->OpenLayoutDialog(bv);
+ i->openLayoutDialog(bv);
return;
}
}
func_status::value_type status = func_status::OK;
int i = 0;
- for (; tabularFeatures[i].action != LyXTabular::LAST_ACTION; ++i) {
- string const tmp = tabularFeatures[i].feature;
+ for (; tabularFeature[i].action != LyXTabular::LAST_ACTION; ++i) {
+ string const tmp = tabularFeature[i].feature;
if (tmp == what.substr(0, tmp.length())) {
//if (!compare(tabularFeatures[i].feature.c_str(), what.c_str(),
// tabularFeatures[i].feature.length())) {
- action = tabularFeatures[i].action;
+ action = tabularFeature[i].action;
break;
}
}
if (action == LyXTabular::LAST_ACTION)
return func_status::Unknown;
- string const argument = frontStrip(what.substr(tabularFeatures[i].feature.length()));
+ string const argument = frontStrip(what.substr(tabularFeature[i].feature.length()));
int sel_row_start;
int sel_row_end;
///
~InsetTabular();
///
- Inset * Clone(Buffer const &) const;
+ Inset * clone(Buffer const &) const;
///
- 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;
///
///
void update(BufferView *, LyXFont const &, bool = false);
///
- string const EditMessage() const;
+ string const editMessage() const;
///
- void Edit(BufferView *, int x, int y, unsigned int);
+ void edit(BufferView *, int x, int y, unsigned int);
///
bool doClearArea() const;
///
- void InsetUnlock(BufferView *);
+ void insetUnlock(BufferView *);
///
- void UpdateLocal(BufferView *, UpdateCodes, bool mark_dirty) const;
+ void updateLocal(BufferView *, UpdateCodes, bool mark_dirty) const;
///
- 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();
///
- UpdatableInset * GetLockingInset();
+ UpdatableInset * getLockingInset();
///
- UpdatableInset * GetFirstLockingInsetOfType(Inset::Code);
+ UpdatableInset * getFirstLockingInsetOfType(Inset::Code);
///
- bool InsertInset(BufferView *, Inset *);
+ bool insertInset(BufferView *, Inset *);
///
- bool IsTextInset() const { return true; }
+ bool isTextInset() const { return true; }
///
bool display() const { return tabular->IsLongTabular(); }
///
- 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 &, bool, bool) const;
+ int latex(Buffer const *, std::ostream &, bool, bool) 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 & features) const;
+ void validate(LaTeXFeatures & features) const;
///
- Inset::Code LyxCode() const { return Inset::TABULAR_CODE; }
+ Inset::Code lyxCode() const { return Inset::TABULAR_CODE; }
///
- void GetCursorPos(BufferView *, int & x, int & y) const;
+ void getCursorPos(BufferView *, int & x, int & y) const;
///
- void ToggleInsetCursor(BufferView *);
+ void toggleInsetCursor(BufferView *);
///
- bool TabularFeatures(BufferView * bv, string const & what);
+ bool tabularFeatures(BufferView * bv, string const & what);
///
- void TabularFeatures(BufferView * bv, LyXTabular::Feature feature,
+ void tabularFeatures(BufferView * bv, LyXTabular::Feature feature,
string const & val = string());
///
- int GetActCell() const { return actcell; }
+ int getActCell() const { return actcell; }
///
- void SetFont(BufferView *, LyXFont const &, bool toggleall = false,
+ void setFont(BufferView *, LyXFont const &, bool toggleall = false,
bool selectall = false);
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
- Buffer * BufferOwner() const { return const_cast<Buffer *>(buffer); }
+ Buffer * bufferOwner() const { return const_cast<Buffer *>(buffer); }
///
LyXText * getLyXText(BufferView const *,
bool const recursive = false) const;
///
void resizeLyXText(BufferView *, bool force = false) const;
///
- void OpenLayoutDialog(BufferView *) const;
+ void openLayoutDialog(BufferView *) const;
///
- bool ShowInsetDialog(BufferView *) const;
+ bool showInsetDialog(BufferView *) const;
///
func_status::value_type getStatus(string const & argument) const;
///
bool nodraw() const;
///
int scroll(bool recursive=true) const;
+ ///
void scroll(BufferView *bv, float sx) const {
UpdatableInset::scroll(bv, sx);
}
+ ///
void scroll(BufferView *bv, int offset) const {
UpdatableInset::scroll(bv, offset);
}
//
// Public structures and variables
///
- //LyXTabular * tabular;
boost::scoped_ptr<LyXTabular> tabular;
///
SigC::Signal0<void> hideDialog;
bool calculate_dimensions_of_cells(BufferView *, LyXFont const &,
bool = false) const;
///
- void DrawCellLines(Painter &, int x, int baseline,
+ void drawCellLines(Painter &, int x, int baseline,
int row, int cell) const;
///
- void DrawCellSelection(Painter &, int x, int baseline,
+ void drawCellSelection(Painter &, int x, int baseline,
int row, int column, int cell) const;
///
- void ShowInsetCursor(BufferView *, bool show=true);
+ void showInsetCursor(BufferView *, bool show=true);
///
- void HideInsetCursor(BufferView *);
+ void hideInsetCursor(BufferView *);
///
void setPos(BufferView *, int x, int y) const;
///
bool moveNextCell(BufferView *, bool lock = false);
///
bool movePrevCell(BufferView *, bool lock = false);
- ///
+ /// Delete what?
bool Delete();
///
int getCellXPos(int cell) const;
///
void resetPos(BufferView *) const;
///
- void RemoveTabularRow();
+ void removeTabularRow();
///
bool hasSelection() const {
return sel_cell_start != sel_cell_end;
sel_cell_start = sel_cell_end = 0;
}
///
- bool ActivateCellInset(BufferView *, int x = 0, int y = 0,
+ bool activateCellInset(BufferView *, int x = 0, int y = 0,
int button = 0,
bool behind = false);
///
- bool ActivateCellInsetAbs(BufferView *, int x = 0, int y = 0,
+ bool activateCellInsetAbs(BufferView *, int x = 0, int y = 0,
int button = 0);
///
- bool InsetHit(BufferView * bv, int x, int y) const;
+ bool insetHit(BufferView * bv, int x, int y) const;
///
- int GetMaxWidthOfCell(BufferView * bv, int cell) const;
+ int getMaxWidthOfCell(BufferView * bv, int cell) const;
///
bool hasPasteBuffer() const;
///
drawFrame_ = NEVER;
xpos = 0.0;
if (ins) {
- SetParagraphData(ins->par);
+ setParagraphData(ins->par);
autoBreakRows = ins->autoBreakRows;
drawFrame_ = ins->drawFrame_;
}
}
-Inset * InsetText::Clone(Buffer const &) const
+Inset * InsetText::clone(Buffer const &) const
{
InsetText * t = new InsetText(*this);
return t;
}
-void InsetText::Write(Buffer const * buf, ostream & os) const
+void InsetText::write(Buffer const * buf, ostream & os) const
{
os << "Text\n";
- WriteParagraphData(buf, os);
+ writeParagraphData(buf, os);
}
-void InsetText::WriteParagraphData(Buffer const * buf, ostream & os) const
+void InsetText::writeParagraphData(Buffer const * buf, ostream & os) const
{
par->writeFile(buf, os, buf->params, 0);
}
-void InsetText::Read(Buffer const * buf, LyXLex & lex)
+void InsetText::read(Buffer const * buf, LyXLex & lex)
{
string token;
int pos = 0;
}
-void InsetText::SetUpdateStatus(BufferView * bv, int what) const
+void InsetText::setUpdateStatus(BufferView * bv, int what) const
{
need_update |= what;
if (TEXT(bv)->status == LyXText::NEED_MORE_REFRESH)
}
-void InsetText::UpdateLocal(BufferView * bv, int what, bool mark_dirty)
+void InsetText::updateLocal(BufferView * bv, int what, bool mark_dirty)
{
TEXT(bv)->fullRebreak(bv);
- SetUpdateStatus(bv, what);
+ setUpdateStatus(bv, what);
if ((need_update != CURSOR) || (TEXT(bv)->status != LyXText::UNCHANGED) ||
TEXT(bv)->selection.set())
bv->updateInset(this, mark_dirty);
}
-string const InsetText::EditMessage() const
+string const InsetText::editMessage() const
{
return _("Opened Text Inset");
}
-void InsetText::Edit(BufferView * bv, int x, int y, unsigned int button)
+void InsetText::edit(BufferView * bv, int x, int y, unsigned int button)
{
// par->SetInsetOwner(this);
- UpdatableInset::Edit(bv, x, y, button);
+ UpdatableInset::edit(bv, x, y, button);
if (!bv->lockInset(this)) {
lyxerr[Debug::INSETS] << "Cannot lock inset" << endl;
y + insetAscent);
TEXT(bv)->selection.cursor = TEXT(bv)->cursor;
bv->text->finishUndo();
- ShowInsetCursor(bv);
- UpdateLocal(bv, CURSOR, false);
+ showInsetCursor(bv);
+ updateLocal(bv, CURSOR, false);
// If the inset is empty set the language of the current font to the
// language to the surronding text (if different).
{
LyXFont font(LyXFont::ALL_IGNORE);
font.setLanguage(bv->getParentLanguage(this));
- SetFont(bv, font, false);
+ setFont(bv, font, false);
}
}
-void InsetText::InsetUnlock(BufferView * bv)
+void InsetText::insetUnlock(BufferView * bv)
{
if (the_locking_inset) {
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
the_locking_inset = 0;
}
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
no_selection = false;
locked = false;
int code = CURSOR|CLEAR_FRAME;
->cursor.par()->getLayout());
else
bv->owner()->setLayout(bv->text->cursor.par()->getLayout());
- UpdateLocal(bv, code, false);
+ updateLocal(bv, code, false);
}
-bool InsetText::LockInsetInInset(BufferView * bv, UpdatableInset * inset)
+bool InsetText::lockInsetInInset(BufferView * bv, UpdatableInset * inset)
{
lyxerr[Debug::INSETS] << "InsetText::LockInsetInInset("
<< inset << "): ";
TEXT(bv)->sel_cursor = TEXT(bv)->cursor;
TEXT(bv)->UpdateInset(bv, the_locking_inset);
#else
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
#endif
return true;
} else if (the_locking_inset && (the_locking_inset == inset)) {
}
} else if (the_locking_inset) {
lyxerr[Debug::INSETS] << "MAYBE" << endl;
- return the_locking_inset->LockInsetInInset(bv, inset);
+ return the_locking_inset->lockInsetInInset(bv, inset);
}
lyxerr[Debug::INSETS] << "NOT OK" << endl;
return false;
}
-bool InsetText::UnlockInsetInInset(BufferView * bv, UpdatableInset * inset,
+bool InsetText::unlockInsetInInset(BufferView * bv, UpdatableInset * inset,
bool lr)
{
if (!the_locking_inset)
return false;
if (the_locking_inset == inset) {
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
TEXT(bv)->updateInset(bv, inset);
the_locking_inset = 0;
if (lr)
if (scroll())
scroll(bv, 0.0F);
else
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
return true;
}
- return the_locking_inset->UnlockInsetInInset(bv, inset, lr);
+ return the_locking_inset->unlockInsetInInset(bv, inset, lr);
}
-bool InsetText::UpdateInsetInInset(BufferView * bv, Inset * inset)
+bool InsetText::updateInsetInInset(BufferView * bv, Inset * inset)
{
if (!the_locking_inset)
return false;
if (the_locking_inset != inset) {
TEXT(bv)->updateInset(bv, the_locking_inset);
- SetUpdateStatus(bv, CURSOR_PAR);
- return the_locking_inset->UpdateInsetInInset(bv, inset);
+ setUpdateStatus(bv, CURSOR_PAR);
+ return the_locking_inset->updateInsetInInset(bv, inset);
}
-// UpdateLocal(bv, FULL, false);
+// updateLocal(bv, FULL, false);
if (TEXT(bv)->updateInset(bv, inset))
- UpdateLocal(bv, CURSOR_PAR, false);
+ updateLocal(bv, CURSOR_PAR, false);
if (cpar(bv) == inset_par && cpos(bv) == inset_pos) {
inset_x = cx(bv) - top_x + drawTextXOffset;
inset_y = cy(bv) + drawTextYOffset;
}
-void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button)
+void InsetText::insetButtonPress(BufferView * bv, int x, int y, int button)
{
no_selection = true;
int tmp_y = y + insetAscent - TEXT(bv)->first;
Inset * inset = bv->checkInsetHit(TEXT(bv), tmp_x, tmp_y, button);
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
if (the_locking_inset) {
if (the_locking_inset == inset) {
- the_locking_inset->InsetButtonPress(bv,x-inset_x,y-inset_y,button);
+ the_locking_inset->insetButtonPress(bv,x-inset_x,y-inset_y,button);
no_selection = false;
return;
} else if (inset) {
// otherwise unlock the_locking_inset and lock the new inset
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
inset_x = cx(bv) - top_x + drawTextXOffset;
inset_y = cy(bv) + drawTextYOffset;
the_locking_inset = static_cast<UpdatableInset*>(inset);
- inset->InsetButtonPress(bv, x - inset_x, y - inset_y, button);
- inset->Edit(bv, x - inset_x, y - inset_y, button);
+ inset->insetButtonPress(bv, x - inset_x, y - inset_y, button);
+ inset->edit(bv, x - inset_x, y - inset_y, button);
if (the_locking_inset)
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
no_selection = false;
return;
}
// otherwise only unlock the_locking_inset
- the_locking_inset->InsetUnlock(bv);
+ the_locking_inset->insetUnlock(bv);
the_locking_inset = 0;
}
if (bv->theLockingInset()) {
- if (inset && inset->Editable() == Inset::HIGHLY_EDITABLE) {
+ if (inset && inset->editable() == Inset::HIGHLY_EDITABLE) {
UpdatableInset * uinset = static_cast<UpdatableInset*>(inset);
inset_x = cx(bv) - top_x + drawTextXOffset;
inset_y = cy(bv) + drawTextYOffset;
inset_par = cpar(bv);
inset_boundary = cboundary(bv);
the_locking_inset = uinset;
- uinset->InsetButtonPress(bv, x - inset_x, y - inset_y,
+ uinset->insetButtonPress(bv, x - inset_x, y - inset_y,
button);
- uinset->Edit(bv, x - inset_x, y - inset_y, 0);
+ uinset->edit(bv, x - inset_x, y - inset_y, 0);
if (the_locking_inset)
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
no_selection = false;
return;
}
if (!inset) { // && (button == 2)) {
bool paste_internally = false;
if ((button == 2) && TEXT(bv)->selection.set()) {
- LocalDispatch(bv, LFUN_COPY, "");
+ localDispatch(bv, LFUN_COPY, "");
paste_internally = true;
}
TEXT(bv)->setCursorFromCoordinates(bv, x-drawTextXOffset,
y + insetAscent);
TEXT(bv)->selection.cursor = TEXT(bv)->cursor;
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
bv->owner()->setLayout(cpar(bv)->getLayout());
old_par = cpar(bv);
// Insert primary selection with middle mouse
// insert this
if (button == 2) {
if (paste_internally)
- LocalDispatch(bv, LFUN_PASTE, "");
+ localDispatch(bv, LFUN_PASTE, "");
else
- LocalDispatch(bv, LFUN_PASTESELECTION,
+ localDispatch(bv, LFUN_PASTESELECTION,
"paragraph");
}
}
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
no_selection = false;
}
-void InsetText::InsetButtonRelease(BufferView * bv, int x, int y, int button)
+void InsetText::insetButtonRelease(BufferView * bv, int x, int y, int button)
{
UpdatableInset * inset = 0;
if (the_locking_inset) {
- the_locking_inset->InsetButtonRelease(bv,
+ the_locking_inset->insetButtonRelease(bv,
x - inset_x, y - inset_y,
button);
} else {
if (cpar(bv)->getChar(cpos(bv)) == Paragraph::META_INSET) {
inset = static_cast<UpdatableInset*>(cpar(bv)->getInset(cpos(bv)));
- if (inset->Editable() == Inset::HIGHLY_EDITABLE) {
- inset->InsetButtonRelease(bv,
+ if (inset->editable() == Inset::HIGHLY_EDITABLE) {
+ inset->insetButtonRelease(bv,
x - inset_x,
y - inset_y, button);
} else {
inset_x = cx(bv) - top_x + drawTextXOffset;
inset_y = cy(bv) + drawTextYOffset;
- inset->InsetButtonRelease(bv,
+ inset->insetButtonRelease(bv,
x - inset_x,
y - inset_y, button);
- inset->Edit(bv,
+ inset->edit(bv,
x - inset_x, y - inset_y, button);
}
- UpdateLocal(bv, CURSOR_PAR, false);
+ updateLocal(bv, CURSOR_PAR, false);
}
}
no_selection = false;
}
-void InsetText::InsetMotionNotify(BufferView * bv, int x, int y, int state)
+void InsetText::insetMotionNotify(BufferView * bv, int x, int y, int state)
{
if (no_selection)
return;
if (the_locking_inset) {
- the_locking_inset->InsetMotionNotify(bv, x - inset_x,
+ the_locking_inset->insetMotionNotify(bv, x - inset_x,
y - inset_y,state);
return;
}
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
TEXT(bv)->setCursorFromCoordinates(bv, x - drawTextXOffset,
y + insetAscent);
TEXT(bv)->setSelection(bv);
if (TEXT(bv)->toggle_cursor.par()!=TEXT(bv)->toggle_end_cursor.par() ||
TEXT(bv)->toggle_cursor.pos()!=TEXT(bv)->toggle_end_cursor.pos())
- UpdateLocal(bv, SELECTION, false);
- ShowInsetCursor(bv);
+ updateLocal(bv, SELECTION, false);
+ showInsetCursor(bv);
}
-void InsetText::InsetKeyPress(XKeyEvent * xke)
+void InsetText::insetKeyPress(XKeyEvent * xke)
{
if (the_locking_inset) {
- the_locking_inset->InsetKeyPress(xke);
+ the_locking_inset->insetKeyPress(xke);
return;
}
}
UpdatableInset::RESULT
-InsetText::LocalDispatch(BufferView * bv,
+InsetText::localDispatch(BufferView * bv,
kb_action action, string const & arg)
{
no_selection = false;
UpdatableInset::RESULT
- result= UpdatableInset::LocalDispatch(bv, action, arg);
+ result= UpdatableInset::localDispatch(bv, action, arg);
if (result != UNDISPATCHED) {
return DISPATCHED;
}
return FINISHED;
if (the_locking_inset) {
- result = the_locking_inset->LocalDispatch(bv, action, arg);
+ result = the_locking_inset->localDispatch(bv, action, arg);
if (result == DISPATCHED_NOUPDATE)
return result;
else if (result == DISPATCHED) {
- UpdateLocal(bv, CURSOR_PAR, false);
+ updateLocal(bv, CURSOR_PAR, false);
return result;
} else if (result == FINISHED) {
bool dispatched = false;
return DISPATCHED;
}
}
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
switch (action) {
// Normal chars
case LFUN_SELFINSERT:
}
}
TEXT(bv)->selection.cursor = TEXT(bv)->cursor;
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
result=DISPATCHED_NOUPDATE;
break;
// --- Cursor Movements -----------------------------------
bv->text->finishUndo();
moveRight(bv, false, true);
TEXT(bv)->setSelection(bv);
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_RIGHT:
result = moveRight(bv);
bv->text->finishUndo();
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
case LFUN_LEFTSEL:
bv->text->finishUndo();
moveLeft(bv, false, true);
TEXT(bv)->setSelection(bv);
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_LEFT:
bv->text->finishUndo();
result = moveLeft(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
case LFUN_DOWNSEL:
bv->text->finishUndo();
moveDown(bv);
TEXT(bv)->setSelection(bv);
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_DOWN:
bv->text->finishUndo();
result = moveDown(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
case LFUN_UPSEL:
bv->text->finishUndo();
moveUp(bv);
TEXT(bv)->setSelection(bv);
- UpdateLocal(bv, SELECTION, false);
+ updateLocal(bv, SELECTION, false);
break;
case LFUN_UP:
bv->text->finishUndo();
result = moveUp(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
case LFUN_HOME:
bv->text->finishUndo();
TEXT(bv)->cursorHome(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
case LFUN_END:
TEXT(bv)->cursorEnd(bv);
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
break;
case LFUN_BACKSPACE:
bv->text->setUndo(bv->buffer(), Undo::DELETE,
TEXT(bv)->cutSelection(bv);
else
TEXT(bv)->backspace(bv);
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
break;
case LFUN_DELETE:
bv->text->setUndo(bv->buffer(), Undo::DELETE,
TEXT(bv)->cutSelection(bv);
else
TEXT(bv)->Delete(bv);
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
break;
case LFUN_CUT:
bv->text->setUndo(bv->buffer(), Undo::DELETE,
bv->text->cursor.par()->previous(),
bv->text->cursor.par()->next());
TEXT(bv)->cutSelection(bv);
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
break;
case LFUN_COPY:
bv->text->finishUndo();
TEXT(bv)->copySelection(bv);
- UpdateLocal(bv, CURSOR_PAR, false);
+ updateLocal(bv, CURSOR_PAR, false);
break;
case LFUN_PASTESELECTION:
{
} else {
TEXT(bv)->insertStringAsLines(bv, clip);
}
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
break;
}
case LFUN_PASTE:
bv->text->cursor.par()->previous(),
bv->text->cursor.par()->next());
TEXT(bv)->pasteSelection(bv);
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
break;
case LFUN_BREAKPARAGRAPH:
if (!autoBreakRows)
return DISPATCHED;
TEXT(bv)->breakParagraph(bv, 0);
- UpdateLocal(bv, FULL, true);
+ updateLocal(bv, FULL, true);
break;
case LFUN_BREAKPARAGRAPHKEEPLAYOUT:
if (!autoBreakRows)
return DISPATCHED;
TEXT(bv)->breakParagraph(bv, 1);
- UpdateLocal(bv, FULL, true);
+ updateLocal(bv, FULL, true);
break;
case LFUN_BREAKLINE:
if (!autoBreakRows)
bv->text->cursor.par()->previous(),
bv->text->cursor.par()->next());
TEXT(bv)->insertChar(bv, Paragraph::META_NEWLINE);
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
break;
case LFUN_LAYOUT:
// do not set layouts on non breakable textinsets
cur_layout = layout.second;
TEXT(bv)->setLayout(bv, layout.second);
bv->owner()->setLayout(cpar(bv)->getLayout());
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
}
} else {
// reset the layout box
if (cur_spacing != new_spacing || cur_value != new_value) {
par->params().spacing(Spacing(new_spacing, new_value));
//TEXT(bv)->RedoParagraph(owner->view());
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
//bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
}
if (par->size() == 0 && !par->next()) {
LyXFont font(LyXFont::ALL_IGNORE);
font.setLanguage(bv->getParentLanguage(this));
- SetFont(bv, font, false);
+ setFont(bv, font, false);
}
if (result != FINISHED) {
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
} else
bv->unlockInset(this);
return result;
}
-int InsetText::Latex(Buffer const * buf, ostream & os, bool, bool) const
+int InsetText::latex(Buffer const * buf, ostream & os, bool, bool) const
{
TexRow texrow;
buf->latexParagraphs(os, par, 0, texrow);
}
-int InsetText::Ascii(Buffer const * buf, ostream & os, int linelen) const
+int InsetText::ascii(Buffer const * buf, ostream & os, int linelen) const
{
Paragraph * p = par;
unsigned int lines = 0;
}
-int InsetText::DocBook(Buffer const * buf, ostream & os) const
+int InsetText::docBook(Buffer const * buf, ostream & os) const
{
Paragraph * p = par;
unsigned int lines = 0;
string tmp;
while (p) {
- buf->SimpleDocBookOnePar(os, tmp, p, desc, 0);
+ buf->simpleDocBookOnePar(os, tmp, p, desc, 0);
p = p->next();
}
}
-void InsetText::Validate(LaTeXFeatures & features) const
+void InsetText::validate(LaTeXFeatures & features) const
{
Paragraph * p = par;
while (p) {
}
-int InsetText::BeginningOfMainBody(Buffer const * buf, Paragraph * p) const
+int InsetText::beginningOfMainBody(Buffer const * buf, Paragraph * p) const
{
if (textclasslist.Style(buf->params.textclass,
p->getLayout()).labeltype != LABEL_MANUAL)
}
-void InsetText::GetCursorPos(BufferView * bv,
+void InsetText::getCursorPos(BufferView * bv,
int & x, int & y) const
{
x = cx(bv);
}
-unsigned int InsetText::InsetInInsetY()
+unsigned int InsetText::insetInInsetY()
{
if (!the_locking_inset)
return 0;
- return (inset_y + the_locking_inset->InsetInInsetY());
+ return (inset_y + the_locking_inset->insetInInsetY());
}
-void InsetText::ToggleInsetCursor(BufferView * bv)
+void InsetText::toggleInsetCursor(BufferView * bv)
{
if (the_locking_inset) {
- the_locking_inset->ToggleInsetCursor(bv);
+ the_locking_inset->toggleInsetCursor(bv);
return;
}
}
-void InsetText::ShowInsetCursor(BufferView * bv, bool show)
+void InsetText::showInsetCursor(BufferView * bv, bool show)
{
if (the_locking_inset) {
- the_locking_inset->ShowInsetCursor(bv);
+ the_locking_inset->showInsetCursor(bv);
return;
}
if (!isCursorVisible()) {
}
-void InsetText::HideInsetCursor(BufferView * bv)
+void InsetText::hideInsetCursor(BufferView * bv)
{
if (isCursorVisible()) {
bv->hideLockedInsetCursor();
setCursorVisible(false);
}
if (the_locking_inset)
- the_locking_inset->HideInsetCursor(bv);
+ the_locking_inset->hideInsetCursor(bv);
}
}
-bool InsetText::InsertInset(BufferView * bv, Inset * inset)
+bool InsetText::insertInset(BufferView * bv, Inset * inset)
{
if (the_locking_inset) {
- if (the_locking_inset->InsertInsetAllowed(inset))
- return the_locking_inset->InsertInset(bv, inset);
+ if (the_locking_inset->insertInsetAllowed(inset))
+ return the_locking_inset->insertInset(bv, inset);
return false;
}
bv->text->setUndo(bv->buffer(), Undo::INSERT,
bv->text->cursor.par()->previous(),
bv->text->cursor.par()->next());
inset->setOwner(this);
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
TEXT(bv)->insertInset(bv, inset);
#if 0
if ((cpar(bv)->GetChar(cpos(bv)) != Paragraph::META_INSET) ||
TEXT(bv)->CursorLeft(bv);
#endif
bv->fitCursor(TEXT(bv));
- UpdateLocal(bv, CURSOR_PAR|CURSOR, true);
- ShowInsetCursor(bv);
+ updateLocal(bv, CURSOR_PAR|CURSOR, true);
+ showInsetCursor(bv);
return true;
}
-UpdatableInset * InsetText::GetLockingInset()
+UpdatableInset * InsetText::getLockingInset()
{
- return the_locking_inset ? the_locking_inset->GetLockingInset() : this;
+ return the_locking_inset ? the_locking_inset->getLockingInset() : this;
}
-UpdatableInset * InsetText::GetFirstLockingInsetOfType(Inset::Code c)
+UpdatableInset * InsetText::getFirstLockingInsetOfType(Inset::Code c)
{
- if (c == LyxCode())
+ if (c == lyxCode())
return this;
if (the_locking_inset)
- return the_locking_inset->GetFirstLockingInsetOfType(c);
+ return the_locking_inset->getFirstLockingInsetOfType(c);
return 0;
}
-bool InsetText::ShowInsetDialog(BufferView * bv) const
+bool InsetText::showInsetDialog(BufferView * bv) const
{
if (the_locking_inset)
- return the_locking_inset->ShowInsetDialog(bv);
+ return the_locking_inset->showInsetDialog(bv);
return false;
}
}
-void InsetText::SetFont(BufferView * bv, LyXFont const & font, bool toggleall,
+void InsetText::setFont(BufferView * bv, LyXFont const & font, bool toggleall,
bool selectall)
{
if (the_locking_inset) {
- the_locking_inset->SetFont(bv, font, toggleall, selectall);
+ the_locking_inset->setFont(bv, font, toggleall, selectall);
return;
}
if (TEXT(bv)->selection.set()) {
TEXT(bv)->clearSelection(bv);
bv->fitCursor(TEXT(bv));
if (selectall || TEXT(bv)->selection.set())
- UpdateLocal(bv, FULL, true);
+ updateLocal(bv, FULL, true);
else
- UpdateLocal(bv, CURSOR_PAR, true);
+ updateLocal(bv, CURSOR_PAR, true);
}
unsigned int y;
Inset * inset =
static_cast<UpdatableInset*>(cpar(bv)->getInset(cpos(bv)));
- if (!inset || inset->Editable() != Inset::HIGHLY_EDITABLE)
+ if (!inset || inset->editable() != Inset::HIGHLY_EDITABLE)
return false;
LyXFont const font =
TEXT(bv)->getFont(bv->buffer(), cpar(bv), cpos(bv));
}
//inset_x = cx(bv) - top_x + drawTextXOffset;
//inset_y = cy(bv) + drawTextYOffset;
- inset->Edit(bv, x, y, 0);
+ inset->edit(bv, x, y, 0);
if (!the_locking_inset)
return false;
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
return true;
}
return false;
y = insetDescent;
inset_x = cx(bv) - top_x + drawTextXOffset;
inset_y = cy(bv) + drawTextYOffset;
- inset->Edit(bv, x - inset_x, y - inset_y, button);
+ inset->edit(bv, x - inset_x, y - inset_y, button);
if (!the_locking_inset)
return false;
- UpdateLocal(bv, CURSOR, false);
+ updateLocal(bv, CURSOR, false);
return true;
}
return false;
}
-void InsetText::SetParagraphData(Paragraph * p)
+void InsetText::setParagraphData(Paragraph * p)
{
// delete all instances of LyXText before deleting the paragraps used
// by it.
}
-void InsetText::SetText(string const & data)
+void InsetText::setText(string const & data)
{
clear();
LyXFont font(LyXFont::ALL_SANE);
}
-void InsetText::SetAutoBreakRows(bool flag)
+void InsetText::setAutoBreakRows(bool flag)
{
if (flag != autoBreakRows) {
autoBreakRows = flag;
}
-void InsetText::SetDrawFrame(BufferView * bv, DrawFrame how)
+void InsetText::setDrawFrame(BufferView * bv, DrawFrame how)
{
if (how != drawFrame_) {
drawFrame_ = how;
if (bv)
- UpdateLocal(bv, DRAW_FRAME, false);
+ updateLocal(bv, DRAW_FRAME, false);
}
}
-void InsetText::SetFrameColor(BufferView * bv, LColor::color col)
+void InsetText::setFrameColor(BufferView * bv, LColor::color col)
{
if (frame_color != col) {
frame_color = col;
if (bv)
- UpdateLocal(bv, DRAW_FRAME, false);
+ updateLocal(bv, DRAW_FRAME, false);
}
}
///
~InsetText();
///
- Inset * Clone(Buffer const &) const;
+ Inset * clone(Buffer const &) const;
///
InsetText & operator=(InsetText const & it);
///
void clear();
///
- 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;
///
///
void update(BufferView *, LyXFont const &, bool =false);
///
- void SetUpdateStatus(BufferView *, int what) const;
+ void setUpdateStatus(BufferView *, int what) const;
///
- string const EditMessage() const;
+ string const editMessage() const;
///
- void Edit(BufferView *, int, int, unsigned int);
+ void edit(BufferView *, int, int, unsigned int);
///
- bool IsTextInset() const { return true; }
+ bool isTextInset() const { return true; }
///
bool doClearArea() const;
///
- void InsetUnlock(BufferView *);
+ void insetUnlock(BufferView *);
///
- bool LockInsetInInset(BufferView *, UpdatableInset *);
+ bool lockInsetInInset(BufferView *, UpdatableInset *);
///
- bool UnlockInsetInInset(BufferView *, UpdatableInset *, bool lr = false);
+ bool unlockInsetInInset(BufferView *,
+ UpdatableInset *, bool lr = false);
///
- bool UpdateInsetInInset(BufferView *, Inset *);
+ bool updateInsetInInset(BufferView *, Inset *);
///
- 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, string const &);
+ 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 linelen) const;
+ int ascii(Buffer const *, std::ostream &, int linelen) 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 ;
+ int docBook(Buffer const *, std::ostream &) const ;
///
- void Validate(LaTeXFeatures & features) const;
+ void validate(LaTeXFeatures & features) const;
///
- Inset::Code LyxCode() const { return Inset::TEXT_CODE; }
+ Inset::Code lyxCode() const { return Inset::TEXT_CODE; }
///
- void GetCursorPos(BufferView *, int & x, int & y) const;
+ void getCursorPos(BufferView *, int & x, int & y) const;
///
- unsigned int InsetInInsetY();
+ unsigned int insetInInsetY();
///
- void ToggleInsetCursor(BufferView *);
+ void toggleInsetCursor(BufferView *);
///
- bool InsertInset(BufferView *, Inset *);
+ bool insertInset(BufferView *, Inset *);
///
- 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);
///
int getMaxWidth(BufferView *, UpdatableInset const *) const;
///
void init(InsetText const * ins = 0);
///
- void WriteParagraphData(Buffer const *, std::ostream &) const;
+ void writeParagraphData(Buffer const *, std::ostream &) const;
///
- void SetParagraphData(Paragraph *);
+ void setParagraphData(Paragraph *);
///
- void SetText(string const &);
+ void setText(string const &);
///
- void SetAutoBreakRows(bool);
+ void setAutoBreakRows(bool);
///
- void SetDrawFrame(BufferView *, DrawFrame);
+ void setDrawFrame(BufferView *, DrawFrame);
///
- void SetFrameColor(BufferView *, LColor::color);
+ void setFrameColor(BufferView *, LColor::color);
///
LyXText * getLyXText(BufferView const *,
bool const recursive = false) const;
///
void resizeLyXText(BufferView *, bool force = false) const;
///
- bool ShowInsetDialog(BufferView *) const;
+ bool showInsetDialog(BufferView *) const;
///
std::vector<string> const getLabelList() const;
///
protected:
///
- void UpdateLocal(BufferView *, int what, bool mark_dirty);
+ void updateLocal(BufferView *, int what, bool mark_dirty);
///
mutable int drawTextXOffset;
///
///
typedef Cache::value_type value_type;
///
- int BeginningOfMainBody(Buffer const *, Paragraph * par) const;
+ int beginningOfMainBody(Buffer const *, Paragraph * par) const;
///
- void ShowInsetCursor(BufferView *, bool show=true);
+ void showInsetCursor(BufferView *, bool show=true);
///
- void HideInsetCursor(BufferView *);
+ void hideInsetCursor(BufferView *);
///
- UpdatableInset::RESULT moveRight(BufferView *, bool activate_inset = true,
+ UpdatableInset::RESULT moveRight(BufferView *,
+ bool activate_inset = true,
bool selecting = false);
///
- UpdatableInset::RESULT moveLeft(BufferView *, bool activate_inset = true,
+ UpdatableInset::RESULT moveLeft(BufferView *,
+ bool activate_inset = true,
bool selecting = false);
///
UpdatableInset::RESULT moveRightIntern(BufferView *, bool behind,
///
UpdatableInset::RESULT moveDown(BufferView *);
///
- void SetCharFont(Buffer const *, int pos, LyXFont const & font);
+ void setCharFont(Buffer const *, int pos, LyXFont const & font);
///
string const getText(int);
///
}
///
void drawFrame(Painter &, bool cleared) const;
+ ///
void clearFrame(Painter &, bool cleared) const;
///
void clearInset(Painter &, int baseline, bool & cleared) const;
}
-void InsetTheorem::Write(Buffer const * buf, ostream & os) const
+void InsetTheorem::write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n";
- InsetCollapsable::Write(buf, os);
+ InsetCollapsable::write(buf, os);
}
-Inset * InsetTheorem::Clone(Buffer const &) const
+Inset * InsetTheorem::clone(Buffer const &) const
{
InsetTheorem * result = new InsetTheorem;
}
-string const InsetTheorem::EditMessage() const
+string const InsetTheorem::editMessage() const
{
return _("Opened Theorem Inset");
}
-int InsetTheorem::Latex(Buffer const * buf,
+int InsetTheorem::latex(Buffer const * buf,
ostream & os, bool fragile, bool fp) const
{
os << "\\begin{theorem}%\n";
- int i = inset.Latex(buf, os, fragile, fp);
+ int i = inset.latex(buf, os, fragile, fp);
os << "\\end{theorem}%\n";
return i + 2;
}
-bool InsetTheorem::InsertInsetAllowed(Inset * inset) const
+bool InsetTheorem::insertInsetAllowed(Inset * inset) const
{
lyxerr << "InsetTheorem::InsertInsetAllowed" << endl;
- if ((inset->LyxCode() == Inset::FOOT_CODE) ||
- (inset->LyxCode() == Inset::MARGIN_CODE)) {
+ if ((inset->lyxCode() == Inset::FOOT_CODE) ||
+ (inset->lyxCode() == Inset::MARGIN_CODE)) {
return false;
}
return true;
///
InsetTheorem();
///
- void Write(Buffer const * buf, std::ostream & os) const;
+ void write(Buffer const * buf, std::ostream & os) const;
///
- Inset * Clone(Buffer const &) const;
+ virtual Inset * clone(Buffer const &) const;
///
- Inset::Code LyxCode() const { return Inset::THEOREM_CODE; }
+ Inset::Code lyxCode() const { return Inset::THEOREM_CODE; }
///
bool display() const { return true; }
///
- 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
///
InsetTOC(InsetCommandParams const & p) : InsetCommand(p) {}
///
- Inset * Clone(Buffer const &) const { return new InsetTOC(params()); }
+ virtual Inset * clone(Buffer const &) const {
+ return new InsetTOC(params());
+ }
///
string const getScreenLabel() const;
///
explicit
InsetUrl(InsetCommandParams const &);
///
- Inset * Clone(Buffer const &) const { return new InsetUrl(params()); }
+ virtual Inset * clone(Buffer const &) const {
+ return new InsetUrl(params());
+ }
///
Inset::Code LyxCode() const { return Inset::URL_CODE; }
///
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.
- virtual void InsetButtonPress(int x, int y, int button);
- virtual void InsetButtonRelease(int x, int y, int button);
- virtual void InsetKeyPress(XKeyEvent *ev);
- virtual void InsetMotionNotify(int x, int y, int state);
- virtual void InsetUnlock();
+ virtual void insetButtonPress(int x, int y, int button);
+ virtual void insetButtonRelease(int x, int y, int button);
+ virtual void insetKeyPress(XKeyEvent *ev);
+ virtual void insetMotionNotify(int x, int y, int state);
+ virtual void insetUnlock();
If a inset wishes any redraw and/or update it just has to call
UpdateInset(this).
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
if (lyxrc.use_gui) {
- if (!bufferlist.QwriteAll())
+ if (!bufferlist.qwriteAll())
return;
lastfiles->writeFile(lyxrc.lastfiles);
last_loaded = bufferlist.newFile("tmpfile", string());
// try to dispatch to last loaded buffer first
- bool dispatched = last_loaded->Dispatch(batch_command);
+ bool dispatched = last_loaded->dispatch(batch_command);
// if this was successful, return.
// Maybe we could do something more clever than aborting...
// Read configuration files
//
- ReadRcFile("lyxrc.defaults");
+ readRcFile("lyxrc.defaults");
system_lyxrc = lyxrc;
system_formats = formats;
system_converters = converters;
// If there is a preferences file we read that instead
// of the old lyxrc file.
- if (!ReadRcFile("preferences"))
- ReadRcFile("lyxrc");
+ if (!readRcFile("preferences"))
+ readRcFile("lyxrc");
// Read encodings
- ReadEncodingsFile("encodings");
+ readEncodingsFile("encodings");
// Read languages
- ReadLanguagesFile("languages");
+ readLanguagesFile("languages");
// Load the layouts
lyxerr[Debug::INIT] << "Reading layouts..." << endl;
lyxrc.readBindFileIfNeeded();
// Read menus
- ReadUIFile(lyxrc.ui_file);
+ readUIFile(lyxrc.ui_file);
// Bind the X dead keys to the corresponding LyX functions if
// necessary.
// Read the rc file `name'
-bool LyX::ReadRcFile(string const & name)
+bool LyX::readRcFile(string const & name)
{
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
// Read the ui file `name'
-void LyX::ReadUIFile(string const & name)
+void LyX::readUIFile(string const & name)
{
enum Uitags {
ui_menuset = 1,
// Read the languages file `name'
-void LyX::ReadLanguagesFile(string const & name)
+void LyX::readLanguagesFile(string const & name)
{
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
// Read the encodings file `name'
-void LyX::ReadEncodingsFile(string const & name)
+void LyX::readEncodingsFile(string const & name)
{
lyxerr[Debug::INIT] << "About to read " << name << "..." << endl;
/** Search for and read the LyXRC file name, return
true if successfull.
*/
- bool ReadRcFile(string const & name);
+ bool readRcFile(string const & name);
/// Read the ui file `name'
- void ReadUIFile(string const & name);
+ void readUIFile(string const & name);
/// Read the languages file `name'
- void ReadLanguagesFile(string const & name);
+ void readLanguagesFile(string const & name);
/// Read the encodings file `name'
- void ReadEncodingsFile(string const & name);
+ void readEncodingsFile(string const & name);
///
bool easyParse(int * argc, char * argv[]);
};
// Disable insertion of floats in a tabular.
disable = false;
if (owner->view()->theLockingInset()) {
- disable = (owner->view()->theLockingInset()->LyxCode() == Inset::TABULAR_CODE) ||
- owner->view()->theLockingInset()->GetFirstLockingInsetOfType(Inset::TABULAR_CODE);
+ disable = (owner->view()->theLockingInset()->lyxCode() == Inset::TABULAR_CODE) ||
+ owner->view()->theLockingInset()->getFirstLockingInsetOfType(Inset::TABULAR_CODE);
}
break;
case LFUN_LAYOUT_TABULAR:
disable = true;
if (owner->view()->theLockingInset()) {
- disable = (owner->view()->theLockingInset()->LyxCode() != Inset::TABULAR_CODE) &&
- !owner->view()->theLockingInset()->GetFirstLockingInsetOfType(Inset::TABULAR_CODE);
+ disable = (owner->view()->theLockingInset()->lyxCode() != Inset::TABULAR_CODE) &&
+ !owner->view()->theLockingInset()->getFirstLockingInsetOfType(Inset::TABULAR_CODE);
}
break;
disable = true;
if (owner->view()->theLockingInset()) {
func_status::value_type ret = func_status::Disabled;
- if (owner->view()->theLockingInset()->LyxCode() == Inset::TABULAR_CODE) {
+ if (owner->view()->theLockingInset()->lyxCode() == Inset::TABULAR_CODE) {
ret = static_cast<InsetTabular *>
(owner->view()->theLockingInset())->
getStatus(argument);
- } else if (owner->view()->theLockingInset()->GetFirstLockingInsetOfType(Inset::TABULAR_CODE)) {
+ } else if (owner->view()->theLockingInset()->getFirstLockingInsetOfType(Inset::TABULAR_CODE)) {
ret = static_cast<InsetTabular *>
(owner->view()->theLockingInset()->
- GetFirstLockingInsetOfType(Inset::TABULAR_CODE))->
+ getFirstLockingInsetOfType(Inset::TABULAR_CODE))->
getStatus(argument);
}
flag |= ret;
isSavedPosition(strToUnsignedInt(argument));
case LFUN_MATH_VALIGN: {
Inset * tli = owner->view()->theLockingInset();
- if (tli && (tli->LyxCode() == Inset::MATH_CODE
- || tli->LyxCode() == Inset::MATHMACRO_CODE)) {
+ if (tli && (tli->lyxCode() == Inset::MATH_CODE
+ || tli->lyxCode() == Inset::MATHMACRO_CODE)) {
char align = mathcursor->valign();
if (align == '\0') {
disable = true;
}
case LFUN_MATH_HALIGN: {
Inset * tli = owner->view()->theLockingInset();
- if (tli && (tli->LyxCode() == Inset::MATH_CODE
- || tli->LyxCode() == Inset::MATHMACRO_CODE)) {
+ if (tli && (tli->lyxCode() == Inset::MATH_CODE
+ || tli->lyxCode() == Inset::MATHMACRO_CODE)) {
char align = mathcursor->halign();
if (align == '\0') {
disable = true;
}
case LFUN_MATH_MUTATE: {
Inset * tli = owner->view()->theLockingInset();
- if (tli && (tli->LyxCode() == Inset::MATH_CODE)) {
+ if (tli && (tli->lyxCode() == Inset::MATH_CODE)) {
MathInsetTypes type = mathcursor->par()->GetType();
func_status::value_type box = func_status::ToggleOff;
if (argument == "inline") {
int sly;
UpdatableInset * inset =
owner->view()->theLockingInset();
- inset->GetCursorPos(owner->view(), slx, sly);
+ inset->getCursorPos(owner->view(), slx, sly);
owner->view()->unlockInset(inset);
owner->view()->menuUndo();
if (TEXT()->cursor.par()->
inset = 0;
}
if (inset)
- inset->Edit(owner->view(),slx,sly,0);
+ inset->edit(owner->view(),slx,sly,0);
return string();
} else if (action == LFUN_REDO) {
int slx;
int sly;
UpdatableInset * inset = owner->view()->
theLockingInset();
- inset->GetCursorPos(owner->view(), slx, sly);
+ inset->getCursorPos(owner->view(), slx, sly);
owner->view()->unlockInset(inset);
owner->view()->menuRedo();
inset = static_cast<UpdatableInset*>(
getInset(TEXT()->
cursor.pos()));
if (inset)
- inset->Edit(owner->view(),slx,sly,0);
+ inset->edit(owner->view(),slx,sly,0);
return string();
} else if (((result=owner->view()->theLockingInset()->
- LocalDispatch(owner->view(), action,
+ localDispatch(owner->view(), action,
argument)) ==
UpdatableInset::DISPATCHED) ||
(result == UpdatableInset::DISPATCHED_NOUPDATE))
UpdatableInset * tli =
owner->view()->theLockingInset();
if (tli) {
- UpdatableInset * lock = tli->GetLockingInset();
+ UpdatableInset * lock = tli->getLockingInset();
if (tli == lock) {
owner->view()->unlockInset(tli);
moveCursorUpdate(true, false);
owner->showState();
} else {
- tli->UnlockInsetInInset(owner->view(),
+ tli->unlockInsetInInset(owner->view(),
lock,
true);
}
case LFUN_LAYOUT_TABULAR:
if (owner->view()->theLockingInset()) {
- if (owner->view()->theLockingInset()->LyxCode()==Inset::TABULAR_CODE) {
+ if (owner->view()->theLockingInset()->lyxCode()==Inset::TABULAR_CODE) {
InsetTabular * inset = static_cast<InsetTabular *>
(owner->view()->theLockingInset());
- inset->OpenLayoutDialog(owner->view());
+ inset->openLayoutDialog(owner->view());
} else if (owner->view()->theLockingInset()->
- GetFirstLockingInsetOfType(Inset::TABULAR_CODE)!=0) {
+ getFirstLockingInsetOfType(Inset::TABULAR_CODE)!=0) {
InsetTabular * inset = static_cast<InsetTabular *>(
- owner->view()->theLockingInset()->GetFirstLockingInsetOfType(Inset::TABULAR_CODE));
- inset->OpenLayoutDialog(owner->view());
+ owner->view()->theLockingInset()->getFirstLockingInsetOfType(Inset::TABULAR_CODE));
+ inset->openLayoutDialog(owner->view());
}
}
break;
{
for (int pos = 0; pos < size(); next(pos))
if (isInset(pos))
- replace(pos, GetInset(pos)->Clone());
+ replace(pos, GetInset(pos)->clone());
}
-Inset * InsetFormula::Clone(Buffer const &) const
+Inset * InsetFormula::clone(Buffer const &) const
{
return new InsetFormula(*this);
}
-void InsetFormula::Write(Buffer const * buf, ostream & os) const
+void InsetFormula::write(Buffer const * buf, ostream & os) const
{
os << "Formula ";
- Latex(buf, os, false, false);
+ latex(buf, os, false, false);
}
-int InsetFormula::Latex(Buffer const *, ostream & os, bool fragile, bool) const
+int InsetFormula::latex(Buffer const *, ostream & os, bool fragile, bool) const
{
par()->Write(os, fragile);
return 1;
}
-int InsetFormula::Ascii(Buffer const *, ostream & os, int) const
+int InsetFormula::ascii(Buffer const *, ostream & os, int) const
{
par()->Write(os, false);
return 1;
}
-int InsetFormula::Linuxdoc(Buffer const * buf, ostream & os) const
+int InsetFormula::linuxdoc(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-int InsetFormula::DocBook(Buffer const * buf, ostream & os) const
+int InsetFormula::docBook(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-void InsetFormula::Read(Buffer const *, LyXLex & lex)
+void InsetFormula::read(Buffer const *, LyXLex & lex)
{
par_ = mathed_parse(lex);
}
UpdatableInset::RESULT
-InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
+InsetFormula::localDispatch(BufferView * bv, kb_action action,
string const & arg)
{
RESULT result = DISPATCHED;
case LFUN_BREAKLINE:
bv->lockedInsetStoreUndo(Undo::INSERT);
par()->breakLine();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_DELETE_LINE_FORWARD:
bv->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->DelLine();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_MATH_NUMBER:
for (int row = 0; row < par()->nrows(); ++row)
par()->numbered(row, !old);
bv->owner()->message(old ? _("No number") : _("Number"));
- UpdateLocal(bv);
+ updateLocal(bv);
}
break;
}
bool old = par()->numbered(row);
bv->owner()->message(old ? _("No number") : _("Number"));
par()->numbered(row, !old);
- UpdateLocal(bv);
+ updateLocal(bv);
}
break;
}
par()->label(row, new_label);
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
case LFUN_MATH_EXTERN:
- HandleExtern(arg, bv);
- UpdateLocal(bv);
+ handleExtern(arg, bv);
+ updateLocal(bv);
break;
case LFUN_MATH_MUTATE:
par()->mutate(arg);
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_TABINSERT:
lyxerr << "take index from cursor\n";
par()->splitCell(0);
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_MATH_DISPLAY:
par()->mutate(LM_OT_EQUATION);
else
par()->mutate(LM_OT_SIMPLE);
- UpdateLocal(bv);
+ updateLocal(bv);
break;
default:
- result = InsetFormulaBase::LocalDispatch(bv, action, arg);
+ result = InsetFormulaBase::localDispatch(bv, action, arg);
}
return result;
}
-void InsetFormula::HandleExtern(const string & arg, BufferView *)
+void InsetFormula::handleExtern(const string & arg, BufferView *)
{
//string outfile = lyx::tempName("maple.out");
string outfile = "/tmp/lyx2" + arg + ".out";
}
-Inset::Code InsetFormula::LyxCode() const
+Inset::Code InsetFormula::lyxCode() const
{
return Inset::MATH_CODE;
}
-void InsetFormula::Validate(LaTeXFeatures & features) const
+void InsetFormula::validate(LaTeXFeatures & features) const
{
par()->Validate(features);
}
///
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;
///
- Inset * Clone(Buffer const &) const;
+ Inset * clone(Buffer const &) const;
///
- void Validate(LaTeXFeatures & features) const;
+ void validate(LaTeXFeatures & features) const;
///
- Inset::Code LyxCode() const;
+ Inset::Code lyxCode() const;
///
- virtual RESULT LocalDispatch(BufferView *, kb_action, string const &);
+ virtual RESULT localDispatch(BufferView *, kb_action, string const &);
///
std::vector<string> const getLabelList() const;
///
- void HandleExtern(string const & arg, BufferView * bv);
+ void handleExtern(string const & arg, BufferView * bv);
///
MathMatrixInset * par() const;
///
: par_(par)
{}
+
InsetFormulaBase::InsetFormulaBase(InsetFormulaBase const & f)
- : UpdatableInset(f), par_(static_cast<MathInset *>(f.par_->Clone()))
+ : UpdatableInset(f), par_(static_cast<MathInset *>(f.par_->clone()))
{}
+
InsetFormulaBase::~InsetFormulaBase()
{
#ifdef WITH_WARNINGS
}
-void InsetFormulaBase::Write(Buffer const * buf, ostream & os) const
+void InsetFormulaBase::write(Buffer const * buf, ostream & os) const
{
os << "Formula ";
- Latex(buf, os, false, false);
+ latex(buf, os, false, false);
}
-int InsetFormulaBase::Ascii(Buffer const *, ostream & os, int) const
+int InsetFormulaBase::ascii(Buffer const *, ostream & os, int) const
{
par_->Write(os, false);
return 0;
}
-int InsetFormulaBase::Linuxdoc(Buffer const * buf, ostream & os) const
+int InsetFormulaBase::linuxdoc(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-int InsetFormulaBase::DocBook(Buffer const * buf, ostream & os) const
+int InsetFormulaBase::docBook(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
// Check if uses AMS macros
-void InsetFormulaBase::Validate(LaTeXFeatures &) const
+void InsetFormulaBase::validate(LaTeXFeatures &) const
{}
-string const InsetFormulaBase::EditMessage() const
+string const InsetFormulaBase::editMessage() const
{
return _("Math editor mode");
}
-void InsetFormulaBase::Edit(BufferView * bv, int x, int /*y*/, unsigned int)
+void InsetFormulaBase::edit(BufferView * bv, int x, int /*y*/, unsigned int)
{
mathcursor = new MathCursor(this);
}
-void InsetFormulaBase::InsetUnlock(BufferView * bv)
+void InsetFormulaBase::insetUnlock(BufferView * bv)
{
if (mathcursor) {
if (mathcursor->InMacroMode()) {
mathcursor->MacroModeClose();
- UpdateLocal(bv);
+ updateLocal(bv);
}
delete mathcursor;
}
}
-void InsetFormulaBase::GetCursorPos(BufferView *, int & x, int & y) const
+void InsetFormulaBase::getCursorPos(BufferView *, int & x, int & y) const
{
mathcursor->GetPos(x, y);
x -= par_->xo();
}
-void InsetFormulaBase::ToggleInsetCursor(BufferView * bv)
+void InsetFormulaBase::toggleInsetCursor(BufferView * bv)
{
if (!mathcursor)
return;
}
-void InsetFormulaBase::ShowInsetCursor(BufferView * bv, bool)
+void InsetFormulaBase::showInsetCursor(BufferView * bv, bool)
{
if (!isCursorVisible()) {
if (mathcursor) {
int const desc = lyxfont::maxDescent(font);
bv->fitLockedInsetCursor(x, y, asc, desc);
}
- ToggleInsetCursor(bv);
+ toggleInsetCursor(bv);
}
}
-void InsetFormulaBase::HideInsetCursor(BufferView * bv)
+void InsetFormulaBase::hideInsetCursor(BufferView * bv)
{
if (isCursorVisible())
- ToggleInsetCursor(bv);
+ toggleInsetCursor(bv);
}
-void InsetFormulaBase::ToggleInsetSelection(BufferView * bv)
+void InsetFormulaBase::toggleInsetSelection(BufferView * bv)
{
if (!mathcursor)
return;
}
-void InsetFormulaBase::UpdateLocal(BufferView * bv)
+void InsetFormulaBase::updateLocal(BufferView * bv)
{
par_->Metrics(LM_ST_TEXT);
bv->updateInset(this, true);
}
-void InsetFormulaBase::InsetButtonRelease(BufferView * bv,
- int x, int y, int /*button*/)
+void InsetFormulaBase::insetButtonRelease(BufferView * bv,
+ int x, int y, int /*button*/)
{
if (mathcursor) {
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
x += par_->xo();
y += par_->yo();
mathcursor->SetPos(x, y);
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
if (sel_flag) {
sel_flag = false;
sel_x = 0;
}
-void InsetFormulaBase::InsetButtonPress(BufferView * bv,
- int x, int y, int /*button*/)
+void InsetFormulaBase::insetButtonPress(BufferView * bv,
+ int x, int y, int /*button*/)
{
sel_flag = false;
sel_x = x;
}
-void InsetFormulaBase::InsetMotionNotify(BufferView * bv,
- int x, int y, int /*button*/)
+void InsetFormulaBase::insetMotionNotify(BufferView * bv,
+ int x, int y, int /*button*/)
{
if (sel_x && sel_y && abs(x-sel_x) > 4 && !sel_flag) {
sel_flag = true;
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
mathcursor->SetPos(sel_x + par_->xo(), sel_y + par_->yo());
mathcursor->SelStart();
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
mathcursor->GetPos(sel_x, sel_y);
} else if (sel_flag) {
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
x += par_->xo();
y += par_->yo();
mathcursor->SetPos(x, y);
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
mathcursor->GetPos(x, y);
if (sel_x != x || sel_y != y)
bv->updateInset(this, false);
}
-void InsetFormulaBase::InsetKeyPress(XKeyEvent *)
+void InsetFormulaBase::insetKeyPress(XKeyEvent *)
{
- lyxerr[Debug::MATHED] << "Used InsetFormulaBase::InsetKeyPress." << endl;
+ lyxerr[Debug::MATHED]
+ << "Used InsetFormulaBase::InsetKeyPress." << endl;
}
UpdatableInset::RESULT
-InsetFormulaBase::LocalDispatch(BufferView * bv, kb_action action,
+InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
string const & arg)
{
//lyxerr << "InsetFormulaBase::LocalDispatch: act: " << action
RESULT result = DISPATCHED;
static MathSpaceInset * sp = 0;
- HideInsetCursor(bv);
+ hideInsetCursor(bv);
if (mathcursor->getLastCode() == LM_TC_TEX)
varcode = LM_TC_TEX;
case LFUN_RIGHT:
result = DISPATCH_RESULT(mathcursor->Right(sel));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_LEFT:
result = DISPATCH_RESULT(mathcursor->Left(sel));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_UP:
result = DISPATCH_RESULT(mathcursor->Up(sel));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_DOWN:
result = DISPATCH_RESULT(mathcursor->Down(sel));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_DELETE_LINE_FORWARD:
bv->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->DelLine();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_TAB:
bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->idxRight();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_TABINSERT:
bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->idxRight();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_BACKSPACE:
mathcursor->MacroModeClose();
bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->SelPaste();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_CUT:
bv->lockedInsetStoreUndo(Undo::DELETE);
mathcursor->SelCut();
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_COPY:
case LFUN_MATH_LIMITS:
bv->lockedInsetStoreUndo(Undo::INSERT);
if (mathcursor->toggleLimits())
- UpdateLocal(bv);
+ updateLocal(bv);
break;
case LFUN_MATH_SIZE:
bv->lockedInsetStoreUndo(Undo::INSERT);
latexkeys const * l = in_word_set(arg);
mathcursor->SetSize(MathStyles(l ? l->id : static_cast<unsigned int>(-1)));
- UpdateLocal(bv);
+ updateLocal(bv);
}
break;
if (!arg.empty()) {
bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->Interpret(arg);
- UpdateLocal(bv);
+ updateLocal(bv);
}
break;
p->valign(v_align[0]);
p->halign(h_align);
mathcursor->insert(p);
- UpdateLocal(bv);
+ updateLocal(bv);
}
break;
} else {
mathcursor->insert(new MathDelimInset(ilt, irt));
}
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
bv->lockedInsetStoreUndo(Undo::INSERT);
mathcursor->insert(new MathSpaceInset(1));
space_on = true;
- UpdateLocal(bv);
+ updateLocal(bv);
break;
// Invalid actions under math mode
if (!p)
break;
p->halign(arg.size() ? arg[0] : 'c', p->col(idx));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
if (!p)
break;
p->valign(arg.size() ? arg[0] : 'c');
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
if (!p)
break;
p->addRow(p->row(idx));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
if (!p)
break;
p->delRow(p->row(idx));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
if (!p)
break;
p->addCol(p->col(idx));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
if (!p)
break;
p->delCol(p->col(idx));
- UpdateLocal(bv);
+ updateLocal(bv);
break;
}
bv->owner()->message(_("TeX mode"));
mathcursor->setLastCode(LM_TC_TEX);
}
- UpdateLocal(bv);
+ updateLocal(bv);
} else if (action == LFUN_MATH_PANEL) {
result = UNDISPATCHED;
} else {
if (mathcursor && was_macro != mathcursor->InMacroMode()
&& action >= 0
&& action != LFUN_BACKSPACE)
- UpdateLocal(bv);
+ updateLocal(bv);
//if (mathcursor)
- // UpdateLocal(bv);
+ // updateLocal(bv);
if (sp && !space_on)
sp = 0;
if (mathcursor && (mathcursor->Selection() || was_selection))
- ToggleInsetSelection(bv);
+ toggleInsetSelection(bv);
if (result == DISPATCHED || result == DISPATCHED_NOUPDATE ||
result == UNDISPATCHED)
- ShowInsetCursor(bv);
+ showInsetCursor(bv);
else
bv->unlockInset(this);
string tmp;
tmp = c;
- if (!bv->theLockingInset() || bv->theLockingInset()->IsTextInset()) {
+ if (!bv->theLockingInset() || bv->theLockingInset()->isTextInset()) {
int greek_kb_flag_save = greek_kb_flag;
InsetFormula * new_inset = new InsetFormula();
bv->beforeChange(bv->text);
return false;
}
//Update(1);//BUG
- new_inset->Edit(bv, 0, 0, 0);
- new_inset->LocalDispatch(bv, LFUN_SELFINSERT, tmp);
+ new_inset->edit(bv, 0, 0, 0);
+ new_inset->localDispatch(bv, LFUN_SELFINSERT, tmp);
if (greek_kb_flag_save < 2) {
bv->unlockInset(new_inset); // bv->theLockingInset());
bv->text->cursorRight(bv, true);
}
} else
- if (bv->theLockingInset()->LyxCode() == Inset::MATH_CODE ||
- bv->theLockingInset()->LyxCode() == Inset::MATHMACRO_CODE)
- static_cast<InsetFormula*>(bv->theLockingInset())->LocalDispatch(bv, LFUN_SELFINSERT, tmp);
+ if (bv->theLockingInset()->lyxCode() == Inset::MATH_CODE ||
+ bv->theLockingInset()->lyxCode() == Inset::MATHMACRO_CODE)
+ static_cast<InsetFormula*>(bv->theLockingInset())->localDispatch(bv, LFUN_SELFINSERT, tmp);
else
lyxerr << "Math error: attempt to write on a wrong "
"class of inset." << endl;
-Inset::Code InsetFormulaBase::LyxCode() const
+Inset::Code InsetFormulaBase::lyxCode() const
{
return Inset::MATH_CODE;
}
-LyXFont const InsetFormulaBase::ConvertFont(LyXFont const & f) const
+LyXFont const InsetFormulaBase::convertFont(LyXFont const & f) const
{
// We have already discussed what was here
LyXFont font(f);
///
virtual void draw(BufferView *,LyXFont const &, int, float &, bool) const = 0;
///
- 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;
///
- virtual int Latex(Buffer const *, std::ostream &,
+ virtual int latex(Buffer const *, std::ostream &,
bool fragile, bool free_spc) const = 0;
///
- virtual int Ascii(Buffer const *, std::ostream &, int linelen) const = 0;
+ virtual int ascii(Buffer const *, std::ostream &, int linelen) 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;
///
- virtual void Validate(LaTeXFeatures &) const;
+ virtual void validate(LaTeXFeatures &) const;
///
- virtual Inset * Clone(Buffer const &) const = 0;
+ virtual Inset * clone(Buffer const &) const = 0;
///
- virtual Inset::Code LyxCode() const;
+ virtual Inset::Code lyxCode() const;
///
- virtual LyXFont const ConvertFont(LyXFont const & f) const;
+ virtual LyXFont const convertFont(LyXFont const & f) 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 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 ToggleInsetSelection(BufferView * bv);
+ virtual void toggleInsetSelection(BufferView * bv);
///
- virtual void InsetButtonPress(BufferView *, int x, int y, int button);
+ virtual void insetButtonPress(BufferView *, int x, int y, int button);
///
- virtual void InsetButtonRelease(BufferView *, int x, int y, int button);
+ 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 *);
/// To allow transparent use of math editing functions
- virtual RESULT LocalDispatch(BufferView *, kb_action, string const &);
+ virtual RESULT localDispatch(BufferView *, kb_action, string const &);
///
virtual std::vector<string> const getLabelList() const;
MathInset * par() const;
protected:
///
- virtual void UpdateLocal(BufferView * bv);
+ virtual void updateLocal(BufferView * bv);
///
MathInset * par_;
}
-Inset * InsetFormulaMacro::Clone(Buffer const &) const
+Inset * InsetFormulaMacro::clone(Buffer const &) const
{
return new InsetFormulaMacro(*this);
}
-void InsetFormulaMacro::Write(Buffer const *, ostream & os) const
+void InsetFormulaMacro::write(Buffer const *, ostream & os) const
{
os << "FormulaMacro ";
tmacro()->Write(os, false);
}
-int InsetFormulaMacro::Latex(Buffer const *, ostream & os, bool fragile,
+int InsetFormulaMacro::latex(Buffer const *, ostream & os, bool fragile,
bool /*free_spacing*/) const
{
tmacro()->Write(os, fragile);
return 2;
}
-int InsetFormulaMacro::Ascii(Buffer const *, ostream & os, int) const
+int InsetFormulaMacro::ascii(Buffer const *, ostream & os, int) const
{
tmacro()->Write(os, false);
return 0;
}
-int InsetFormulaMacro::Linuxdoc(Buffer const * buf, ostream & os) const
+int InsetFormulaMacro::linuxdoc(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-int InsetFormulaMacro::DocBook(Buffer const * buf, ostream & os) const
+int InsetFormulaMacro::docBook(Buffer const * buf, ostream & os) const
{
- return Ascii(buf, os, 0);
+ return ascii(buf, os, 0);
}
-void InsetFormulaMacro::Read(Buffer const *, LyXLex & lex)
+void InsetFormulaMacro::read(Buffer const *, LyXLex & lex)
{
// Awful hack...
par_ = mathed_parse(lex);
UpdatableInset::RESULT
-InsetFormulaMacro::LocalDispatch(BufferView * bv,
+InsetFormulaMacro::localDispatch(BufferView * bv,
kb_action action, string const & arg)
{
RESULT result = DISPATCHED;
lyxerr << "inserting macro arg " << i << "\n";
if (i > 0 && i <= tmacro()->nargs()) {
mathcursor->insert(new MathMacroArgument(i));
- UpdateLocal(bv);
+ updateLocal(bv);
} else {
lyxerr << "not in range 0.." << tmacro()->nargs() << "\n";
}
}
default:
- result = InsetFormulaBase::LocalDispatch(bv, action, arg);
+ result = InsetFormulaBase::localDispatch(bv, action, arg);
}
return result;
}
}
-Inset::Code InsetFormulaMacro::LyxCode() const
+Inset::Code InsetFormulaMacro::lyxCode() const
{
return Inset::MATHMACRO_CODE;
}
///
void draw(BufferView *,LyXFont const &, int, float &, bool) const;
///
- void Read(Buffer const *, LyXLex & lex);
+ void read(Buffer const *, LyXLex & lex);
///
- void Write(Buffer const *, std::ostream & os) const;
+ void write(Buffer const *, std::ostream & os) const;
///
- int Ascii(Buffer const *, std::ostream &, int linelen) const;
+ int ascii(Buffer const *, std::ostream &, int linelen) const;
///
- int Latex(Buffer const *, std::ostream & os, bool fragile,
+ int latex(Buffer const *, std::ostream & os, bool fragile,
bool free_spc) const;
///
- int Linuxdoc(Buffer const *, std::ostream & os) const;
+ int linuxdoc(Buffer const *, std::ostream & os) const;
///
- int DocBook(Buffer const *, std::ostream &) const;
+ int docBook(Buffer const *, std::ostream &) const;
///
- Inset * Clone(Buffer const &) const;
+ Inset * clone(Buffer const &) const;
///
- Inset::Code LyxCode() const;
+ Inset::Code lyxCode() const;
///
- RESULT LocalDispatch(BufferView *, kb_action, string const &);
+ RESULT localDispatch(BufferView *, kb_action, string const &);
private:
/// prefix in inset
string prefix() const;
}
-MathInset * MathAccentInset::Clone() const
+MathInset * MathAccentInset::clone() const
{
MathAccentInset * p;
if (inset)
- p = new MathAccentInset(inset->Clone(), code);
+ p = new MathAccentInset(inset->clone(), code);
else
p = new MathAccentInset(c, fn, code);
///
~MathAccentInset();
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int, int);
///
{}
-MathInset * MathArrayInset::Clone() const
+MathInset * MathArrayInset::clone() const
{
return new MathArrayInset(*this);
}
///
MathArrayInset(int m, int n);
///
- MathInset * Clone() const;
+ virtual MathInset * clone() const;
///
void Write(std::ostream &, bool fragile) const;
};
}
-MathInset * MathBigopInset::Clone() const
+MathInset * MathBigopInset::clone() const
{
return new MathBigopInset(*this);
}
///
MathBigopInset(string const &, int);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int, int);
///
}
-MathInset * MathDecorationInset::Clone() const
+MathInset * MathDecorationInset::clone() const
{
return new MathDecorationInset(*this);
}
///
MathDecorationInset(int);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int, int);
///
{}
-MathInset * MathDelimInset::Clone() const
+MathInset * MathDelimInset::clone() const
{
return new MathDelimInset(*this);
}
///
MathDelimInset(int, int);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int, int);
///
{}
-MathInset * MathDotsInset::Clone() const
+MathInset * MathDotsInset::clone() const
{
return new MathDotsInset(*this);
}
///
MathDotsInset(string const &, int);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int, int);
///
}
-MathInset * MathFracInset::Clone() const
+MathInset * MathFracInset::clone() const
{
return new MathFracInset(*this);
}
///
explicit MathFracInset(MathInsetTypes ot = LM_OT_FRAC);
///
- virtual MathInset * Clone() const;
+ virtual MathInset * clone() const;
///
virtual void Write(std::ostream &, bool fragile) const;
///
}
-MathInset * MathFuncInset::Clone() const
+MathInset * MathFuncInset::clone() const
{
return new MathFuncInset(*this);
}
///
explicit MathFuncInset(string const & nm, MathInsetTypes ot = LM_OT_FUNC);
///
- MathInset * Clone() const;
+ virtual MathInset * clone() const;
///
void draw(Painter &, int, int);
///
///
MathGridInset(int m, int n, string const & nm, MathInsetTypes ot);
///
- MathInset * Clone() const = 0;
+ virtual MathInset * clone() const = 0;
///
void Write(std::ostream &, bool fragile) const;
///
void MathInset::substitute(MathArray & array, MathMacro const & m) const
{
- MathInset * p = Clone();
+ MathInset * p = clone();
for (int i = 0; i < nargs(); ++i)
p->cell(i).substitute(m);
array.push_back(p);
/// Write normalized content
virtual void WriteNormal(std::ostream &) const;
/// Reproduces itself
- virtual MathInset * Clone() const = 0;
+ virtual MathInset * clone() const = 0;
/// Appends itself with macro arguments substituted
virtual void substitute(MathArray & array, MathMacro const & macro) const;
/// Compute the size of the object
{}
-MathInset * MathMacro::Clone() const
+MathInset * MathMacro::clone() const
{
return new MathMacro(*this);
}
///
void Metrics(MathStyles st);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void Write(std::ostream &, bool fragile) const;
///
}
-MathInset * MathMacroArgument::Clone() const
+MathInset * MathMacroArgument::clone() const
{
return new MathMacroArgument(*this);
}
///
explicit MathMacroArgument(int);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void Metrics(MathStyles st);
///
{}
-MathInset * MathMacroTemplate::Clone() const
+MathInset * MathMacroTemplate::clone() const
{
lyxerr << "cloning MacroTemplate!\n";
return new MathMacroTemplate(*this);
///
MathMacroTemplate(string const & name, int nargs);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void Write(std::ostream &, bool fragile) const;
/// Number of arguments
: MathGridInset(1, 1, "formula", LM_OT_SIMPLE), nonum_(1), label_(1)
{}
-MathInset * MathMatrixInset::Clone() const
+MathInset * MathMatrixInset::clone() const
{
return new MathMatrixInset(*this);
}
///
explicit MathMatrixInset(MathInsetTypes t);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void Write(std::ostream &, bool fragile) const;
///
MathParInset(short st = LM_ST_TEXT, string const & nm = string(),
short ot = LM_OT_MIN);
///
- virtual MathedInset * Clone();
+ virtual MathedInset * clone();
///
virtual void substitute(MathMacro *);
/// Draw the object on a drawable
{}
-MathInset * MathRootInset::Clone() const
+MathInset * MathRootInset::clone() const
{
return new MathRootInset(*this);
}
///
MathRootInset();
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int x, int baseline);
///
{}
-MathInset * MathScriptInset::Clone() const
+MathInset * MathScriptInset::clone() const
{
return new MathScriptInset(*this);
}
///
MathScriptInset(bool up, bool down);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void Write(std::ostream &, bool fragile) const;
///
}
-MathInset * MathSizeInset::Clone() const
+MathInset * MathSizeInset::clone() const
{
return new MathSizeInset(*this);
}
///
explicit MathSizeInset(MathStyles st);
///
- MathInset * Clone() const;
+ virtual MathInset * clone() const;
///
void Metrics(MathStyles st);
///
{}
-MathInset * MathSpaceInset::Clone() const
+MathInset * MathSpaceInset::clone() const
{
return new MathSpaceInset(*this);
}
///
MathSpaceInset(int sp, MathInsetTypes ot = LM_OT_SPACE);
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int, int);
///
{}
-MathInset * MathSqrtInset::Clone() const
+MathInset * MathSqrtInset::clone() const
{
return new MathSqrtInset(*this);
}
///
MathSqrtInset();
///
- MathInset * Clone() const;
+ MathInset * clone() const;
///
void draw(Painter &, int x, int baseline);
///
// ale970302
if (lp.bibkey)
bibkey = static_cast<InsetBibKey *>
- (lp.bibkey->Clone(*current_view->buffer()));
+ (lp.bibkey->clone(*current_view->buffer()));
else
bibkey = 0;
insetlist = lp.insetlist;
for (InsetList::iterator it = insetlist.begin();
it != insetlist.end(); ++it)
- it->inset = it->inset->Clone(*current_view->buffer());
+ it->inset = it->inset->clone(*current_view->buffer());
}
// bibitem ale970302
if (bibkey)
- bibkey->Write(buf, os);
+ bibkey->write(buf, os);
LyXFont font1(LyXFont::ALL_INHERIT, bparams.language);
{
Inset const * inset = getInset(i);
if (inset)
- if (inset->DirectWrite()) {
+ if (inset->directWrite()) {
// international char, let it write
// code directly so it's shorter in
// the file
- inset->Write(buf, os);
+ inset->write(buf, os);
} else {
os << "\n\\begin_inset ";
- inset->Write(buf, os);
+ inset->write(buf, os);
os << "\n\\end_inset \n\n";
column = 0;
}
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if ((*cit).inset)
- (*cit).inset->Validate(features);
+ (*cit).inset->validate(features);
}
}
minibuffer_inset = 0;
if (minibuffer_char == Paragraph::META_INSET) {
if (getInset(pos)) {
- minibuffer_inset = getInset(pos)->Clone(buffer);
+ minibuffer_inset = getInset(pos)->clone(buffer);
} else {
minibuffer_inset = 0;
minibuffer_char = ' ';
//lyxerr << "Paragraph::InsertInsetAllowed" << endl;
if (pimpl_->inset_owner)
- return pimpl_->inset_owner->InsertInsetAllowed(inset);
+ return pimpl_->inset_owner->insertInsetAllowed(inset);
return true;
}
int count = 0;
InsetList::size_type index = 0;
while (index < insetlist.size()) {
- if (insetlist[index].inset && insetlist[index].inset->AutoDelete()) {
+ if (insetlist[index].inset && insetlist[index].inset->autoDelete()) {
erase(insetlist[index].pos);
// Erase() calls to insetlist.erase(&insetlist[index])
// so index shouldn't be increased.
break;
case LATEX_ITEM_ENVIRONMENT:
if (bibkey) {
- bibkey->Latex(buf, os, false, false);
+ bibkey->latex(buf, os, false, false);
} else
os << "\\item ";
break;
if (IsPrintable(c))
s += c;
else if (c == META_INSET &&
- getInset(i)->LyxCode() == Inset::MATH_CODE) {
+ getInset(i)->lyxCode() == Inset::MATH_CODE) {
std::ostringstream ost;
- getInset(i)->Ascii(buffer, ost);
+ getInset(i)->ascii(buffer, ost);
s += subst(ost.str().c_str(),'\n',' ');
}
}
if (IsPrintable(c))
ost << c;
else if (c == META_INSET) {
- getInset(i)->Ascii(buffer, ost);
+ getInset(i)->ascii(buffer, ost);
}
}
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if ((*cit).inset) {
- if ((*cit).inset->IsTextInset()) {
+ if ((*cit).inset->isTextInset()) {
static_cast<UpdatableInset *>
((*cit).inset)->deleteLyXText(bv, true);
}
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if ((*cit).inset) {
- if ((*cit).inset->IsTextInset()) {
+ if ((*cit).inset->isTextInset()) {
static_cast<UpdatableInset *>
((*cit).inset)->resizeLyXText(bv, true);
}
Inset const * getInset(size_type pos) const;
/** important for cut and paste
Temporary change from BufferParams to Buffer. Will revert when we
- get rid of the argument to Inset::Clone(Buffer const &) */
+ get rid of the argument to Inset::clone(Buffer const &) */
void copyIntoMinibuffer(Buffer const &, size_type pos) const;
///
void cutIntoMinibuffer(BufferParams const &, size_type pos);
bool close = false;
int const len = os.tellp();
//ostream::pos_type const len = os.tellp();
- if ((inset->LyxCode() == Inset::GRAPHICS_CODE
- || inset->LyxCode() == Inset::MATH_CODE
- || inset->LyxCode() == Inset::URL_CODE)
+ if ((inset->lyxCode() == Inset::GRAPHICS_CODE
+ || inset->lyxCode() == Inset::MATH_CODE
+ || inset->lyxCode() == Inset::URL_CODE)
&& running_font.isRightToLeft()) {
os << "\\L{";
close = true;
}
- int tmp = inset->Latex(buf, os, moving_arg,
+ int tmp = inset->latex(buf, os, moving_arg,
style.free_spacing);
if (close)
getTokenValue(line, "special", cell_info[i][j].align_special);
l_getline(is, line);
if (prefixIs(line, "\\begin_inset")) {
- cell_info[i][j].inset.Read(buf, lex);
+ cell_info[i][j].inset.read(buf, lex);
l_getline(is, line);
}
if (line != "</Cell>") {
}
-LyXTabular * LyXTabular::Clone(InsetTabular * inset)
+LyXTabular * LyXTabular::clone(InsetTabular * inset)
{
LyXTabular * result = new LyXTabular(inset, *this);
#if 0
for (int i = 0; i < rows_; ++i) {
for (int j = 0; j < columns_; ++j) {
cell_info[i][j].inset.setOwner(owner_);
- cell_info[i][j].inset.SetDrawFrame(0, InsetText::LOCKED);
+ cell_info[i][j].inset.setDrawFrame(0, InsetText::LOCKED);
cell_info[i][j].cellno = cellno++;
}
cell_info[i].back().right_line = true;
cell_info[row][column].right_line =
cell_info[row][column+cn-1].right_line;
}
- cell_info[row][column].inset.SetAutoBreakRows(
+ cell_info[row][column].inset.setAutoBreakRows(
!GetPWidth(GetCellNumber(row, column)).empty());
}
}
for (int i = 0; i < rows_; ++i) {
int c = GetCellNumber(i, j);
flag = !GetPWidth(c).empty(); // because of multicolumns!
- GetCellInset(c)->SetAutoBreakRows(flag);
+ GetCellInset(c)->setAutoBreakRows(flag);
}
return true;
}
cellinfo_of_cell(cell)->p_width = width;
if (IsMultiColumn(cell)) {
- GetCellInset(cell)->SetAutoBreakRows(flag);
+ GetCellInset(cell)->setAutoBreakRows(flag);
return true;
}
return false;
<< write_attribute("special", cell_info[i][j].align_special)
<< ">\n";
os << "\\begin_inset ";
- cell_info[i][j].inset.Write(buf, os);
+ cell_info[i][j].inset.write(buf, os);
os << "\n\\end_inset \n"
<< "</cell>\n";
}
getTokenValue(line, "special", cell_info[i][j].align_special);
l_getline(is, line);
if (prefixIs(line, "\\begin_inset")) {
- cell_info[i][j].inset.Read(buf, lex);
+ cell_info[i][j].inset.read(buf, lex);
l_getline(is, line);
}
if (!prefixIs(line, "</cell>")) {
int pos = 0;
Paragraph::depth_type depth = 0;
LyXFont font(LyXFont::ALL_INHERIT);
- font.setLanguage(owner_->BufferOwner()->GetLanguage());
+ font.setLanguage(owner_->bufferOwner()->getLanguage());
while (lex.IsOK()) {
lex.nextToken();
lex.pushToken(token);
break;
}
- if (owner_->BufferOwner()->parseSingleLyXformat2Token(lex, par,
+ if (owner_->bufferOwner()->parseSingleLyXformat2Token(lex, par,
return_par,
token, pos,
depth, font)) {
par->insertChar(i, ' ');
}
}
- par->copyIntoMinibuffer(*owner_->BufferOwner(), i);
+ par->copyIntoMinibuffer(*owner_->bufferOwner(), i);
inset->par->insertFromMinibuffer(inset->par->size());
}
delete par;
if (rtl)
os << "\\R{";
- ret += inset->Latex(buf, os, fragile, fp);
+ ret += inset->latex(buf, os, fragile, fp);
if (rtl)
os << "}";
}
os << ">";
- ret += GetCellInset(cell)->DocBook(buf, os);
+ ret += GetCellInset(cell)->docBook(buf, os);
os << "</entry>";
++cell;
}
vector<unsigned int> const & clen) const
{
ostringstream sstr;
- int ret = GetCellInset(cell)->Ascii(buf, sstr, 0);
+ int ret = GetCellInset(cell)->ascii(buf, sstr, 0);
if (LeftLine(cell))
os << "| ";
if (IsMultiColumn(cell, true))
continue;
ostringstream sstr;
- GetCellInset(cell)->Ascii(buf, sstr, 0);
+ GetCellInset(cell)->ascii(buf, sstr, 0);
if (clen[j] < sstr.str().length())
clen[j] = sstr.str().length();
}
if (!IsMultiColumn(cell, true) || IsPartOfMultiColumn(i, j))
continue;
ostringstream sstr;
- GetCellInset(cell)->Ascii(buf, sstr, 0);
+ GetCellInset(cell)->ascii(buf, sstr, 0);
int len = int(sstr.str().length());
int const n = cells_in_multicolumn(cell);
for (int k = j; (len > 0) && (k < (j + n - 1)); ++k)
for (int cell = 0; !features.array && (cell < numberofcells); ++cell) {
if (GetVAlignment(cell) != LYX_VALIGN_TOP)
features.array = true;
- GetCellInset(cell)->Validate(features);
+ GetCellInset(cell)->validate(features);
}
}
///
LyXTabular & operator=(LyXTabular const &);
///
- LyXTabular * Clone(InsetTabular *);
+ LyXTabular * clone(InsetTabular *);
/// Returns true if there is a topline, returns false if not
bool TopLine(int cell, bool onlycolumn = false) const;
// I am not sure how some of the XWindows names coresponds to the TeX ones.
tex_accent_struct lyx_accent_table[18] = {
- { static_cast<tex_accent>(0), "", "", "", static_cast<kb_action>(0)},
- {TEX_ACUTE, "\\'", " AEIOUYaeiouySZszRLCNrlcn", "acute", LFUN_ACUTE},
- {TEX_GRAVE, "\\`", " aeiouAEIOU", "grave", LFUN_GRAVE},
- {TEX_MACRON, "\\=", " EeAIOUaiou", "macron", LFUN_MACRON},
- {TEX_TILDE, "\\~", " ANOanoIiUu", "tilde", LFUN_TILDE},
- {TEX_UNDERBAR, "\\b", " ", "underbar", LFUN_UNDERBAR},
- {TEX_CEDILLA, "\\c", " CcSsTtRLGrlgNKnk", "cedilla", LFUN_CEDILLA},
- {TEX_UNDERDOT, "\\d", " ", "underdot", LFUN_UNDERDOT},
- {TEX_CIRCUMFLEX, "\\^", " AEIOUaeiouHJhjCGScgs", "circumflex", LFUN_CIRCUMFLEX},
- {TEX_CIRCLE, "\\r", " AaUu", "circle", LFUN_CIRCLE},
- {TEX_TIE, "\\t", " ", "tie", LFUN_TIE},
- {TEX_BREVE, "\\u", " AaGgUu", "breve", LFUN_BREVE},
- {TEX_CARON, "\\v", " LSTZlstzCEDNRcednr", "caron", LFUN_CARON},
+ { static_cast<tex_accent>(0), "", /*"",*/ "", static_cast<kb_action>(0)},
+ {TEX_ACUTE, "\\'", /*" AEIOUYaeiouySZszRLCNrlcn",*/ "acute", LFUN_ACUTE},
+ {TEX_GRAVE, "\\`", /*" aeiouAEIOU",*/ "grave", LFUN_GRAVE},
+ {TEX_MACRON, "\\=", /*" EeAIOUaiou",*/ "macron", LFUN_MACRON},
+ {TEX_TILDE, "\\~", /*" ANOanoIiUu",*/ "tilde", LFUN_TILDE},
+ {TEX_UNDERBAR, "\\b", /*" ",*/ "underbar", LFUN_UNDERBAR},
+ {TEX_CEDILLA, "\\c", /*" CcSsTtRLGrlgNKnk",*/ "cedilla", LFUN_CEDILLA},
+ {TEX_UNDERDOT, "\\d", /*" ",*/ "underdot", LFUN_UNDERDOT},
+ {TEX_CIRCUMFLEX, "\\^", /*" AEIOUaeiouHJhjCGScgs",*/ "circumflex", LFUN_CIRCUMFLEX},
+ {TEX_CIRCLE, "\\r", /*" AaUu",*/ "circle", LFUN_CIRCLE},
+ {TEX_TIE, "\\t", /*" ",*/ "tie", LFUN_TIE},
+ {TEX_BREVE, "\\u", /*" AaGgUu",*/ "breve", LFUN_BREVE},
+ {TEX_CARON, "\\v", /*" LSTZlstzCEDNRcednr",*/ "caron", LFUN_CARON},
// {TEX_SPECIAL_CARON, "\\q", "", "ooo", LFUN_SPECIAL_CARON},
- {TEX_HUNGUML, "\\H", " OUou", "hugarian_umlaut", LFUN_HUNG_UMLAUT},
- {TEX_UMLAUT, "\\\"", " AEIOUaeiouy", "umlaut", LFUN_UMLAUT},
- {TEX_DOT, "\\.", " ZzICGicgEe", "dot", LFUN_DOT},
- {TEX_OGONEK, "\\k", " AaEe", "ogonek", LFUN_OGONEK},
- { static_cast<tex_accent>(0), "", "", "", static_cast<kb_action>(0)}};
+ {TEX_HUNGUML, "\\H", /*" OUou",*/ "hugarian_umlaut", LFUN_HUNG_UMLAUT},
+ {TEX_UMLAUT, "\\\"", /*" AEIOUaeiouy",*/ "umlaut", LFUN_UMLAUT},
+ {TEX_DOT, "\\.", /*" ZzICGicgEe",*/ "dot", LFUN_DOT},
+ {TEX_OGONEK, "\\k", /*" AaEe",*/ "ogonek", LFUN_OGONEK},
+ { static_cast<tex_accent>(0), "", /*"",*/ "", static_cast<kb_action>(0)}};
tex_accent_struct get_accent(kb_action action)
return lyx_accent_table[i];
++i;
}
- struct tex_accent_struct temp = { static_cast<tex_accent>(0), 0, 0,
+ struct tex_accent_struct temp = { static_cast<tex_accent>(0), 0,
0, static_cast<kb_action>(0)};
return temp;
}
tex_accent accent;
///
char const * cmd;
+#if 0
///
char const * native;
+#endif
///
char const * name;
///
if (row->par()->getChar(row->pos()) == Paragraph::META_INSET
&& (inset=row->par()->getInset(row->pos()))
&& (inset->display())) // || (inset->scroll() < 0)))
- align = (inset->LyxCode() == Inset::MATHMACRO_CODE)
+ align = (inset->lyxCode() == Inset::MATHMACRO_CODE)
? LYX_ALIGN_BLOCK : LYX_ALIGN_CENTER;
switch (align) {
&& (cursor.par()->isLetter(cursor.pos()))
|| (cursor.par()->getChar(cursor.pos()) == Paragraph::META_INSET
&& cursor.par()->getInset(cursor.pos()) != 0
- && cursor.par()->getInset(cursor.pos())->Latex(bview->buffer(), latex, false, false) == 0
+ && cursor.par()->getInset(cursor.pos())->latex(bview->buffer(), latex, false, false) == 0
&& latex.str() == "\\-"
))
cursor.pos(cursor.pos() + 1);
&& (cursor.par()->isLetter(cursor.pos())
|| (cursor.par()->getChar(cursor.pos()) == Paragraph::META_INSET
&& cursor.par()->getInset(cursor.pos()) != 0
- && cursor.par()->getInset(cursor.pos())->Latex(bview->buffer(), latex, false, false) == 0
+ && cursor.par()->getInset(cursor.pos())->latex(bview->buffer(), latex, false, false) == 0
&& latex.str() == "\\-"
)))
cursor.pos(cursor.pos() + 1);
// some insets are undeletable here
if (cursor.par()->getChar(cursor.pos()) == Paragraph::META_INSET) {
- if (!cursor.par()->getInset(cursor.pos())->Deletable())
+ if (!cursor.par()->getInset(cursor.pos())->deletable())
return;
// force complete redo when erasing display insets
// this is a cruel method but safe..... Matthias
if (par->getChar(pos) == Paragraph::META_INSET) {
Inset * inset = par->getInset(pos);
if (inset) {
- if (inset->Editable()==Inset::HIGHLY_EDITABLE) {
+ if (inset->editable()==Inset::HIGHLY_EDITABLE) {
UpdatableInset * uinset = static_cast<UpdatableInset *>(inset);
- uinset->SetFont(bv, fnt, toggleall, true);
+ uinset->setFont(bv, fnt, toggleall, true);
}
- font = inset->ConvertFont(font);
+ font = inset->convertFont(font);
}
}
LyXFont font(fnt);
// Let the insets convert their font
if (par->getChar(pos) == Paragraph::META_INSET) {
- font = par->getInset(pos)->ConvertFont(font);
+ font = par->getInset(pos)->convertFont(font);
}
LyXLayout const & layout =
selection.set(false);
if (inset_owner && (selection.set() || lsel))
- inset_owner->SetUpdateStatus(bview, InsetText::SELECTION);
+ inset_owner->setUpdateStatus(bview, InsetText::SELECTION);
}
selection.cursor = cursor;
}
if (inset_owner)
- inset_owner->SetUpdateStatus(bview, InsetText::CURSOR_PAR);
+ inset_owner->setUpdateStatus(bview, InsetText::CURSOR_PAR);
}
// the caption hack:
if (layout.labeltype == LABEL_SENSITIVE) {
bool isOK (par->InInset() && par->InInset()->owner() &&
- (par->InInset()->owner()->LyxCode() == Inset::FLOAT_CODE));
+ (par->InInset()->owner()->lyxCode() == Inset::FLOAT_CODE));
if (isOK) {
InsetFloat * tmp = static_cast<InsetFloat*>(par->InInset()->owner());
// inset now after the Undo LyX tries to call inset->Edit(...) again
// and cannot do this as the cursor is behind the inset and GetInset
// does not return the inset!
- if (inset->Editable() == Inset::HIGHLY_EDITABLE) {
+ if (inset->editable() == Inset::HIGHLY_EDITABLE) {
cursorLeft(bview, true);
}
#endif
} while (res.par() &&
!(res.par()->getChar(res.pos()) == Paragraph::META_INSET
&& (inset = res.par()->getInset(res.pos())) != 0
- && find(codes.begin(), codes.end(), inset->LyxCode())
+ && find(codes.begin(), codes.end(), inset->lyxCode())
!= codes.end()
&& (contents.empty() ||
static_cast<InsetCommand *>(res.par()->getInset(res.pos()))->getContents()
kmod_list_[accent] = new kmod_list_decl;
kmod_list_[accent]->data = keys;
kmod_list_[accent]->accent = accent;
+#if 0
if (allowed == "native") {
kmod_list_[accent]->allowed= lyx_accent_table[accent].native;
- } else {
+ } else {
+#endif
kmod_list_[accent]->allowed = allowed;
+#if 0
}
+#endif
for (string::size_type i = 0; i < keys.length(); ++i) {
string & temp =
l = l->next;
}
if (l == 0) {
+#if 0
// Not an exception. Check if it allowed
if (countChar(deadkey_info_.allowed, c) > 0) {
+#endif
res = DoAccent(c, deadkey_info_.accent);
+#if 0
} else {
// Not allowed
if (deadkey_!= 0)
res+= TOKEN_SEP;
res+= trans;
}
+#endif
}
currentState = init_state_;
return res;
string const TransCombinedState::normalkey(char c, string const & trans)
{
string res;
-
+
+#if 0
// Check if the key is allowed on the combination
if (countChar(comb_info_->data, c) > 0) {
+#endif
string const temp = DoAccent(c, deadkey2_info_.accent);
res = DoAccent(temp, deadkey_info_.accent);
currentState = init_state_;
+#if 0
} else {
// Not allowed. Output deadkey1 and check deadkey2 + c
if (deadkey_ != 0)
// Call deadkey state and leave it to setup the FSM
res += deadkey_state_->normalkey(c, trans);
}
+#endif
return res;
}
!enc.first) {
// Could not find an encoding
InsetLatexAccent ins(str);
- if (ins.CanDisplay()) {
+ if (ins.canDisplay()) {
text->insertInset(current_view, new InsetLatexAccent(ins));
} else {
insertVerbatim(str, text);
if (active_ == &default_ || c == 0) {
KmodInfo i;
i.accent = accent;
+#if 0
i.allowed = lyx_accent_table[accent].native;
+#endif
i.data.erase();
i.exception_list = 0;