mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-16 08:10:32 +02:00
117 lines
3.6 KiB
C++
117 lines
3.6 KiB
C++
/*
|
|
===========================================================================
|
|
|
|
IceTech GPL Source Code
|
|
Copyright (C) 2026 Justin Marshall
|
|
|
|
This file is part of the IceTech GPL Source Code (?IceTech Source Code?).
|
|
|
|
IceTech Source Code is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
IceTech Source Code is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with IceTech Source Code. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
In addition, the IceTech Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the IceTech Source Code. If not, please request a copy in writing from id Software at the address below.
|
|
|
|
If you have questions concerning this license or the applicable additional terms, you may contact in writing Justin Marshall, justinmarshall20@gmail.com
|
|
|
|
===========================================================================
|
|
*/
|
|
|
|
#if !defined(AFX_WAITDLG_H__2B7A6C91_8D3F_4BEE_B564_33A0CFFA241B__INCLUDED_)
|
|
#define AFX_WAITDLG_H__2B7A6C91_8D3F_4BEE_B564_33A0CFFA241B__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CWaitDlg dialog
|
|
|
|
class CWaitDlg : public CDialog {
|
|
public:
|
|
CWaitDlg(CWnd* pParent = NULL, const char* msg = "Wait...");
|
|
virtual ~CWaitDlg();
|
|
|
|
void SetText(const char* msg, bool append = false);
|
|
void AllowCancel(bool enable);
|
|
bool CancelPressed(void);
|
|
|
|
// New progress API.
|
|
// SetProgress(-1) = animated indeterminate marquee.
|
|
// SetProgress(0..100) = fixed progress amount.
|
|
void SetProgress(int percent);
|
|
void StepProgress(int amount = 1);
|
|
int GetProgress(void) const;
|
|
|
|
void SetTitleText(const char* title);
|
|
|
|
enum { IDD = IDD_DLG_WAIT };
|
|
|
|
CString waitStr;
|
|
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX);
|
|
virtual BOOL OnInitDialog();
|
|
virtual void OnCancel();
|
|
|
|
afx_msg void OnPaint();
|
|
afx_msg BOOL OnEraseBkgnd(CDC* pDC);
|
|
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
private:
|
|
void InitModernResources(void);
|
|
void FreeModernResources(void);
|
|
void LayoutModernControls(void);
|
|
void ResizeAndCenterDialog(void);
|
|
|
|
void DrawModernBackground(CDC& dc, const CRect& rcClient);
|
|
void DrawHeader(CDC& dc, const CRect& rcClient);
|
|
void DrawMessage(CDC& dc, const CRect& rcClient);
|
|
void DrawProgress(CDC& dc, const CRect& rcClient);
|
|
void DrawRoundedRect(CDC& dc, const CRect& rc, COLORREF fill, COLORREF outline, int radius);
|
|
|
|
void PumpMessages(void);
|
|
|
|
private:
|
|
idStr text;
|
|
bool cancelPressed;
|
|
bool cancelAllowed;
|
|
|
|
CString titleStr;
|
|
|
|
int progressPercent; // -1 = indeterminate / marquee
|
|
int marqueeOffset;
|
|
int pulseFrame;
|
|
|
|
CFont titleFont;
|
|
CFont messageFont;
|
|
CFont smallFont;
|
|
|
|
CBrush transparentBrush;
|
|
|
|
COLORREF colorBackTop;
|
|
COLORREF colorBackBottom;
|
|
COLORREF colorPanel;
|
|
COLORREF colorPanelBorder;
|
|
COLORREF colorText;
|
|
COLORREF colorMutedText;
|
|
COLORREF colorAccent;
|
|
COLORREF colorAccent2;
|
|
COLORREF colorProgressBack;
|
|
COLORREF colorDanger;
|
|
};
|
|
|
|
#endif // !defined(AFX_WAITDLG_H__2B7A6C91_8D3F_4BEE_B564_33A0CFFA241B__INCLUDED_)
|