1#ifndef COIN_SOGUIVIEWPORTFIX_H
2#define COIN_SOGUIVIEWPORTFIX_H
3
4// @configure_input@
5
6/**************************************************************************\
7 *
8 *  This file is part of the Coin 3D visualization library.
9 *  Copyright (C) by Kongsberg Oil & Gas Technologies.
10 *
11 *  This library is free software; you can redistribute it and/or
12 *  modify it under the terms of the GNU General Public License
13 *  ("GPL") version 2 as published by the Free Software Foundation.
14 *  See the file LICENSE.GPL at the root directory of this source
15 *  distribution for additional information about the GNU GPL.
16 *
17 *  For using Coin with software that can not be combined with the GNU
18 *  GPL, and for taking advantage of the additional benefits of our
19 *  support services, please contact Kongsberg Oil & Gas Technologies
20 *  about acquiring a Coin Professional Edition License.
21 *
22 *  See http://www.coin3d.org/ for more information.
23 *
24 *  Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
25 *  http://www.sim.no/  sales@sim.no  coin-support@coin3d.org
26 *
27\**************************************************************************/
28
29#ifndef SO@GUI@_INTERNAL
30#error this is a private header file
31#endif /* !SO@GUI@_INTERNAL */
32
33#include <Inventor/fields/SoSFEnum.h>
34#include <Inventor/fields/SoSFVec3f.h>
35#include <Inventor/nodes/SoTransformation.h>
36
37// might go abstract to separate between ortho and perspective views
38
39class SoGuiViewportFix : public SoTransformation {
40  typedef SoTransformation inherited;
41  SO_NODE_HEADER(SoGuiViewportFix);
42
43public:
44  static void initClass(void);
45
46  SoGuiViewportFix(void);
47
48  enum Corner {
49    LEFT_TOP,
50    RIGHT_TOP,
51    LEFT_BOTTOM,
52    RIGHT_BOTTOM
53  };
54
55  SoSFEnum corner;
56
57  SoSFVec3f viewportSize; // output field: updated internally
58
59  virtual void doAction(SoAction * action);
60  virtual void GLRender(SoGLRenderAction * action);
61  virtual void pick(SoPickAction * action);
62  virtual void rayPick(SoRayPickAction * action);
63  virtual void getMatrix(SoGetMatrixAction * action);
64
65protected:
66  virtual ~SoGuiViewportFix(void);
67
68private:
69  void * internals;
70
71};
72
73#endif // !COIN_SOGUIVIEWPORTFIX_H
74