74 MRVIEWER_API
void draw(
const Box2i& limitFramebuffer );
89 struct NotificationWithTimer
95 std::vector<NotificationWithTimer> notifications_;
96 std::vector<NotificationWithTimer> notificationsHistory_;
97 bool requestRedraw_ =
false;
98 bool historyMode_ =
false;
100 float showHistoryBtnMaxTime_{ -1.0f };
101 float currentHistoryBtnTimer_{ -1.0f };
102#ifndef __EMSCRIPTEN__
103 Time requestedTime_{ Time::max() };
104 AsyncRequest asyncRequest_;
108 void drawHistoryButton_(
const Box2i& limitFramebuffer );
110 void drawHistory_(
const Box2i& limitFramebuffer );
112 void drawFloating_(
const Box2i& limitFramebuffer );
115 bool scrollDownNeeded_ =
false;
116 float prevHistoryScrollMax_ = 0.0f;
117 struct DrawNotificationSettings
126 bool drawNotification_(
const DrawNotificationSettings& settings );
127 void addNotification_( std::vector<NotificationWithTimer>& store,
const RibbonNotification& notification );
128 void filterInvalid_(
int numInvalid = -1 );
129 void requestClosestRedraw_();
#define MR_MAKE_FLAG_OPERATORS(T)
Generates operators for a enum (at namespace scope).
Definition MRFlagOperators.h:6
class to hold and operate with notifications
Definition MRRibbonNotification.h:67
std::string buttonName
Name of button that will be drawn if callback is enabled.
Definition MRRibbonNotification.h:48
float timer
Definition MRRibbonNotification.h:92
NotificationTagMask tags
it ANDs with RibbonNotifier allowed tags to see if notification should be displayed
Definition MRRibbonNotification.h:59
std::function< void()> OnButtonClick
Definition MRRibbonNotification.h:44
void draw(const Box2i &limitFramebuffer)
float width
Definition MRRibbonNotification.h:120
NotificationType
Definition MRNotificationType.h:10
OnButtonClick onButtonClick
Definition MRRibbonNotification.h:45
std::string text
Text of notification.
Definition MRRibbonNotification.h:52
NotificationTagMask allowedTagMask
this mask is used to control allowed notifications by filtering with tags
Definition MRRibbonNotification.h:84
void setHitoryButtonMaxLifeTime(float histBtnMaxLifeTime)
RibbonNotificationCorner cornerPosition
position of notifications on screen
Definition MRRibbonNotification.h:87
bool historyMode
Definition MRRibbonNotification.h:121
unsigned NotificationTagMask
Definition MRRibbonNotification.h:31
Vector2f * currentPos
Definition MRRibbonNotification.h:122
NotificationType type
Type of notification.
Definition MRRibbonNotification.h:54
float lifeTimeSec
Definition MRRibbonNotification.h:57
bool operator==(const RibbonNotification &other) const
void pushNotification(const RibbonNotification ¬ification)
adds new notification for drawing
RibbonNotification notification
Definition MRRibbonNotification.h:91
float defaultNotificationLifeTimeSeconds
this value is used as notification lifeTimeSec if negative values passed
Definition MRRibbonNotification.h:81
RibbonNotificationCorner
corner where notifications will appear
Definition MRRibbonNotification.h:35
std::string header
Header of notification.
Definition MRRibbonNotification.h:50
int sameCounter
Definition MRRibbonNotification.h:93
Tag
Definition MRRibbonNotification.h:19
int index
Definition MRRibbonNotification.h:119
@ other
Angle, normally float. Measure in radians.
Definition MRFeatureObject.h:27
@ Info
Definition MRNotificationType.h:13
@ LowerRight
Definition MRRibbonNotification.h:37
@ LowerLeft
Definition MRRibbonNotification.h:36
@ ImplicitChanges
Definition MRRibbonNotification.h:23
@ Report
Definition MRRibbonNotification.h:21
@ Recommendation
Definition MRRibbonNotification.h:22
@ All
Definition MRRibbonNotification.h:26
@ Important
Definition MRRibbonNotification.h:24
@ Default
Definition MRRibbonNotification.h:25
@ None
Definition MRRibbonNotification.h:20
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRRibbonNotification.h:41