2013-08-09 00:01:20 +00:00
|
|
|
// Aseprite UI Library
|
2017-12-05 16:31:34 +00:00
|
|
|
// Copyright (C) 2001-2017 David Capello
|
2012-01-05 22:45:03 +00:00
|
|
|
//
|
2014-03-29 23:08:05 +00:00
|
|
|
// This file is released under the terms of the MIT license.
|
|
|
|
// Read LICENSE.txt for more information.
|
2012-01-05 22:45:03 +00:00
|
|
|
|
2013-08-06 00:20:19 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2012-01-05 22:45:03 +00:00
|
|
|
#include "config.h"
|
2013-08-06 00:20:19 +00:00
|
|
|
#endif
|
2012-01-05 22:45:03 +00:00
|
|
|
|
2012-06-18 01:49:58 +00:00
|
|
|
#include "ui/paint_event.h"
|
|
|
|
#include "ui/widget.h"
|
2012-01-05 22:45:03 +00:00
|
|
|
|
2012-06-18 01:02:54 +00:00
|
|
|
namespace ui {
|
|
|
|
|
2012-01-05 22:45:03 +00:00
|
|
|
PaintEvent::PaintEvent(Widget* source, Graphics* graphics)
|
|
|
|
: Event(source)
|
|
|
|
, m_graphics(graphics)
|
|
|
|
, m_painted(false)
|
2017-12-05 16:31:34 +00:00
|
|
|
, m_transparentBg(false)
|
2012-01-05 22:45:03 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
PaintEvent::~PaintEvent()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
Refactor several "getNoun()" getters to "noun()"
This is a work-in-progress to create a consistent API and finally
separate the whole Aseprite base/gfx/ui libs into a reusable C++ library.
Classes:
app::IFileItem, app::AppMenuItem, app::skin::SkinPart,
gfx::Rect, gfx::Border, she::FileDialog,
ui::IButtonIcon, ui::Graphics, ui::Overlay, ui::Widget,
ui::ScrollableViewDelegate, and UI events
2015-12-04 17:39:04 +00:00
|
|
|
Graphics* PaintEvent::graphics()
|
2012-01-05 22:45:03 +00:00
|
|
|
{
|
2012-08-06 00:16:16 +00:00
|
|
|
// If someone requested the graphics pointer, it means that this
|
|
|
|
// "someone" has painted the widget.
|
2012-01-05 22:45:03 +00:00
|
|
|
m_painted = true;
|
|
|
|
return m_graphics;
|
|
|
|
}
|
|
|
|
|
2012-06-18 01:02:54 +00:00
|
|
|
} // namespace ui
|