Line 1... |
Line 1... |
1 |
/*
|
1 |
/*
|
2 |
* Copyright (C) 2020 by Andreas Theofilu <andreas@theosys.at>
|
2 |
* Copyright (C) 2020, 2021 by Andreas Theofilu <andreas@theosys.at>
|
3 |
*
|
3 |
*
|
4 |
* This program is free software; you can redistribute it and/or modify
|
4 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* it under the terms of the GNU General Public License as published by
|
5 |
* it under the terms of the GNU General Public License as published by
|
6 |
* the Free Software Foundation; either version 3 of the License, or
|
6 |
* the Free Software Foundation; either version 3 of the License, or
|
7 |
* (at your option) any later version.
|
7 |
* (at your option) any later version.
|
Line 76... |
Line 76... |
76 |
void registerCallbackFT(std::function<void (ulong handle, const std::string& text, const std::string& font, const std::string& family, int size, int x, int y, ulong color, ulong effectColor, FONT_STYLE style, Button::TEXT_ORIENTATION ori, Button::TEXT_EFFECT effect, bool ww)> setText)
|
76 |
void registerCallbackFT(std::function<void (ulong handle, const std::string& text, const std::string& font, const std::string& family, int size, int x, int y, ulong color, ulong effectColor, FONT_STYLE style, Button::TEXT_ORIENTATION ori, Button::TEXT_EFFECT effect, bool ww)> setText)
|
77 |
{ _setText = setText; }
|
77 |
{ _setText = setText; }
|
78 |
void registerCallbackDB(std::function<void(ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> displayButton) { _displayButton = displayButton; }
|
78 |
void registerCallbackDB(std::function<void(ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> displayButton) { _displayButton = displayButton; }
|
79 |
void regCallDropPage(std::function<void (ulong handle)> callDropPage) { _callDropPage = callDropPage; }
|
79 |
void regCallDropPage(std::function<void (ulong handle)> callDropPage) { _callDropPage = callDropPage; }
|
80 |
void regCallDropSubPage(std::function<void (ulong handle)> callDropSubPage) { _callDropSubPage = callDropSubPage; }
|
80 |
void regCallDropSubPage(std::function<void (ulong handle)> callDropSubPage) { _callDropSubPage = callDropSubPage; }
|
- |
|
81 |
void regCallPlayVideo(std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> playVideo) { _playVideo = playVideo; };
|
81 |
|
82 |
|
82 |
void show();
|
83 |
void show();
|
83 |
void drop();
|
84 |
void drop();
|
84 |
|
85 |
|
85 |
protected:
|
86 |
protected:
|
Line 89... |
Line 90... |
89 |
std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, ulong color)> _setBackground{nullptr};
|
90 |
std::function<void (ulong handle, unsigned char *image, size_t size, size_t rowBytes, ulong color)> _setBackground{nullptr};
|
90 |
std::function<void (ulong handle, const std::string& text, const std::string& font, const std::string& family, int size, int x, int y, ulong color, ulong effectColor, FONT_STYLE style, Button::TEXT_ORIENTATION ori, Button::TEXT_EFFECT effect, bool ww)> _setText{nullptr};
|
91 |
std::function<void (ulong handle, const std::string& text, const std::string& font, const std::string& family, int size, int x, int y, ulong color, ulong effectColor, FONT_STYLE style, Button::TEXT_ORIENTATION ori, Button::TEXT_EFFECT effect, bool ww)> _setText{nullptr};
|
91 |
std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
|
92 |
std::function<void (ulong handle, ulong parent, unsigned char *buffer, int width, int height, int pixline, int left, int top)> _displayButton{nullptr};
|
92 |
std::function<void (ulong handle)> _callDropPage{nullptr};
|
93 |
std::function<void (ulong handle)> _callDropPage{nullptr};
|
93 |
std::function<void (ulong handle)> _callDropSubPage{nullptr};
|
94 |
std::function<void (ulong handle)> _callDropSubPage{nullptr};
|
- |
|
95 |
std::function<void (ulong handle, ulong parent, int left, int top, int width, int height, const std::string& url, const std::string& user, const std::string& pw)> _playVideo{nullptr};
|
94 |
|
96 |
|
95 |
std::string mPath; // Path and name of the XML file
|
97 |
std::string mPath; // Path and name of the XML file
|
96 |
std::string name; // Name of the page
|
98 |
std::string name; // Name of the page
|
97 |
int pageID{0}; // Number of the page
|
99 |
int pageID{0}; // Number of the page
|
98 |
int width; // Width of the page
|
100 |
int width; // Width of the page
|