]> git.vomp.tv Git - vompclient.git/blob - wtabbar.h
Fix text corruption in channel number display on live tv
[vompclient.git] / wtabbar.h
1 /*
2     Copyright 2004-2005 Chris Tallon
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20
21 #ifndef WTABBAR_H
22 #define WTABBAR_H
23
24 #include <vector>
25 #include "defines.h"
26 #include "boxx.h"
27 #include "wsymbol.h"
28
29 class WButton;
30
31 typedef struct sTabDetails
32 {
33   const char* name;
34   UINT nameWidth;
35   WButton* button;
36   Boxx* pane;
37 } TabDetails;
38
39 class WTabBar : public Boxx
40 {
41   public:
42     WTabBar();
43     virtual ~WTabBar();
44     void addTab(const char* name, Boxx* boxx);
45     int handleCommand(int command);
46     bool mouseMove(int x, int y) ;
47     bool mouseLBDOWN(int x, int y);
48         bool mouseAndroidScroll(int x, int y, int sx, int sy);
49     void activateFocus(bool active);
50
51   private:
52     bool left();
53     bool right();
54   
55     UINT visiblePane;
56     bool buttonBarActive;
57     vector<TabDetails> tabs;
58     
59     WSymbol symbolLeft;
60     WSymbol symbolRight;
61 };
62
63 #endif