1// Aseprite UI Library
2// Copyright (C) 2001-2013 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_EVENT_H_INCLUDED
8#define UI_EVENT_H_INCLUDED
9#pragma once
10
11namespace ui {
12
13 class Component;
14
15 // Base class for every kind of event.
16 class Event
17 {
18 public:
19 // Creates a new event specifying that it was generated from the
20 // source component.
21 Event(Component* source);
22 virtual ~Event();
23
24 // Returns the component which generated the event.
25 Component* getSource();
26
27 private:
28 // The component which generates the event.
29 Component* m_source;
30 };
31
32} // namespace ui
33
34#endif
35