mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 22:18:30 +00:00
c42c5e1453
Some features from the beta branch of aseprite & laf were backported to the main branch of aseprite. Related commits: - New memory handling (db4504e816
) - New get event with timeout (e6ec13cc31
) - Convert os::NativeCursor to an enum (06a5b4f3ae
) - Adapt code to the new os::Display -> os::Window refactor (5d31314cdb
) - Save/load main window layout correctly and limit to current workarea (d6acb9e20f
) - Redraw window immediately on "live resizing" (d0b39ebade
)
35 lines
634 B
C++
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
|