src/frontends/qt2/paragraphdlgimpl.C
src/frontends/qt2/tabularcreatedlgimpl.C
src/frontends/xforms/FormBase.h
-src/frontends/xforms/form_bibitem.C
src/frontends/xforms/FormBibitem.C
-src/frontends/xforms/form_bibtex.C
+src/frontends/xforms/form_bibitem.C
src/frontends/xforms/FormBibtex.C
+src/frontends/xforms/form_bibtex.C
src/frontends/xforms/form_browser.C
-src/frontends/xforms/form_citation.C
src/frontends/xforms/FormCitation.C
-src/frontends/xforms/form_copyright.C
+src/frontends/xforms/form_citation.C
src/frontends/xforms/FormCopyright.C
-src/frontends/xforms/form_document.C
+src/frontends/xforms/form_copyright.C
src/frontends/xforms/FormDocument.C
-src/frontends/xforms/form_error.C
+src/frontends/xforms/form_document.C
src/frontends/xforms/FormError.C
-src/frontends/xforms/form_graphics.C
+src/frontends/xforms/form_error.C
src/frontends/xforms/FormGraphics.C
-src/frontends/xforms/form_include.C
+src/frontends/xforms/form_graphics.C
src/frontends/xforms/FormInclude.C
-src/frontends/xforms/form_index.C
+src/frontends/xforms/form_include.C
src/frontends/xforms/FormIndex.C
+src/frontends/xforms/form_index.C
src/frontends/xforms/FormInset.h
src/frontends/xforms/FormLog.C
-src/frontends/xforms/form_paragraph.C
src/frontends/xforms/FormParagraph.C
-src/frontends/xforms/form_preferences.C
+src/frontends/xforms/form_paragraph.C
src/frontends/xforms/FormPreferences.C
-src/frontends/xforms/form_print.C
+src/frontends/xforms/form_preferences.C
src/frontends/xforms/FormPrint.C
-src/frontends/xforms/form_ref.C
+src/frontends/xforms/form_print.C
src/frontends/xforms/FormRef.C
+src/frontends/xforms/form_ref.C
src/frontends/xforms/FormSplash.C
-src/frontends/xforms/form_tabular.C
src/frontends/xforms/FormTabular.C
-src/frontends/xforms/form_tabular_create.C
+src/frontends/xforms/form_tabular.C
src/frontends/xforms/FormTabularCreate.C
-src/frontends/xforms/form_toc.C
+src/frontends/xforms/form_tabular_create.C
src/frontends/xforms/FormToc.C
-src/frontends/xforms/form_url.C
+src/frontends/xforms/form_toc.C
src/frontends/xforms/FormUrl.C
+src/frontends/xforms/form_url.C
src/frontends/xforms/FormVCLog.C
src/frontends/xforms/input_validators.C
src/frontends/xforms/Menubar_pimpl.C
}
+void BufferView::scrollCB(double value)
+{
+ pimpl_->scrollCB(value);
+}
+
+
Inset * BufferView::checkInsetHit(LyXText * text, int & x, int & y,
unsigned int button)
{
LyXParagraph * par = 0;
LyXParagraph * selstartpar = 0;
LyXParagraph * selendpar = 0;
+ UpdatableInset * the_locking_inset;
+
int pos = 0;
int selstartpos = 0;
int selendpos = 0;
selendpos = bv_->text->sel_end_cursor.pos();
selection = bv_->text->selection;
mark_set = bv_->text->mark_set;
+ the_locking_inset = bv_->text->the_locking_inset;
delete bv_->text;
bv_->text = new LyXText(bv_);
} else {
bv_->text->sel_cursor = bv_->text->cursor;
bv_->text->selection = false;
}
+ // remake the inset locking
+ bv_->text->the_locking_inset = the_locking_inset;
}
bv_->text->first = screen_->TopCursorVisible(bv_->text);
buffer_->resizeInsets(bv_);
+2001-02-19 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * src/buffer.h: tiny clean-ups to allow compilation with DEC cxx.
+
2001-02-17 Dekel Tsur <dekelts@tau.ac.il>
* LaTeX.C (run): Do not use 'scanres & RERUN' when deciding
inline
-void Buffer::setUnnamed(bool flag = true)
+void Buffer::setUnnamed(bool flag)
{
unnamed = flag;
}
inline
-void Buffer::Buffer::setParentName(string const & name)
+void Buffer::setParentName(string const & name)
{
params.parentname = name;
}
+2001-02-19 Juergen Vigna <jug@sad.it>
+
+ * FormTabular.C (build): make all input field accepted only after
+ a "RETURN".
+
+ * forms/form_tabular.fd: removed default "Return" on Close-Button.
+
+2001-02-19 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * FormError.C:
+ * FormGraphics.C:
+ * FormInset.C (showInset): change associated with name change
+ inset::hide to inset::hideDialog.
+
2001-02-19 Angus Leeming <a.leeming@ic.ac.uk>
* FormCitation.C (build): altering "Text after" now activates the Ok,
inset_ = inset;
message_ = inset->getContents();
- ih_ = inset->hide.connect(slot(this, &FormError::hide));
+ ih_ = inset->hideDialog.connect(slot(this, &FormError::hide));
show();
}
inset_ = inset;
- ih_ = inset_->hide.connect(slot(this, &FormGraphics::hide));
+ ih_ = inset_->hideDialog.connect(slot(this, &FormGraphics::hide));
show();
}
inset_ = inset;
params = inset->params();
- ih_ = inset->hide.connect(slot(this, &FormCommand::hide));
+ ih_ = inset->hideDialog.connect(slot(this, &FormCommand::hide));
show();
}
fl_set_input_return(column_options_->input_column_width,
FL_RETURN_END);
fl_set_input_return(column_options_->input_special_alignment,
- FL_RETURN_CHANGED);
+ FL_RETURN_END);
fl_set_input_return(cell_options_->input_mcolumn_width,
- FL_RETURN_CHANGED);
+ FL_RETURN_END);
fl_set_input_return(cell_options_->input_special_multialign,
- FL_RETURN_CHANGED);
+ FL_RETURN_END);
fl_addto_tabfolder(dialog_->tabFolder, _("Tabular"),
tabular_options_->form);
fdui->tabFolder = obj = fl_add_tabfolder(FL_TOP_TABFOLDER, 0, 0, 505, 250, _("Tabbed folder"));
fl_set_object_resize(obj, FL_RESIZE_ALL);
{
- char const * const dummy = N_("Close|^[^M");
+ char const * const dummy = N_("Close|^[");
fdui->button_close = obj = fl_add_button(FL_NORMAL_BUTTON, 415, 260, 90, 30, idex(_(dummy)));
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
}
style: FL_NORMAL_STYLE
size: FL_NORMAL_SIZE
lcol: FL_BLACK
-label: Close|^[^M
+label: Close|^[
shortcut:
resize: FL_RESIZE_ALL
gravity: FL_NoGravity FL_NoGravity
+2001-02-19 Angus Leeming <a.leeming@ic.ac.uk>
+
+ * insetcommand.h:
+ * inseterror.h:
+ * insetgraphics.C: change name of "hide" signal to "hideDialog",
+ consistent with InsetTabular.
+
+2001-02-19 Juergen Vigna <jug@sad.it>
+
+ * insettabular.C (LocalDispatch): implement PAGE up/down.
+
+ * insettext.C (draw): clear all of it on need_update==INIT too!
+
+ * insettabular.C (InsetUnlock): always clear the selection.
+
+ * inset.C (scroll): normally we only want to scroll the inset until
+ it is fully visible so if top_x + offset > 20 then just set scx to 0.
+
+2001-02-14 Juergen Vigna <jug@sad.it>
+
+ * insettabular.C (LocalDispatch): remove x_fix as it is not used.
+ (resetPos): fixed scroll behaviour.
+ (LocalDispatch): do an update if moving cursor inside a table cell
+ requests a scroll of the tabular.
+
2001-02-16 Lars Gullik Bjønnes <larsbj@lyx.org>
* insettext.C (textWidth): constify local var
if (!scx && top_x >= 20)
return;
if ((top_x + offset) > 20)
- scx += offset - (top_x - scx + offset - 20);
+ scx = 0;
+// scx += offset - (top_x - scx + offset - 20);
else
scx += offset;
} else {
explicit
InsetCommand(InsetCommandParams const &);
///
- virtual ~InsetCommand() { hide(); }
+ virtual ~InsetCommand() { hideDialog(); }
///
void Write(Buffer const *, std::ostream & os) const
{ p_.Write( os ); }
///
void setParams(InsetCommandParams const &);
///
- Signal0<void> hide;
+ Signal0<void> hideDialog;
private:
///
InsetCommandParams p_;
explicit
InsetError(string const &);
///
- ~InsetError() { hide(); }
+ ~InsetError() { hideDialog(); }
///
int ascent(BufferView *, LyXFont const &) const;
///
///
string const & getContents() const { return contents; }
///
- Signal0<void> hide;
+ Signal0<void> hideDialog;
+
private:
///
string contents;
InsetGraphics::~InsetGraphics()
{
// Emits the hide signal to the dialog connected (if any)
- hide();
+ hideDialog();
}
char const *
/** This signal is connected by our dialog and called when the inset
is deleted.
*/
- Signal0 <void> hide;
+ Signal0 <void> hideDialog;
+
private:
/// Update the inset after parameter change.
void updateInset() const;
// just for test!!!
the_locking_inset = 0;
locked = no_selection = cursor_visible = false;
- cursor.x_fix(-1);
oldcell = -1;
actrow = actcell = 0;
clearSelection();
tabular = new LyXTabular(this, *(tab.tabular));
the_locking_inset = 0;
locked = no_selection = cursor_visible = false;
- cursor.x_fix(-1);
oldcell = -1;
actrow = actcell = 0;
sel_cell_start = sel_cell_end = 0;
if (cleared) {
int cell = 0;
float cx;
+ first_visible_cell = -1;
for (i = 0; i < tabular->rows(); ++i) {
nx = int(x);
dodraw = ((baseline + tabular->GetDescentOfRow(i)) > 0) &&
continue;
cx = nx + tabular->GetBeginningOfTextInCell(cell);
if (dodraw) {
+ if (first_visible_cell < 0)
+ first_visible_cell = cell;
if (hasSelection())
DrawCellSelection(pain, nx, baseline, i, j, cell);
tabular->GetCellInset(cell)->draw(bv, font, baseline, cx,
oldcell = -1;
locked = false;
if (scroll() || hasSelection()) {
+ sel_cell_start = sel_cell_end = 0;
if (scroll()) {
scroll(bv, 0.0F);
- } else {
- sel_cell_start = sel_cell_end = 0;
}
UpdateLocal(bv, FULL, false);
}
if ((action < 0) && arg.empty())
return FINISHED;
- if ((action != LFUN_DOWN) && (action != LFUN_UP) &&
- (action != LFUN_DOWNSEL) && (action != LFUN_UPSEL))
- cursor.x_fix(-1);
if (the_locking_inset) {
result=the_locking_inset->LocalDispatch(bv, action, arg);
- if (result == DISPATCHED_NOUPDATE)
+ 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);
+ }
return result;
- else if (result == DISPATCHED) {
+ } else if (result == DISPATCHED) {
the_locking_inset->ToggleInsetCursor(bv);
UpdateLocal(bv, CELL, false);
the_locking_inset->ToggleInsetCursor(bv);
if (hs)
UpdateLocal(bv, SELECTION, false);
break;
+ case LFUN_NEXT: {
+ int column = actcol;
+ if (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);
+ actcell = tabular->GetCellBelow(first_visible_cell) + column;
+ } else {
+ actcell = tabular->GetFirstCellInRow(tabular->rows() - 1) + column;
+ }
+ resetPos(bv);
+ UpdateLocal(bv, CURSOR, false);
+ break;
+ }
+ case LFUN_PRIOR: {
+ int column = actcol;
+ if (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);
+ if (top_baseline > 0)
+ actcell = column;
+ else
+ actcell = tabular->GetCellBelow(first_visible_cell) + column;
+ } else {
+ actcell = column;
+ }
+ resetPos(bv);
+ UpdateLocal(bv, CURSOR, false);
+ break;
+ }
case LFUN_BACKSPACE:
break;
case LFUN_DELETE:
new_x += offset;
cursor.x(new_x);
// cursor.x(getCellXPos(actcell) + offset);
- if (((cursor.x() - offset) > 20) &&
- ((cursor.x()-offset+tabular->GetWidthOfColumn(actcell)) >
- (bv->workWidth()-20)))
+ if (scroll() && (tabular->GetWidthOfTabular() < bv->workWidth()-20))
+ scroll(bv, 0.0F);
+ else if (the_locking_inset &&
+ (tabular->GetWidthOfColumn(actcell) > bv->workWidth()-20))
+ {
+ int xx = cursor.x() - offset + bv->text->GetRealCursorX(bv);
+ printf("%d\n", xx);
+ if (xx > (bv->workWidth()-20))
+ scroll(bv, -(xx - bv->workWidth() + 60));
+ else if (xx < 20) {
+ if (xx < 0)
+ xx = -xx + 60;
+ else
+ xx = 60;
+ scroll(bv, xx);
+ }
+ } 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);
if ((!the_locking_inset ||
!the_locking_inset->GetFirstLockingInsetOfType(TABULAR_CODE)) &&
(actcell != oldcell)) {
- InsetTabular * inset = const_cast<InsetTabular *>(this);
- bv->owner()->getDialogs()->updateTabular(inset);
- oldcell = actcell;
+ InsetTabular * inset = const_cast<InsetTabular *>(this);
+ bv->owner()->getDialogs()->updateTabular(inset);
+ oldcell = actcell;
}
}
// Public structures and variables
///
LyXTabular * tabular;
- ///
- Signal0<void> hideDialog;
+ ///
+ Signal0<void> hideDialog;
private:
///
///
mutable int actrow;
///
+ mutable int first_visible_cell;
+ ///
bool no_selection;
///
bool no_draw;
// 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==FULL) || (top_baseline!=baseline)))
+ ((need_update==INIT)||(need_update==FULL)||(top_baseline!=baseline)))
{
int w = insetWidth;
int h = insetAscent + insetDescent;
///
UpdatableInset * the_locking_inset;
+ ///
+ int GetRealCursorX(BufferView *) const;
///
LyXFont const GetFont(Buffer const *, LyXParagraph * par,
LyXParagraph::size_type pos) const;
}
+int LyXText::GetRealCursorX(BufferView * bview) const
+{
+ int x = cursor.x();
+ if (the_locking_inset && (the_locking_inset->getLyXText(bview)!=this))
+ x = the_locking_inset->getLyXText(bview)->GetRealCursorX(bview);
+ return x;
+}
+
+
unsigned char LyXText::TransformChar(unsigned char c, LyXParagraph * par,
LyXParagraph::size_type pos) const
{