capitalized to have first letter lowercased.
* Adjust all affected files.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13605
a592a061-630c-0410-9148-
cb99ea01b6c8
53 files changed:
Intl & intl = owner_->getIntl();
if (bv_->getLyXText()->real_current_font.isRightToLeft()) {
if (intl.keymap == Intl::PRIMARY)
Intl & intl = owner_->getIntl();
if (bv_->getLyXText()->real_current_font.isRightToLeft()) {
if (intl.keymap == Intl::PRIMARY)
} else {
if (intl.keymap == Intl::SECONDARY)
} else {
if (intl.keymap == Intl::SECONDARY)
-void BufferView::Pimpl::MenuInsertLyXFile(string const & filenm)
+void BufferView::Pimpl::menuInsertLyXFile(string const & filenm)
{
BOOST_ASSERT(cursor_.inTexted());
string filename = filenm;
{
BOOST_ASSERT(cursor_.inTexted());
string filename = filenm;
break;
case LFUN_FILE_INSERT:
break;
case LFUN_FILE_INSERT:
- MenuInsertLyXFile(cmd.argument);
+ menuInsertLyXFile(cmd.argument);
break;
case LFUN_FILE_INSERT_ASCII_PARA:
break;
case LFUN_FILE_INSERT_ASCII_PARA:
- InsertAsciiFile(bv_, cmd.argument, true);
+ insertAsciiFile(bv_, cmd.argument, true);
break;
case LFUN_FILE_INSERT_ASCII:
break;
case LFUN_FILE_INSERT_ASCII:
- InsertAsciiFile(bv_, cmd.argument, false);
+ insertAsciiFile(bv_, cmd.argument, false);
break;
case LFUN_FONT_STATE:
break;
case LFUN_FONT_STATE:
case LFUN_OUTLINE: {
lyx::toc::OutlineOp const op =
static_cast<lyx::toc::OutlineOp>(convert<int>(cmd.argument));
case LFUN_OUTLINE: {
lyx::toc::OutlineOp const op =
static_cast<lyx::toc::OutlineOp>(convert<int>(cmd.argument));
- lyx::toc::Outline(op, buffer_, cursor_.pit());
+ lyx::toc::outline(op, buffer_, cursor_.pit());
bv_->text()->setCursor(cursor_, cursor_.pit(), 0);
buffer_->markDirty();
updateCounters(*buffer_);
bv_->text()->setCursor(cursor_, cursor_.pit(), 0);
buffer_->markDirty();
updateCounters(*buffer_);
///
std::vector<Position> saved_positions;
///
///
std::vector<Position> saved_positions;
///
- void MenuInsertLyXFile(std::string const & filen);
+ void menuInsertLyXFile(std::string const & filen);
/// our workarea
WorkArea & workarea() const;
/// this is used to handle XSelection events in the right manner
/// our workarea
WorkArea & workarea() const;
/// this is used to handle XSelection events in the right manner
}
// Make sure there is no class difference.
}
// Make sure there is no class difference.
- lyx::cap::SwitchBetweenClasses(textclass, tc, insertion, errorlist);
+ lyx::cap::switchBetweenClasses(textclass, tc, insertion, errorlist);
ParagraphList::iterator tmpbuf = insertion.begin();
int depth_delta = pars[pit].params().depth() - tmpbuf->params().depth();
ParagraphList::iterator tmpbuf = insertion.begin();
int depth_delta = pars[pit].params().depth() - tmpbuf->params().depth();
-void SwitchBetweenClasses(textclass_type c1, textclass_type c2,
+void switchBetweenClasses(textclass_type c1, textclass_type c2,
ParagraphList & pars, ErrorList & errorlist)
{
BOOST_ASSERT(!pars.empty());
ParagraphList & pars, ErrorList & errorlist)
{
BOOST_ASSERT(!pars.empty());
* for a list of paragraphs beginning with the specified par.
* It changes layouts and character styles.
*/
* for a list of paragraphs beginning with the specified par.
* It changes layouts and character styles.
*/
-void SwitchBetweenClasses(lyx::textclass_type c1,
+void switchBetweenClasses(lyx::textclass_type c1,
lyx::textclass_type c2,
ParagraphList & par,
ErrorList &);
lyx::textclass_type c2,
ParagraphList & par,
ErrorList &);
LanguageList::const_iterator it = UsedLanguages_.begin();
LanguageList::const_iterator end = UsedLanguages_.end();
for (; it != end; ++it)
LanguageList::const_iterator it = UsedLanguages_.begin();
LanguageList::const_iterator end = UsedLanguages_.end();
for (; it != end; ++it)
- if ((*it)->encoding()->LatexName() != doc_encoding)
- encodings.insert((*it)->encoding()->LatexName());
+ if ((*it)->encoding()->latexName() != doc_encoding)
+ encodings.insert((*it)->encoding()->latexName());
action = LFUN_IMPORT;
break;
case MenuItem::ViewFormats:
action = LFUN_IMPORT;
break;
case MenuItem::ViewFormats:
- formats = Exporter::GetExportableFormats(*view->buffer(), true);
+ formats = Exporter::getExportableFormats(*view->buffer(), true);
action = LFUN_PREVIEW;
break;
case MenuItem::UpdateFormats:
action = LFUN_PREVIEW;
break;
case MenuItem::UpdateFormats:
- formats = Exporter::GetExportableFormats(*view->buffer(), true);
+ formats = Exporter::getExportableFormats(*view->buffer(), true);
action = LFUN_UPDATE;
break;
default:
action = LFUN_UPDATE;
break;
default:
- formats = Exporter::GetExportableFormats(*view->buffer(), false);
+ formats = Exporter::getExportableFormats(*view->buffer(), false);
action = LFUN_EXPORT;
}
sort(formats.begin(), formats.end(), compare_format());
action = LFUN_EXPORT;
}
sort(formats.begin(), formats.end(), compare_format());
if (!only_body) {
if (runparams.flavor == OutputParams::XML)
ofs << "<?xml version=\"1.0\" encoding=\""
if (!only_body) {
if (runparams.flavor == OutputParams::XML)
ofs << "<?xml version=\"1.0\" encoding=\""
- << params().language->encoding()->Name() << "\"?>\n";
+ << params().language->encoding()->name() << "\"?>\n";
ofs << "<!DOCTYPE " << top_element << " ";
ofs << "<!DOCTYPE " << top_element << " ";
-string const BufferFormat(Buffer const & buffer)
+string const bufferFormat(Buffer const & buffer)
{
if (buffer.isLinuxDoc())
return "linuxdoc";
{
if (buffer.isLinuxDoc())
return "linuxdoc";
bool isNamed = false);
///return the format of the buffer on a string
bool isNamed = false);
///return the format of the buffer on a string
-std::string const BufferFormat(Buffer const & buffer);
+std::string const bufferFormat(Buffer const & buffer);
///
void bufferErrors(Buffer const &, TeXErrors const &);
///
///
void bufferErrors(Buffer const &, TeXErrors const &);
///
bool succeeded;
if (buf->isUnnamed())
bool succeeded;
if (buf->isUnnamed())
- succeeded = WriteAs(buf);
+ succeeded = writeAs(buf);
- succeeded = MenuWrite(buf);
+ succeeded = menuWrite(buf);
if (!succeeded)
return false;
if (!succeeded)
return false;
if (ret == 0) {
if (buf->isUnnamed()) {
if (ret == 0) {
if (buf->isUnnamed()) {
return false;
} else if (buf->save()) {
LyX::ref().session().addLastFile(buf->fileName());
return false;
} else if (buf->save()) {
LyX::ref().session().addLastFile(buf->fileName());
// true in the returned pair, then `second' is the textclass
// number; if it is false, second is 0. In both cases, second
// is what we want.
// true in the returned pair, then `second' is the textclass
// number; if it is false, second is 0. In both cases, second
// is what we want.
- textclass(textclasslist.NumberOfClass("article").second),
+ textclass(textclasslist.numberOfClass("article").second),
pimpl_(new Impl)
{
paragraph_separation = PARSEP_INDENT;
pimpl_(new Impl)
{
paragraph_separation = PARSEP_INDENT;
lex.next();
string const classname = lex.getString();
pair<bool, lyx::textclass_type> pp =
lex.next();
string const classname = lex.getString();
pair<bool, lyx::textclass_type> pp =
- textclasslist.NumberOfClass(classname);
+ textclasslist.numberOfClass(classname);
if (pp.first) {
textclass = pp.second;
} else {
if (pp.first) {
textclass = pp.second;
} else {
if (inputenc == "auto") {
string const doc_encoding =
if (inputenc == "auto") {
string const doc_encoding =
- language->encoding()->LatexName();
+ language->encoding()->latexName();
// Create a list with all the input encodings used
// in the document
// Create a list with all the input encodings used
// in the document
// only needed for gcc 2.95, remove when support terminated
template <typename A, typename B>
bool ptr_cmp(A const * a, B const * b)
// only needed for gcc 2.95, remove when support terminated
template <typename A, typename B>
bool ptr_cmp(A const * a, B const * b)
-bool Encodings::IsComposeChar_hebrew(unsigned char c)
+bool Encodings::isComposeChar_hebrew(unsigned char c)
{
return c <= 0xd2 && c >= 0xc0 &&
c != 0xce && c != 0xd0;
{
return c <= 0xd2 && c >= 0xc0 &&
c != 0xce && c != 0xd0;
-bool Encodings::IsComposeChar_arabic(unsigned char c)
+bool Encodings::isComposeChar_arabic(unsigned char c)
{
return c >= 0xeb && c <= 0xf2;
}
{
return c >= 0xeb && c <= 0xf2;
}
-unsigned char Encodings::TransformChar(unsigned char c,
+unsigned char Encodings::transformChar(unsigned char c,
Encodings::Letter_Form form)
{
if (!is_arabic(c))
Encodings::Letter_Form form)
{
if (!is_arabic(c))
encoding_table[i] = e[i];
}
///
encoding_table[i] = e[i];
}
///
- std::string const & Name() const {
+ std::string const & name() const {
- std::string const & LatexName() const {
+ std::string const & latexName() const {
- bool IsComposeChar_hebrew(unsigned char c);
+ bool isComposeChar_hebrew(unsigned char c);
- bool IsComposeChar_arabic(unsigned char c);
+ bool isComposeChar_arabic(unsigned char c);
///
static
bool is_arabic_special(unsigned char c);
///
static
bool is_arabic_special(unsigned char c);
bool is_arabic(unsigned char c);
///
static
bool is_arabic(unsigned char c);
///
static
- unsigned char TransformChar(unsigned char c, Letter_Form form);
+ unsigned char transformChar(unsigned char c, Letter_Form form);
{
vector<string> v;
if (buffer.params().getLyXTextClass().isTeXClassAvailable()) {
{
vector<string> v;
if (buffer.params().getLyXTextClass().isTeXClassAvailable()) {
- v.push_back(BufferFormat(buffer));
+ v.push_back(bufferFormat(buffer));
// FIXME: Don't hardcode format names here, but use a flag
if (v.back() == "latex")
v.push_back("pdflatex");
// FIXME: Don't hardcode format names here, but use a flag
if (v.back() == "latex")
v.push_back("pdflatex");
-bool Exporter::Preview(Buffer * buffer, string const & format)
+bool Exporter::preview(Buffer * buffer, string const & format)
{
string result_file;
if (!Export(buffer, format, true, result_file))
{
string result_file;
if (!Export(buffer, format, true, result_file))
-bool Exporter::IsExportable(Buffer const & buffer, string const & format)
+bool Exporter::isExportable(Buffer const & buffer, string const & format)
{
vector<string> backends = Backends(buffer);
for (vector<string>::const_iterator it = backends.begin();
{
vector<string> backends = Backends(buffer);
for (vector<string>::const_iterator it = backends.begin();
vector<Format const *> const
vector<Format const *> const
-Exporter::GetExportableFormats(Buffer const & buffer, bool only_viewable)
+Exporter::getExportableFormats(Buffer const & buffer, bool only_viewable)
{
vector<string> backends = Backends(buffer);
vector<Format const *> result =
{
vector<string> backends = Backends(buffer);
vector<Format const *> result =
bool put_in_tempdir);
///
static
bool put_in_tempdir);
///
static
- bool Preview(Buffer * buffer, std::string const & format);
+ bool preview(Buffer * buffer, std::string const & format);
- bool IsExportable(Buffer const & buffer, std::string const & format);
+ bool isExportable(Buffer const & buffer, std::string const & format);
///
static
std::vector<Format const *> const
///
static
std::vector<Format const *> const
- GetExportableFormats(Buffer const & buffer, bool only_viewable);
+ getExportableFormats(Buffer const & buffer, bool only_viewable);
autosave_timeout_->start();
}
autosave_timeout_->start();
}
- intl_->InitKeyMapper(lyxrc.use_kbmap);
+ intl_->initKeyMapper(lyxrc.use_kbmap);
lyxerr[Debug::INFO] << "Running autoSave()" << endl;
if (view()->available()) {
lyxerr[Debug::INFO] << "Running autoSave()" << endl;
if (view()->available()) {
- ::AutoSave(view().get());
+ ::autoSave(view().get());
Glib::RefPtr<Gdk::GC> gc = gc_;
pixmap->draw_pixbuf (gc, pixbuf, 0, 0, x, y, w, h,
Glib::RefPtr<Gdk::GC> gc = gc_;
pixmap->draw_pixbuf (gc, pixbuf, 0, 0, x, y, w, h,
- Gdk::RGB_DITHER_NONE, 0, 0);
+ Gdk::RGB_DITHER_NONE, 0, 0);
// ENCODING: we assume we've got 8-bit string in whatever format Xft
// ENCODING: we assume we've got 8-bit string in whatever format Xft
-// wants. We should be finding out what the backend's giving us and
+// wants. We should be finding out what the backend's giving us and
// then converting it before feeding it to Xft using XftDrawStringUtf8
void GPainter::text(int x, int y, char const * s, size_t ls, LyXFont const & f)
{
// then converting it before feeding it to Xft using XftDrawStringUtf8
void GPainter::text(int x, int y, char const * s, size_t ls, LyXFont const & f)
{
sigc::mem_fun(*this, >abular::updateSpecialRowsSensitivity));
xml_->get_widget("PageBreak", pagebreakcheck_);
sigc::mem_fun(*this, >abular::updateSpecialRowsSensitivity));
xml_->get_widget("PageBreak", pagebreakcheck_);
xml_->get_widget("SpecialRows", specialrowstable_);
xml_->get_widget("HeaderOn",headeroncheck_);
xml_->get_widget("SpecialRows", specialrowstable_);
xml_->get_widget("HeaderOn",headeroncheck_);
}
updateHorzAlignCombo(!multicol && !pwidth.zero());
}
updateHorzAlignCombo(!multicol && !pwidth.zero());
int halign = tabular.getAlignment(cell);
if (halign == LYX_ALIGN_RIGHT)
horzaligncombo_->set_active(2);
int halign = tabular.getAlignment(cell);
if (halign == LYX_ALIGN_RIGHT)
horzaligncombo_->set_active(2);
updateSensitivity();
updateSpecialRowsSensitivity();
}
updateSensitivity();
updateSpecialRowsSensitivity();
}
bool const multicol = multicolcheck_->get_active();
widthlength_->set_sensitive(specifywidth);
bool const multicol = multicolcheck_->get_active();
widthlength_->set_sensitive(specifywidth);
- vertaligncombo_->set_sensitive(specifywidth);
+ vertaligncombo_->set_sensitive(specifywidth);
updateHorzAlignCombo(!multicol && specifywidth);
}
updateHorzAlignCombo(!multicol && specifywidth);
}
headerlowerborderdoublecheck_->set_sensitive(header);
footerupperborderdoublecheck_->set_sensitive(footer);
footerlowerborderdoublecheck_->set_sensitive(footer);
headerlowerborderdoublecheck_->set_sensitive(header);
footerupperborderdoublecheck_->set_sensitive(footer);
footerlowerborderdoublecheck_->set_sensitive(footer);
firstheaderoncheck_->set_sensitive(!firstheaderempty);
firstheaderupperborderdoublecheck_->set_sensitive(firstheaderempty || firstheader);
firstheaderlowerborderdoublecheck_->set_sensitive(firstheaderempty || firstheader);
firstheaderoncheck_->set_sensitive(!firstheaderempty);
firstheaderupperborderdoublecheck_->set_sensitive(firstheaderempty || firstheader);
firstheaderlowerborderdoublecheck_->set_sensitive(firstheaderempty || firstheader);
bool const samelang = realfont.language() == bp.language;
bool const isrtl = realfont.isVisibleRightToLeft();
bool const samelang = realfont.language() == bp.language;
bool const isrtl = realfont.isVisibleRightToLeft();
- if (!samelang || isrtl != bp.language->RightToLeft()) {
+ if (!samelang || isrtl != bp.language->rightToLeft()) {
shape = L_SHAPE;
if (isrtl)
shape = REVERSED_L_SHAPE;
shape = L_SHAPE;
if (isrtl)
shape = REVERSED_L_SHAPE;
#include "format.h"
#include "frontends/LyXView.h"
#include "funcrequest.h"
#include "format.h"
#include "frontends/LyXView.h"
#include "funcrequest.h"
#include "bufferlist.h"
#include "support/filetools.h"
#include "bufferlist.h"
#include "support/filetools.h"
extern BufferList bufferlist;
extern BufferList bufferlist;
-extern void InsertAsciiFile(BufferView *, string const &, bool);
bool Importer::Import(LyXView * lv, string const & filename,
bool Importer::Import(LyXView * lv, string const & filename,
string filename2 = (loader_format == format) ? filename
: changeExtension(filename,
formats.extension(loader_format));
string filename2 = (loader_format == format) ? filename
: changeExtension(filename,
formats.extension(loader_format));
- InsertAsciiFile(lv->view().get(), filename2, as_paragraphs);
+ insertAsciiFile(lv->view().get(), filename2, as_paragraphs);
lv->dispatch(FuncRequest(LFUN_MARK_OFF));
}
lv->dispatch(FuncRequest(LFUN_MARK_OFF));
}
Paragraph const & parentpar = cur[cur.depth() - 2].paragraph();
LCursor::pos_type const parentpos = cur[cur.depth() - 2].pos();
return parentpar.getFontSettings(cur.bv().buffer()->params(),
Paragraph const & parentpar = cur[cur.depth() - 2].paragraph();
LCursor::pos_type const parentpos = cur[cur.depth() - 2].pos();
return parentpar.getFontSettings(cur.bv().buffer()->params(),
- parentpos).language()->RightToLeft();
+ parentpos).language()->rightToLeft();
-void Intl::KeyMapOn(bool on)
+void Intl::keyMapOn(bool on)
{
keymapon = on;
if (on) {
if (keymap == PRIMARY)
{
keymapon = on;
if (on) {
if (keymap == PRIMARY)
-void Intl::ToggleKeyMap()
+void Intl::toggleKeyMap()
{
if (keymapon && (keymap == PRIMARY)) {
{
if (keymapon && (keymap == PRIMARY)) {
- if (!trans.SetPrimary(prim_lang))
- trans.EnablePrimary();
+ if (!trans.setPrimary(prim_lang))
+ trans.enablePrimary();
keymapon = true;
keymap = PRIMARY;
}
keymapon = true;
keymap = PRIMARY;
}
- if (!trans.SetSecondary(sec_lang))
- trans.EnableSecondary();
+ if (!trans.setSecondary(sec_lang))
+ trans.enableSecondary();
keymapon = true;
keymap = SECONDARY;
}
keymapon = true;
keymap = SECONDARY;
}
-void Intl::InitKeyMapper(bool on)
+void Intl::initKeyMapper(bool on)
{
lyxerr[Debug::INIT] << "Initializing key mappings..." << endl;
{
lyxerr[Debug::INIT] << "Initializing key mappings..." << endl;
- trans.SetPrimary(prim_lang);
- trans.SetSecondary(sec_lang);
+ trans.setPrimary(prim_lang);
+ trans.setSecondary(sec_lang);
trans.setCharset(lyxrc.font_norm);
}
trans.setCharset(lyxrc.font_norm);
}
Intl();
/// {en/dis}able the keymap
Intl();
/// {en/dis}able the keymap
- void KeyMapOn(bool on);
+ void keyMapOn(bool on);
/// set the primary language keymap
/// set the primary language keymap
/// set the secondary language keymap
/// set the secondary language keymap
/// turn on/off key mappings, status in keymapon
/// turn on/off key mappings, status in keymapon
/// initialize key mapper
/// initialize key mapper
- void InitKeyMapper(bool on);
+ void initKeyMapper(bool on);
// Get the Translation Manager
TransManager & getTransManager();
// Get the Translation Manager
TransManager & getTransManager();
if (lyxrc.isp_use_input_encoding &&
params.inputenc != "default") {
string enc = (params.inputenc == "auto")
if (lyxrc.isp_use_input_encoding &&
params.inputenc != "default") {
string enc = (params.inputenc == "auto")
- ? params.language->encoding()->LatexName()
+ ? params.language->encoding()->latexName()
: params.inputenc;
string::size_type n = enc.length();
tmp = new char[3];
: params.inputenc;
string::size_type n = enc.length();
tmp = new char[3];
///
std::string const & display() const { return display_; }
///
///
std::string const & display() const { return display_; }
///
- bool RightToLeft() const { return rightToLeft_; }
+ bool rightToLeft() const { return rightToLeft_; }
///
Encoding const * encoding() const { return encoding_; }
///
///
Encoding const * encoding() const { return encoding_; }
///
-bool MenuWrite(Buffer * buffer)
+bool menuWrite(Buffer * buffer)
{
if (buffer->save()) {
LyX::ref().session().addLastFile(buffer->fileName());
{
if (buffer->save()) {
LyX::ref().session().addLastFile(buffer->fileName());
text, 0, 1, _("&Rename"), _("&Cancel"));
if (ret == 0)
text, 0, 1, _("&Rename"), _("&Cancel"));
if (ret == 0)
- return WriteAs(buffer);
+ return writeAs(buffer);
-bool WriteAs(Buffer * buffer, string const & filename)
+bool writeAs(Buffer * buffer, string const & filename)
{
string fname = buffer->fileName();
string const oldname = fname;
{
string fname = buffer->fileName();
string const oldname = fname;
bool unnamed = buffer->isUnnamed();
buffer->setUnnamed(false);
bool unnamed = buffer->isUnnamed();
buffer->setUnnamed(false);
- if (!MenuWrite(buffer)) {
+ if (!menuWrite(buffer)) {
buffer->setFileName(oldname);
buffer->setUnnamed(unnamed);
return false;
buffer->setFileName(oldname);
buffer->setUnnamed(unnamed);
return false;
-void QuitLyX(bool noask)
+void quitLyX(bool noask)
{
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
{
lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
-void AutoSave(BufferView * bv)
+void autoSave(BufferView * bv)
// should probably be moved into BufferList (Lgb)
// Perfect target for a thread...
{
// should probably be moved into BufferList (Lgb)
// Perfect target for a thread...
{
// create new file with template
// SERVERCMD !
//
// create new file with template
// SERVERCMD !
//
-void NewFile(BufferView * bv, string const & filename)
+void newFile(BufferView * bv, string const & filename)
{
// Split argument by :
string name;
{
// Split argument by :
string name;
// Insert ascii file (if filename is empty, prompt for one)
// Insert ascii file (if filename is empty, prompt for one)
-void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
+void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
{
if (!bv->available())
return;
{
if (!bv->available())
return;
// This function runs "configure" and then rereads lyx.defaults to
// reconfigure the automatic settings.
// This function runs "configure" and then rereads lyx.defaults to
// reconfigure the automatic settings.
-void Reconfigure(BufferView * bv)
+void reconfigure(BufferView * bv)
{
bv->owner()->message(_("Running configure..."));
{
bv->owner()->message(_("Running configure..."));
extern bool quitting;
///
extern bool quitting;
///
-bool MenuWrite(Buffer * buffer);
+bool menuWrite(Buffer * buffer);
/// write the given file, or ask if no name given
/// write the given file, or ask if no name given
-bool WriteAs(Buffer * buffer, std::string const & filename = std::string());
+bool writeAs(Buffer * buffer, std::string const & filename = std::string());
-void QuitLyX(bool noask);
+void quitLyX(bool noask);
-void AutoSave(BufferView * bv);
+void autoSave(BufferView * bv);
-void NewFile(BufferView * bv, std::string const & filename);
+void newFile(BufferView * bv, std::string const & filename);
-void InsertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
+void insertAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
///
std::string getContentsOfAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
///
///
std::string getContentsOfAsciiFile(BufferView * bv, std::string const & f, bool asParagraph);
///
-void Reconfigure(BufferView * bv);
+void reconfigure(BufferView * bv);
#include "language.h"
#include "session.h"
#include "LColor.h"
#include "language.h"
#include "session.h"
#include "LColor.h"
#include "lyxfunc.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "lyxfunc.h"
#include "lyxlex.h"
#include "lyxrc.h"
-extern void QuitLyX(bool);
-
extern LyXServer * lyxserver;
// This is the global bufferlist object
extern LyXServer * lyxserver;
// This is the global bufferlist object
if (last_loaded) {
bool success = false;
if (last_loaded->dispatch(batch_command, &success)) {
if (last_loaded) {
bool success = false;
if (last_loaded->dispatch(batch_command, &success)) {
lyx_gui::start(batch_command, files);
else {
// Something went wrong above
lyx_gui::start(batch_command, files);
else {
// Something went wrong above
bool LyXFont::isRightToLeft() const
{
bool LyXFont::isRightToLeft() const
{
- return lang->RightToLeft();
+ return lang->rightToLeft();
}
bool LyXFont::isVisibleRightToLeft() const
{
}
bool LyXFont::isVisibleRightToLeft() const
{
- return (lang->RightToLeft() &&
+ return (lang->rightToLeft() &&
Encoding const * encoding = view()->cursor().getEncoding();
Encoding const * encoding = view()->cursor().getEncoding();
- encoded_last_key = keysym->getISOEncoded(encoding ? encoding->Name() : "");
+ encoded_last_key = keysym->getISOEncoded(encoding ? encoding->name() : "");
// Do a one-deep top-level lookup for
// cancel and meta-fake keys. RVDK_PATCH_5
// Do a one-deep top-level lookup for
// cancel and meta-fake keys. RVDK_PATCH_5
case LFUN_EXPORT:
enable = cmd.argument == "custom"
case LFUN_EXPORT:
enable = cmd.argument == "custom"
- || Exporter::IsExportable(*buf, cmd.argument);
+ || Exporter::isExportable(*buf, cmd.argument);
break;
case LFUN_RUNCHKTEX:
break;
case LFUN_RUNCHKTEX:
break;
case LFUN_BUILDPROG:
break;
case LFUN_BUILDPROG:
- enable = Exporter::IsExportable(*buf, "program");
+ enable = Exporter::isExportable(*buf, "program");
break;
case LFUN_LAYOUT_TABULAR:
break;
case LFUN_LAYOUT_TABULAR:
|| name == "prefs"
|| name == "texinfo";
else if (name == "print")
|| name == "prefs"
|| name == "texinfo";
else if (name == "print")
- enable = Exporter::IsExportable(*buf, "dvi")
+ enable = Exporter::isExportable(*buf, "dvi")
&& lyxrc.print_command != "none";
else if (name == "character" || name == "mathpanel")
enable = cur.inset().lyxCode() != InsetBase::ERT_CODE;
&& lyxrc.print_command != "none";
else if (name == "character" || name == "mathpanel")
enable = cur.inset().lyxCode() != InsetBase::ERT_CODE;
void loadTextclass(string const & name)
{
std::pair<bool, lyx::textclass_type> const tc_pair =
void loadTextclass(string const & name)
{
std::pair<bool, lyx::textclass_type> const tc_pair =
- textclasslist.NumberOfClass(name);
+ textclasslist.numberOfClass(name);
if (!tc_pair.first) {
lyxerr << "Document class \"" << name
if (!tc_pair.first) {
lyxerr << "Document class \"" << name
string const str = bformat(_("Saving document %1$s..."),
makeDisplayPath(owner->buffer()->fileName()));
owner->message(str);
string const str = bformat(_("Saving document %1$s..."),
makeDisplayPath(owner->buffer()->fileName()));
owner->message(str);
- MenuWrite(owner->buffer());
+ menuWrite(owner->buffer());
owner->message(str + _(" done."));
} else
owner->message(str + _(" done."));
} else
- WriteAs(owner->buffer());
+ writeAs(owner->buffer());
break;
case LFUN_WRITEAS:
break;
case LFUN_WRITEAS:
- WriteAs(owner->buffer(), argument);
+ writeAs(owner->buffer(), argument);
break;
case LFUN_MENURELOAD: {
break;
case LFUN_MENURELOAD: {
case LFUN_UPDATE:
Exporter::Export(owner->buffer(), argument, true);
case LFUN_UPDATE:
Exporter::Export(owner->buffer(), argument, true);
- view()->showErrorList(BufferFormat(*owner->buffer()));
+ view()->showErrorList(bufferFormat(*owner->buffer()));
break;
case LFUN_PREVIEW:
break;
case LFUN_PREVIEW:
- Exporter::Preview(owner->buffer(), argument);
- view()->showErrorList(BufferFormat(*owner->buffer()));
+ Exporter::preview(owner->buffer(), argument);
+ view()->showErrorList(bufferFormat(*owner->buffer()));
break;
case LFUN_BUILDPROG:
break;
case LFUN_BUILDPROG:
owner->getDialogs().show("sendto");
else {
Exporter::Export(owner->buffer(), argument, false);
owner->getDialogs().show("sendto");
else {
Exporter::Export(owner->buffer(), argument, false);
- view()->showErrorList(BufferFormat(*owner->buffer()));
+ view()->showErrorList(bufferFormat(*owner->buffer()));
// save bookmarks to .lyx/session
view()->saveSavedPositions();
}
// save bookmarks to .lyx/session
view()->saveSavedPositions();
}
- QuitLyX(argument == "force");
+ quitLyX(argument == "force");
break;
case LFUN_TOCVIEW: {
break;
case LFUN_TOCVIEW: {
break;
case LFUN_RECONFIGURE:
break;
case LFUN_RECONFIGURE:
break;
case LFUN_HELP_OPEN: {
break;
case LFUN_HELP_OPEN: {
break;
case LFUN_FILE_NEW:
break;
case LFUN_FILE_NEW:
- NewFile(view(), argument);
+ newFile(view(), argument);
break;
case LFUN_FILE_OPEN:
break;
case LFUN_FILE_OPEN:
break;
case LFUN_KMAP_OFF:
break;
case LFUN_KMAP_OFF:
- owner->getIntl().KeyMapOn(false);
+ owner->getIntl().keyMapOn(false);
break;
case LFUN_KMAP_PRIM:
break;
case LFUN_KMAP_PRIM:
- owner->getIntl().KeyMapPrim();
+ owner->getIntl().keyMapPrim();
break;
case LFUN_KMAP_SEC:
break;
case LFUN_KMAP_SEC:
- owner->getIntl().KeyMapSec();
+ owner->getIntl().keyMapSec();
break;
case LFUN_KMAP_TOGGLE:
break;
case LFUN_KMAP_TOGGLE:
- owner->getIntl().ToggleKeyMap();
+ owner->getIntl().toggleKeyMap();
break;
case LFUN_REPEAT: {
break;
case LFUN_REPEAT: {
if (!newL || oldL == newL)
break;
if (!newL || oldL == newL)
break;
- if (oldL->RightToLeft() == newL->RightToLeft()
+ if (oldL->rightToLeft() == newL->rightToLeft()
&& !buffer.isMultiLingual())
buffer.changeLanguage(oldL, newL);
else
&& !buffer.isMultiLingual())
buffer.changeLanguage(oldL, newL);
else
loadTextclass(argument);
std::pair<bool, lyx::textclass_type> const tc_pair =
loadTextclass(argument);
std::pair<bool, lyx::textclass_type> const tc_pair =
- textclasslist.NumberOfClass(argument);
+ textclasslist.numberOfClass(argument);
if (!tc_pair.first)
break;
if (!tc_pair.first)
break;
buffer->params().textclass = new_class;
StableDocIterator backcur(view()->cursor());
ErrorList el;
buffer->params().textclass = new_class;
StableDocIterator backcur(view()->cursor());
ErrorList el;
- lyx::cap::SwitchBetweenClasses(
+ lyx::cap::switchBetweenClasses(
old_class, new_class,
buffer->paragraphs(), el);
old_class, new_class,
buffer->paragraphs(), el);
// Reads a layout definition from file
// Reads a layout definition from file
-bool LyXLayout::Read(LyXLex & lexrc, LyXTextClass const & tclass)
+bool LyXLayout::read(LyXLex & lexrc, LyXTextClass const & tclass)
{
// This table is sorted alphabetically [asierra 30March96]
keyword_item layoutTags[] = {
{
// This table is sorted alphabetically [asierra 30March96]
keyword_item layoutTags[] = {
- bool Read(LyXLex &, LyXTextClass const &);
+ bool read(LyXLex &, LyXTextClass const &);
///
void readAlign(LyXLex &);
///
///
void readAlign(LyXLex &);
///
- errnum = TranslateOS2Error(rc);
+ errnum = translateOS2Error(rc);
lyxerr <<"LyXComm: Could not create pipe " << filename
<< strerror(errnum) << endl;
return -1;
lyxerr <<"LyXComm: Could not create pipe " << filename
<< strerror(errnum) << endl;
return -1;
// Listen to it.
rc = DosConnectNPipe(os2fd);
if (rc != NO_ERROR && rc != ERROR_PIPE_NOT_CONNECTED) {
// Listen to it.
rc = DosConnectNPipe(os2fd);
if (rc != NO_ERROR && rc != ERROR_PIPE_NOT_CONNECTED) {
- errnum = TranslateOS2Error(rc);
+ errnum = translateOS2Error(rc);
lyxerr <<"LyXComm: Could not create pipe " << filename
<< strerror(errnum) << endl;
return -1;
lyxerr <<"LyXComm: Could not create pipe " << filename
<< strerror(errnum) << endl;
return -1;
rc = DosDisConnectNPipe(fd);
if (rc != NO_ERROR) {
rc = DosDisConnectNPipe(fd);
if (rc != NO_ERROR) {
- errnum = TranslateOS2Error(rc);
+ errnum = translateOS2Error(rc);
lyxerr << "LyXComm: Could not disconnect pipe " << filename
<< '\n' << strerror(errnum) << endl;
return;
lyxerr << "LyXComm: Could not disconnect pipe " << filename
<< '\n' << strerror(errnum) << endl;
return;
int errnum;
rc = DosResetBuffer(outfd); // To avoid synchronization problems.
if (rc != NO_ERROR) {
int errnum;
rc = DosResetBuffer(outfd); // To avoid synchronization problems.
if (rc != NO_ERROR) {
- errnum = TranslateOS2Error(rc);
+ errnum = translateOS2Error(rc);
lyxerr << "LyXComm: Message could not be flushed: " << msg
<< '\n' << strerror(errnum) << endl;
}
lyxerr << "LyXComm: Message could not be flushed: " << msg
<< '\n' << strerror(errnum) << endl;
}
bool cursorTop(LCursor & cur);
///
bool cursorBottom(LCursor & cur);
bool cursorTop(LCursor & cur);
///
bool cursorBottom(LCursor & cur);
- /// Delete character at cursor. Honour change tracking
- bool Delete(LCursor & cur);
+ /// Erase character at cursor. Honour change tracking
+ bool erase(LCursor & cur);
/** At cursor position 0, merge paragraph with the one before it.
* Ignore CT (this is used in \c acceptChange, \c rejectChange for
* physical deletion of paragraph break)
/** At cursor position 0, merge paragraph with the one before it.
* Ignore CT (this is used in \c acceptChange, \c rejectChange for
* physical deletion of paragraph break)
bool LyXTextClass::do_readStyle(LyXLex & lexrc, LyXLayout & lay)
{
lyxerr[Debug::TCLASS] << "Reading style " << lay.name() << endl;
bool LyXTextClass::do_readStyle(LyXLex & lexrc, LyXLayout & lay)
{
lyxerr[Debug::TCLASS] << "Reading style " << lay.name() << endl;
- if (!lay.Read(lexrc, *this)) {
+ if (!lay.read(lexrc, *this)) {
// Resolve fonts
lay.resfont = lay.font;
lay.resfont.realize(defaultfont());
// Resolve fonts
lay.resfont = lay.font;
lay.resfont.realize(defaultfont());
// Reads a textclass structure from file.
// Reads a textclass structure from file.
-bool LyXTextClass::Read(string const & filename, bool merge)
+bool LyXTextClass::read(string const & filename, bool merge)
{
if (!lyx::support::isFileReadable(filename)) {
lyxerr << "Cannot read layout file `" << filename << "'."
{
if (!lyx::support::isFileReadable(filename)) {
lyxerr << "Cannot read layout file `" << filename << "'."
lexrc.getString(),
"layout");
lexrc.getString(),
"layout");
lexrc.printError("Error reading input"
"file: "+tmp);
error = true;
lexrc.printError("Error reading input"
"file: "+tmp);
error = true;
string const tempfile = lyx::support::tempName();
error = !layout2layout(filename, tempfile);
if (!error)
string const tempfile = lyx::support::tempName();
error = !layout2layout(filename, tempfile);
if (!error)
- error = Read(tempfile, merge);
+ error = read(tempfile, merge);
lyx::support::unlink(tempfile);
return error;
}
lyx::support::unlink(tempfile);
return error;
}
// Read style-file
string const real_file = libFileSearch("layouts", name_, "layout");
// Read style-file
string const real_file = libFileSearch("layouts", name_, "layout");
- loaded_ = const_cast<LyXTextClass*>(this)->Read(real_file) == 0;
+ loaded_ = const_cast<LyXTextClass*>(this)->read(real_file) == 0;
if (!loaded_) {
lyxerr << "Error reading `"
if (!loaded_) {
lyxerr << "Error reading `"
const_iterator end() const { return layoutlist_.end(); }
/// Performs the read of the layout file.
const_iterator end() const { return layoutlist_.end(); }
/// Performs the read of the layout file.
- bool Read(std::string const & filename, bool merge = false);
+ bool read(std::string const & filename, bool merge = false);
///
void readOutputType(LyXLex &);
///
///
void readOutputType(LyXLex &);
///
// Gets textclass number from name
pair<bool, textclass_type> const
// Gets textclass number from name
pair<bool, textclass_type> const
-LyXTextClassList::NumberOfClass(string const & textclass) const
+LyXTextClassList::numberOfClass(string const & textclass) const
{
ClassList::const_iterator cit =
find_if(classlist_.begin(), classlist_.end(),
{
ClassList::const_iterator cit =
find_if(classlist_.begin(), classlist_.end(),
// Reads LyX textclass definitions according to textclass config file
// Reads LyX textclass definitions according to textclass config file
-bool LyXTextClassList::Read()
+bool LyXTextClassList::read()
{
LyXLex lex(0, 0);
string real_file = libFileSearch("", "textclass.lst");
{
LyXLex lex(0, 0);
string real_file = libFileSearch("", "textclass.lst");
{
lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration..." << endl;
{
lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration..." << endl;
- if (!textclasslist.Read()) {
+ if (!textclasslist.read()) {
lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
"during parsing.\n Exiting." << endl;
exit(1);
lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
"during parsing.\n Exiting." << endl;
exit(1);
/// Gets textclass number from name, -1 if textclass name does not exist
std::pair<bool, lyx::textclass_type> const
/// Gets textclass number from name, -1 if textclass name does not exist
std::pair<bool, lyx::textclass_type> const
- NumberOfClass(std::string const & textclass) const;
+ numberOfClass(std::string const & textclass) const;
///
LyXTextClass const & operator[](lyx::textclass_type textclass) const;
/// Read textclass list. Returns false if this fails.
///
LyXTextClass const & operator[](lyx::textclass_type textclass) const;
/// Read textclass list. Returns false if this fails.
private:
///
mutable ClassList classlist_;
private:
///
mutable ClassList classlist_;
if (bparams.inputenc == "auto" &&
language->encoding() != previous_language->encoding()) {
os << "\\inputencoding{"
if (bparams.inputenc == "auto" &&
language->encoding() != previous_language->encoding()) {
os << "\\inputencoding{"
- << language->encoding()->LatexName()
+ << language->encoding()->latexName()
<< "}\n";
texrow.newline();
}
<< "}\n";
texrow.newline();
}
bool Paragraph::isRightToLeftPar(BufferParams const & bparams) const
{
return lyxrc.rtl_support
bool Paragraph::isRightToLeftPar(BufferParams const & bparams) const
{
return lyxrc.rtl_support
- && getParLanguage(bparams)->RightToLeft()
+ && getParLanguage(bparams)->rightToLeft()
&& ownerCode() != InsetBase::ERT_CODE;
}
&& ownerCode() != InsetBase::ERT_CODE;
}
for (pos_type i = pos + 1, end = size(); i < end; ++i) {
unsigned char const par_char = getChar(i);
for (pos_type i = pos + 1, end = size(); i < end; ++i) {
unsigned char const par_char = getChar(i);
- if (!Encodings::IsComposeChar_arabic(par_char)) {
+ if (!Encodings::isComposeChar_arabic(par_char)) {
next_char = par_char;
break;
}
next_char = par_char;
break;
}
if (Encodings::is_arabic(next_char)) {
if (Encodings::is_arabic(prev_char) &&
!Encodings::is_arabic_special(prev_char))
if (Encodings::is_arabic(next_char)) {
if (Encodings::is_arabic(prev_char) &&
!Encodings::is_arabic_special(prev_char))
- return Encodings::TransformChar(c, Encodings::FORM_MEDIAL);
+ return Encodings::transformChar(c, Encodings::FORM_MEDIAL);
- return Encodings::TransformChar(c, Encodings::FORM_INITIAL);
+ return Encodings::transformChar(c, Encodings::FORM_INITIAL);
} else {
if (Encodings::is_arabic(prev_char) &&
!Encodings::is_arabic_special(prev_char))
} else {
if (Encodings::is_arabic(prev_char) &&
!Encodings::is_arabic_special(prev_char))
- return Encodings::TransformChar(c, Encodings::FORM_FINAL);
+ return Encodings::transformChar(c, Encodings::FORM_FINAL);
- return Encodings::TransformChar(c, Encodings::FORM_ISOLATED);
+ return Encodings::transformChar(c, Encodings::FORM_ISOLATED);
if ((bparams.inputenc == "latin1" ||
bparams.inputenc == "latin9") ||
(bparams.inputenc == "auto" &&
if ((bparams.inputenc == "latin1" ||
bparams.inputenc == "latin9") ||
(bparams.inputenc == "auto" &&
- (font.language()->encoding()->LatexName()
+ (font.language()->encoding()->latexName()
- font.language()->encoding()->LatexName()
+ font.language()->encoding()->latexName()
== "latin9"))) {
os << "\\ensuremath{"
<< c
== "latin9"))) {
os << "\\ensuremath{"
<< c
for (pos_type i = pos - 1; i >= 0; --i) {
c = par_.getChar(i);
for (pos_type i = pos - 1; i >= 0; --i) {
c = par_.getChar(i);
- if (!Encodings::IsComposeChar_hebrew(c)) {
+ if (!Encodings::isComposeChar_hebrew(c)) {
if (isPrintableNonspace(c)) {
int const width2 =
text_.singleWidth(par_, i, c, text_.getFont(par_, i));
if (isPrintableNonspace(c)) {
int const width2 =
text_.singleWidth(par_, i, c, text_.getFont(par_, i));
for (pos_type i = pos - 1; i >= 0; --i) {
c = par_.getChar(i);
for (pos_type i = pos - 1; i >= 0; --i) {
c = par_.getChar(i);
- if (!Encodings::IsComposeChar_arabic(c)) {
+ if (!Encodings::isComposeChar_arabic(c)) {
if (isPrintableNonspace(c)) {
int const width2 =
text_.singleWidth(par_, i, c, text_.getFont(par_, i));
if (isPrintableNonspace(c)) {
int const width2 =
text_.singleWidth(par_, i, c, text_.getFont(par_, i));
if (!isPrintableNonspace(c))
break;
if (!isPrintableNonspace(c))
break;
- if (arabic && Encodings::IsComposeChar_arabic(c))
+ if (arabic && Encodings::isComposeChar_arabic(c))
- if (hebrew && Encodings::IsComposeChar_hebrew(c))
+ if (hebrew && Encodings::isComposeChar_hebrew(c))
// draw as many chars as we can
if ((!hebrew && !arabic)
// draw as many chars as we can
if ((!hebrew && !arabic)
- || (hebrew && !Encodings::IsComposeChar_hebrew(c))
- || (arabic && !Encodings::IsComposeChar_arabic(c))) {
+ || (hebrew && !Encodings::isComposeChar_hebrew(c))
+ || (arabic && !Encodings::isComposeChar_arabic(c))) {
paintChars(vpos, orig_font, hebrew, arabic);
} else if (hebrew) {
paintHebrewComposeChar(vpos, orig_font);
paintChars(vpos, orig_font, hebrew, arabic);
} else if (hebrew) {
paintHebrewComposeChar(vpos, orig_font);
-int TranslateOS2Error(unsigned long rc)
+int translateOS2Error(unsigned long rc)
{
if (rc >= sizeof (errno_tab))
return EINVAL;
{
if (rc >= sizeof (errno_tab))
return EINVAL;
exit(1);
}
LyXTextClass textclass;
exit(1);
}
LyXTextClass textclass;
- textclass.Read(layoutfilename);
+ textclass.read(layoutfilename);
if (h_papersides.empty()) {
ostringstream ss;
ss << textclass.sides();
if (h_papersides.empty()) {
ostringstream ss;
ss << textclass.sides();
// The most common case is handled first (Asger)
if (isPrintable(c)) {
Language const * language = font.language();
// The most common case is handled first (Asger)
if (isPrintable(c)) {
Language const * language = font.language();
- if (language->RightToLeft()) {
+ if (language->rightToLeft()) {
if ((lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 ||
lyxrc.font_norm_type == LyXRC::ISO_10646_1)
&& language->lang() == "arabic") {
if ((lyxrc.font_norm_type == LyXRC::ISO_8859_6_8 ||
lyxrc.font_norm_type == LyXRC::ISO_10646_1)
&& language->lang() == "arabic") {
- if (Encodings::IsComposeChar_arabic(c))
+ if (Encodings::isComposeChar_arabic(c))
return 0;
c = par.transformChar(c, pos);
} else if (language->lang() == "hebrew" &&
return 0;
c = par.transformChar(c, pos);
} else if (language->lang() == "hebrew" &&
- Encodings::IsComposeChar_hebrew(c))
+ Encodings::isComposeChar_hebrew(c))
return 0;
}
return font_metrics::width(c, font);
return 0;
}
return font_metrics::width(c, font);
-bool LyXText::Delete(LCursor & cur)
+bool LyXText::erase(LCursor & cur)
{
BOOST_ASSERT(this == cur.text());
bool needsUpdate = false;
{
BOOST_ASSERT(this == cur.text());
bool needsUpdate = false;
if (cur.pos() == cur.paragraph().size())
// Par boundary, force full-screen update
singleParUpdate = false;
if (cur.pos() == cur.paragraph().size())
// Par boundary, force full-screen update
singleParUpdate = false;
- needsUpdate = Delete(cur);
+ needsUpdate = erase(cur);
cur.resetAnchor();
// It is possible to make it a lot faster still
// just comment out the line below...
cur.resetAnchor();
// It is possible to make it a lot faster still
// just comment out the line below...
cursorRight(cur);
cursorLeft(cur);
}
cursorRight(cur);
cursorLeft(cur);
}
cur.resetAnchor();
} else {
cutSelection(cur, true, false);
cur.resetAnchor();
} else {
cutSelection(cur, true, false);
string::const_iterator end = cmd.argument.end();
for (; cit != end; ++cit)
bv->owner()->getIntl().getTransManager().
string::const_iterator end = cmd.argument.end();
for (; cit != end; ++cit)
bv->owner()->getIntl().getTransManager().
- TranslateAndInsert(*cit, this);
+ translateAndInsert(*cit, this);
cur.resetAnchor();
moveCursor(cur, false);
cur.resetAnchor();
moveCursor(cur, false);
bv->owner()->getLyXFunc().handleKeyFunc(cmd.action);
if (!cmd.argument.empty())
bv->owner()->getIntl().getTransManager()
bv->owner()->getLyXFunc().handleKeyFunc(cmd.action);
if (!cmd.argument.empty())
bv->owner()->getIntl().getTransManager()
- .TranslateAndInsert(cmd.argument[0], this);
+ .translateAndInsert(cmd.argument[0], this);
break;
case LFUN_FLOAT_LIST: {
break;
case LFUN_FLOAT_LIST: {
-void Outline(OutlineOp mode, Buffer * buf, pit_type & pit)
+void outline(OutlineOp mode, Buffer * buf, pit_type & pit)
{
ParagraphList & pars = buf->text().paragraphs();
ParagraphList::iterator bgn = pars.begin();
{
ParagraphList & pars = buf->text().paragraphs();
ParagraphList::iterator bgn = pars.begin();
-void Outline(OutlineOp, Buffer *, pit_type &);
+void outline(OutlineOp, Buffer *, pit_type &);
-void Trans::InsertException(KmodException & exclist, char c,
+void Trans::insertException(KmodException & exclist, char c,
string const & data, bool flag, tex_accent accent)
{
Keyexc p;
string const & data, bool flag, tex_accent accent)
{
Keyexc p;
-void Trans::FreeException(KmodException & exclist)
+void Trans::freeException(KmodException & exclist)
-void Trans::FreeKeymap()
+void Trans::freeKeymap()
{
kmod_list_.clear();
keymap_.clear();
}
{
kmod_list_.clear();
keymap_.clear();
}
-bool Trans::IsDefined() const
+bool Trans::isDefined() const
{
return !name_.empty();
}
{
return !name_.empty();
}
-string const & Trans::GetName() const
+string const & Trans::getName() const
tex_accent getkeymod(string const &);
tex_accent getkeymod(string const &);
-void Trans::AddDeadkey(tex_accent accent, string const & keys)
+void Trans::addDeadkey(tex_accent accent, string const & keys)
{
KmodInfo tmp;
tmp.data = keys;
{
KmodInfo tmp;
tmp.data = keys;
-int Trans::Load(LyXLex & lex)
+int Trans::load(LyXLex & lex)
return -1;
/* string const allowed = lex.getString(); */
return -1;
/* string const allowed = lex.getString(); */
- AddDeadkey(accent, keys /*, allowed*/);
+ addDeadkey(accent, keys /*, allowed*/);
- AddDeadkey(accent, keys);
+ addDeadkey(accent, keys);
- InsertException(kmod_list_[accent_1].exception_list,
+ insertException(kmod_list_[accent_1].exception_list,
static_cast<char>(it->first), allowed,
true, accent_2);
}
static_cast<char>(it->first), allowed,
true, accent_2);
}
- InsertException(kmod_list_[accent].exception_list,
+ insertException(kmod_list_[accent].exception_list,
string const Trans::process(char c, TransManager & k)
{
string const Trans::process(char c, TransManager & k)
{
- string const t = Match(static_cast<unsigned char>(c));
+ string const t = match(static_cast<unsigned char>(c));
if (t.empty() && c != 0) {
return k.normalkey(c);
if (t.empty() && c != 0) {
return k.normalkey(c);
-int Trans::Load(string const & language)
+int Trans::load(string const & language)
{
string const filename = libFileSearch("kbd", language, "kmap");
if (filename.empty())
return -1;
{
string const filename = libFileSearch("kbd", language, "kmap");
if (filename.empty())
return -1;
LyXLex lex(kmapTags, K_LAST - 1);
lex.setFile(filename);
LyXLex lex(kmapTags, K_LAST - 1);
lex.setFile(filename);
- int const res = Load(lex);
+ int const res = load(lex);
if (res == 0) {
name_ = language;
if (res == 0) {
name_ = language;
- int Load(std::string const & language);
+ int load(std::string const & language);
- bool IsDefined() const;
+ bool isDefined() const;
- std::string const & GetName() const;
+ std::string const & getName() const;
///
std::string const process(char, TransManager &);
///
///
std::string const process(char, TransManager &);
///
- void AddDeadkey(tex_accent, std::string const &);
+ void addDeadkey(tex_accent, std::string const &);
- std::string const & Match(unsigned char c);
+ std::string const & match(unsigned char c);
- void InsertException(KmodException & exclist, char c,
+ void insertException(KmodException & exclist, char c,
std::string const & data, bool = false,
tex_accent = TEX_NOACCENT);
///
std::string const & data, bool = false,
tex_accent = TEX_NOACCENT);
///
- void FreeException(KmodException & exclist);
+ void freeException(KmodException & exclist);
-std::string const & Trans::Match(unsigned char c)
+std::string const & Trans::match(unsigned char c)
{
std::map<int, std::string>::iterator it = keymap_.find(c);
if (it != keymap_.end()) {
{
std::map<int, std::string>::iterator it = keymap_.find(c);
if (it != keymap_.end()) {
-int TransManager::SetPrimary(string const & language)
+int TransManager::setPrimary(string const & language)
- if (t1_->GetName() == language)
+ if (t1_->getName() == language)
- return t1_->Load(language);
+ return t1_->load(language);
-int TransManager::SetSecondary(string const & language)
+int TransManager::setSecondary(string const & language)
- if (t2_->GetName() == language)
+ if (t2_->getName() == language)
- return t2_->Load(language);
+ return t2_->load(language);
-void TransManager::EnablePrimary()
+void TransManager::enablePrimary()
active_ = t1_.get();
lyxerr[Debug::KBMAP] << "Enabling primary keymap" << endl;
}
active_ = t1_.get();
lyxerr[Debug::KBMAP] << "Enabling primary keymap" << endl;
}
-void TransManager::EnableSecondary()
+void TransManager::enableSecondary()
active_ = t2_.get();
lyxerr[Debug::KBMAP] << "Enabling secondary keymap" << endl;
}
active_ = t2_.get();
lyxerr[Debug::KBMAP] << "Enabling secondary keymap" << endl;
}
-void TransManager::DisableKeymap()
+void TransManager::disableKeymap()
{
active_ = &default_;
lyxerr[Debug::KBMAP] << "Disabling keymap" << endl;
}
{
active_ = &default_;
lyxerr[Debug::KBMAP] << "Disabling keymap" << endl;
}
-void TransManager::TranslateAndInsert(char c, LyXText * text)
+void TransManager::translateAndInsert(char c, LyXText * text)
{
string res = active_->process(c, *this);
{
string res = active_->process(c, *this);
insert(res, t);
} else {
// Go through the translation
insert(res, t);
} else {
// Go through the translation
- TranslateAndInsert(c, t);
+ translateAndInsert(c, t);
- int SetPrimary(std::string const &);
+ int setPrimary(std::string const &);
- int SetSecondary(std::string const &);
+ int setSecondary(std::string const &);
- void EnableSecondary();
+ void enableSecondary();
///
bool setCharset(std::string const &);
///
///
bool setCharset(std::string const &);
///
return trans_fsm_.currentState->backspace();
}
///
return trans_fsm_.currentState->backspace();
}
///
- void TranslateAndInsert(char, LyXText *);
+ void translateAndInsert(char, LyXText *);
///
std::string const deadkey(char, KmodInfo);
///
///
std::string const deadkey(char, KmodInfo);
///