]> git.vomp.tv Git - vompclient.git/blob - wpictureview.h
Display channel name, duration, resume point and size on recording info screen
[vompclient.git] / wpictureview.h
1 /*
2     Copyright 2005 Brian Walton (WTextBox)
3     Copyright 2014 Marten Richter (WPictureView)
4
5     This file is part of VOMP.
6
7     VOMP is free software; you can redistribute it and/or modify
8     it under the terms of the GNU General Public License as published by
9     the Free Software Foundation; either version 2 of the License, or
10     (at your option) any later version.
11
12     VOMP is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15     GNU General Public License for more details.
16
17     You should have received a copy of the GNU General Public License
18     along with VOMP; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 */
21
22 #ifndef WPICTUREVIEW_H
23 #define WPICTUREVIEW_H
24
25 #include <stdio.h>
26 #include <string>
27 #include <list>
28
29 #include "defines.h"
30 #include "boxx.h"
31
32 class Colour;
33
34 class WPictureView : public Boxx
35 {
36   public:
37         WPictureView();
38     virtual ~WPictureView();
39     void addPicture(TVMediaInfo& pict,  float width, float height,bool banner=false, std::string caption ="", std::string caption2 ="");
40     void draw();
41     void setForegroundColour(const DrawStyle& fcolour);
42
43
44     // if added as a pane
45     int handleCommand(int command);
46         bool mouseAndroidScroll(int x, int y, int sx, int sy);
47
48   protected:
49     class Picture {
50     public:
51         Picture(TVMediaInfo tmedia,float width, float height, bool tbanner, std::string tcaption,  std::string tcaption2){
52                 media=tmedia; caption=tcaption;caption2=tcaption2;w=width; h=height; banner=tbanner;
53         }
54
55         TVMediaInfo media;
56         std::string caption;
57         std::string caption2;
58         float w;
59         float h;
60         bool banner;
61     };
62     list<Picture> pictures;
63
64     DrawStyle foreColour;
65     unsigned int cur_scroll_line;
66     unsigned int rem_scroll_line;
67     unsigned int const_height; // if set only one per line
68 };
69
70 class WActorGallery : public WPictureView
71 {
72 public:
73         WActorGallery(Actors& actors);
74
75 };
76
77 class WArtworkGallery : public WPictureView
78 {
79 public:
80         WArtworkGallery(MovieInfo& movie);
81         WArtworkGallery(SeriesInfo& series);
82 protected:
83         void addTVMedias(TVMedias& medias, bool banner=false);
84         void addTVMedia(TVMedia& media, bool banner=false);
85
86 };
87
88 #endif