OpenCOVER
BoxSelection.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef _BOX_SELECTION_
9#define _BOX_SELECTION_
10
11#include <util/coExport.h>
12#include <cover/ui/Owner.h>
13
14namespace opencover {
15namespace ui {
16class Menu;
17class Button;
18class Label;
19}
20}
21
22namespace opencover
23{
24class BoxSelectionInteractor;
25
26class PLUGIN_UTILEXPORT BoxSelection
27 : public ui::Owner
28{
29
30public:
31 BoxSelection(opencover::ui::Menu *, const char *name, const char *label);
34 void registerInteractionFinishedCallback(void (*interactionFinished)());
36 ui::Button *getButton() const;
37 bool getCheckboxState() const;
38
39 void getBox(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax);
40
41private:
42 static void (*s_interactionFinished)();
43 ui::Menu *m_pinboard = nullptr;
44 ui::Button *m_useBoxSelection = nullptr;
45 ui::Menu *m_selectionSubMenu = nullptr;
46
47 static float s_xmin;
48 static float s_ymin;
49 static float s_zmin;
50 static float s_xmax;
51 static float s_ymax;
52 static float s_zmax;
53
54 static opencover::BoxSelectionInteractor *s_boxSelectionInteractor;
55
56 static void interactionFinished();
57 static void interactionRunning();
58
59 std::string stringify(float);
60};
61}
62#endif
Definition: ARToolKit.h:33
Definition: BoxSelection.h:28
BoxSelection(opencover::ui::Menu *, const char *name, const char *label)
void getBox(float &xmin, float &ymin, float &zmin, float &xmax, float &ymax, float &zmax)
ui::Button * getButton() const
bool getCheckboxState() const
void registerInteractionFinishedCallback(void(*interactionFinished)())
void unregisterInteractionFinishedCallback()
BoxSelection * instance()
Definition: BoxSelectionInteractor.h:24