⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 application.h

📁 MONA是为数不多的C++语言编写的一个很小的操作系统
💻 H
字号:
// This software is in the public domain.// There are no restrictions on any sort of usage of this software.#ifndef __SYSTEM_MONA_FORMS_APPLICATION_H__#define __SYSTEM_MONA_FORMS_APPLICATION_H__#ifdef MONA#include <monapi.h>#define MAIN_ARGS List<char*>* pekoe#define SET_MAIN_CLASS(T) int MonaMain(MAIN_ARGS) { \	System::Mona::Forms::Application::__main<T>(pekoe); return 0; }#else#define MAIN_ARGS int argc, char* argv[]#define SET_MAIN_CLASS(T) int main(MAIN_ARGS) { \	System::Mona::Forms::Application::__main<T>(argc, argv); return 0; }#endif#include <gui/System/Pointer.h>#include <gui/System/String.h>#include <gui/System/Collections/ArrayList.h>#include <gui/System/Mona/Forms/IMessageFilter.h>namespace System { namespace Mona { namespace Forms{	class Form;	class Control;		class Application	{	private:		static _P<System::Collections::ArrayList<_P<Form> > > forms;		static _P<Control> prevControl;		static _P<Form> mainForm;		static _P<System::Collections::ArrayList<IMessageFilter*> > messageFilters;		static bool isExited;		static int mouseButtons;				static void Initialize();		static void Dispose();			public:		static unsigned char* defaultFontData;				static void Run();		static void Run(_P<Form> form);		static void DoEvents();		static void ProcessEvent(Message* m);		static void Exit();		static void AddMessageFilter(IMessageFilter* value);		static void RemoveMessageFilter(IMessageFilter* value);				static void AddForm(_P<Form> f);		static void RemoveForm(_P<Form> f);		static _P<Form> FindForm(int x, int y);				template <class T> static void __main(MAIN_ARGS)		{#ifdef MONA			int len = pekoe->size();			_A<String> args(len);			for (int i = 0; i < len; i++) args[i] = pekoe->get(i);#else			_A<String> args(argc);			for (int i = 0; i < argc; i++) args[i] = argv[i];#endif						Application::Initialize();			T::Main(args);			Application::Dispose();		}	};}}}#endif  // __SYSTEM_MONA_FORMS_APPLICATION_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -