aboutsummaryrefslogtreecommitdiff
path: root/vendor/rlImGui-main/examples/asset_browser/item_view.h
blob: c70191ba3b2f5fb4c12bc9e79c65247512a1b969 (plain)
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
/*******************************************************************************************
*
*   raylib-extras [ImGui] example - asset browser
*
*	This is a more complex ImGui Integration
*	It shows how to build windows on top of 2d and 3d views using a render texture
*
*   Copyright (c) 2024 Jeffery Myers
*
********************************************************************************************/

#pragma once

#include <string>
#include "raylib.h"

class ViewableItem
{
public:
    virtual ~ViewableItem() = default;

    std::string Name;
    std::string Icon;
    Color Tint = BLANK;
};

class ViewableItemContainer
{
public:
    virtual ~ViewableItemContainer() = default;
    virtual ViewableItem* Reset() = 0;
    virtual size_t Count() = 0;
    virtual ViewableItem* Next() = 0;
};

class ItemView
{
public:
    virtual ~ItemView() = default;
    virtual ViewableItem* Show(ViewableItemContainer& container) = 0;
};

class ListItemView : public ItemView
{
public:
    ViewableItem* Show(ViewableItemContainer& container) override;
};