From fedf703a0a4412c736003a0aedc7e087e2897225 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 26 Sep 2014 16:43:22 +0000 Subject: experimental Xaw Box --- Display.c | 3 +++ Makefile | 2 +- spectrogram.c | 11 ++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Display.c b/Display.c index 6a82b55..36b57eb 100644 --- a/Display.c +++ b/Display.c @@ -4,6 +4,9 @@ #include #include "DisplayP.h" +//static ChangeManaged(Widget); +//static XtGeometryResult GeometryManager(Widget, XtWidgetGeometry *, XtWidgetGeometry *); + #define Offset(field) XtOffsetOf(DisplayRec, display.field) static XtResource resources[] = { }; diff --git a/Makefile b/Makefile index 77029f6..141dc9a 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ VERSION=3.0 PROG= spectrogram SRCS= spectrogram.c fft.c cms.c aux.c widget.c Sgraph.c Display.c -LIBS= fftw3 xt xext xrender +LIBS= fftw3 xaw7 xext xrender BINDIR= /usr/local/bin UNAME!= uname diff --git a/spectrogram.c b/spectrogram.c index 9a1b828..821e2e5 100644 --- a/spectrogram.c +++ b/spectrogram.c @@ -19,7 +19,8 @@ #include #include -#include "Display.h" +//#include "Display.h" +#include #include "Sgraph.h" #include @@ -121,13 +122,17 @@ main(int argc, char **argv) init_fft(samples); warnx("samples: %d", samples); - display = XtCreateManagedWidget("Display", displayWidgetClass, - toplevel, NULL, 0); + n = 0; + XtSetArg(args[n], XtNorientation, "horizontal"); n++; + display = XtCreateManagedWidget("Display", boxWidgetClass, + toplevel, args, n); n = 0; XtSetArg(args[n], XtNsamples, samples); n++; sgraph = XtCreateManagedWidget("SGraph", sgraphWidgetClass, display, args, n); + sgraph = XtCreateManagedWidget("SGraph", sgraphWidgetClass, + display, args, n); XtOverrideTranslations(sgraph, XtParseTranslationTable("q: quit()")); -- cgit v1.2.3