Unravel Engine C++ Reference
Loading...
Searching...
No Matches
imgui_notify.h File Reference
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
#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_Tooltip | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoInputs
 
#define NOTIFY_USE_SEPARATOR
 
#define NOTIFY_USE_DISMISS_BUTTON   false
 
#define NOTIFY_RENDER_LIMIT   10
 
#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 int ImGuiToastHorizontalPos
 
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
}
 
enum  ImGuiToastHorizontalPos_ { ImGuiToastHorizontalPos_Left , ImGuiToastHorizontalPos_Right , ImGuiToastHorizontalPos_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 47 of file imgui_notify.h.

◆ NOTIFY_FADE_IN_OUT_TIME

#define NOTIFY_FADE_IN_OUT_TIME   150

Definition at line 46 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); }
gfx::texture_format format

Definition at line 57 of file imgui_notify.h.

◆ NOTIFY_INLINE

#define NOTIFY_INLINE   inline

Definition at line 55 of file imgui_notify.h.

◆ NOTIFY_MAX_MSG_LENGTH

#define NOTIFY_MAX_MSG_LENGTH   4096

Definition at line 42 of file imgui_notify.h.

◆ NOTIFY_MAX_TOASTS

#define NOTIFY_MAX_TOASTS   10

Definition at line 41 of file imgui_notify.h.

◆ NOTIFY_NULL_OR_EMPTY

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

Definition at line 56 of file imgui_notify.h.

◆ NOTIFY_OPACITY

#define NOTIFY_OPACITY   1.0f

Definition at line 48 of file imgui_notify.h.

◆ NOTIFY_PADDING_MESSAGE_Y

#define NOTIFY_PADDING_MESSAGE_Y   10.f

Definition at line 45 of file imgui_notify.h.

◆ NOTIFY_PADDING_X

#define NOTIFY_PADDING_X   20.f

Definition at line 43 of file imgui_notify.h.

◆ NOTIFY_PADDING_Y

#define NOTIFY_PADDING_Y   20.f

Definition at line 44 of file imgui_notify.h.

◆ NOTIFY_RENDER_LIMIT

#define NOTIFY_RENDER_LIMIT   10

Definition at line 53 of file imgui_notify.h.

◆ NOTIFY_TOAST_FLAGS

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

Definition at line 49 of file imgui_notify.h.

◆ NOTIFY_USE_DISMISS_BUTTON

#define NOTIFY_USE_DISMISS_BUTTON   false

Definition at line 52 of file imgui_notify.h.

◆ NOTIFY_USE_SEPARATOR

#define NOTIFY_USE_SEPARATOR

Definition at line 51 of file imgui_notify.h.

Typedef Documentation

◆ ImGuiToastDrawCallback

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

Definition at line 69 of file imgui_notify.h.

◆ ImGuiToastHorizontalPos

Definition at line 62 of file imgui_notify.h.

◆ ImGuiToastPhase

typedef int ImGuiToastPhase

Definition at line 60 of file imgui_notify.h.

◆ ImGuiToastPos

typedef int ImGuiToastPos

Definition at line 61 of file imgui_notify.h.

◆ ImGuiToastType

typedef int ImGuiToastType

Definition at line 59 of file imgui_notify.h.

Enumeration Type Documentation

◆ ImGuiToastHorizontalPos_

Enumerator
ImGuiToastHorizontalPos_Left 
ImGuiToastHorizontalPos_Right 
ImGuiToastHorizontalPos_COUNT 

Definition at line 102 of file imgui_notify.h.

◆ ImGuiToastPhase_

Enumerator
ImGuiToastPhase_FadeIn 
ImGuiToastPhase_Wait 
ImGuiToastPhase_FadeOut 
ImGuiToastPhase_Expired 
ImGuiToastPhase_COUNT 

Definition at line 81 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 90 of file imgui_notify.h.

◆ ImGuiToastType_

Enumerator
ImGuiToastType_None 
ImGuiToastType_Success 
ImGuiToastType_Warning 
ImGuiToastType_Error 
ImGuiToastType_Info 
ImGuiToastType_COUNT 

Definition at line 71 of file imgui_notify.h.