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

📄 main.cc

📁 QNX实时操作系统里的GUI是c格式的
💻 CC
字号:
#include <Ap.h>#include <photon/PtWindow.h>#ifndef NDEBUG#    include <photon/PtLabel.h>#endif#include "photonmm/Main.h"// namespace Ap {        extern PtWidget_t* main_widget;        PtAppContext_t cnt;                Main::Main (int *  argc, char* argv[]  )        {                main_widget = PtAppInit (&cnt, argc, argv, 0, NULL  );        }        void        Main::run ()        {       #ifndef NDEBUGPtArg_t argt[5];int i =0;PhPoint_t pos = { 0, 0 };char* str = "Debug View.";PhDim_t dim = { 200, 150 };PtSetArg (&argt[i++], Pt_ARG_TEXT_STRING, str,  0);PtSetArg (&argt[i++], Pt_ARG_POS,         &pos, 0);PtWidget_t* widget = PtCreateWidget (PtLabel, main_widget, i, argt);		PtSetResource   (main_widget, Pt_ARG_DIM,          &dim, 0);		PtSetResource   (main_widget, Pt_ARG_WINDOW_TITLE, str,  0);                PtRealizeWidget (main_widget);				#endif                PtMainLoop ();        }        void        Main::exit ()        {                PtExit (0);        }// } // namespace Ap

⌨️ 快捷键说明

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