1// Aseprite UI Library
2// Copyright (C) 2001-2016 David Capello
3//
4// This file is released under the terms of the MIT license.
5// Read LICENSE.txt for more information.
6
7#ifndef UI_IMAGE_VIEW_H_INCLUDED
8#define UI_IMAGE_VIEW_H_INCLUDED
9#pragma once
10
11#include "os/ref.h"
12#include "ui/widget.h"
13
14namespace os {
15 class Surface;
16}
17
18namespace ui {
19
20 class ImageView : public Widget {
21 public:
22 ImageView(const os::Ref<os::Surface>& sur, int align);
23
24 protected:
25 void onSizeHint(SizeHintEvent& ev) override;
26 void onPaint(PaintEvent& ev) override;
27
28 private:
29 os::Ref<os::Surface> m_sur;
30 };
31
32} // namespace ui
33
34#endif
35