HoverRace  2.0
SdlRuleLineView.h
Go to the documentation of this file.
1 
2 // SdlRuleLineView.h
3 //
4 // Copyright (c) 2014 Michael Imamura.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 
22 #pragma once
23 
24 #include "SdlDisplay.h"
25 #include "SdlView.h"
26 
27 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
28 # ifdef MR_ENGINE
29 # define MR_DllDeclare __declspec( dllexport )
30 # else
31 # define MR_DllDeclare __declspec( dllimport )
32 # endif
33 #else
34 # define MR_DllDeclare
35 #endif
36 
37 namespace HoverRace {
38  namespace Display {
39  class RuleLine;
40  }
41 }
42 
43 namespace HoverRace {
44 namespace Display {
45 namespace SDL {
46 
51 class MR_DllDeclare SdlRuleLineView : public SdlView<RuleLine>
52 {
54 
55 public:
57  SUPER(disp, model) { }
58  virtual ~SdlRuleLineView() { }
59 
60 public:
61  void OnModelUpdate(int) override { }
62 
63 public:
64  Vec3 Measure() override;
65  void PrepareRender() override { }
66  void Render() override;
67 };
68 
69 } // namespace SDL
70 } // namespace Display
71 } // namespace HoverRace
72 
73 #undef MR_DllDeclare
A horizontal or vertical line.
Definition: RuleLine.h:54
void PrepareRender() override
Definition: SdlRuleLineView.h:65
SdlRuleLineView(SdlDisplay &disp, RuleLine &model)
Definition: SdlRuleLineView.h:56
SDL view for RuleLine.
Definition: SdlRuleLineView.h:51
virtual ~SdlRuleLineView()
Definition: SdlRuleLineView.h:58
Definition: Announcement.h:24
#define MR_DllDeclare
Definition: SdlRuleLineView.h:34
Definition: Vec.h:114
void OnModelUpdate(int) override
Called by the view model to indicate that a property has changed.
Definition: SdlRuleLineView.h:61
Base class for views that use SDL for rendering.
Definition: SdlView.h:54
SDL-based software rendering.
Definition: SdlDisplay.h:60