OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
14 namespace opencover {
15 namespace ui {
16 class Menu;
17 class Button;
18 class Label;
19 }
20 }
21 
22 namespace opencover
23 {
24 class BoxSelectionInteractor;
25 
26 class PLUGIN_UTILEXPORT BoxSelection
27  : public ui::Owner
28 {
29 
30 public:
31  BoxSelection(opencover::ui::Menu *, const char *name, const char *label);
32  ~BoxSelection();
33  BoxSelection *instance();
34  void registerInteractionFinishedCallback(void (*interactionFinished)());
35  void unregisterInteractionFinishedCallback();
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 
41 private:
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: BoxSelectionInteractor.h:23
Definition: BoxSelection.h:26