File: Interaction.h

package info (click to toggle)
scilab 5.3.3-10
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 330,656 kB
file content (103 lines) | stat: -rw-r--r-- 3,755 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) 2001 - 2002 - INRIA - Mathieu Philipe
 * Copyright (C) 2002 - 2004 - INRIA - Djalel Abdemouche
 * Copyright (C) 2004 - 2006 - INRIA - Fabrice Leray
 * 
 * This file must be used under the terms of the CeCILL.
 * This source file is licensed as described in the file COPYING, which
 * you should have received as part of this distribution.  The terms
 * are also available at    
 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
 *
 */

/*------------------------------------------------------------------------
 *    Graphic library 
 *    Comment:
 *    This file contains all functions used to INTERACT with the graphic
 *    window (zoom by pressing button, callbacks...)
 --------------------------------------------------------------------------*/

#ifndef __SCI_INTERACTION__
#define __SCI_INTERACTION__

#include "dynlib_graphics.h"
#include "ObjectStructure.h"
#include "BOOL.h"

/**
 * Different status after resizing a canvas or a window.
 */
typedef enum
{
  RESIZE_SUCCESS = 0,
  RESIZE_MULTIPLE_DOCKED_TAB = -1,
  RESIZE_SIZE_TOO_LARGE = -2,
  RESIZE_UNCHANGED = 1
} EResizeStatus;



GRAPHICS_IMPEXP int sciAddCallback (sciPointObj * pthis, char *code, int len, int mevent); /* INTERACTION */
GRAPHICS_IMPEXP int sciGetCallbackMouseEvent (sciPointObj * pthis); /* INTERACTION */
GRAPHICS_IMPEXP int sciSetCallbackMouseEvent (sciPointObj * pthis, int mevent); /* INTERACTION */
GRAPHICS_IMPEXP char *sciGetCallback (sciPointObj * pthis); /* INTERACTION */
GRAPHICS_IMPEXP int sciDelCallback (sciPointObj * pthis); /* INTERACTION */

GRAPHICS_IMPEXP int Objmove(sciPointObj * pobj, double d[], int m, BOOL opt); /* INTERACTION */

/**
 * Call rubber box on a figure in pixels
 * @param pFigure figure on which to apply the rubber box
 * @param isClick specify whether the rubber box is selected by mouse click
 *        or a sequence of press/release.
 * @param intialRect if not null, specify the initial rectangle to use
 * @param[out] endRect array containing the coordinates of two opposite corners of
 *                     the rubber box
 * @param[out] usedButton Scilab code of the button used to terminate the rubber box
 */
GRAPHICS_IMPEXP void pixelRubberBox(sciPointObj * pFigure, BOOL isClick,
                    const int initialRect[4], int endRect[4], int * usedButton);

/**
 * Call rubber box using a subwn scale
 * @param pFigure figure on which to apply the rubber box
 * @param isClick specify whether the rubber box is selected by mouse click
 *        or a sequence of press/release.
 * @param intialRect if not null, specify the initial rectangle [x,y,w,h] to use
 * @param[out] endRect array containing the [x,y,w,h] of the selected rectangle
 * @param[out] usedButton Scilab code of the button used to terminate the rubber box
 */
GRAPHICS_IMPEXP void rubberBox(sciPointObj * pSubwin, BOOL isClick,
               const double initialRect[4], double endRect[4], int * usedButton);


/**
 * Perform an interative zoom on a subwin or figure handle;
 */
GRAPHICS_IMPEXP void interactiveZoom(sciPointObj * pObj);

/**
 * Interactive rotation of a subwin within the figure.
 */
GRAPHICS_IMPEXP void interactiveRotation(sciPointObj * pFigure);

/**
 * Interactive rotation of a subwindow
 */
GRAPHICS_IMPEXP void interactiveSubwinRotation(sciPointObj * pSubwin);

/**
 * Put the figure in top of other windows.
 * @pram pFigure figure corresponding to the window
 */
GRAPHICS_IMPEXP void showWindow(sciPointObj * pFigure);

/**
 * Modify a subwin viewing angles by a certain amount.
 */
GRAPHICS_IMPEXP void updateViewingAngles(sciPointObj * pSubwin, double deltaAlpha, double deltaTheta);


#endif /* __SCI_INTERACTION__ */