Mercurial > hg > orthanc-stone
comparison Framework/Widgets/WidgetBase.h @ 273:f21ba2468570 am-2
force all Widgets to have a name to ease debugging
author | am@osimis.io |
---|---|
date | Fri, 24 Aug 2018 11:26:59 +0200 |
parents | fccffbf99ba1 |
children | 8a86695fcbc3 |
comparison
equal
deleted
inserted
replaced
272:d7d91d96b9d8 | 273:f21ba2468570 |
---|---|
34 IViewport* viewport_; | 34 IViewport* viewport_; |
35 IStatusBar* statusBar_; | 35 IStatusBar* statusBar_; |
36 bool backgroundCleared_; | 36 bool backgroundCleared_; |
37 uint8_t backgroundColor_[3]; | 37 uint8_t backgroundColor_[3]; |
38 bool transmitMouseOver_; | 38 bool transmitMouseOver_; |
39 std::string name_; | |
39 | 40 |
40 protected: | 41 protected: |
41 void ClearBackgroundOrthanc(Orthanc::ImageAccessor& target) const; | 42 void ClearBackgroundOrthanc(Orthanc::ImageAccessor& target) const; |
42 | 43 |
43 void ClearBackgroundCairo(CairoContext& context) const; | 44 void ClearBackgroundCairo(CairoContext& context) const; |
50 { | 51 { |
51 return statusBar_; | 52 return statusBar_; |
52 } | 53 } |
53 | 54 |
54 public: | 55 public: |
55 WidgetBase(); | 56 WidgetBase(const std::string& name); |
56 | 57 |
57 virtual void SetDefaultView() | 58 virtual void SetDefaultView() |
58 { | 59 { |
59 } | 60 } |
60 | 61 |
103 { | 104 { |
104 return transmitMouseOver_; | 105 return transmitMouseOver_; |
105 } | 106 } |
106 | 107 |
107 virtual void NotifyChange(); | 108 virtual void NotifyChange(); |
109 | |
110 const std::string& GetName() const | |
111 { | |
112 return name_; | |
113 } | |
114 | |
108 }; | 115 }; |
109 } | 116 } |