mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-22 12:56:11 +00:00
44 lines
1012 B
C
44 lines
1012 B
C
|
/* x64dbg RichTextPainter */
|
||
|
#ifndef RICHTEXTPAINTER_H
|
||
|
#define RICHTEXTPAINTER_H
|
||
|
|
||
|
#include <QString>
|
||
|
#include <QColor>
|
||
|
#include <vector>
|
||
|
|
||
|
class CachedFontMetrics;
|
||
|
class QPainter;
|
||
|
|
||
|
class RichTextPainter
|
||
|
{
|
||
|
public:
|
||
|
//structures
|
||
|
enum CustomRichTextFlags
|
||
|
{
|
||
|
FlagNone,
|
||
|
FlagColor,
|
||
|
FlagBackground,
|
||
|
FlagAll
|
||
|
};
|
||
|
|
||
|
struct CustomRichText_t
|
||
|
{
|
||
|
QString text;
|
||
|
QColor textColor;
|
||
|
QColor textBackground;
|
||
|
CustomRichTextFlags flags;
|
||
|
bool highlight;
|
||
|
QColor highlightColor;
|
||
|
int highlightWidth = 2;
|
||
|
bool highlightConnectPrev = false;
|
||
|
};
|
||
|
|
||
|
typedef std::vector<CustomRichText_t> List;
|
||
|
|
||
|
//functions
|
||
|
static void paintRichText(QPainter* painter, int x, int y, int w, int h, int xinc, const List & richText, CachedFontMetrics* fontMetrics);
|
||
|
static void htmlRichText(const List & richText, QString & textHtml, QString & textPlain);
|
||
|
};
|
||
|
|
||
|
#endif // RICHTEXTPAINTER_H
|