label.cpp

来自「基于网络编程的例子」· C++ 代码 · 共 22 行

CPP
22
字号
// Label.cpp//#include <X11/Intrinsic.h>#include <X11/StringDefs.h>#include <X11/Xaw/Label.h>#include "Label.hxx"Label::Label(char *label, int width, int height) {  my_label = label;  my_width = width;  my_height = height;}void Label::setup(Widget parent) {  Arg args[2];  XtSetArg(args[0], XtNwidth,  my_width);  XtSetArg(args[1], XtNheight, my_height);  my_widget = XtCreateManagedWidget(my_label, labelWidgetClass, parent,                                    args, 2);}

⌨️ 快捷键说明

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