📄 main.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 + -