29 #if defined(_WIN32) && defined(HR_ENGINE_SHARED) 31 # define MR_DllDeclare __declspec( dllexport ) 33 # define MR_DllDeclare __declspec( dllimport ) 36 # define MR_DllDeclare 62 virtual void AttachView(
Display &disp) = 0;
63 void SetView(std::unique_ptr<View> &&view) { this->view = std::move(view); }
111 if (view) view->PrepareRender();
114 void Render() {
if (view) view->Render(); }
Base class for renderable components.
Definition: ViewModel.h:55
virtual Vec3 Measure()
Calculate the size of the component.
Definition: ViewModel.h:103
std::unique_ptr< View > view
Definition: ViewModel.h:126
Interface for classes that can attach a view to a model.
Definition: ViewAttacher.h:43
virtual void Layout()
Adjust the size and position of any child elements.
Definition: ViewModel.h:91
void SetView(std::unique_ptr< View > &&view)
Definition: ViewModel.h:63
Base class for display managers.
Definition: Display.h:73
virtual void FireModelUpdate(int prop)
Indicate that a model property has changed.
Definition: ViewModel.h:122
bool needsLayout
Definition: ViewModel.h:125
virtual ~ViewModel()
Definition: ViewModel.h:59
void PrepareRender()
Definition: ViewModel.h:105
#define MR_DllDeclare
Definition: ViewModel.h:36
Base class for views.
Definition: View.h:42
View * GetView() const
Definition: ViewModel.h:64
ViewModel()
Definition: ViewModel.h:58
Definition: Announcement.h:24
void AttachViewDynamic(Display &disp, T *self)
Definition: ViewModel.h:68
void Render()
Definition: ViewModel.h:114
void RequestLayout()
Indicate that the current layout is out-of-date and needs to be adjusted.
Definition: ViewModel.h:79