Am 13.03.2008 um 18:31 schrieb Andre Poenitz:
On Thu, Mar 13, 2008 at 01:07:14AM +0100, Stefan Schimanski wrote:
This works:
if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
|| cmd.x > xo(cur.bv()) + tabular.width()) {
row_type r = 0;
int h = yo(cur.bv()) - tabular.rowA
On Thu, Mar 13, 2008 at 01:07:14AM +0100, Stefan Schimanski wrote:
> This works:
>
> if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
> || cmd.x > xo(cur.bv()) + tabular.width()) {
> row_type r = 0;
> int h = yo(cur.bv()) - tabular.rowAscent(0);
> for (;r < tabular.rowCount()
Stefan Schimanski wrote:
This works:
great, thanks!
This works:
if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
|| cmd.x > xo(cur.bv()) + tabular.width()) {
row_type r = 0;
int h = yo(cur.bv()) - tabular.rowAscent(0);
for (;r < tabular.rowCount() && cmd.y > h; ++r) {
h += tabular.rowAscent(r);
Stefan Schimanski wrote:
White board? The text background?
some padding defined by ADD_TO_TABULAR_WIDTH at the beginning of
InsetTabular.cpp
Stefan Schimanski wrote:
Look in BufferView::mouseEventDispatch:
Inset * inset = d->text_metrics_[&buffer_.text()].editXY(cur, cmd.x,
cmd.y);
So only the inset below the cursor will get the event.
it s getting the event alright, you're clicking on the white border
the attached patch incr
Am 13.03.2008 um 00:42 schrieb Edwin Leuven:
Stefan Schimanski wrote:
Why should the table get this mouse event after all if the mouse is
not over the table, but left on it?
there is a white border around it
White board? The text background?
Stefan
Stefan Schimanski wrote:
Why should the table get this mouse event after all if the mouse is not
over the table, but left on it?
there is a white border around it
Look in BufferView::mouseEventDispatch:
Inset * inset = d->text_metrics_[&buffer_.text()].editXY(cur,
cmd.x, cmd.y);
So only the inset below the cursor will get the event.
Stefan
Am 13.03.2008 um 00:37 schrieb Stefan Schimanski:
Am 13.03.2008 um 00:23 schrieb Edwin Leuven:
Stefan Sch
Am 13.03.2008 um 00:23 schrieb Edwin Leuven:
Stefan Schimanski wrote:
Can you send me a complete patch of your changes?
attached. it defines a new lfun that selects a row (once you're in
tabular)
the part that doesn't work is this:
// SELECT ROW
if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR
Stefan Schimanski wrote:
Can you send me a complete patch of your changes?
attached. it defines a new lfun that selects a row (once you're in tabular)
the part that doesn't work is this:
// SELECT ROW
if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WIDTH
|| cmd.x > xo(cur.bv()) + tabular.width(
Am 13.03.2008 um 00:07 schrieb Edwin Leuven:
Stefan Schimanski wrote:
Do a cur.bv().cursor() = cur; or something similar.
doesn't do diddly either
Can you send me a complete patch of your changes?
Stefan
Stefan Schimanski wrote:
Do a cur.bv().cursor() = cur; or something similar.
doesn't do diddly either
Am 12.03.2008 um 23:58 schrieb Edwin Leuven:
Stefan Schimanski wrote:
What do you want to do exactly?
select a table row when you click in front of it while the cursor is
outside the table
i added the following in InsetTabular::doDispatch when handling case
LFUN_MOUSE_PRESS:
// SELEC
Stefan Schimanski wrote:
What do you want to do exactly?
select a table row when you click in front of it while the cursor is
outside the table
i added the following in InsetTabular::doDispatch when handling case
LFUN_MOUSE_PRESS:
// SELECT ROW
if (cmd.x < xo(cur.bv()) + ADD_TO_TABULAR_WI
Am 12.03.2008 um 23:43 schrieb Edwin Leuven:
Stefan Schimanski wrote:
So you have to push the inset of the table on the cursor:
cur.push(theTableInset);
tried that too, doesn't work either...
What do you want to do exactly? Maybe it's what Andre was suggesting:
you have to make sure that
Stefan Schimanski wrote:
So you have to push the inset of the table on the cursor:
cur.push(theTableInset);
tried that too, doesn't work either...
Am 12.03.2008 um 23:33 schrieb Edwin Leuven:
Stefan Schimanski wrote:
Look in InsetMathNest::handleNest(...). I do exactly this for math.
i already tried something like like that, and now did this:
cur.idx() = tabular.getFirstCellInRow(r);
cur.pos() = 0;
cur.resetAnchor();
cur.idx() = tabul
Stefan Schimanski wrote:
Look in InsetMathNest::handleNest(...). I do exactly this for math.
i already tried something like like that, and now did this:
cur.idx() = tabular.getFirstCellInRow(r);
cur.pos() = 0;
cur.resetAnchor();
cur.idx() = tabular.getLastCellInRow(r);
cur.pos() = cur.lastpos(
Am 12.03.2008 um 21:43 schrieb Edwin Leuven:
Stefan Schimanski wrote:
* go to first cell
* go to last cell
and how do i do this?
Look in InsetMathNest::handleNest(...). I do exactly this for math.
Stefan
Edwin Leuven wrote:
Stefan Schimanski wrote:
* go to first cell
* go to last cell
and how do i do this?
difficult or trivial?
On Wed, Mar 12, 2008 at 09:23:59PM +0100, Edwin Leuven wrote:
> i am trying to get some row selection code working in insettabular, but am
> baffled by this cursor business
>
> the scenario is the following:
>
> the cursor is outside the tabular
>
> at the moment, on mouse press, i check in front
Stefan Schimanski wrote:
* go to first cell
* go to last cell
and how do i do this?
thanks again!
Am 12.03.2008 um 21:23 schrieb Edwin Leuven:
i am trying to get some row selection code working in insettabular,
but am baffled by this cursor business
the scenario is the following:
the cursor is outside the tabular
at the moment, on mouse press, i check in front of what row i click
this
i am trying to get some row selection code working in insettabular, but
am baffled by this cursor business
the scenario is the following:
the cursor is outside the tabular
at the moment, on mouse press, i check in front of what row i click
this i do in InsetTabular::doDispatch
now i want to
25 matches
Mail list logo