blob: a18c3a80cc9029cf6d06ad75d14bab9213207a5c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods
/***************************************************************************
ui/widgets.h
Internal MAME widgets for the user interface.
***************************************************************************/
#ifndef MAME_FRONTEND_UI_WIDGETS_H
#define MAME_FRONTEND_UI_WIDGETS_H
#pragma once
#include "bitmap.h"
#include "render.h"
#include <memory>
#include <functional>
namespace ui {
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
class widgets_manager
{
public:
widgets_manager(running_machine &machine);
render_texture *hilight_texture() { return m_hilight_texture.get(); }
render_texture *hilight_main_texture() { return m_hilight_main_texture.get(); }
render_texture *arrow_texture() { return m_arrow_texture.get(); }
using bitmap_ptr = std::unique_ptr<bitmap_argb32>;
using texture_ptr = std::unique_ptr<render_texture, std::function<void(render_texture *)> >;
private:
static void render_triangle(bitmap_argb32 &dest, bitmap_argb32 &source, const rectangle &sbounds, void *param);
bitmap_ptr m_hilight_bitmap;
texture_ptr m_hilight_texture;
bitmap_ptr m_hilight_main_bitmap;
texture_ptr m_hilight_main_texture;
texture_ptr m_arrow_texture;
};
} // namespace ui
#endif // MAME_FRONTEND_UI_WIDGETS_H
|