SavvyUI C++ UI Library
Loading...
Searching...
No Matches
DialogFactory.h
Go to the documentation of this file.
1#pragma once
2
3#include "Component.h"
4
14{
15public:
23 static void showError(Component *parent, const wstring& errorMessage, const wstring& title = L"");
24
32 static void showWarning(Component *parent, const wstring& warningMessage, const wstring& title = L"");
33
41 static void showInfo(Component *parent, const wstring& infoMessage, const wstring& title = L"");
42
50 static void showSuccess(Component *parent, const wstring& successMessage, const wstring& title = L"");
51
60 static BOOL showConfirmDialog(Component *parent, const wstring& promptMessageText, const wstring& title = L"");
61
69 static BOOL showOpenFileDialog(Component *parent, wstring& selection);
70
78 static BOOL showSaveFileDialog(Component *parent, wstring& selection);
79
87 static BOOL showFolderSelectionDialog(Component *parent, wstring& selection);
88
96 static BOOL showColorSelectionDialog(Component *parent, COLORREF& selection);
97
110 wstring& fontName,
111 long& fontHeight,
112 long& fontWeight,
113 BOOL& isItalic,
114 COLORREF& color);
115
124
136 long& leftMargin, long& topMargin,
137 long& rightMargin, long& bottomMargin);
138
147 static BOOL showInputDialog(Component *parent, const vector<wstring>& labels, vector<wstring>& values);
148
156 static BOOL showDateInputDialog(Component *parent, wstring& selectedDate);
157};
158
HDC DCHandle
Definition Common.h:17
Base class for all UI components providing window creation, event handling, and listener management.
Definition Component.h:32
A utility class providing static methods to show common dialog boxes.
Definition DialogFactory.h:14
static BOOL showInputDialog(Component *parent, const vector< wstring > &labels, vector< wstring > &values)
Shows a generic input dialog with multiple labeled fields.
static BOOL showFolderSelectionDialog(Component *parent, wstring &selection)
Shows a folder selection dialog.
static BOOL showConfirmDialog(Component *parent, const wstring &promptMessageText, const wstring &title=L"")
Shows a confirmation dialog with Yes/No options.
static DCHandle showPrinterSelectionDialog(Component *parent)
Shows a printer selection dialog.
static BOOL showColorSelectionDialog(Component *parent, COLORREF &selection)
Shows a color selection dialog.
static void showSuccess(Component *parent, const wstring &successMessage, const wstring &title=L"")
Shows a success message dialog.
static BOOL showSaveFileDialog(Component *parent, wstring &selection)
Shows a Save File dialog to specify a file to save.
static BOOL showOpenFileDialog(Component *parent, wstring &selection)
Shows an Open File dialog to select a file.
static void showInfo(Component *parent, const wstring &infoMessage, const wstring &title=L"")
Shows an informational message dialog.
static BOOL showDateInputDialog(Component *parent, wstring &selectedDate)
Shows a generic input dialog with multiple labeled fields.
static void showWarning(Component *parent, const wstring &warningMessage, const wstring &title=L"")
Shows a warning message dialog.
static BOOL showFontSelectionDialog(Component *parent, wstring &fontName, long &fontHeight, long &fontWeight, BOOL &isItalic, COLORREF &color)
Shows a font selection dialog.
static BOOL showPrinterSetupDialog(Component *parent, long &leftMargin, long &topMargin, long &rightMargin, long &bottomMargin)
Shows a printer setup dialog to configure margins.
static void showError(Component *parent, const wstring &errorMessage, const wstring &title=L"")
Shows an error message dialog.