📄 text.cpp
字号:
#include <wx/wx.h>/** A frame that contains a text control.*/class TextFrame : public wxFrame{public: /** Constructs the text control. */ TextFrame();private: wxTextCtrl* text;};/** An application that shows a frame with a text control.*/class TextApp : public wxApp{public: /** Constructs the frame. */ TextApp(); /** Shows the frame. @return true */ virtual bool OnInit();private: TextFrame* frame;};DECLARE_APP(TextApp)IMPLEMENT_APP(TextApp)TextFrame::TextFrame() : wxFrame(NULL, -1, "TextFrame"){ text = new wxTextCtrl(this, -1, "Type some text here!", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE);}TextApp::TextApp(){ frame = new TextFrame();}bool TextApp::OnInit(){ frame->Show(true); return true;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -