image_box.h 668 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * File : image_box.h
  3. * COPYRIGHT (C) 2012-2017, Shanghai Real-Thread Technology Co., Ltd
  4. *
  5. * Change Logs:
  6. * Date Author Notes
  7. * 2017-11-05 realthread the first version
  8. */
  9. #pragma once
  10. #include <pm_widget.h>
  11. #include <pm_image.h>
  12. namespace Persimmon
  13. {
  14. class ImageBox : public Widget
  15. {
  16. public:
  17. ImageBox(Image *image);
  18. virtual ~ImageBox();
  19. void setImage(Image *m);
  20. Image* getImage(void);
  21. virtual void render(struct rtgui_dc* dc, const Point &dcPoint = Point(),
  22. const Rect &srcRect = Rect(),
  23. RenderFlag flags = DrawNormal);
  24. protected:
  25. Image *image;
  26. };
  27. }