2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2017-01-03 21:19:33 +01:00
|
|
|
|
2021-05-08 15:57:00 +02:00
|
|
|
#include <QColor>
|
|
|
|
|
Sort and force grouping of includes (#4172)
This change enforces strict include grouping using IncludeCategories
In addition to adding this to the .clang-format file and applying it in the tests/src and src directories, I also did the following small changes:
In ChatterSet.hpp, I changed lrucache to a <>include
In Irc2.hpp, I change common/SignalVector.hpp to a "project-include"
In AttachedWindow.cpp, NativeMessaging.cpp, WindowsHelper.hpp, BaseWindow.cpp, and StreamerMode.cpp, I disabled clang-format for the windows-includes
In WindowDescriptors.hpp, I added the missing vector include. It was previously not needed because the include was handled by another file that was previously included first.
clang-format minimum version has been bumped, so Ubuntu version used in the check-formatting job has been bumped to 22.04 (which is the latest LTS)
2022-11-27 19:32:53 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2017-04-14 17:52:22 +02:00
|
|
|
namespace chatterino {
|
2018-04-03 02:55:32 +02:00
|
|
|
|
2018-01-06 03:48:56 +01:00
|
|
|
class ScrollbarHighlight
|
2017-01-03 21:19:33 +01:00
|
|
|
{
|
|
|
|
public:
|
2018-01-06 03:48:56 +01:00
|
|
|
enum Style : char { None, Default, Line };
|
2017-01-03 21:19:33 +01:00
|
|
|
|
2020-01-25 11:03:10 +01:00
|
|
|
/**
|
|
|
|
* @brief Constructs an invalid ScrollbarHighlight.
|
|
|
|
*
|
|
|
|
* A highlight constructed this way will not show on the scrollbar.
|
|
|
|
* For these, use the static ScrollbarHighlight::newSubscription and
|
|
|
|
* ScrollbarHighlight::newHighlight methods.
|
|
|
|
*/
|
2018-01-06 03:48:56 +01:00
|
|
|
ScrollbarHighlight();
|
2017-01-03 21:19:33 +01:00
|
|
|
|
2020-01-25 11:03:10 +01:00
|
|
|
ScrollbarHighlight(const std::shared_ptr<QColor> color,
|
2021-10-30 13:24:38 +02:00
|
|
|
Style style = Default, bool isRedeemedHighlight = false,
|
2022-10-01 01:23:31 +02:00
|
|
|
bool isFirstMessageHighlight = false,
|
|
|
|
bool isElevatedMessageHighlight = false);
|
2020-01-25 11:03:10 +01:00
|
|
|
|
|
|
|
QColor getColor() const;
|
2018-01-06 03:48:56 +01:00
|
|
|
Style getStyle() const;
|
2020-04-15 23:15:45 +02:00
|
|
|
bool isRedeemedHighlight() const;
|
2021-10-30 13:24:38 +02:00
|
|
|
bool isFirstMessageHighlight() const;
|
2022-10-01 01:23:31 +02:00
|
|
|
bool isElevatedMessageHighlight() const;
|
2018-01-06 03:48:56 +01:00
|
|
|
bool isNull() const;
|
2017-01-03 21:19:33 +01:00
|
|
|
|
|
|
|
private:
|
2020-01-25 11:03:10 +01:00
|
|
|
std::shared_ptr<QColor> color_;
|
2018-07-06 19:23:47 +02:00
|
|
|
Style style_;
|
2020-04-15 23:15:45 +02:00
|
|
|
bool isRedeemedHighlight_;
|
2021-10-30 13:24:38 +02:00
|
|
|
bool isFirstMessageHighlight_;
|
2022-10-01 01:23:31 +02:00
|
|
|
bool isElevatedMessageHighlight_;
|
2017-01-03 21:19:33 +01:00
|
|
|
};
|
2017-05-27 16:16:39 +02:00
|
|
|
|
|
|
|
} // namespace chatterino
|