Yesid Hernandez wrote:

> 1. I set the a2dRecursiveEditTool and Push it with the a2dStToolContr, 
> my idea is to just edit the curves on the plot and not for example the 
> axis size, or de complete plot size, so I was looking for a porpierty 
> that allow me to block this edit, I supposed this:  void SetEditing 
> (bool value),  in the a2dCanvasObject do it, but it didn't. I was 
> looking for something else but didn't find it, so If anyone is so kind 
> to point in a right direction here.

SetEditable(bool editable) is to disable editing on an object and all its 
children  object.
But hierarchical object like a2dPlot, can only be edited inside(children) if 
the object itself is editable.
So you must set the children non editable.

Next to that you do not want to edit a2dPlot itself for certain features.

             PROPID_Allowrotation.SetPropertyToObject( editcopy, false );
             PROPID_Allowsizing.SetPropertyToObject( editcopy, false );
             PROPID_Allowskew.SetPropertyToObject( editcopy, false );

That should i think do more or less what you want.

> 
> 2. When I start to edit the curve, I realize that I can move any point, 
> that's no a desired behavior. I'm creating the curve with the 
> a2dVertexCurve let's supposed that from 3 point and the curve will be 
> something like a triangle, so in the editing mode the user should be 
> able just to edit that 3 points, not every point in the curve.

Happens in:

void a2dVertexCurve::OnCanvasObjectMouseEvent( a2dCanvasObjectMouseEvent& event 
)

I did add an extra flag:


     //! these flags define how (points on) curves can be moved/edited
     enum a2dCurveEditFlags
     {
         a2dCURVES_EDIT_NORMAL      = 0x0001,       /*!< points can be moved in 
any direction */
         a2dCURVES_EDIT_FIXED_X     = 0x0002,       /*!< points have fixed x 
coord. */
         a2dCURVES_EDIT_FIXED_Y     = 0x0004,       /*!< points have fixed y 
coord. */
         a2dCURVES_EDIT_ALLOW_ADD   = 0x0008,       /*!< allow adding new 
points to curve */
         a2dCURVES_EDIT_DEFAULT     = a2dCURVES_EDIT_NORMAL
     };

And in a2dVertexCurve::OnCanvasObjectMouseEvent.

if (!(m_editmode & a2dCURVES_EDIT_NORMAL))

Will check it in within 10 days, since my internet connection is down at home 
:-(

Klaas




-- 
Unclassified

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to