File: textviewwidget.h

package info (click to toggle)
newsboat 2.38-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,540 kB
  • sloc: cpp: 90,216; xml: 606; sh: 429; makefile: 369; ruby: 258; python: 239; ansic: 211; php: 63; awk: 59; perl: 38
file content (40 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (2)
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
#ifndef NEWSBOAT_TEXTVIEWWIDGET_H_
#define NEWSBOAT_TEXTVIEWWIDGET_H_

#include <cstdint>
#include <string>

#include "stflpp.h"

namespace newsboat {

class TextviewWidget {
public:
	TextviewWidget(const std::string& textview_name,
		Stfl::Form& form);
	void stfl_replace_textview(std::uint32_t number_of_lines, std::string stfl);
	void stfl_replace_lines(std::uint32_t number_of_lines, std::string stfl);

	void scroll_up();
	void scroll_down();
	void scroll_to_top();
	void scroll_to_bottom();
	void scroll_page_up();
	void scroll_page_down();
	void scroll_halfpage_up();
	void scroll_halfpage_down();

	std::uint32_t get_scroll_offset();
	void set_scroll_offset(std::uint32_t offset);

	std::uint32_t get_width();
	std::uint32_t get_height();
private:
	const std::string textview_name;
	Stfl::Form& form;
	std::uint32_t num_lines;
};

} // namespace newsboat

#endif /* NEWSBOAT_TEXTVIEWWIDGET_H_ */