1 /*
2  * Part of WCM Commander
3  * https://github.com/corporateshark/WCMCommander
4  * wcm@linderdaum.com
5  */
6 
7 #pragma once
8 
9 #include "ncdialogs.h"
10 #include "operwin.h"
11 
12 class OperData
13 {
14 	NCDialogParent* volatile parentWin;
15 public:
OperData(NCDialogParent * p)16 	OperData( NCDialogParent* p ): parentWin( p ) {}
Parent()17 	NCDialogParent* Parent() { return parentWin; }
18 	virtual ~OperData();
19 };
20 
21 extern ButtonDataNode bOk[];
22 
23 class OperThread
24 {
25 	OperThreadNode* volatile node;
26 	std::string operName; //++volatile
27 	NCDialogParent* volatile parentWin;
28 public:
29 	OperThread( const char* opName, NCDialogParent* p, OperThreadNode* n );
Node()30 	OperThreadNode& Node() { return *node; }
OperName()31 	const char* OperName() { return operName.data(); }
32 	virtual void Run();
33 	virtual ~OperThread();
34 protected:
Parent()35 	NCDialogParent* Parent() { return parentWin; }
36 	int RedMessage( ButtonDataNode* b, const char* str, const char* sysErr = 0 );
37 	int RedMessage( const char* s1, ButtonDataNode* buttons = bOk, const char* sysErr = 0 );
38 	int RedMessage( const char* s1, const char* s2, ButtonDataNode* buttons = bOk, const char* sysErr = 0 );
39 	int RedMessage( const char* s1, const char* s2, const char* s3, ButtonDataNode* buttons = bOk, const char* sysErr = 0 );
40 	int RedMessage( const char* s1, const char* s2, const char* s3, const char* s4, ButtonDataNode* buttons = bOk, const char* sysErr = 0 );
41 	int RedMessage( const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, ButtonDataNode* buttons = bOk, const char* sysErr = 0 );
42 	int RedMessage( const char* s1, const char* s2, const char* s3, const char* s4, const char* s5, const char* s6, ButtonDataNode* buttons = bOk, const char* sysErr = 0 );
43 };
44 
45