UILayout.cpp 548 B

123456789101112131415161718192021222324252627282930313233
  1. #include <TurboBadger/tb_widgets.h>
  2. #include <TurboBadger/tb_widgets_common.h>
  3. #include <TurboBadger/image/tb_image_widget.h>
  4. #include "UIEvents.h"
  5. #include "UIWidget.h"
  6. #include "UILayout.h"
  7. using namespace tb;
  8. namespace Atomic
  9. {
  10. UILayout::UILayout(Context* context, bool createWidget) : UIWidget(context, false)
  11. {
  12. if (createWidget)
  13. {
  14. widget_ = new TBLayout();
  15. widget_->SetDelegate(this);
  16. }
  17. }
  18. UILayout::~UILayout()
  19. {
  20. }
  21. bool UILayout::OnEvent(const tb::TBWidgetEvent &ev)
  22. {
  23. return UIWidget::OnEvent(ev);
  24. }
  25. }