Debian Codegraph @

include/iinteractiveview.h

raw
1 #pragma once
2
3 #include "iselectiontest.h"
4 #include "ivolumetest.h"
5 #include "math/Vector2.h"
6
7 /**
8 * Base class of the interactive views used in DarkRadiant:
9 * OrthoView (XYView), Camera (3D View), Texture Tool (UV editor)
10 */
11 class IInteractiveView
12 {
13 public:
14 virtual ~IInteractiveView() {}
15
16 /**
17 * Creates a new SelectionTest instance for the given position, measured in
18 * device coordinates in the range [-1..+1]
19 */
20 virtual SelectionTestPtr createSelectionTestForPoint(const Vector2& point) = 0;
21
22 // Returns true if this view allows drag-selecting multiple items
23 virtual bool supportsDragSelections() = 0;
24
25 // Returns the device dimensions in pixels
26 virtual int getDeviceWidth() const = 0;
27 virtual int getDeviceHeight() const = 0;
28
29 /**
30 * Returns the VolumeTest instance associated with this view.
31 */
32 virtual const VolumeTest& getVolumeTest() const = 0;
33
34 // Schedules a repaint of this view
35 virtual void queueDraw() = 0;
36
37 // Paints the view immediately
38 virtual void forceRedraw() = 0;
39 };