test_it.cpp

来自「GNU/Linux程序开发指南书的所有例子源代码」· C++ 代码 · 共 25 行

CPP
25
字号
// test_it.cpp#include <iostream.h>#include "PaneWindow.hxx"#include "Label.hxx"#include "Button.hxx"#include "Text.hxx"Text *text;void button_cb() {  cout << "Text is:\n" << text->getText() << "\n";}void main() {  PaneWindow pw;  Label label("this is a test");  Button button("Get text", button_cb);  text = new Text(300, 120);  pw.addComponent(&label);  pw.addComponent(&button);  pw.addComponent(text);  pw.run();}

⌨️ 快捷键说明

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