For faster navigation, this Iframe is preloading the Wikiwand page for Xaw.

Xaw

Материал из Википедии — свободной энциклопедии

Графический стек X Window System

Xaw (англ. X Window System Athena widget set) — набор виджетов для реализации простых интерфейсов пользователя, основанный на X Toolkit Intrinsics. Распространяется с X Window System.

Пример программы

[править | править код]

Следующая программа создает кнопку в окне, с помощью Athena Widget:

/*
 * Компилируется строкой cc -o simple simple.c -lXaw -lXt -lX11
 */
#include <X11/Intrinsic.h>
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Command.h>
#include <stdlib.h>

XtAppContext app_context;

void quit_proc(Widget w, XtPointer client_data, XtPointer call_data)
{
    XtDestroyApplicationContext(app_context);
    exit(0);
}

int main(int argc, char **argv)
{
    Widget toplevel, form, w;

    toplevel = XtOpenApplication(&app_context, "XFirst", NULL, 0, &argc,
				 argv, NULL, applicationShellWidgetClass,
				 NULL, 0);
    form =
	XtVaCreateManagedWidget("form", formWidgetClass, toplevel, NULL);
    w = XtVaCreateManagedWidget("quit_button", commandWidgetClass, form,
				XtNlabel, "Quit", NULL);
    XtAddCallback(w, XtNcallback, quit_proc, NULL);
    XtRealizeWidget(toplevel);
    XtAppMainLoop(app_context);
}
{{bottomLinkPreText}} {{bottomLinkText}}
Xaw
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?