uwog can you update the activity now?

From: <msevior_at_physics.unimelb.edu.au>
Date: Tue Dec 19 2006 - 01:09:10 CET

>
> Update of /cvsroot/abi/src/text/fmt/xp
> In directory abiword.snt.utwente.nl:/tmp/cvs-serv12980/src/text/fmt/xp
>
> Modified Files:
> fp_Page.cpp fv_View.cpp
> Log Message:
>
> Implement 1. Select next paragraph when clicking to the left of text.
> 2. Do word level selections. ie All selections are at least one full
> word.
> This behaviour results whenever the "set_show_margin(True)" is set and is
> the default for abiwidget. This behaviour was request by OLPC.
>

Hi Marc,
       I think the activity should be updated now. Can you do the following?

1. Pull cvs HEAD abiword and build the library.
2. Pull cvs HEAD pyabiword and build it.
3. pull pyabiword/examples/abicandy/toolbar.py
4. copy and paste the code from pyabiword/examples/abicandy/abicandy.py

Thanks!

Martin

>
> Index: fp_Page.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Page.cpp,v
> retrieving revision 1.195
> retrieving revision 1.196
> diff -u -d -r1.195 -r1.196
> --- fp_Page.cpp 15 Dec 2006 00:48:59 -0000 1.195
> +++ fp_Page.cpp 18 Dec 2006 23:46:13 -0000 1.196
> @@ -72,7 +72,7 @@
> m_rDamageRect.top = 0;
> m_rDamageRect.width = 0;
> m_rDamageRect.height = 0;
> - UT_DEBUGMSG(("!!!!!!!!!!!!!!!!!!!!!!!!!!Created Page %x \n",this));
> + xxx_UT_DEBUGMSG(("!!!!!!!!!!!!!!!!!!!!!!!!!!Created Page %x \n",this));
> }
>
> fp_Page::~fp_Page()
> @@ -995,10 +995,10 @@
> while (pCol)
> {
> dg_DrawArgs da = *pDA;
> - UT_DEBUGMSG(("Draw in page page X offset %d \n",pDA->xoff));
> + xxx_UT_DEBUGMSG(("Draw in page page X offset %d \n",pDA->xoff));
> da.xoff += pCol->getX();
> da.yoff += pCol->getY(pDA->pG);
> - UT_DEBUGMSG(("Draw in page col X offset %d \n",da.xoff));
> + xxx_UT_DEBUGMSG(("Draw in page col X offset %d \n",da.xoff));
> pCol->draw(&da);
>
> fp_Column *pNextCol = pCol->getFollower();
>
> Index: fv_View.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
> retrieving revision 1.1153
> retrieving revision 1.1154
> diff -u -d -r1.1153 -r1.1154
> --- fv_View.cpp 18 Dec 2006 00:49:03 -0000 1.1153
> +++ fv_View.cpp 18 Dec 2006 23:46:13 -0000 1.1154
> @@ -6800,19 +6800,86 @@
>
> //UT_ASSERT(!isSelectionEmpty());
>
> - if (iNewPoint <= m_Selection.getSelectionLeftAnchor())
> + xxx_UT_DEBUGMSG(("left anchor %d right %d
> \n",m_Selection.getSelectionLeftAnchor(),m_Selection.getSelectionRightAnchor()));
> +
> + PT_DocPosition iNewPointWord = 0;
> + /*
> +Here is the Logic.
> +If No selection present:
> +
> +If iNewPoint > getSelectionAnchor()
> +then:
> +1. Make sure selection anchor is at nearest Beginning of Word (BOW)
> +2. Make iNewPoint go to nearest End of Word (EOW)
> +else
> +1. Make selection anchor go to nearest End of Word (EOW)
> +2. Make iNewPoint go to nearest BOW
> +endif
> +
> +else selection is present:
> +
> +if oldpoint >= anchor and iNewPoint >= anchor then
> + iNewPoint goes to nearest BOW
> +else if oldpoint > anchor and (iNewPoint < anchor) then
> +
> +clear selection
> +iNewPoint goes to nearest BOW before anchor
> +anchor goes to nearest EOW to iNewPoint
> +
> +else if oldpoint < anchor and iNewPoint < anchor then
> +
> +iNewPoint goes to nears BOW
> +
> +else if oldpoint < anchor and iNewPoint >= anchor then
> +
> +clear selection
> +anchor goes to nearest BOW > iNewPoint
> +iNewPoint goes to nearest EOW > anchor
> +
> +endif
> + */
> + if(isSelectionEmpty())
> {
> - m_Selection.setSelectionAnchor(m_Selection.getSelectionRightAnchor());
> + if(iNewPoint > getPoint())
> + {
> + iNewPointWord = _getDocPosFromPoint(getPoint(), FV_DOCPOS_BOW, false);
> + m_Selection.setSelectionAnchor(iNewPointWord);
> + iNewPointWord = _getDocPosFromPoint(iNewPoint, FV_DOCPOS_EOW_SELECT,
> false);
> + }
> + else
> + {
> + iNewPointWord = _getDocPosFromPoint(getPoint(), FV_DOCPOS_EOW_SELECT,
> false);
> + m_Selection.setSelectionAnchor(iNewPointWord);
> + iNewPointWord = _getDocPosFromPoint(iNewPoint, FV_DOCPOS_BOW, false);
> + }
> }
> else
> {
> - m_Selection.setSelectionAnchor(m_Selection.getSelectionLeftAnchor());
> + if((getPoint() > m_Selection.getSelectionAnchor()) && (iNewPoint >=
> m_Selection.getSelectionAnchor()))
> + {
> + iNewPointWord = _getDocPosFromPoint(iNewPoint, FV_DOCPOS_EOW_SELECT,
> false);
> + }
> + else if ((getPoint() > m_Selection.getSelectionAnchor()) && (iNewPoint
> < m_Selection.getSelectionAnchor()))
> + {
> + iNewPointWord = _getDocPosFromPoint(m_Selection.getSelectionAnchor(),
> FV_DOCPOS_BOW, false);
> + _clearSelection();
> + iNewPointWord = _getDocPosFromPoint(iNewPointWord,
> FV_DOCPOS_EOW_SELECT, false);
> + m_Selection.setSelectionAnchor(iNewPointWord);
> + iNewPointWord = _getDocPosFromPoint(iNewPointWord, FV_DOCPOS_BOW,
> false);
> + }
> + else if ((getPoint() <= m_Selection.getSelectionAnchor()) && (iNewPoint
> < m_Selection.getSelectionAnchor()))
> + {
> + iNewPointWord = _getDocPosFromPoint(iNewPoint, FV_DOCPOS_BOW, false);
> + }
> + else
> + {
> + iNewPointWord = _getDocPosFromPoint(iNewPoint, FV_DOCPOS_BOW,
> false);
> + _clearSelection();
> + m_Selection.setSelectionAnchor(iNewPointWord);
> + iNewPointWord = _getDocPosFromPoint(iNewPointWord,
> FV_DOCPOS_EOW_SELECT, false);
> + }
> }
>
> - const FV_DocPos argDocPos =
> - iNewPoint > m_Selection.getSelectionAnchor() ? FV_DOCPOS_EOW_SELECT :
> FV_DOCPOS_BOW;
> - const PT_DocPosition iNewPointWord = _getDocPosFromPoint(iNewPoint,
> argDocPos,false);
> -
> bool bPostpone = false;
>
> if (bDrag)
> @@ -6855,12 +6922,23 @@
> bPostpone = true;
> }
> }
> -
> + xxx_UT_DEBUGMSG(("anchor %d extend to point %d \n",getSelectionAnchor(),
> iNewPointWord));
> if (!bPostpone)
> {
> _extSelToPos(iNewPointWord);
> notifyListeners(AV_CHG_MOTION);
> }
> + if(getPoint() > getSelectionAnchor())
> + {
> + m_Selection.setSelectionLeftAnchor(getSelectionAnchor());
> + m_Selection.setSelectionRightAnchor(getPoint());
> + }
> + else
> + {
> + m_Selection.setSelectionRightAnchor(m_Selection.getSelectionAnchor());
> + m_Selection.setSelectionLeftAnchor(getPoint());
> + }
> + xxx_UT_DEBUGMSG(("final selection anchor %d extend to point %d
> \n",getSelectionAnchor(), iNewPointWord));
> }
>
> void FV_View::endDrag(UT_sint32 xPos, UT_sint32 yPos)
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>
Received on Tue Dec 19 01:09:28 2006

This archive was generated by hypermail 2.1.8 : Tue Dec 19 2006 - 01:09:29 CET