HoverRace  2.0
SdlFillBoxView.h
Go to the documentation of this file.
1 
2 // SdlFillBoxView.h
3 //
4 // Copyright (c) 2013-2016 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 "SdlBoxView.h"
25 
26 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
27 # ifdef MR_ENGINE
28 # define MR_DllDeclare __declspec( dllexport )
29 # else
30 # define MR_DllDeclare __declspec( dllimport )
31 # endif
32 #else
33 # define MR_DllDeclare
34 #endif
35 
36 namespace HoverRace {
37  namespace Display {
38  class FillBox;
39  }
40 }
41 
42 namespace HoverRace {
43 namespace Display {
44 namespace SDL {
45 
50 class MR_DllDeclare SdlFillBoxView : public SdlBoxView<FillBox>
51 {
53 
54 public:
56  SUPER(disp, model) { }
57  virtual ~SdlFillBoxView() { }
58 
59 public:
60  void OnModelUpdate(int) override { }
61 
62 public:
63  Vec3 Measure() override;
64  void PrepareRender() override { }
65  void Render() override;
66 };
67 
68 } // namespace SDL
69 } // namespace Display
70 } // namespace HoverRace
71 
72 #undef MR_DllDeclare
SDL view for FillBox.
Definition: SdlFillBoxView.h:50
Base class for FillBox views.
Definition: SdlBoxView.h:53
void OnModelUpdate(int) override
Called by the view model to indicate that a property has changed.
Definition: SdlFillBoxView.h:60
SdlFillBoxView(SdlDisplay &disp, FillBox &model)
Definition: SdlFillBoxView.h:55
A colored rectangle, that&#39;s all.
Definition: FillBox.h:51
virtual ~SdlFillBoxView()
Definition: SdlFillBoxView.h:57
#define MR_DllDeclare
Definition: SdlFillBoxView.h:33
Definition: Announcement.h:24
Definition: Vec.h:114
void PrepareRender() override
Definition: SdlFillBoxView.h:64
SDL-based software rendering.
Definition: SdlDisplay.h:60