mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-16 23:42:57 +00:00
39 lines
693 B
C++
39 lines
693 B
C++
// ASEPRITE gui library
|
|
// Copyright (C) 2001-2012 David Capello
|
|
//
|
|
// This source file is ditributed under a BSD-like license, please
|
|
// read LICENSE.txt for more information.
|
|
|
|
#include "config.h"
|
|
|
|
#include "ui/paint_event.h"
|
|
#include "ui/widget.h"
|
|
|
|
namespace ui {
|
|
|
|
PaintEvent::PaintEvent(Widget* source, Graphics* graphics)
|
|
: Event(source)
|
|
, m_graphics(graphics)
|
|
, m_painted(false)
|
|
{
|
|
}
|
|
|
|
PaintEvent::~PaintEvent()
|
|
{
|
|
}
|
|
|
|
Graphics* PaintEvent::getGraphics()
|
|
{
|
|
// If someone requested the graphics pointer, it means that this
|
|
// "someone" has painted the widget.
|
|
m_painted = true;
|
|
return m_graphics;
|
|
}
|
|
|
|
bool PaintEvent::isPainted() const
|
|
{
|
|
return m_painted;
|
|
}
|
|
|
|
} // namespace ui
|