xbmc
xbmc
video
ContextMenus.h
1
/*
2
* Copyright (C) 2016-2018 Team Kodi
3
* This file is part of Kodi - https://kodi.tv
4
*
5
* SPDX-License-Identifier: GPL-2.0-or-later
6
* See LICENSES/README.md for more information.
7
*/
8
9
#pragma once
10
11
#include "ContextMenuItem.h"
12
#include "VideoLibraryQueue.h"
13
#include "media/MediaType.h"
14
15
#include <memory>
16
17
namespace
CONTEXTMENU
18
{
19
20
class
CVideoInfo
:
public
CStaticContextMenuAction
21
{
22
public
:
23
explicit
CVideoInfo
(MediaType mediaType);
24
bool
IsVisible(
const
CFileItem
& item)
const override
;
25
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
26
27
private
:
28
const
MediaType m_mediaType;
29
};
30
31
struct
CTVShowInfo
:
CVideoInfo
32
{
33
CTVShowInfo
() :
CVideoInfo
(MediaTypeTvShow) {}
34
};
35
36
struct
CSeasonInfo
:
CVideoInfo
37
{
38
CSeasonInfo
() :
CVideoInfo
(MediaTypeSeason) {}
39
};
40
41
struct
CEpisodeInfo
:
CVideoInfo
42
{
43
CEpisodeInfo
() :
CVideoInfo
(MediaTypeEpisode) {}
44
};
45
46
struct
CMusicVideoInfo
:
CVideoInfo
47
{
48
CMusicVideoInfo
() :
CVideoInfo
(MediaTypeMusicVideo) {}
49
};
50
51
struct
CMovieInfo
:
CVideoInfo
52
{
53
CMovieInfo
() :
CVideoInfo
(MediaTypeMovie) {}
54
};
55
56
struct
CMovieSetInfo
:
CVideoInfo
57
{
58
CMovieSetInfo
() :
CVideoInfo
(MediaTypeVideoCollection) {}
59
};
60
61
struct
CVideoRemoveResumePoint
:
CStaticContextMenuAction
62
{
63
CVideoRemoveResumePoint
() :
CStaticContextMenuAction
(38209) {}
64
bool
IsVisible(
const
CFileItem
& item)
const override
;
65
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
66
};
67
68
struct
CVideoMarkWatched
:
CStaticContextMenuAction
69
{
70
CVideoMarkWatched
() :
CStaticContextMenuAction
(16103) {}
71
bool
IsVisible(
const
CFileItem
& item)
const override
;
72
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
73
};
74
75
struct
CVideoMarkUnWatched
:
CStaticContextMenuAction
76
{
77
CVideoMarkUnWatched
() :
CStaticContextMenuAction
(16104) {}
78
bool
IsVisible(
const
CFileItem
& item)
const override
;
79
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
80
};
81
82
struct
CVideoBrowse
:
CStaticContextMenuAction
83
{
84
CVideoBrowse
() :
CStaticContextMenuAction
(37015) {}
// Browse into
85
bool
IsVisible(
const
CFileItem
& item)
const override
;
86
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
87
};
88
89
struct
CVideoResume
:
IContextMenuItem
90
{
91
std::string GetLabel(
const
CFileItem
& item)
const override
;
92
bool
IsVisible(
const
CFileItem
& item)
const override
;
93
bool
Execute(
const
std::shared_ptr<CFileItem>& _item)
const override
;
94
};
95
96
struct
CVideoPlay
:
IContextMenuItem
97
{
98
std::string GetLabel(
const
CFileItem
& item)
const override
;
99
bool
IsVisible(
const
CFileItem
& item)
const override
;
100
bool
Execute(
const
std::shared_ptr<CFileItem>& _item)
const override
;
101
};
102
103
struct
CVideoPlayUsing
:
CStaticContextMenuAction
104
{
105
CVideoPlayUsing
() :
CStaticContextMenuAction
(15213) {}
// Play using...
106
bool
IsVisible(
const
CFileItem
& item)
const override
;
107
bool
Execute(
const
std::shared_ptr<CFileItem>& _item)
const override
;
108
};
109
110
struct
CVideoQueue
:
CStaticContextMenuAction
111
{
112
CVideoQueue
() :
CStaticContextMenuAction
(13347) {}
// Queue item
113
bool
IsVisible(
const
CFileItem
& item)
const override
;
114
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
115
};
116
117
struct
CVideoPlayNext
:
CStaticContextMenuAction
118
{
119
CVideoPlayNext
() :
CStaticContextMenuAction
(10008) {}
// Play next
120
bool
IsVisible(
const
CFileItem
& item)
const override
;
121
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
122
};
123
124
struct
CVideoPlayAndQueue
:
IContextMenuItem
125
{
126
std::string GetLabel(
const
CFileItem
& item)
const override
;
127
bool
IsVisible(
const
CFileItem
& item)
const override
;
128
bool
Execute(
const
std::shared_ptr<CFileItem>& item)
const override
;
129
};
130
131
}
CONTEXTMENU::CVideoQueue
Definition:
ContextMenus.h:110
CONTEXTMENU::CVideoInfo
Definition:
ContextMenus.h:20
CONTEXTMENU::CTVShowInfo
Definition:
ContextMenus.h:31
CONTEXTMENU::CVideoBrowse
Definition:
ContextMenus.h:82
CONTEXTMENU::CVideoPlayAndQueue
Definition:
ContextMenus.h:124
CONTEXTMENU::CVideoPlayUsing
Definition:
ContextMenus.h:103
CONTEXTMENU
Definition:
ContextMenus.cpp:21
CONTEXTMENU::CVideoMarkUnWatched
Definition:
ContextMenus.h:75
CONTEXTMENU::CVideoPlayNext
Definition:
ContextMenus.h:117
CONTEXTMENU::CVideoPlay
Definition:
ContextMenus.h:96
IContextMenuItem
Definition:
ContextMenuItem.h:28
CONTEXTMENU::CMovieInfo
Definition:
ContextMenus.h:51
CONTEXTMENU::CEpisodeInfo
Definition:
ContextMenus.h:41
CONTEXTMENU::CMusicVideoInfo
Definition:
ContextMenus.h:46
CONTEXTMENU::CMovieSetInfo
Definition:
ContextMenus.h:56
CStaticContextMenuAction
Definition:
ContextMenuItem.h:39
CONTEXTMENU::CSeasonInfo
Definition:
ContextMenus.h:36
CONTEXTMENU::CVideoMarkWatched
Definition:
ContextMenus.h:68
CONTEXTMENU::CVideoResume
Definition:
ContextMenus.h:89
CONTEXTMENU::CVideoRemoveResumePoint
Definition:
ContextMenus.h:61
CFileItem
Represents a file on a share.
Definition:
FileItem.h:102
Generated by
1.8.13