aseprite/src/ui/image_view.h
David Capello c42c5e1453 Backport new laf API to main branch of aseprite
Some features from the beta branch of aseprite & laf were backported
to the main branch of aseprite.

Related commits:
- New memory handling (db4504e816ffccf0ea63a78737ebb6e22cc0453b)
- New get event with timeout (e6ec13cc31e6e689040bc651f98ee1752834d14c)
- Convert os::NativeCursor to an enum (06a5b4f3aebfafb6363ea33d349975d6e419ca7b)
- Adapt code to the new os::Display -> os::Window refactor (5d31314cdb23f314391e5eaebd7cea84f5179ac7)
- Save/load main window layout correctly and limit to current workarea (d6acb9e20f11fda938959c99285fe4f7d7051794)
- Redraw window immediately on "live resizing" (d0b39ebade7736d47e6b2450bf68b088c0da8e57)
2021-07-05 17:51:29 -03:00

35 lines
634 B
C++

// Aseprite UI Library
// Copyright (C) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef UI_IMAGE_VIEW_H_INCLUDED
#define UI_IMAGE_VIEW_H_INCLUDED
#pragma once
#include "os/ref.h"
#include "ui/widget.h"
namespace os {
class Surface;
}
namespace ui {
class ImageView : public Widget {
public:
ImageView(const os::Ref<os::Surface>& sur, int align);
protected:
void onSizeHint(SizeHintEvent& ev) override;
void onPaint(PaintEvent& ev) override;
private:
os::Ref<os::Surface> m_sur;
};
} // namespace ui
#endif