aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/components/Component.h
blob: e889ae97071c07c9085ebaf33dd1cd5714b70bd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once
#include "../Base.h"

namespace cru::ui::components {
/**
 * \remarks In destructor, component should first delete all child components
 * and then remove root control from its parent (by calling
 * Control::RemoveFromParent). Then delete all its root control.
 */
class CRU_UI_API Component : public Object {
 public:
  Component() = default;

  CRU_DELETE_COPY(Component)
  CRU_DELETE_MOVE(Component)

  ~Component() = default;

  virtual controls::Control* GetRootControl() = 0;
};
}  // namespace cru::ui::components