36 lines
1.4 KiB
C++
36 lines
1.4 KiB
C++
#pragma once
|
|
/**
|
|
******************************************************************************
|
|
* Xenia : Xbox 360 Emulator Research Project *
|
|
******************************************************************************
|
|
* Copyright 2022 Ben Vanik. All rights reserved. *
|
|
* Released under the BSD license - see LICENSE in the root for more details. *
|
|
******************************************************************************
|
|
*
|
|
* @modified Tom Clay, 2026 - Adapted for ReXGlue runtime
|
|
*/
|
|
|
|
#include <cstdint>
|
|
|
|
namespace rex {
|
|
namespace ui {
|
|
|
|
class UIDrawContext;
|
|
|
|
class UIDrawer {
|
|
public:
|
|
// No preparation or finishing callbacks because drawers may register or
|
|
// unregister each other, so between the loops the list may be different.
|
|
|
|
// The draw function may register or unregister drawers (and depending on the
|
|
// Z order the changes may or may not effect immediately). However, they must
|
|
// not perform any lifetime management of the presenter and of its connection
|
|
// to the surface. Ideally drawing should not be changing any state at all,
|
|
// however, in Dear ImGui, input is handled directly during drawing - any
|
|
// quitting or resizing, if done in the UI, must be deferred via something
|
|
// like WindowedAppContext::CallInUIThreadDeferred.
|
|
virtual void Draw(UIDrawContext& context) = 0;
|
|
};
|
|
|
|
} // namespace ui
|
|
} // namespace rex
|