summaryrefslogtreecommitdiff
path: root/browse.h
blob: 0789a7219eb8215ab07a3907729aad1a9e5bf9a5 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * browse.h
 */

#ifndef __BROWSE_H
#define __BROWSE_H

#include "column.h"
#include "trackinfo.h"
#include "browse-item.h"

#include <vdr/osdbase.h>
#include <vdr/plugin.h>

#include <string>


class cBrowse : public cOsdMenu {
private:
        const char *help_yellow;
	std::string help_green;
	int view, num_columns, width;
	bool expand;
	cColumn *columns;
        cPlugin *player;
        
        void set_view(int _view, bool init = true);
        void set_help_keys(void);
        void set_status(void);
        void set_title(void);
        
	void process_submenu_states(eOSState &state);        
        
	cBrowseItem *get_actual_item(void);        
        void insert_items(void);
        void delete_items(void);
        
        void set_filter(const cBrowseItem *item);
        
	bool filter_track(const cTrackInfo *track);
        
	std::string get_category(const cBrowseItem *item);
        std::string get_trackname(const cTrackInfo *track);
	std::string get_value_of_column(const cTrackInfo *track, int c);
        
	void play_all_files(const cBrowseItem *node);
        void play_file(const cTrackInfo *track, bool set_status = true);
        
        void cut_string(std::string &cut, int length);
public:
	cBrowse(void);
	~cBrowse();
        
        virtual eOSState ProcessKey(eKeys key);
};


class cBrowseAction : public cOsdMenu {
public:
        cBrowseAction(bool node, const std::string &text);
};


class cBrowseInfo : public cOsdMenu {
private:
	cOsdItem *add_item(const char *type, const std::string &text);
public:
        cBrowseInfo(const cTrackInfo *track);
};

#endif /* __BROWSE__H */