Free Electron
RegionalDebug.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_RegionalDebug_h__
8 #define __dataui_RegionalDebug_h__
9 
10 #include <dataui/dataui.pmh>
11 
12 #include "viewer/DrawView.h"
13 namespace fe
14 {
15 namespace ext
16 {
17 
18 class FE_DL_EXPORT RegionalDebug :
19  public Initialize<RegionalDebug>,
20  virtual public Mask,
21  virtual public HandlerI,
22  virtual public Config
23 {
24  public:
25  RegionalDebug(void);
26 virtual ~RegionalDebug(void);
27 
28  void initialize(void);
29 
30  // AS HandlerI
31 virtual void handleBind(sp<SignalerI> spSignalerI,
32  sp<Layout> l_sig);
33 virtual void handle(Record &record);
34 
35  private:
36  void handleEvent(Record &r_sig);
37  void applyOffset(void);
38 
39  protected:
40  class Region : public Counted
41  {
42  public:
43 virtual ~Region(void){}
44  Vector2i m_lo;
45  Vector2i m_hi;
46  };
47 
48 virtual void handleRegion(sp<Region> a_region) =0;
49 virtual void handleHome(void) =0;
50 virtual void handleDraw(Record &r_sig) =0;
51 
52  void drawText(const String &a_text, const Color a_color);
53  Real textWidth(const String &a_text);
54 
55  WindowEvent::Mask m_select;
56  WindowEvent::Mask m_home;
57  sp<Scope> m_spScope;
58  AsSignal m_asSignal;
59  AsWindata m_asWindata;
60  AsOrtho m_asOrtho;
61  std::vector< sp<Region> > m_regions;
62  I32 m_fontHeight;
63  Real m_height;
64  Real m_width;
65  Vector2f m_cursor;
66  DrawView m_drawview;
67 
68  private:
69  WindowEvent m_wev;
70  Vector2 m_lo;
71  Vector2 m_hi;
72  Vector2 m_offset;
73 };
74 
75 } /* namespace ext */
76 } /* namespace fe */
77 
78 #endif /* __dataui_RegionalDebug_h__ */
79 
kernel
Definition: namespace.dox:3