mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 19:06:39 +00:00
e8abba1b93
- Moved ui::GuiSystem from ui/base.h to ui/system.h as ui::UISystem - Moved some internals to ui::details namespace - Fix crash of UI tests when ~Manager is called - Removed ui::init/exit_system() functions
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
// Aseprite UI Library
|
|
// Copyright (C) 2001-2013, 2015 David Capello
|
|
//
|
|
// This file is released under the terms of the MIT license.
|
|
// Read LICENSE.txt for more information.
|
|
|
|
#ifndef UI_OVERLAY_MANAGER_H_INCLUDED
|
|
#define UI_OVERLAY_MANAGER_H_INCLUDED
|
|
#pragma once
|
|
|
|
#include "ui/base.h"
|
|
#include <vector>
|
|
|
|
namespace she { class Surface; }
|
|
|
|
namespace ui {
|
|
|
|
class Overlay;
|
|
|
|
class OverlayManager {
|
|
friend class UISystem; // So it can call destroyInstance() from ~UISystem
|
|
static OverlayManager* m_singleton;
|
|
|
|
OverlayManager();
|
|
~OverlayManager();
|
|
|
|
public:
|
|
static OverlayManager* instance();
|
|
|
|
void addOverlay(Overlay* overlay);
|
|
void removeOverlay(Overlay* overlay);
|
|
|
|
void captureOverlappedAreas();
|
|
void restoreOverlappedAreas();
|
|
void drawOverlays();
|
|
|
|
private:
|
|
static void destroyInstance();
|
|
|
|
typedef std::vector<Overlay*> OverlayList;
|
|
typedef OverlayList::iterator iterator;
|
|
|
|
iterator begin() { return m_overlays.begin(); }
|
|
iterator end() { return m_overlays.end(); }
|
|
|
|
OverlayList m_overlays;
|
|
};
|
|
|
|
} // namespace ui
|
|
|
|
#endif
|