mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-04 16:42:57 +00:00
simplify some, ws, begin minibuffer simplification
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1905 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a3a1d06f72
commit
4314e0e5cf
@ -10,8 +10,8 @@ src/CutAndPaste.C
|
||||
src/debug.C
|
||||
src/exporter.C
|
||||
src/ext_l10n.h
|
||||
src/figureForm.C
|
||||
src/figure_form.C
|
||||
src/figureForm.C
|
||||
src/FontLoader.C
|
||||
src/frontends/controllers/ButtonController.h
|
||||
src/frontends/controllers/character.C
|
||||
@ -90,67 +90,67 @@ src/frontends/qt2/paragraphdlgimpl.C
|
||||
src/frontends/qt2/tabularcreatedlgimpl.C
|
||||
src/frontends/xforms/combox.C
|
||||
src/frontends/xforms/FileDialog.C
|
||||
src/frontends/xforms/FormBibitem.C
|
||||
src/frontends/xforms/form_bibitem.C
|
||||
src/frontends/xforms/FormBibtex.C
|
||||
src/frontends/xforms/FormBibitem.C
|
||||
src/frontends/xforms/form_bibtex.C
|
||||
src/frontends/xforms/FormBibtex.C
|
||||
src/frontends/xforms/form_browser.C
|
||||
src/frontends/xforms/FormCharacter.C
|
||||
src/frontends/xforms/form_character.C
|
||||
src/frontends/xforms/FormCitation.C
|
||||
src/frontends/xforms/FormCharacter.C
|
||||
src/frontends/xforms/form_citation.C
|
||||
src/frontends/xforms/FormCopyright.C
|
||||
src/frontends/xforms/FormCitation.C
|
||||
src/frontends/xforms/form_copyright.C
|
||||
src/frontends/xforms/FormCredits.C
|
||||
src/frontends/xforms/FormCopyright.C
|
||||
src/frontends/xforms/form_credits.C
|
||||
src/frontends/xforms/FormDocument.C
|
||||
src/frontends/xforms/FormCredits.C
|
||||
src/frontends/xforms/form_document.C
|
||||
src/frontends/xforms/FormError.C
|
||||
src/frontends/xforms/FormDocument.C
|
||||
src/frontends/xforms/form_error.C
|
||||
src/frontends/xforms/FormExternal.C
|
||||
src/frontends/xforms/FormError.C
|
||||
src/frontends/xforms/form_external.C
|
||||
src/frontends/xforms/FormFiledialog.C
|
||||
src/frontends/xforms/FormExternal.C
|
||||
src/frontends/xforms/form_filedialog.C
|
||||
src/frontends/xforms/FormGraphics.C
|
||||
src/frontends/xforms/FormFiledialog.C
|
||||
src/frontends/xforms/form_graphics.C
|
||||
src/frontends/xforms/FormInclude.C
|
||||
src/frontends/xforms/FormGraphics.C
|
||||
src/frontends/xforms/form_include.C
|
||||
src/frontends/xforms/FormIndex.C
|
||||
src/frontends/xforms/FormInclude.C
|
||||
src/frontends/xforms/form_index.C
|
||||
src/frontends/xforms/FormIndex.C
|
||||
src/frontends/xforms/FormLog.C
|
||||
src/frontends/xforms/FormMathsBitmap.C
|
||||
src/frontends/xforms/FormMathsDeco.C
|
||||
src/frontends/xforms/form_maths_deco.C
|
||||
src/frontends/xforms/FormMathsDelim.C
|
||||
src/frontends/xforms/FormMathsDeco.C
|
||||
src/frontends/xforms/form_maths_delim.C
|
||||
src/frontends/xforms/FormMathsMatrix.C
|
||||
src/frontends/xforms/FormMathsDelim.C
|
||||
src/frontends/xforms/form_maths_matrix.C
|
||||
src/frontends/xforms/FormMathsPanel.C
|
||||
src/frontends/xforms/FormMathsMatrix.C
|
||||
src/frontends/xforms/form_maths_panel.C
|
||||
src/frontends/xforms/FormMathsSpace.C
|
||||
src/frontends/xforms/FormMathsPanel.C
|
||||
src/frontends/xforms/form_maths_space.C
|
||||
src/frontends/xforms/FormMinipage.C
|
||||
src/frontends/xforms/FormMathsSpace.C
|
||||
src/frontends/xforms/form_minipage.C
|
||||
src/frontends/xforms/FormParagraph.C
|
||||
src/frontends/xforms/FormMinipage.C
|
||||
src/frontends/xforms/form_paragraph.C
|
||||
src/frontends/xforms/FormPreamble.C
|
||||
src/frontends/xforms/FormParagraph.C
|
||||
src/frontends/xforms/form_preamble.C
|
||||
src/frontends/xforms/FormPreferences.C
|
||||
src/frontends/xforms/FormPreamble.C
|
||||
src/frontends/xforms/form_preferences.C
|
||||
src/frontends/xforms/FormPrint.C
|
||||
src/frontends/xforms/FormPreferences.C
|
||||
src/frontends/xforms/form_print.C
|
||||
src/frontends/xforms/FormRef.C
|
||||
src/frontends/xforms/FormPrint.C
|
||||
src/frontends/xforms/form_ref.C
|
||||
src/frontends/xforms/FormSearch.C
|
||||
src/frontends/xforms/FormRef.C
|
||||
src/frontends/xforms/form_search.C
|
||||
src/frontends/xforms/FormTabular.C
|
||||
src/frontends/xforms/FormSearch.C
|
||||
src/frontends/xforms/form_tabular.C
|
||||
src/frontends/xforms/FormTabularCreate.C
|
||||
src/frontends/xforms/FormTabular.C
|
||||
src/frontends/xforms/form_tabular_create.C
|
||||
src/frontends/xforms/FormToc.C
|
||||
src/frontends/xforms/FormTabularCreate.C
|
||||
src/frontends/xforms/form_toc.C
|
||||
src/frontends/xforms/FormUrl.C
|
||||
src/frontends/xforms/FormToc.C
|
||||
src/frontends/xforms/form_url.C
|
||||
src/frontends/xforms/FormUrl.C
|
||||
src/frontends/xforms/FormVCLog.C
|
||||
src/frontends/xforms/input_validators.C
|
||||
src/frontends/xforms/Menubar_pimpl.C
|
||||
|
@ -864,9 +864,11 @@ void BufferView::updateInset(Inset * inset, bool mark_dirty)
|
||||
if (text->UpdateInset(this, inset)) {
|
||||
update();
|
||||
if (mark_dirty) {
|
||||
#if 0
|
||||
if (buffer()->isLyxClean())
|
||||
owner()->getMiniBuffer()->
|
||||
setTimer(4);
|
||||
#endif
|
||||
buffer()->markDirty();
|
||||
}
|
||||
updateScrollbar();
|
||||
@ -876,9 +878,11 @@ void BufferView::updateInset(Inset * inset, bool mark_dirty)
|
||||
if (text->UpdateInset(this, theLockingInset())) {
|
||||
update();
|
||||
if (mark_dirty){
|
||||
#if 0
|
||||
if (buffer()->isLyxClean())
|
||||
owner()->getMiniBuffer()->
|
||||
setTimer(4);
|
||||
#endif
|
||||
buffer()->markDirty();
|
||||
}
|
||||
updateScrollbar();
|
||||
|
@ -1102,7 +1102,9 @@ void BufferView::Pimpl::update(LyXText * text, BufferView::UpdateCodes f)
|
||||
if ((f & CHANGE)) {
|
||||
if (buffer_->isLyxClean()) {
|
||||
buffer_->markDirty();
|
||||
#if 0
|
||||
owner_->getMiniBuffer()->setTimer(4);
|
||||
#endif
|
||||
} else {
|
||||
buffer_->markDirty();
|
||||
}
|
||||
@ -1217,7 +1219,7 @@ void BufferView::Pimpl::savePosition(unsigned int i)
|
||||
bv_->text->cursor.par()->id(),
|
||||
bv_->text->cursor.pos());
|
||||
if (i > 0)
|
||||
owner_->getMiniBuffer()->Set(_("Saved bookmark ") + tostr(i));
|
||||
owner_->getMiniBuffer()->Set(_("Saved bookmark"), tostr(i));
|
||||
}
|
||||
|
||||
|
||||
@ -1250,7 +1252,7 @@ void BufferView::Pimpl::restorePosition(unsigned int i)
|
||||
#endif
|
||||
update(bv_->text, BufferView::SELECT|BufferView::FITCUR);
|
||||
if (i > 0)
|
||||
owner_->getMiniBuffer()->Set(_("Moved to bookmark ") + tostr(i));
|
||||
owner_->getMiniBuffer()->Set(_("Moved to bookmark"), tostr(i));
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-04-06 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* tabular.[Ch] (getLabelList): implement new method
|
||||
|
||||
* minibuffer.h: comment ouf setTiimer
|
||||
|
||||
* minibuffer.C (ExecutingCB): constify res
|
||||
(peek_event): constify s
|
||||
(Set): constify ntext
|
||||
(Init): constify nicename
|
||||
|
||||
* BufferView2.C (updateInset): comment out Minibuffer::setTimer
|
||||
|
||||
* BufferView_pimpl.C (update): comment out Minibuffer::setTimer
|
||||
(savePosition): use two params to Minibuffer::Set
|
||||
(restorePosition): ditto
|
||||
|
||||
2001-04-06 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyx_main.C: include language.h
|
||||
|
@ -1,3 +1,12 @@
|
||||
2001-04-06 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||
|
||||
* insettext.C (InsetText): fix new
|
||||
(InsetText): reindent some, simplify deletion of par list
|
||||
(clear): simplify deletion of par list, fix new
|
||||
(SetParagraphData): simplify deletion of par list
|
||||
|
||||
* insettabular.[Ch] (getLabelList): implement new method
|
||||
|
||||
2001-04-05 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* lyxinset.h: do not include gettext.h...
|
||||
|
@ -2161,6 +2161,12 @@ LyXFunc::func_status InsetTabular::getStatus(string const & what) const
|
||||
}
|
||||
|
||||
|
||||
std::vector<string> const InsetTabular::getLabelList() const
|
||||
{
|
||||
return tabular->getLabelList();
|
||||
}
|
||||
|
||||
|
||||
bool InsetTabular::copySelection(BufferView * bv)
|
||||
{
|
||||
if (!hasSelection())
|
||||
|
@ -176,7 +176,8 @@ public:
|
||||
bool ShowInsetDialog(BufferView *) const;
|
||||
///
|
||||
LyXFunc::func_status getStatus(string const & argument) const;
|
||||
|
||||
///
|
||||
std::vector<string> const getLabelList() const;
|
||||
//
|
||||
// Public structures and variables
|
||||
///
|
||||
@ -230,10 +231,12 @@ private:
|
||||
sel_cell_start = sel_cell_end = 0;
|
||||
}
|
||||
///
|
||||
bool ActivateCellInset(BufferView *, int x = 0, int y = 0, int button = 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, int button=0);
|
||||
bool ActivateCellInsetAbs(BufferView *, int x = 0, int y = 0,
|
||||
int button = 0);
|
||||
///
|
||||
bool InsetHit(BufferView * bv, int x, int y) const;
|
||||
///
|
||||
|
@ -60,7 +60,7 @@ extern int greek_kb_flag;
|
||||
|
||||
InsetText::InsetText()
|
||||
{
|
||||
par = new LyXParagraph();
|
||||
par = new LyXParagraph;
|
||||
init();
|
||||
}
|
||||
|
||||
@ -132,12 +132,10 @@ InsetText::~InsetText()
|
||||
delete par;
|
||||
}
|
||||
#else
|
||||
LyXParagraph * p = par->next();
|
||||
delete par;
|
||||
while(p) {
|
||||
par = p;
|
||||
p = p->next();
|
||||
while (par) {
|
||||
LyXParagraph * tmp = par->next();
|
||||
delete par;
|
||||
par = tmp;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -160,15 +158,13 @@ void InsetText::clear()
|
||||
delete par;
|
||||
}
|
||||
#else
|
||||
LyXParagraph * p = par->next();
|
||||
delete par;
|
||||
while(p) {
|
||||
par = p;
|
||||
p = p->next();
|
||||
while (par) {
|
||||
LyXParagraph * tmp = par->next();
|
||||
delete par;
|
||||
par = tmp;
|
||||
}
|
||||
#endif
|
||||
par = new LyXParagraph();
|
||||
par = new LyXParagraph;
|
||||
}
|
||||
|
||||
|
||||
@ -220,12 +216,10 @@ void InsetText::Read(Buffer const * buf, LyXLex & lex)
|
||||
delete par;
|
||||
}
|
||||
#else
|
||||
LyXParagraph * p = par->next();
|
||||
delete par;
|
||||
while(p) {
|
||||
par = p;
|
||||
p = p->next();
|
||||
while (par) {
|
||||
LyXParagraph * tmp = par->next();
|
||||
delete par;
|
||||
par = tmp;
|
||||
}
|
||||
#endif
|
||||
par = new LyXParagraph;
|
||||
@ -237,8 +231,8 @@ void InsetText::Read(Buffer const * buf, LyXLex & lex)
|
||||
if (token == "\\end_inset")
|
||||
break;
|
||||
if (const_cast<Buffer*>(buf)->
|
||||
parseSingleLyXformat2Token(lex, par, return_par,token, pos, depth,
|
||||
font
|
||||
parseSingleLyXformat2Token(lex, par, return_par,
|
||||
token, pos, depth, font
|
||||
#ifndef NEW_INSETS
|
||||
, footnoteflag, footnotekind
|
||||
#endif
|
||||
@ -334,8 +328,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
||||
// if top_x differs we have a rule down and we don't have to clear anything
|
||||
if (!cleared && (top_x == int(x)) &&
|
||||
((need_update == INIT) || (need_update == FULL) || (top_baseline != baseline) ||
|
||||
(last_drawn_width!=insetWidth)))
|
||||
{
|
||||
(last_drawn_width!=insetWidth))) {
|
||||
int w = insetWidth;
|
||||
int h = insetAscent + insetDescent;
|
||||
int ty = baseline - insetAscent;
|
||||
@ -381,6 +374,8 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
||||
return;
|
||||
}
|
||||
x += TEXT_TO_INSET_OFFSET;
|
||||
|
||||
#warning Jürgen, why is this a block of its own? (Lgb)
|
||||
{
|
||||
int y = 0;
|
||||
Row * row = TEXT(bv)->GetRowNearY(y);
|
||||
@ -432,11 +427,13 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
||||
((drawFrame == ALWAYS) || ((drawFrame == LOCKED) && locked)))
|
||||
{
|
||||
pain.rectangle(top_x + 1, baseline - insetAscent + 1,
|
||||
width(bv, f) - 1, insetAscent + insetDescent - 1,
|
||||
width(bv, f) - 1,
|
||||
insetAscent + insetDescent - 1,
|
||||
frame_color);
|
||||
} else if (need_update & CLEAR_FRAME) {
|
||||
pain.rectangle(top_x + 1, baseline - insetAscent + 1,
|
||||
width(bv, f) - 1, insetAscent + insetDescent - 1,
|
||||
width(bv, f) - 1,
|
||||
insetAscent + insetDescent - 1,
|
||||
LColor::background);
|
||||
}
|
||||
x += width(bv, f) - TEXT_TO_INSET_OFFSET;
|
||||
@ -500,6 +497,7 @@ void InsetText::update(BufferView * bv, LyXFont const & font, bool reinit)
|
||||
TEXT_TO_INSET_OFFSET;
|
||||
}
|
||||
|
||||
|
||||
void InsetText::SetUpdateStatus(BufferView * bv, int what)
|
||||
{
|
||||
need_update |= what;
|
||||
@ -513,6 +511,7 @@ void InsetText::SetUpdateStatus(BufferView * bv, int what)
|
||||
TEXT(bv)->ClearSelection(bv);
|
||||
}
|
||||
|
||||
|
||||
void InsetText::UpdateLocal(BufferView * bv, int what, bool mark_dirty)
|
||||
{
|
||||
TEXT(bv)->FullRebreak(bv);
|
||||
@ -592,7 +591,8 @@ void InsetText::InsetUnlock(BufferView * bv)
|
||||
|
||||
bool InsetText::LockInsetInInset(BufferView * bv, UpdatableInset * inset)
|
||||
{
|
||||
lyxerr[Debug::INSETS] << "InsetText::LockInsetInInset(" << inset << "): ";
|
||||
lyxerr[Debug::INSETS] << "InsetText::LockInsetInInset("
|
||||
<< inset << "): ";
|
||||
if (!inset)
|
||||
return false;
|
||||
if (inset == cpar(bv)->GetInset(cpos(bv))) {
|
||||
@ -707,7 +707,8 @@ void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
inset_par = cpar(bv);
|
||||
inset_boundary = cboundary(bv);
|
||||
the_locking_inset = uinset;
|
||||
uinset->InsetButtonPress(bv, x - inset_x, y - inset_y, button);
|
||||
uinset->InsetButtonPress(bv, x - inset_x, y - inset_y,
|
||||
button);
|
||||
uinset->Edit(bv, x - inset_x, y - inset_y, 0);
|
||||
if (the_locking_inset)
|
||||
UpdateLocal(bv, CURSOR, false);
|
||||
@ -734,7 +735,8 @@ void InsetText::InsetButtonPress(BufferView * bv, int x, int y, int button)
|
||||
if (paste_internally)
|
||||
LocalDispatch(bv, LFUN_PASTE, "");
|
||||
else
|
||||
LocalDispatch(bv, LFUN_PASTESELECTION, "paragraph");
|
||||
LocalDispatch(bv, LFUN_PASTESELECTION,
|
||||
"paragraph");
|
||||
}
|
||||
}
|
||||
ShowInsetCursor(bv);
|
||||
@ -754,12 +756,17 @@ void InsetText::InsetButtonRelease(BufferView * bv, int x, int y, int button)
|
||||
if (cpar(bv)->GetChar(cpos(bv)) == LyXParagraph::META_INSET) {
|
||||
inset = static_cast<UpdatableInset*>(cpar(bv)->GetInset(cpos(bv)));
|
||||
if (inset->Editable() == Inset::HIGHLY_EDITABLE) {
|
||||
inset->InsetButtonRelease(bv, x - inset_x, y - inset_y,button);
|
||||
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, x - inset_x, y - inset_y,button);
|
||||
inset->Edit(bv, x - inset_x, y - inset_y, button);
|
||||
inset->InsetButtonRelease(bv,
|
||||
x - inset_x,
|
||||
y - inset_y, button);
|
||||
inset->Edit(bv,
|
||||
x - inset_x, y - inset_y, button);
|
||||
}
|
||||
UpdateLocal(bv, CURSOR_PAR, false);
|
||||
}
|
||||
@ -892,7 +899,7 @@ InsetText::LocalDispatch(BufferView * bv,
|
||||
UpdateLocal(bv, CURSOR_PAR, true);
|
||||
result=DISPATCHED_NOUPDATE;
|
||||
break;
|
||||
// --- Cursor Movements ---------------------------------------------
|
||||
// --- Cursor Movements -----------------------------------
|
||||
case LFUN_RIGHTSEL:
|
||||
bv->text->FinishUndo();
|
||||
moveRight(bv, false, true);
|
||||
@ -1587,19 +1594,15 @@ void InsetText::SetParagraphData(LyXParagraph * p)
|
||||
np->SetInsetOwner(this);
|
||||
}
|
||||
#else
|
||||
LyXParagraph * np;
|
||||
if (par) {
|
||||
np = par->next();
|
||||
delete par;
|
||||
while(np) {
|
||||
par = np;
|
||||
np = np->next();
|
||||
while (par) {
|
||||
LyXParagraph * tmp = par->next();
|
||||
delete par;
|
||||
par = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
par = p->Clone();
|
||||
par->SetInsetOwner(this);
|
||||
np = par;
|
||||
LyXParagraph * np = par;
|
||||
while (p->next()) {
|
||||
p = p->next();
|
||||
np->next(p->Clone());
|
||||
@ -1658,7 +1661,8 @@ int InsetText::cx(BufferView * bv) const
|
||||
int x = text->cursor.x() + top_x + TEXT_TO_INSET_OFFSET;
|
||||
if (the_locking_inset) {
|
||||
LyXFont font = text->GetFont(bv->buffer(),
|
||||
text->cursor.par(), text->cursor.pos());
|
||||
text->cursor.par(),
|
||||
text->cursor.pos());
|
||||
if (font.isVisibleRightToLeft())
|
||||
x -= the_locking_inset->width(bv, font);
|
||||
}
|
||||
@ -1696,7 +1700,8 @@ Row * InsetText::crow(BufferView * bv) const
|
||||
}
|
||||
|
||||
|
||||
LyXText * InsetText::getLyXText(BufferView const * lbv, bool const recursive) const
|
||||
LyXText * InsetText::getLyXText(BufferView const * lbv,
|
||||
bool const recursive) const
|
||||
{
|
||||
// Super UGLY! (Lgb)
|
||||
BufferView * bv = const_cast<BufferView *>(lbv);
|
||||
@ -1786,10 +1791,11 @@ void InsetText::resizeLyXText(BufferView * bv) const
|
||||
* Mechanism when setting the cursor */
|
||||
TEXT(bv)->mark_set = mark_set;
|
||||
if (selection) {
|
||||
TEXT(bv)->SetCursor(bv, selstartpar, selstartpos,true,
|
||||
selstartboundary);
|
||||
TEXT(bv)->SetCursor(bv, selstartpar, selstartpos,
|
||||
true, selstartboundary);
|
||||
TEXT(bv)->sel_cursor = TEXT(bv)->cursor;
|
||||
TEXT(bv)->SetCursor(bv, selendpar, selendpos, true, selendboundary);
|
||||
TEXT(bv)->SetCursor(bv, selendpar, selendpos,
|
||||
true, selendboundary);
|
||||
TEXT(bv)->SetSelection(bv);
|
||||
TEXT(bv)->SetCursor(bv, lpar, pos);
|
||||
} else {
|
||||
|
@ -62,7 +62,7 @@ void MiniBuffer::ExecutingCB(FL_OBJECT * ob, long)
|
||||
obj->addHistory(obj->cur_cmd);
|
||||
|
||||
// Dispatch only returns requested data for a few commands (ale)
|
||||
string res = obj->owner->getLyXFunc()->Dispatch(obj->cur_cmd);
|
||||
string const res = obj->owner->getLyXFunc()->Dispatch(obj->cur_cmd);
|
||||
lyxerr.debug() << "Minibuffer Res: " << res << endl;
|
||||
obj->shows_no_match = false;
|
||||
|
||||
@ -70,7 +70,8 @@ void MiniBuffer::ExecutingCB(FL_OBJECT * ob, long)
|
||||
}
|
||||
|
||||
|
||||
extern "C" void C_MiniBuffer_ExecutingCB(FL_OBJECT * ob, long)
|
||||
extern "C"
|
||||
void C_MiniBuffer_ExecutingCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
MiniBuffer * obj = static_cast<MiniBuffer*>(ob->u_vdata);
|
||||
obj->Init();
|
||||
@ -102,7 +103,7 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, FL_Coord, FL_Coord,
|
||||
case XK_Tab:
|
||||
{
|
||||
// complete or increment the command
|
||||
string s(lyxaction.getApproxFuncName(fl_get_input(ob)));
|
||||
string const s(lyxaction.getApproxFuncName(fl_get_input(ob)));
|
||||
if (!s.empty())
|
||||
fl_set_input(ob, s.c_str());
|
||||
return 1;
|
||||
@ -139,7 +140,8 @@ int MiniBuffer::peek_event(FL_OBJECT * ob, int event, FL_Coord, FL_Coord,
|
||||
}
|
||||
|
||||
|
||||
extern "C" int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
|
||||
extern "C"
|
||||
int C_MiniBuffer_peek_event(FL_OBJECT * ob, int event,
|
||||
FL_Coord, FL_Coord,
|
||||
int key, void * xev)
|
||||
{
|
||||
@ -189,7 +191,7 @@ void MiniBuffer::Set(string const& s1, string const& s2,
|
||||
else
|
||||
timer.stop();
|
||||
|
||||
string ntext = strip(s1 + ' ' + s2 + ' ' + s3);
|
||||
string const ntext = strip(s1 + ' ' + s2 + ' ' + s3);
|
||||
|
||||
if (!the_buffer->focus) {
|
||||
fl_set_input(the_buffer, ntext.c_str());
|
||||
@ -218,7 +220,7 @@ void MiniBuffer::Init()
|
||||
|
||||
// Else, show the buffer state.
|
||||
else if (owner->view()->available()) {
|
||||
string nicename =
|
||||
string const nicename =
|
||||
MakeDisplayPath(owner->buffer()->
|
||||
fileName());
|
||||
// Should we do this instead? (kindo like emacs)
|
||||
|
@ -23,10 +23,12 @@ public:
|
||||
///
|
||||
bool shows_no_match;
|
||||
|
||||
#if 0
|
||||
///
|
||||
void setTimer(unsigned int a) {
|
||||
timer.setTimeout(a * 1000);
|
||||
}
|
||||
#endif
|
||||
|
||||
///
|
||||
void Set(string const & = string(),
|
||||
|
@ -2544,6 +2544,20 @@ void LyXTabular::Validate(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
|
||||
std::vector<string> const LyXTabular::getLabelList() const
|
||||
{
|
||||
std::vector<string> label_list;
|
||||
for (int i = 0; i < rows_; ++i)
|
||||
for (int j = 0; j < columns_; ++j) {
|
||||
std::vector<string> const l =
|
||||
GetCellInset(i, j)->getLabelList();
|
||||
label_list.insert(label_list.end(),
|
||||
l.begin(), l.end());
|
||||
}
|
||||
return label_list;
|
||||
}
|
||||
|
||||
|
||||
#ifndef NEW_INSETS
|
||||
LyXTabular::BoxType LyXTabular::UseParbox(int cell) const
|
||||
{
|
||||
|
@ -214,9 +214,11 @@ public:
|
||||
/// Returns true if a complete update is necessary, otherwise false
|
||||
bool SetRightLine(int cell, bool line, bool onlycolumn = false);
|
||||
/// Returns true if a complete update is necessary, otherwise false
|
||||
bool SetAlignment(int cell, LyXAlignment align, bool onlycolumn = false);
|
||||
bool SetAlignment(int cell, LyXAlignment align,
|
||||
bool onlycolumn = false);
|
||||
/// Returns true if a complete update is necessary, otherwise false
|
||||
bool SetVAlignment(int cell, VAlignment align, bool onlycolumn = false);
|
||||
bool SetVAlignment(int cell, VAlignment align,
|
||||
bool onlycolumn = false);
|
||||
///
|
||||
bool SetColumnPWidth(int cell, string const & width);
|
||||
///
|
||||
@ -288,8 +290,9 @@ public:
|
||||
int AsciiBottomHLine(std::ostream &, int row,
|
||||
std::vector<unsigned int> const &) const;
|
||||
///
|
||||
int AsciiPrintCell(Buffer const *, std::ostream &, int cell, int row,
|
||||
int column, std::vector<unsigned int> const &) const;
|
||||
int AsciiPrintCell(Buffer const *, std::ostream &,
|
||||
int cell, int row, int column,
|
||||
std::vector<unsigned int> const &) const;
|
||||
///
|
||||
int Ascii(Buffer const *, std::ostream &) const;
|
||||
///
|
||||
@ -366,8 +369,9 @@ public:
|
||||
InsetTabular * owner() const { return owner_; }
|
||||
///
|
||||
void Validate(LaTeXFeatures &) const;
|
||||
|
||||
private: //////////////////////////////////////////////////////////////////
|
||||
///
|
||||
std::vector<string> const getLabelList() const;
|
||||
private:
|
||||
///
|
||||
struct cellstruct {
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user