2 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 * Copyright (C) 2001 - 2002 - INRIA - Mathieu Philipe
4 * Copyright (C) 2002 - 2004 - INRIA - Djalel Abdemouche
5 * Copyright (C) 2004 - 2006 - INRIA - Fabrice Leray
6 * Copyright (C) 2011 - 2011 - DIGITEO - Bruno JOFRET
8 * This file must be used under the terms of the CeCILL.
9 * This source file is licensed as described in the file COPYING, which
10 * you should have received as part of this distribution. The terms
11 * are also available at
12 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
16 /*------------------------------------------------------------------------
19 * This file contains all functions used to INTERACT with the graphic
20 * window (zoom by pressing button, callbacks...)
21 --------------------------------------------------------------------------*/
23 #ifndef __SCI_INTERACTION__
24 #define __SCI_INTERACTION__
26 #include "dynlib_graphics.h"
27 #include "ObjectStructure.h"
31 * Different status after resizing a canvas or a window.
36 RESIZE_MULTIPLE_DOCKED_TAB = -1,
37 RESIZE_SIZE_TOO_LARGE = -2,
43 GRAPHICS_IMPEXP int sciAddCallback (sciPointObj * pthis, char *code, int len, int mevent); /* INTERACTION */
44 GRAPHICS_IMPEXP int sciGetCallbackMouseEvent (sciPointObj * pthis); /* INTERACTION */
45 GRAPHICS_IMPEXP int sciSetCallbackMouseEvent (sciPointObj * pthis, int mevent); /* INTERACTION */
46 GRAPHICS_IMPEXP char *sciGetCallback (sciPointObj * pthis); /* INTERACTION */
47 GRAPHICS_IMPEXP int sciDelCallback (sciPointObj * pthis); /* INTERACTION */
49 GRAPHICS_IMPEXP int Objmove(char* pobjUID, double d[], int m, BOOL opt); /* INTERACTION */
52 * Call rubber box on a figure in pixels
53 * @param pFigure figure on which to apply the rubber box
54 * @param isClick specify whether the rubber box is selected by mouse click
55 * or a sequence of press/release.
56 * @param intialRect if not null, specify the initial rectangle to use
57 * @param[out] endRect array containing the coordinates of two opposite corners of
59 * @param[out] usedButton Scilab code of the button used to terminate the rubber box
61 GRAPHICS_IMPEXP void pixelRubberBox(char * pFigure, BOOL isClick,
62 const int initialRect[4], int endRect[4], int * usedButton);
65 * Call rubber box using a subwn scale
66 * @param pFigure figure on which to apply the rubber box
67 * @param isClick specify whether the rubber box is selected by mouse click
68 * or a sequence of press/release.
69 * @param intialRect if not null, specify the initial rectangle [x,y,w,h] to use
70 * @param[out] endRect array containing the [x,y,w,h] of the selected rectangle
71 * @param[out] usedButton Scilab code of the button used to terminate the rubber box
73 GRAPHICS_IMPEXP void rubberBox(char * pSubwin, BOOL isClick,
74 const double initialRect[4], double endRect[4], int * usedButton);
78 * Perform an interative zoom on a subwin or figure handle;
80 GRAPHICS_IMPEXP void interactiveZoom(sciPointObj * pObj);
83 * Interactive rotation of a subwin within the figure.
85 GRAPHICS_IMPEXP void interactiveRotation(sciPointObj * pFigure);
88 * Interactive rotation of a subwindow
90 GRAPHICS_IMPEXP void interactiveSubwinRotation(sciPointObj * pSubwin);
93 * Put the figure in top of other windows.
94 * @pram pFigure figure corresponding to the window
96 GRAPHICS_IMPEXP void showWindow(char* pFigureUID);
98 #endif /* __SCI_INTERACTION__ */