Free Electron
SelectController.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __viewer_SelectController_h__
8 #define __viewer_SelectController_h__
9 
10 //#include "dataui/datauiAS.h"
11 
12 namespace fe
13 {
14 namespace ext
15 {
16 
17 /** Basic screen space selection controller.
18 
19  This controller simply maintains the start and end point of selections
20  in screen space.
21 
22  This controller handles event mapped signals (EventMap) and sets
23  AsSelection attributes in the window data record.
24 
25  Use the slot() method to set the layouts driving the controller.
26 
27  @copydoc SelectController_info
28  */
29 class FE_DL_EXPORT SelectController :
30  virtual public HandlerI,
31  virtual public Config,
32  virtual public Mask,
33  virtual public Reactor,
34  Initialize<SelectController>
35 {
36  public:
37  SelectController(void);
38 virtual ~SelectController(void);
39 
40  void initialize(void);
41 
42  // AS HandlerI
43 virtual void handleBind(sp<SignalerI> spSignaler, sp<Layout> l_sig);
44 virtual void handleSignal(Record &record, sp<SignalerI> spSignaler);
45 
46  private:
47 //virtual void handleMark(Record &r_sig);
48 virtual void handlePick(Record &r_sig, sp<SignalerI> spSignaler);
49 
50  void checkWindata(Record &r_windata);
51 
52  sp<Scope> m_spScope;
53  AsSelectable m_asSelectable;
54  AsSelection m_asSel;
55  AsSelParent m_asSelParent;
56  AsSignal m_asSignal;
57  AsPoint m_asPoint;
58  AsBounded m_asBounded;
59  AsPick m_asPick;
60  AsWindata m_asWindata;
61  AsParticle m_asParticle;
62  AsProjected m_asProjected;
63  WindowEvent::Mask m_start;
64  WindowEvent::Mask m_end;
65  WindowEvent::Mask m_drag;
66  WindowEvent::Mask m_clear;
67  std::vector< sp<IntersectRectI> > m_screenSelects;
68  std::vector< sp<IntersectPointI> > m_screenPicks;
69  std::vector< sp<IntersectRayI> > m_worldPicks;
70 };
71 
72 } /* namespace ext */
73 } /* namespace fe */
74 
75 #endif /* __viewer_SelectController_h__ */
76 
UI selectable.
Definition: windowAS.h:100
Convienience base class for specification and use of path accessors.
Definition: Config.h:19
window data
Definition: datatoolAS.h:38
possible attributes of a top level signal
Definition: datatoolAS.h:16
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
Basic screen space selection controller.
Definition: SelectController.h:29
world space selection
Definition: windowAS.h:57
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
particle in physical space
Definition: shapeAS.h:58
possible bounding area/volume attributes
Definition: shapeAS.h:148
Reference to an instance of a Layout.
Definition: RecordSB.h:35
projected
Definition: windowAS.h:242
screen space selection
Definition: windowAS.h:36