MeshLib Documentation
Loading...
Searching...
No Matches
MRUISaveChangesPopup.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include <functional>
5
6
#include "exports.h"
7
8
namespace
MR
9
{
10
11
namespace
UI
12
{
13
14
struct
SaveChangesPopupSettings
15
{
16
// menu scaling
17
float
scaling
= 1.0f;
18
// text that is shown if we have nothing to save
19
std::string
shortCloseText
=
"Close"
;
20
// text that is shown if we have changes but don't want to save them
21
std::string
dontSaveText
=
"Don't Save"
;
22
23
std::string
saveTooltip
=
"Save current scene"
;
24
std::string
dontSaveTooltip
=
"Donh't save current scene"
;
25
std::string
cancelTooltip
=
"Cansel"
;
26
// header that is used in dialog
27
std::string
header
;
28
// if not empty this function is called on "save" and "not save" options( if succeed )
29
std::function<void()>
onOk
= {};
30
};
31
// Shows ImGui popup that suggests user to save changes,
32
// user need to call ImGui::OpenPopup( str_id ) to open this popup.
33
// It has 3 options: save, don't save, cancel
34
// str_id - ImGui string id for the popup window
35
// settings - settings for dialog
36
MRVIEWER_API
void
saveChangesPopup
(
const
char
* str_id,
const
SaveChangesPopupSettings
& settings = {} );
37
}
38
39
}
MR::UI::saveChangesPopup
MRVIEWER_API void saveChangesPopup(const char *str_id, const SaveChangesPopupSettings &settings={})
MR
Definition
MRCameraOrientationPlugin.h:8
MR::UI::SaveChangesPopupSettings
Definition
MRUISaveChangesPopup.h:15
MR::UI::SaveChangesPopupSettings::dontSaveText
std::string dontSaveText
Definition
MRUISaveChangesPopup.h:21
MR::UI::SaveChangesPopupSettings::header
std::string header
Definition
MRUISaveChangesPopup.h:27
MR::UI::SaveChangesPopupSettings::saveTooltip
std::string saveTooltip
Definition
MRUISaveChangesPopup.h:23
MR::UI::SaveChangesPopupSettings::shortCloseText
std::string shortCloseText
Definition
MRUISaveChangesPopup.h:19
MR::UI::SaveChangesPopupSettings::dontSaveTooltip
std::string dontSaveTooltip
Definition
MRUISaveChangesPopup.h:24
MR::UI::SaveChangesPopupSettings::cancelTooltip
std::string cancelTooltip
Definition
MRUISaveChangesPopup.h:25
MR::UI::SaveChangesPopupSettings::onOk
std::function< void()> onOk
Definition
MRUISaveChangesPopup.h:29
MR::UI::SaveChangesPopupSettings::scaling
float scaling
Definition
MRUISaveChangesPopup.h:17
MeshLib
source
MRViewer
MRUISaveChangesPopup.h
Generated by
1.11.0