mirror of
				https://github.com/TES3MP/openmw-tes3mp.git
				synced 2025-11-04 02:56:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			73 lines
		
	
	
	
		
			890 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
	
		
			890 B
		
	
	
	
		
			C++
		
	
	
	
	
	
#ifndef SH_EDITOR_H
 | 
						|
#define SH_EDITOR_H
 | 
						|
 | 
						|
#if SHINY_BUILD_MATERIAL_EDITOR
 | 
						|
class QApplication;
 | 
						|
 | 
						|
#include <boost/thread/condition_variable.hpp>
 | 
						|
#include <boost/thread/mutex.hpp>
 | 
						|
 | 
						|
namespace boost
 | 
						|
{
 | 
						|
	class thread;
 | 
						|
}
 | 
						|
 | 
						|
namespace sh
 | 
						|
{
 | 
						|
	class MainWindow;
 | 
						|
 | 
						|
	struct SynchronizationState
 | 
						|
	{
 | 
						|
		boost::mutex mUpdateMutex;
 | 
						|
		boost::mutex mActionMutex;
 | 
						|
		boost::mutex mQueryMutex;
 | 
						|
	};
 | 
						|
 | 
						|
	class Editor
 | 
						|
	{
 | 
						|
	public:
 | 
						|
 | 
						|
		Editor();
 | 
						|
		~Editor();
 | 
						|
 | 
						|
		void show();
 | 
						|
		void update();
 | 
						|
 | 
						|
 | 
						|
	private:
 | 
						|
		bool mInitialized;
 | 
						|
 | 
						|
		MainWindow* mMainWindow;
 | 
						|
		QApplication* mApplication;
 | 
						|
 | 
						|
		SynchronizationState mSync;
 | 
						|
 | 
						|
		boost::thread* mThread;
 | 
						|
 | 
						|
		void runThread();
 | 
						|
 | 
						|
		void processShowWindow();
 | 
						|
	};
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
#else
 | 
						|
 | 
						|
// Dummy implementation, so that the user's code does not have to be polluted with #ifdefs
 | 
						|
namespace sh
 | 
						|
{
 | 
						|
 | 
						|
	class Editor
 | 
						|
	{
 | 
						|
	public:
 | 
						|
		Editor() {}
 | 
						|
		~Editor() {}
 | 
						|
		void show() {}
 | 
						|
		void update() {}
 | 
						|
 | 
						|
	};
 | 
						|
}
 | 
						|
 | 
						|
#endif
 | 
						|
 | 
						|
#endif
 |