Free Electron
ButtonController.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 __dataui_ButtonController_h__
8 #define __dataui_ButtonController_h__
9 
10 #include <dataui/dataui.pmh>
11 namespace fe
12 {
13 namespace ext
14 {
15 
16 /** button controller
17  @copydoc ButtonController_info
18  */
19 class FE_DL_EXPORT ButtonController:
20  public Initialize<ButtonController>,
21  virtual public HandlerI,
22  virtual public Mask
23 {
24  public:
25  ButtonController(void);
26 virtual ~ButtonController(void);
27 
28  void initialize(void);
29 
30 virtual void handleBind(sp<SignalerI> spSignalerI, sp<Layout> spLayout);
31 virtual void handle( Record &record);
32 
33  enum
34  {
35  e_base = 0, // 0000 0000
36  e_in = 16, // 0001 0000
37  e_sel = 32, // 0010 0000
38  e_reserved = 64, // 0100 0000
39  e_set = 128, // 1000 0000
40 
41  e_type = 15, // 0000 1111
42  e_state = 240, // 1111 0000
43 
44  e_simple = 0, // 0000 0000
45  e_toggle = 1, // 0000 0001
46  e_condition = 2 // 0000 0010
47 
48  };
49 
50  private:
51  void handle_kb(Record &r_sig, WindowEvent &a_wev, Record &r_windata,
52  sp<RecordGroup> spRG);
53  void fireSignal(Record &a_record);
54  sp<SignalerI> m_spSignaler;
55  AsRectButton m_asRectButton;
56  AsValueButton m_asValueButton;
57  AsWindata m_asWindata;
58  AsSignal m_asSignal;
59  AsCallback m_asCallback;
60  AsSelection m_asSel;
61  bool m_selecting;
62  WindowEvent::Mask m_start;
63  WindowEvent::Mask m_drag;
64  WindowEvent::Mask m_end;
65  WindowEvent::Mask m_motion;
66 };
67 
68 } /*namespace ext */
69 } /*namespace fe */
70 
71 #endif /* __dataui_ButtonController_h__ */
72 
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
Rectangular UI button.
Definition: datauiAS.h:84
button controller
Definition: ButtonController.h:19
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
Generalized windowing event.
Definition: WindowEvent.h:43
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Callback signal wrapper.
Definition: windowAS.h:299
screen space selection
Definition: windowAS.h:36