]> git.vomp.tv Git - vompclient.git/blob - wtextbox.h
Switch from deprecated libavresample to libswresample. Some AudioOMX CWFs
[vompclient.git] / wtextbox.h
1 /*
2     Copyright 2005 Brian Walton
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, see <https://www.gnu.org/licenses/>.
18 */
19
20 #ifndef WTEXTBOX_H
21 #define WTEXTBOX_H
22
23 #include <string>
24
25 #include "defines.h"
26 #include "boxx.h"
27
28 class Colour;
29
30 class WTextbox : public Boxx
31 {
32   public:
33     WTextbox(const char* ttext = NULL);
34     void setText(const char* text);
35     void draw();
36     void setForegroundColour(const DrawStyle& fcolour);
37     void setTextPos(int x, int y); // optional
38     void setParaMode(bool mode);
39
40     // if added as a pane
41     int handleCommand(int command);
42     bool mouseAndroidScroll(int x, int y, int sx, int sy);
43
44   private:
45     std::string text;
46     DrawStyle foreColour;
47     int textX;
48     int textY;
49     bool paraMode;
50     unsigned int cur_scroll_line{};
51     unsigned int rem_scroll_line{};
52 };
53
54 #endif