Unravel Engine C++ Reference
Loading...
Searching...
No Matches
imgui_notify.h File Reference
#include <vector>
#include <chrono>
#include <functional>
#include "fonts/icons/icons_material_design_icons.h"
#include <imgui_includes.h>

Go to the source code of this file.

Classes

class  ImGuiToast
 

Namespaces

namespace  ImGui
 

Macros

#define NOTIFY_MAX_TOASTS   10
 
#define NOTIFY_MAX_MSG_LENGTH   4096
 
#define NOTIFY_PADDING_X   20.f
 
#define NOTIFY_PADDING_Y   20.f
 
#define NOTIFY_PADDING_MESSAGE_Y   10.f
 
#define NOTIFY_FADE_IN_OUT_TIME   150
 
#define NOTIFY_DEFAULT_DISMISS   3000
 
#define NOTIFY_OPACITY   1.0f
 
#define NOTIFY_TOAST_FLAGS   ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoFocusOnAppearing
 
#define NOTIFY_USE_SEPARATOR
 
#define NOTIFY_INLINE   inline
 
#define NOTIFY_NULL_OR_EMPTY(str)
 
#define NOTIFY_FORMAT(fn, format, ...)
 

Typedefs

typedef int ImGuiToastType
 
typedef int ImGuiToastPhase
 
typedef int ImGuiToastPos
 
typedef std::function< void(const ImGuiToast &, float, const ImVec4 &)> ImGuiToastDrawCallback
 

Enumerations

enum  ImGuiToastType_ {
  ImGuiToastType_None , ImGuiToastType_Success , ImGuiToastType_Warning , ImGuiToastType_Error ,
  ImGuiToastType_Info , ImGuiToastType_COUNT
}
 
enum  ImGuiToastPhase_ {
  ImGuiToastPhase_FadeIn , ImGuiToastPhase_Wait , ImGuiToastPhase_FadeOut , ImGuiToastPhase_Expired ,
  ImGuiToastPhase_COUNT
}
 
enum  ImGuiToastPos_ {
  ImGuiToastPos_TopLeft , ImGuiToastPos_TopCenter , ImGuiToastPos_TopRight , ImGuiToastPos_BottomLeft ,
  ImGuiToastPos_BottomCenter , ImGuiToastPos_BottomRight , ImGuiToastPos_Center , ImGuiToastPos_COUNT
}
 

Functions

NOTIFY_INLINE ImGuiToastImGui::GetNotification (uint64_t unique_id)
 
NOTIFY_INLINE void ImGui::PushNotification (const ImGuiToast &toast)
 Insert a new toast in the list.
 
NOTIFY_INLINE void ImGui::PushNotification (uint64_t unique_id, const ImGuiToast &toast)
 Insert or update a notification with a unique ID If the notification already exists, it updates the content and refreshes timing:
 
NOTIFY_INLINE void ImGui::RemoveNotification (int index)
 Remove a toast from the list by its index.
 
NOTIFY_INLINE void ImGui::RenderNotifications ()
 Render toasts, call at the end of your rendering!
 

Variables

NOTIFY_INLINE std::vector< ImGuiToastImGui::notifications
 

Macro Definition Documentation

◆ NOTIFY_DEFAULT_DISMISS

#define NOTIFY_DEFAULT_DISMISS   3000

Definition at line 45 of file imgui_notify.h.

◆ NOTIFY_FADE_IN_OUT_TIME

#define NOTIFY_FADE_IN_OUT_TIME   150

Definition at line 44 of file imgui_notify.h.

◆ NOTIFY_FORMAT

#define NOTIFY_FORMAT ( fn,
format,
... )
Value:
if (format) { va_list args; va_start(args, format); fn(format, args, ##__VA_ARGS__); va_end(args); }

Definition at line 53 of file imgui_notify.h.

◆ NOTIFY_INLINE

#define NOTIFY_INLINE   inline

Definition at line 51 of file imgui_notify.h.

◆ NOTIFY_MAX_MSG_LENGTH

#define NOTIFY_MAX_MSG_LENGTH   4096

Definition at line 40 of file imgui_notify.h.

◆ NOTIFY_MAX_TOASTS

#define NOTIFY_MAX_TOASTS   10

Definition at line 39 of file imgui_notify.h.

◆ NOTIFY_NULL_OR_EMPTY

#define NOTIFY_NULL_OR_EMPTY ( str)
Value:
(!str ||! strlen(str))

Definition at line 52 of file imgui_notify.h.

◆ NOTIFY_OPACITY

#define NOTIFY_OPACITY   1.0f

Definition at line 46 of file imgui_notify.h.

◆ NOTIFY_PADDING_MESSAGE_Y

#define NOTIFY_PADDING_MESSAGE_Y   10.f

Definition at line 43 of file imgui_notify.h.

◆ NOTIFY_PADDING_X

#define NOTIFY_PADDING_X   20.f

Definition at line 41 of file imgui_notify.h.

◆ NOTIFY_PADDING_Y

#define NOTIFY_PADDING_Y   20.f

Definition at line 42 of file imgui_notify.h.

◆ NOTIFY_TOAST_FLAGS

#define NOTIFY_TOAST_FLAGS   ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoFocusOnAppearing

Definition at line 47 of file imgui_notify.h.

◆ NOTIFY_USE_SEPARATOR

#define NOTIFY_USE_SEPARATOR

Definition at line 49 of file imgui_notify.h.

Typedef Documentation

◆ ImGuiToastDrawCallback

typedef std::function<void(const ImGuiToast&, float, const ImVec4&)> ImGuiToastDrawCallback

Definition at line 64 of file imgui_notify.h.

◆ ImGuiToastPhase

typedef int ImGuiToastPhase

Definition at line 56 of file imgui_notify.h.

◆ ImGuiToastPos

typedef int ImGuiToastPos

Definition at line 57 of file imgui_notify.h.

◆ ImGuiToastType

typedef int ImGuiToastType

Definition at line 55 of file imgui_notify.h.

Enumeration Type Documentation

◆ ImGuiToastPhase_

Enumerator
ImGuiToastPhase_FadeIn 
ImGuiToastPhase_Wait 
ImGuiToastPhase_FadeOut 
ImGuiToastPhase_Expired 
ImGuiToastPhase_COUNT 

Definition at line 76 of file imgui_notify.h.

◆ ImGuiToastPos_

Enumerator
ImGuiToastPos_TopLeft 
ImGuiToastPos_TopCenter 
ImGuiToastPos_TopRight 
ImGuiToastPos_BottomLeft 
ImGuiToastPos_BottomCenter 
ImGuiToastPos_BottomRight 
ImGuiToastPos_Center 
ImGuiToastPos_COUNT 

Definition at line 85 of file imgui_notify.h.

◆ ImGuiToastType_

Enumerator
ImGuiToastType_None 
ImGuiToastType_Success 
ImGuiToastType_Warning 
ImGuiToastType_Error 
ImGuiToastType_Info 
ImGuiToastType_COUNT 

Definition at line 66 of file imgui_notify.h.