diff options
Diffstat (limited to 'TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib')
16 files changed, 0 insertions, 3607 deletions
diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile deleted file mode 100644 index 70206b0d54e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/Makefile +++ /dev/null @@ -1,301 +0,0 @@ -#---------------------------------------------------------------------------- -# -# $Id$ -# -#---------------------------------------------------------------------------- - -MAKEFILE = Makefile -LIBNAME = libmpeg_mib -LIB = $(LIBNAME).a -SHLIB = $(LIBNAME).$(SOEXT) - -ifndef TAO_ROOT -TAO_ROOT = $(ACE_ROOT)/TAO -endif - -# On non-Windows environment, we should at least define -# the export_include IDL flag. -FILES= mibButton \ - mibDrawArea \ - mibFrame \ - mibLabel \ - mibList \ - mibMenu \ - mibRadioBox \ - mibScale \ - mibScrollBar \ - mibTextBig \ - mibTextBox \ - mibToggle \ - mibload \ - -DEFS = $(addsuffix .h,$(FILES)) -LSRC = $(addsuffix .cpp,$(FILES)) - -##LIBS += -lTAO -lACE - -#---------------------------------------------------------------------------- -# Include macros and targets -#---------------------------------------------------------------------------- - -include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU -include $(ACE_ROOT)/include/makeinclude/macros.GNU -include $(TAO_ROOT)/rules.tao.GNU -include $(ACE_ROOT)/include/makeinclude/rules.common.GNU -include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU -include $(ACE_ROOT)/include/makeinclude/rules.lib.GNU -include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU -include $(ACE_ROOT)/include/makeinclude/rules.local.GNU - -#---------------------------------------------------------------------------- -# Local targets (and local hacks) -#---------------------------------------------------------------------------- - -LDFLAGS += -L/project/doc/pkg/X11/lib/ -lXm -lXt -lXext -lSM -lICE -lX11 -L/project/doc/pkg/X11/lib -lsocket -lnsl -ldl -CPPFLAGS += -DSH_MEM -DNDEBUG -I/project/doc/pkg/X11/include - -clean: - -/bin/rm -rf *.o Log $(BIN) obj.* core Templates.DB .make.state - -realclean: clean - -/bin/rm -rf $(addsuffix .h, $(IDL_FILES)) $(addsuffix .i, $(IDL_FILES)) $(addsuffix .cpp, $(IDL_FILES)) - -# DO NOT DELETE THIS LINE -- g++dep uses it. -# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. - -.obj/mibButton.o .obj/mibButton.so .shobj/mibButton.o .shobj/mibButton.so: mibButton.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibDrawArea.o .obj/mibDrawArea.so .shobj/mibDrawArea.o .shobj/mibDrawArea.so: mibDrawArea.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibFrame.o .obj/mibFrame.so .shobj/mibFrame.o .shobj/mibFrame.so: mibFrame.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibLabel.o .obj/mibLabel.so .shobj/mibLabel.o .shobj/mibLabel.so: mibLabel.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibList.o .obj/mibList.so .shobj/mibList.o .shobj/mibList.so: mibList.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibMenu.o .obj/mibMenu.so .shobj/mibMenu.o .shobj/mibMenu.so: mibMenu.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibRadioBox.o .obj/mibRadioBox.so .shobj/mibRadioBox.o .shobj/mibRadioBox.so: mibRadioBox.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibScale.o .obj/mibScale.so .shobj/mibScale.o .shobj/mibScale.so: mibScale.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibScrollBar.o .obj/mibScrollBar.so .shobj/mibScrollBar.o .shobj/mibScrollBar.so: mibScrollBar.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibTextBig.o .obj/mibTextBig.so .shobj/mibTextBig.o .shobj/mibTextBig.so: mibTextBig.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibTextBox.o .obj/mibTextBox.so .shobj/mibTextBox.o .shobj/mibTextBox.so: mibTextBox.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibToggle.o .obj/mibToggle.so .shobj/mibToggle.o .shobj/mibToggle.so: mibToggle.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h -.obj/mibload.o .obj/mibload.so .shobj/mibload.o .shobj/mibload.so: mibload.cpp mibload.h \ - $(ACE_ROOT)/ace/OS.h \ - $(ACE_ROOT)/ace/inc_user_config.h \ - $(ACE_ROOT)/ace/config.h \ - $(ACE_ROOT)/ace/config-sunos5.5.h \ - $(ACE_ROOT)/ace/config-g++-common.h \ - $(ACE_ROOT)/ace/streams.h \ - $(ACE_ROOT)/ace/Basic_Types.h \ - $(ACE_ROOT)/ace/Basic_Types.i \ - $(ACE_ROOT)/ace/OS.i \ - $(ACE_ROOT)/ace/Trace.h \ - $(ACE_ROOT)/ace/Log_Msg.h \ - $(ACE_ROOT)/ace/Log_Record.h \ - $(ACE_ROOT)/ace/ACE.h \ - $(ACE_ROOT)/ace/ACE.i \ - $(ACE_ROOT)/ace/Log_Priority.h \ - $(ACE_ROOT)/ace/Log_Record.i \ - mibwidgets.h - -# IF YOU PUT ANYTHING HERE IT WILL GO AWAY diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp deleted file mode 100644 index af68054c6a0..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibButton.cpp +++ /dev/null @@ -1,174 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibButton, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Button */ -/*****************************************************************************/ - -mib_Widget *mib_create_Button(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Button *myres; - unsigned char *label_text; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - myres = (mib_Button *)ACE_OS::malloc(sizeof(mib_Button)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(7); - sprintf(temp->mib_class,"Button"); - temp->mib_class_num = MIB_BUTTON; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - if (mib_fill == WDEFAULT) - { - myres->label = (char *)ACE_OS::malloc(strlen(label)+1); - strcpy(myres->label,label); - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET); - - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmPushButtonWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WDEFAULT) - { - XmStringFree(label_text); - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Button(mib_Widget *thisw) -{ - mib_Button *temp = (mib_Button *)thisw->myres; - - ACE_OS::free(temp->label); - ACE_OS::free(temp); -} - -void mib_save_Button(mib_Widget *thisw, FILE *fout) -{ - mib_Button *temp = (mib_Button *)thisw->myres; - - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label); -} - -void mib_code_gen_Button(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_Button(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Button *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[20]; - int n, got_line, vallen; - - myres = (mib_Button *)thisw->myres; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (!strcmp(res,"label")) - { - vallen = strlen(val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->label,"%s",&(val[1])); - - label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET); - - n = 0; - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetValues(thisw->me, args, n); - - XmStringFree(label_text); - - } - else - return 0; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp deleted file mode 100644 index 255656ff129..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibDrawArea.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibDrawArea, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for DrawingArea */ -/*****************************************************************************/ - -mib_Widget *mib_create_DrawingArea(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_DrawingArea *myres; - Widget wtemp; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - myres = (mib_DrawingArea *)ACE_OS::malloc(sizeof(mib_DrawingArea)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(12); - sprintf(temp->mib_class,"DrawingArea"); - temp->mib_class_num = MIB_DRAWINGAREA; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->nothing = 0; - - /* create Xt widget */ - - - n = 0; - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNbackground, WhitePixel(dpy, DefaultScreen(dpy))); n++; - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmDrawingAreaWidgetClass, - temp->parent->me, args, n); - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_DrawingArea(mib_Widget *thisw) -{ - mib_DrawingArea *temp = (mib_DrawingArea *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_DrawingArea(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_DrawingArea(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp deleted file mode 100644 index d0cd795186b..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibFrame.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibFrame, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Frames */ -/*****************************************************************************/ - -mib_Widget *mib_create_Frame(mib_Widget *parent, char *name, char *frame_type, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Frame *myres; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Frame *)ACE_OS::malloc(sizeof(mib_Frame)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(6); - sprintf(temp->mib_class,"Frame"); - temp->mib_class_num = MIB_FRAME; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->shadowtype = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - if (mib_fill == WDEFAULT) - if (!strcmp("InFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_IN); n++; - } - else - if (!strcmp("OutFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++; - myres->shadowtype = 1; - } - else - if (!strcmp("EtchedInFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - myres->shadowtype = 2; - } - else - if (!strcmp("EtchedOutFrame",frame_type)) - { - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_OUT); n++; - myres->shadowtype = 3; - } - - temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Frame(mib_Widget *thisw) -{ - mib_Frame *temp = (mib_Frame *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_Frame(mib_Widget *thisw, FILE *fout) -{ - mib_Frame *temp = (mib_Frame *)thisw->myres; - - fprintf(fout,"shadowtype: %d\\n\\\n", temp->shadowtype); -} - -int mib_load_Frame(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Frame *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n; - - myres = (mib_Frame *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"shadowtype")) - { - sscanf(val,"%d",&(myres->shadowtype)); - - n = 0; - switch (myres->shadowtype) { - case 0: - XtSetArg (args[n], XmNshadowType, XmSHADOW_IN); n++; - break; - case 1: - XtSetArg (args[n], XmNshadowType, XmSHADOW_OUT); n++; - break; - case 2: - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - break; - case 3: - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_OUT); n++; - break; - default: - break; - } - XtSetValues(thisw->me, args, n); - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp deleted file mode 100644 index 7effa19a519..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibLabel.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibLabel, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Label */ -/*****************************************************************************/ - -mib_Widget *mib_create_Label(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Label *myres; - unsigned char *label_text; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Label *)ACE_OS::malloc(sizeof(mib_Label)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(6); - sprintf(temp->mib_class,"Label"); - temp->mib_class_num = MIB_LABEL; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - if (mib_fill == WDEFAULT) - { - myres->label = (char *)ACE_OS::malloc(strlen(label)+1); - strcpy(myres->label,label); - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET); - - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmLabelWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WDEFAULT) - XmStringFree(label_text); - - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Label(mib_Widget *thisw) -{ - mib_Label *temp = (mib_Label *)thisw->myres; - - ACE_OS::free(temp->label); - ACE_OS::free(temp); -} - -void mib_save_Label(mib_Widget *thisw, FILE *fout) -{ - mib_Label *temp = (mib_Label *)thisw->myres; - - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label); -} - -int mib_load_Label(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Label *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n, vallen; - - myres = (mib_Label *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"label")) - { - vallen = strlen(val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->label,"%s",&(val[1])); - label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET); - - n = 0; - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetValues(thisw->me, args, n); - - XmStringFree(label_text); - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp deleted file mode 100644 index 142be49a634..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibList.cpp +++ /dev/null @@ -1,166 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibList, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static Widget real_list; - -/* Code for Lists */ -/*****************************************************************************/ - -mib_Widget *mib_create_List(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_List *myres; - Widget wtemp; - unsigned char *label_text; - char ttext[30]; - Arg args[20]; - String myname; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_List *)ACE_OS::malloc(sizeof(mib_List)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(5); - sprintf(temp->mib_class,"List"); - temp->mib_class_num = MIB_LIST; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy); n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - - temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass, - temp->parent->me, args, n); - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - - if (mib_fill == WEMPTY) - { - XtSetArg (args[n], XmNlistSizePolicy, XmCONSTANT); n++; - } - - wtemp = XmCreateScrolledList(temp->me, name, args, n); - myres->real_list = wtemp; - real_list = wtemp; - - XtManageChild(wtemp); - - if (mib_fill != WEMPTY) - real_list = NULL; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR("Simple", XmSTRING_DEFAULT_CHARSET); - XmListAddItem(wtemp, label_text, 0); - XmStringFree(label_text); - label_text = XmStringCreateLtoR("List", XmSTRING_DEFAULT_CHARSET); - XmListAddItem(wtemp, label_text, 0); - XmStringFree(label_text); - for (n=0;n<200;n++) - { - sprintf(ttext,"Item %d ",n); - label_text = XmStringCreateLtoR(ttext, XmSTRING_DEFAULT_CHARSET); - XmListAddItem(wtemp, label_text, 0); - XmStringFree(label_text); - } - - mib_apply_eventhandlers(temp->me, temp); - mib_apply_eventhandlers(wtemp, temp); - } - - return temp; -} - -void mib_delete_List(mib_Widget *thisw) -{ - mib_List *temp = (mib_List *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_List(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_List(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - - if (real_list) - thisw->me = real_list; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp deleted file mode 100644 index 395010a7df3..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibMenu.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibMenu, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static int delhandler; /* delay adding event handler until menu - is actually created */ - -/* Code for Menu */ -/*****************************************************************************/ - -mib_Widget *mib_create_Menu(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Menu *myres; - Widget wtemp; - char label_temp[50]; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Menu *)ACE_OS::malloc(sizeof(mib_Menu)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(8); - sprintf(temp->mib_class,"Menu"); - temp->mib_class_num = MIB_MENU; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 0; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->numitems = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - temp->me = XtCreateManagedWidget(name, xmRowColumnWidgetClass, - temp->parent->me, args, n); - - n = 0; - - delhandler = 1; - if (mib_fill == WDEFAULT) - { - delhandler = 0; - myres->numitems = 3; - myres->my_menu = (MenuItem *)ACE_OS::malloc(sizeof(MenuItem) * (myres->numitems+1)); - myres->items = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numitems); - sprintf(label_temp, "Item 1"); - myres->my_menu[0].label = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->my_menu[0].label,label_temp); - myres->my_menu[0].wclass = &xmPushButtonGadgetClass; - myres->my_menu[0].mnemonic = '1'; - myres->my_menu[0].accelerator = NULL; - myres->my_menu[0].accel_text = NULL; - myres->my_menu[0].accel_text = NULL; - myres->my_menu[0].callback = NULL; - myres->my_menu[0].callback_data = NULL; - myres->my_menu[0].subitems = (struct _menu_item *)1; - - sprintf(label_temp, "Item 2"); - myres->my_menu[1].label = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->my_menu[1].label,label_temp); - myres->my_menu[1].wclass = &xmPushButtonGadgetClass; - myres->my_menu[1].mnemonic = '2'; - myres->my_menu[1].accelerator = NULL; - myres->my_menu[1].accel_text = NULL; - myres->my_menu[1].accel_text = NULL; - myres->my_menu[1].callback = NULL; - myres->my_menu[1].callback_data = NULL; - myres->my_menu[1].subitems = (struct _menu_item *)1; - - sprintf(label_temp, "Item 3"); - myres->my_menu[2].label = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->my_menu[2].label,label_temp); - myres->my_menu[2].wclass = &xmPushButtonGadgetClass; - myres->my_menu[2].mnemonic = '2'; - myres->my_menu[2].accelerator = NULL; - myres->my_menu[2].accel_text = NULL; - myres->my_menu[2].accel_text = NULL; - myres->my_menu[2].callback = NULL; - myres->my_menu[2].callback_data = NULL; - myres->my_menu[2].subitems = (struct _menu_item *)1; - - myres->my_menu[3].label = NULL; - - wtemp = BuildMenu(temp->me, XmMENU_OPTION, NULL, 'M', myres->my_menu); - XtManageChild(wtemp); - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - - /* default menu */ - - if (!delhandler) - { - mib_apply_eventhandlers(wtemp, temp); - mib_apply_eventhandlers(temp->me, temp); - } - } - - if (mib_fill == WEMPTY) - delhandler = 0; - - return temp; -} - -void mib_delete_Menu(mib_Widget *thisw) -{ - mib_Menu *temp = (mib_Menu *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_Menu(mib_Widget *thisw, FILE *fout) -{ - mib_Menu *temp = (mib_Menu *)thisw->myres; - int count; - - fprintf(fout, "numitems: %d\\n\\\n", temp->numitems); - - for (count=0; count < temp->numitems; count++) - { - fprintf(fout, "item: \\\"%s\\\"\\n\\\n", temp->my_menu[count].label); - } - -} - -int mib_load_Menu(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - int count, vallen; - Widget wtemp; - mib_Menu *myres = (mib_Menu *)thisw->myres; - - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res, "numitems")) - { - myres->numitems = 0; - sscanf(val, "%d", &(myres->numitems)); - if (!(myres->numitems)) - return 0; - - myres->my_menu = (MenuItem *)ACE_OS::malloc(sizeof(MenuItem) * (myres->numitems+1)); - myres->items = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numitems); - for (count = 0; count < myres->numitems; count++) - { - if (!mib_read_line(fin, res, val)) - return 0; - vallen = strlen(val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->my_menu[count].label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->my_menu[count].label, "%s", &(val[1])); - myres->my_menu[count].wclass = &xmPushButtonGadgetClass; - myres->my_menu[count].mnemonic = NULL; - myres->my_menu[count].accelerator = NULL; - myres->my_menu[count].accel_text = NULL; - myres->my_menu[count].accel_text = NULL; - myres->my_menu[count].callback = NULL; - myres->my_menu[count].callback_data = NULL; - myres->my_menu[count].subitems = (struct _menu_item *)1; - } - myres->my_menu[myres->numitems].label = NULL; - - wtemp = BuildMenu(thisw->me, XmMENU_OPTION, NULL, NULL, myres->my_menu); - XtManageChild(wtemp); - - if (delhandler) - { - mib_apply_eventhandlers(wtemp, thisw); - mib_apply_eventhandlers(thisw->me, thisw); - } - else - thisw->me = wtemp; - - for (count = 0; count < myres->numitems; count++) - { - /* thisw hack extracts the widget for each item in the menu - for possible use by the programmer */ - myres->items[count] = (Widget)(myres->my_menu[count].subitems); - } - - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp deleted file mode 100644 index f18deef164e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibRadioBox.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibRadioBox, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for RadioBox */ -/*****************************************************************************/ - -mib_Widget *mib_create_RadioBox(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_RadioBox *myres; - Widget wtemp; - unsigned char *label_text; - char label_temp[50]; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_RadioBox *)ACE_OS::malloc(sizeof(mib_RadioBox)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(9); - sprintf(temp->mib_class,"RadioBox"); - temp->mib_class_num = MIB_RADIOBOX; - - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 0; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - myres->numlabel = 0; - - if (mib_fill == WDEFAULT) - { - myres->numlabel = 2; - myres->labels = (char **)ACE_OS::malloc(10); - myres->buttons = (Widget *)ACE_OS::malloc(sizeof(Widget) * myres->numlabel); - sprintf(label_temp, "Radio 1"); - myres->labels[0] = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->labels[0],label_temp); - sprintf(label_temp, "Radio 2"); - myres->labels[1] = (char *)ACE_OS::malloc(strlen(label_temp)+1); - strcpy(myres->labels[1],label_temp); - } - - - /* create Xt widget */ - - n = 0; - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XmCreateRadioBox(temp->parent->me, "Radio", args, n); - wtemp = temp->me; - - - if (mib_fill == WDEFAULT) - { - n = 0; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - XtCreateManagedWidget("Radio 1", xmToggleButtonGadgetClass, - wtemp, args, n); - - n = 0; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - XtCreateManagedWidget("Radio 2", xmToggleButtonGadgetClass, - wtemp, args, n); - } - - - XtManageChild(wtemp); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_RadioBox(mib_Widget *thisw) -{ - mib_RadioBox *temp = (mib_RadioBox *)thisw->myres; - int count; - - for (count=0; count < temp->numlabel; count++) - ACE_OS::free(temp->labels[count]); - - ACE_OS::free(temp); -} - -void mib_save_RadioBox(mib_Widget *thisw, FILE *fout) -{ - mib_RadioBox *temp = (mib_RadioBox *)thisw->myres; - int count; - - fprintf(fout,"numlabel: %d\\n\\\n", temp->numlabel); - - for (count=0; count < temp->numlabel; count++) - { - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->labels[count]); - } -} - -int mib_load_RadioBox(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - int count, vallen, n; - Arg args[5]; - mib_RadioBox *myres; - - myres = (mib_RadioBox *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"numlabel")) - { - myres->numlabel = 0; - sscanf(val,"%d",&(myres->numlabel)); - if (!(myres->numlabel)) - return 0; - - myres->labels = (char **)ACE_OS::malloc((myres->numlabel+1)*4); - myres->buttons = (Widget *)ACE_OS::malloc(sizeof(Widget)*(myres->numlabel)); - for (count=0; count < myres->numlabel; count++) - { - if (!mib_read_line(fin, res, val)) - return 0; - vallen = strlen(val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->labels[count] = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->labels[count],"%s",&(val[1])); - - n = 0; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - myres->buttons[count] = XtCreateManagedWidget(myres->labels[count], - xmToggleButtonGadgetClass, thisw->me, args, n); - - } - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp deleted file mode 100644 index e912cf0b298..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScale.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibScale, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static int scaleflag; - -/* Code for Scale */ -/*****************************************************************************/ - -mib_Widget *mib_create_Scale(mib_Widget *parent, char *name, char *orient, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Scale *myres; - Arg args[20]; - int n; - - - scaleflag = 0; - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Scale *)ACE_OS::malloc(sizeof(mib_Scale)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(10); - sprintf(temp->mib_class,"Scale"); - temp->mib_class_num = MIB_SCALE; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->orientation = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - - if (mib_fill == WDEFAULT) - if (!strcmp("VertScale",orient)) - { - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - } - else - if (!strcmp("HorzScale",orient)) - { - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - myres->orientation = 1; - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNshowArrows, False); n++; - XtSetArg (args[n], XmNsliderSize, 30); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - temp->me = XtCreateManagedWidget(name, xmScrollBarWidgetClass, - temp->parent->me, args, n); - else - temp->me = XtCreateManagedWidget(name, xmScaleWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEMPTY) - scaleflag = 1; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Scale(mib_Widget *thisw) -{ - mib_Scale *temp = (mib_Scale *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_Scale(mib_Widget *thisw, FILE *fout) -{ - mib_Scale *temp = (mib_Scale *)thisw->myres; - - fprintf(fout,"orientation: %d\\n\\\n", temp->orientation); -} - -int mib_load_Scale(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Scale *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n; - Dimension myht,mywd; - - - myres = (mib_Scale *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"orientation")) - { - sscanf(val,"%d",&(myres->orientation)); - - n = 0; - if (scaleflag) - { - if (!myres->orientation) - { - XtSetArg (args[n], XmNscaleWidth, thisw->width); n++; - } - else - { - XtSetArg (args[n], XmNscaleWidth, thisw->height); n++; - } - - XtSetValues(thisw->me, args, n); - - } - - n = 0; - switch (myres->orientation) { - case 0: - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - break; - case 1: - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - break; - default: - break; - } - XtSetValues(thisw->me, args, n); - - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp deleted file mode 100644 index 246c425679e..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibScrollBar.cpp +++ /dev/null @@ -1,164 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibScrollBar, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for ScrollBars */ -/*****************************************************************************/ - -mib_Widget *mib_create_ScrollBar(mib_Widget *parent, char *name, char *orient, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_ScrollBar *myres; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_ScrollBar *)ACE_OS::malloc(sizeof(mib_ScrollBar)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(10); - sprintf(temp->mib_class,"ScrollBar"); - temp->mib_class_num = MIB_SCROLLBAR; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->orientation = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - - if (mib_fill == WDEFAULT) - if (!strcmp("VertScrollBar",orient)) - { - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - } - else - if (!strcmp("HorzScrollBar",orient)) - { - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - myres->orientation = 1; - } - - temp->me = XtCreateManagedWidget(name, xmScrollBarWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_ScrollBar(mib_Widget *thisw) -{ - mib_ScrollBar *temp = (mib_ScrollBar *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_ScrollBar(mib_Widget *thisw, FILE *fout) -{ - mib_ScrollBar *temp = (mib_ScrollBar *)thisw->myres; - - fprintf(fout,"orientation: %d\\n\\\n", temp->orientation); -} - -int mib_load_ScrollBar(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_ScrollBar *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[5]; - int n; - - myres = (mib_ScrollBar *)thisw->myres; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"orientation")) - { - sscanf(val,"%d",&(myres->orientation)); - - n = 0; - switch (myres->orientation) { - case 0: - XtSetArg (args[n], XmNorientation, XmVERTICAL); n++; - break; - case 1: - XtSetArg (args[n], XmNorientation, XmHORIZONTAL); n++; - break; - default: - break; - } - XtSetValues(thisw->me, args, n); - } - else - return 0; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp deleted file mode 100644 index 7d20d0329e5..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBig.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibTextBig, "$Id$") - -extern Display *dpy; -extern GC mib_gc; -static Widget real_text; - -/* Code of TextBig */ -/*****************************************************************************/ - -mib_Widget *mib_create_TextBig(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_TextBig *myres; - Widget wtemp; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_TextBig *)ACE_OS::malloc(sizeof(mib_TextBig)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(8); - sprintf(temp->mib_class,"TextBig"); - temp->mib_class_num = MIB_TEXTBIG; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->nothing = 0; - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNshadowType, XmSHADOW_ETCHED_IN); n++; - - temp->me = XtCreateManagedWidget(name, xmFrameWidgetClass, - temp->parent->me, args, n); - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - XtSetArg (args[n], XmNrows, 200); n++; - XtSetArg (args[n], XmNcolumns, 200); n++; - } - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNeditMode, XmMULTI_LINE_EDIT); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - wtemp = XmCreateScrolledText(temp->me, name, args, n); - real_text = wtemp; - - XtManageChild(wtemp); - - if (mib_fill != WEMPTY) - real_text = NULL; - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - XmTextSetString(wtemp,"Big Text Field\nwith Scrollbars\n\n\n\n\n\n\n "); - - mib_apply_eventhandlers(wtemp, temp); - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_TextBig(mib_Widget *thisw) -{ - mib_TextBig *temp = (mib_TextBig *)thisw->myres; - - ACE_OS::free(temp); -} - -void mib_save_TextBig(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_TextBig(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - if (real_text) - thisw->me = real_text; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp deleted file mode 100644 index bee0af42fef..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibTextBox.cpp +++ /dev/null @@ -1,133 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibTextBox, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for TextBox */ -/*****************************************************************************/ - -mib_Widget *mib_create_TextBox(mib_Widget *parent, char *name, char *contents, - int posx, int posy, int width, int height, - int mib_fill) -{ - mib_Widget *temp; - mib_TextBox *myres; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - myres = (mib_TextBox *)ACE_OS::malloc(sizeof(mib_TextBox)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(8); - sprintf(temp->mib_class,"TextBox"); - temp->mib_class_num = MIB_TEXTBOX; - temp->width = width; - temp->height = height; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 1; - - /* initialize private resources */ - - temp->myres = (void *)myres; - myres->init_contents = NULL; - - if (mib_fill == WDEFAULT) - { - if (contents != NULL) - { - myres->init_contents = (char *)ACE_OS::malloc(strlen(contents)+1); - strcpy(myres->init_contents, contents); - } - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - } - - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - - temp->me = XtCreateManagedWidget(name, xmTextFieldWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - XmTextFieldSetString(temp->me, "Text Field"); - - } - - return temp; -} - -void mib_delete_TextBox(mib_Widget *thisw) -{ - mib_TextBox *temp = (mib_TextBox *)thisw->myres; - - if (temp->init_contents != NULL) - ACE_OS::free(temp->init_contents); -} - -void mib_save_TextBox(mib_Widget *thisw, FILE *fout) -{ -} - -int mib_load_TextBox(mib_Widget *thisw, mib_Buffer *fin) -{ - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - - if (!mib_read_line(fin, res, val)) - return 0; - - if (!strcmp(res,"EndWidget.")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp deleted file mode 100644 index 70b2bc1e12a..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibToggle.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibToggle, "$Id$") - -extern Display *dpy; -extern GC mib_gc; - -/* Code for Toggle */ -/*****************************************************************************/ - -mib_Widget *mib_create_Toggle(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill) -{ - mib_Widget *temp; - mib_Toggle *myres; - unsigned char *label_text; - Arg args[20]; - int n; - - /* create the new widget and add it to the tree */ - - temp = mib_new_mib_Widget(); - if (mib_fill == WDEFAULT) - mib_add_backward(temp, parent); - else - mib_add_mib_Widget(temp, parent); - - myres = (mib_Toggle *)ACE_OS::malloc(sizeof(mib_Toggle)); - - /* initialize public resources */ - - if (mib_fill == WDEFAULT) - { - temp->name = (char *)ACE_OS::malloc(strlen(name)+1); - strcpy(temp->name,name); - } - temp->mib_class = (char *)ACE_OS::malloc(7); - sprintf(temp->mib_class,"Toggle"); - temp->mib_class_num = MIB_TOGGLE; - temp->width = 0 /*width*/; - temp->height = 0 /*height*/; - temp->topOffset = posy; - temp->leftOffset = posx; - temp->bottomOffset = 0; - temp->rightOffset = 0; - temp->topAttachment = 1; - temp->leftAttachment = 1; - temp->bottomAttachment = 0; - temp->rightAttachment = 0; - - temp->mib_allowresize = 0; - - /* initialize private resources */ - - temp->myres = (void *)myres; - - myres->isize = 0; - if (mib_fill == WDEFAULT) - { - myres->label = (char *)ACE_OS::malloc(strlen(label)+1); - strcpy(myres->label,label); - } - - /* create Xt widget */ - - n = 0; - - if (mib_fill == WDEFAULT) - { - label_text = XmStringCreateLtoR(label, XmSTRING_DEFAULT_CHARSET); - - XtSetArg (args[n], XmNlabelString, label_text); n++; - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, posx);n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, posy);n++; -/* XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++;*/ - } - - XtSetArg (args[n], XmNwidth, width); n++; - XtSetArg (args[n], XmNheight, height); n++; - XtSetArg (args[n], XmNspacing, 4); n++; - XtSetArg (args[n], XmNhighlightThickness, 0); n++; - XtSetArg (args[n], XmNrubberPositioning, False); n++; - XtSetArg (args[n], XmNindicatorType, XmN_OF_MANY); - - temp->me = XtCreateManagedWidget(name, xmToggleButtonWidgetClass, - temp->parent->me, args, n); - - if (mib_fill == WDEFAULT) - { - XmStringFree(label_text); - } - - if (mib_fill == WEDIT || mib_fill == WDEFAULT) - { - mib_apply_eventhandlers(temp->me, temp); - } - - return temp; -} - -void mib_delete_Toggle(mib_Widget *thisw) -{ - mib_Toggle *temp = (mib_Toggle *)thisw->myres; - - ACE_OS::free(temp->label); - ACE_OS::free(temp); -} - -void mib_save_Toggle(mib_Widget *thisw, FILE *fout) -{ - mib_Toggle *temp = (mib_Toggle *)thisw->myres; - - fprintf(fout,"label: \\\"%s\\\"\\n\\\n", temp->label); - fprintf(fout,"indicatorSize: %d\\n\\\n", temp->isize); -} - -int mib_load_Toggle(mib_Widget *thisw, mib_Buffer *fin) -{ - mib_Toggle *myres; - unsigned char *label_text; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - Arg args[20]; - int n, got_line, vallen; - - myres = (mib_Toggle *)thisw->myres; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (!strcmp(res,"label")) - { - vallen = strlen(val); - if (vallen < 2) - return 0; - val[vallen-1] = '\0'; - myres->label = (char *)ACE_OS::malloc(vallen-1); - sprintf(myres->label,"%s",&(val[1])); - - label_text = XmStringCreateLtoR(myres->label, XmSTRING_DEFAULT_CHARSET); - - n = 0; - XtSetArg (args[n], XmNlabelString, label_text); n++; - thisw->width = 0; - thisw->height = 0; - XtSetArg (args[n], XmNwidth, thisw->width); n++; - XtSetArg (args[n], XmNheight, thisw->height); n++; - XtSetValues(thisw->me, args, n); - XmStringFree(label_text); - - } - else - return 0; - - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - - if (!strcmp(res, "indicatorSize")) - { - sscanf(val, "%d", &(myres->isize)); - if (myres->isize) - XtVaSetValues(thisw->me, XmNindicatorSize, (Dimension)myres->isize, - XmNmarginBottom, 0, XmNmarginTop, 0, XmNmarginLeft, 0, - XmNmarginRight, 0, XmNspacing, 0, NULL); - got_line = mib_read_line(fin, res, val); - if (!got_line) - return 0; - } - - if (strcmp(res,"EndWidget")) - return 0; - - return 1; -} diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp deleted file mode 100644 index d0e99533a08..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.cpp +++ /dev/null @@ -1,804 +0,0 @@ -/* $Id$ */ - -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with thisw file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include <stdlib.h> -#include "mibload.h" -#include "mibwidgets.h" - -ACE_RCSID(mpeg_mib, mibload, "$Id$") - -mib_Widget *mib_root_Widget; -Display *dpy; -GC mib_gc; -static struct _mib_event_handle_funcs { -#ifdef __cplusplus - void (*mib_pick_mib_Widget)( Widget, XtPointer, - XEvent *, Boolean * ); - void (*mib_move_mib_Widget)( Widget, XtPointer, - XEvent *, Boolean *); - void (*mib_unpick_mib_Widget)( Widget, XtPointer, - XEvent *, Boolean * ); -#else - void (*mib_pick_mib_Widget)(/* Widget, XtPointer, - XButtonPressedEvent *, Boolean * */); - void (*mib_move_mib_Widget)(/* Widget, XtPointer, - XPointerMovedEvent *, Boolean * */); - void (*mib_unpick_mib_Widget)(/* Widget, XtPointer, - XButtonReleasedEvent *, Boolean * */); -#endif -} mib_events; - -mib_widget_funcs mwfuncs[] = -{ - { NULL, NULL, NULL, NULL, NULL }, - { "TextBox", mib_create_TextBox, mib_delete_TextBox, - mib_save_TextBox, mib_load_TextBox}, - { "Button", mib_create_Button, mib_delete_Button, - mib_save_Button, mib_load_Button}, - { "Toggle", mib_create_Toggle, mib_delete_Toggle, - mib_save_Toggle, mib_load_Toggle}, - { "RadioBox", mib_create_RadioBox, mib_delete_RadioBox, - mib_save_RadioBox, mib_load_RadioBox}, - { "DrawingArea", mib_create_DrawingArea, mib_delete_DrawingArea, - mib_save_DrawingArea, mib_load_DrawingArea}, - { "Label", mib_create_Label, mib_delete_Label, - mib_save_Label, mib_load_Label}, - { "Frame", mib_create_Frame, mib_delete_Frame, - mib_save_Frame, mib_load_Frame}, - { "ScrollBar", mib_create_ScrollBar, mib_delete_ScrollBar, - mib_save_ScrollBar, mib_load_ScrollBar}, - { "TextBig", mib_create_TextBig, mib_delete_TextBig, - mib_save_TextBig, mib_load_TextBig}, - { "List", mib_create_List, mib_delete_List, - mib_save_List, mib_load_List}, - { "Scale", mib_create_Scale, mib_delete_Scale, - mib_save_Scale, mib_load_Scale}, - { "Menu", mib_create_Menu, mib_delete_Menu, - mib_save_Menu, mib_load_Menu}, - { NULL, NULL, NULL, NULL, NULL }, -}; - -/*****************************************************************************/ - -void mib_add_mib_Widget(mib_Widget *thisw, mib_Widget *parent) -{ - mib_Widget *tmp; - - if (parent->child == NULL) - { - parent->child = thisw; - thisw->prev = parent; - thisw->parent = parent; - thisw->sibling = NULL; - thisw->child = NULL; - } - else - { - tmp = parent->child; - while (tmp->sibling != NULL) - tmp = tmp->sibling; - tmp->sibling = thisw; - thisw->prev = tmp; - thisw->parent = parent; - thisw->sibling = NULL; - thisw->child = NULL; - } -} - -/*****************************************************************************/ - -void mib_add_backward(mib_Widget *thisw, mib_Widget *parent) -{ - mib_Widget *tmp; - - if (parent->child == NULL) - { - parent->child = thisw; - thisw->prev = parent; - thisw->parent = parent; - thisw->sibling = NULL; - thisw->child = NULL; - } - else - { - tmp = parent->child; - parent->child = thisw; - thisw->prev = parent; - thisw->parent = parent; - thisw->sibling = tmp; - thisw->child = NULL; - tmp->prev = thisw; - } -} - -/*****************************************************************************/ - -void mib_remove_mib_Widget(mib_Widget *thisw) -{ - int count; - mib_Widget *pnt; - - XtVaSetValues(mib_root_Widget->me, XmNresizePolicy, XmRESIZE_NONE, NULL); - XtDestroyWidget(thisw->me); - - while (thisw->child != NULL) - mib_remove_mib_Widget(thisw->child); - - if (thisw->parent == thisw) - { - mib_clear_myres(thisw); - return; - } - - if (thisw->prev == thisw->parent) - { - thisw->parent->child = thisw->sibling; - if (thisw->sibling != NULL) - thisw->sibling->prev = thisw->parent; - } - else - { - thisw->prev->sibling = thisw->sibling; - if (thisw->sibling != NULL) - thisw->sibling->prev = thisw->prev; - } - - mib_clear_myres(thisw); -} - -/*****************************************************************************/ - -void mib_clear_myres(mib_Widget *thisw) -{ - ACE_OS::free(thisw->mib_class); - ACE_OS::free(thisw->name); - - if ((thisw->mib_class_num < 1) || (thisw->mib_class_num > MI_NUMCLASSES)) - return; - - mwfuncs[thisw->mib_class_num].mib_delete(thisw); - ACE_OS::free(thisw); -} - -/*****************************************************************************/ - -mib_Widget *mib_new_mib_Widget() -{ - mib_Widget *thisw; - thisw = (mib_Widget *)ACE_OS::malloc(sizeof(mib_Widget)); - thisw->me = NULL; - thisw->mib_class_num = MIB_NULL; - thisw->mib_selected = 0; - thisw->mib_resizing = 0; - thisw->myres = NULL; - thisw->parent = NULL; - thisw->sibling = NULL; - thisw->prev = NULL; - thisw->child = NULL; - thisw->width = 0; - thisw->height = 0; - thisw->topAttachment = 0; - thisw->bottomAttachment = 0; - thisw->leftAttachment = 0; - thisw->rightAttachment = 0; - thisw->topOffset = 0; - thisw->bottomOffset = 0; - thisw->leftOffset = 0; - thisw->rightOffset = 0; - - return thisw; -} - -/*****************************************************************************/ - -mib_Widget *mib_find_name(mib_Widget *temp, char *name) -{ - mib_Widget *child = temp->child; - mib_Widget *ret = NULL; - - if (!strcmp(temp->name, name)) - return temp; - - if (child != NULL) - if (ret = mib_find_name(child, name)) - return ret; - - child = temp->sibling; - if (child != NULL) - if (ret = mib_find_name(child, name)) - return ret; - - return NULL; -} - -/*****************************************************************************/ - -Widget -BuildMenu(Widget parent, int menu_type, char *menu_title, char menu_mnemonic, - MenuItem *items) -{ - Widget menu, cascade, widget; - int i; - XmString str; - - if (menu_type == XmMENU_PULLDOWN || menu_type == XmMENU_OPTION) - menu = XmCreatePulldownMenu(parent, "_pulldown", NULL, 0); - else if (menu_type == XmMENU_POPUP) - menu = XmCreatePopupMenu(parent, "_popup", NULL, 0); - else { - XtWarning("Invalid menu type passed to BuildMenu()"); - return NULL; - } - - /* Pulldown menus require a cascade button to be made */ - if (menu_type == XmMENU_PULLDOWN) { - str = XmStringCreateSimple(menu_title); - cascade = XtVaCreateManagedWidget(menu_title, - xmCascadeButtonGadgetClass, parent, - XmNsubMenuId, menu, - XmNlabelString, str, - XmNmnemonic, menu_mnemonic, - NULL); - XmStringFree(str); - } else if (menu_type == XmMENU_OPTION) { - /* Option menus are a special case, but not hard to handle */ - Arg args[2]; - str = XmStringCreateSimple(menu_title); - XtSetArg(args[0], XmNsubMenuId, menu); - XtSetArg(args[1], XmNlabelString, str); - /* This really isn't a cascade, but thisw is the widget handle - * we're going to return at the end of the function. - */ - cascade = XmCreateOptionMenu(parent, menu_title, args, 2); - XmStringFree(str); - } - - /* Now add the menu items */ - for (i = 0; items[i].label != NULL; i++) { - /* If subitems exist, create the pull-right menu by calling thisw - * function recursively. Since the function returns a cascade - * button, the widget returned is used.. - */ - if (items[i].subitems) - if (menu_type == XmMENU_OPTION) { - widget = XtVaCreateManagedWidget(items[i].label, - *items[i].wclass, menu, NULL); - items[i].subitems = (struct _menu_item *) widget; - /* daeron mod (tm) :-) ... we now use thisw to pass back each - widget we create to the mibMenu functions so that it can - be stored as part of the mibMenu structure */ - - /* XtWarning("You can't have submenus from option menu items."); - continue;*/ - } else - widget = BuildMenu(menu, XmMENU_PULLDOWN, - items[i].label, items[i].mnemonic, items[i].subitems); - else - { - widget = XtVaCreateManagedWidget(items[i].label, - *items[i].wclass, menu, - NULL); - /* ditto here from above ... - Daeron mod (tm) */ - items[i].subitems = (struct _menu_item *) widget; - } - - /* Whether the item is a real item or a cascade button with a - * menu, it can still have a mnemonic. - */ - if (items[i].mnemonic) - XtVaSetValues(widget, XmNmnemonic, items[i].mnemonic, NULL); - - /* any item can have an accelerator, except cascade menus. But, - * we don't worry about that; we know better in our declarations. - */ - if (items[i].accelerator) { - str = XmStringCreateSimple(items[i].accel_text); - XtVaSetValues(widget, - XmNaccelerator, items[i].accelerator, - XmNacceleratorText, str, - NULL); - XmStringFree(str); - } - - if (items[i].callback) - XtAddCallback(widget, - (items[i].wclass == &xmToggleButtonWidgetClass || - items[i].wclass == &xmToggleButtonGadgetClass)? - XmNvalueChangedCallback : /* ToggleButton class */ - XmNactivateCallback, /* PushButton class */ - items[i].callback, items[i].callback_data); - } - - /* for popup menus, just return the menu; pulldown menus, return - * the cascade button; option menus, return the thing returned - * from XmCreateOptionMenu(). This isn't a menu, or a cascade button! - */ - return menu_type == XmMENU_POPUP? menu : cascade; -} - -/*****************************************************************************/ - -mib_Widget *mib_load_interface(Widget parent, char *from, int file_type) -{ - mib_Buffer thiswfile; - mib_Widget *thisw; - FILE *infile; - char *instring; - char ch; - - thiswfile.buf_type = file_type; - - dpy = XtDisplay(parent); - - if ((file_type == MI_FROMFILE) || (file_type == MI_EDITFROMFILE)) - { - if (!(infile = fopen(from,"r"))) - return NULL; - - ch = '\0'; - while ((ch != '\n')&&(!feof(infile))) /* throw away first line */ - ch = (char)fgetc(infile); - - thiswfile.buffer = (void *)infile; - thiswfile.point = 0; - - if (!mib_load_Root(parent, &thisw, &thiswfile)) - { - /* delete thisw */ - return NULL; - } - else - { - fclose(infile); - return thisw; - } - } - else - if ((file_type == MI_FROMSTRING) || (file_type == MI_EDITFROMSTRING)) - { - instring = from; - if (instring == NULL) - return NULL; - - thiswfile.buffer = (void *)instring; - thiswfile.buflen = strlen(instring); - thiswfile.point = 0; - - if (!mib_load_Root(parent, &thisw, &thiswfile)) - { - /* delete thisw */ - return NULL; - } - else - return thisw; - } - else - return NULL; - -} - -/*****************************************************************************/ - -int mib_load_mib_class(mib_Widget **thisw, mib_Widget *parent, char *name, - char *iname, mib_Buffer *fin ) -{ - int namelen, editstate, count, set; - - if ((fin->buf_type == MI_EDITFROMFILE) || - (fin->buf_type == MI_EDITFROMSTRING)) - editstate = WEDIT; - else - editstate = WEMPTY; - - namelen = strlen(name); - if (namelen < 2) - return 0; - - name[namelen-1] = '\0'; - name[0] = ' '; - - count = 1; - - while (mwfuncs[count].name) - { - if (!strcmp(&(name[1]), mwfuncs[count].name)) - { - *thisw = mwfuncs[count].mib_create(parent, iname, NULL, 0, 0, 0, 0, - editstate); - return 1; - } - count++; - } - - (*thisw)->parent = (*thisw); - return 1; -} - -/*****************************************************************************/ - -mib_Widget *mib_load_public(mib_Widget *root, mib_Widget *thisw, mib_Buffer *fin) -{ - int got_line, done; - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - char valcp[MI_MAXSTRLEN]; - Arg args[20]; - int mynum, n; - - got_line = 1; - done = 0; - - /* thisw loop reads basic info about Widget */ - while (got_line && (!done)) - { - got_line = mib_read_line(fin, res, val); - if (!strcmp(res,"Ref")) - sscanf(val, "%d", &mynum); - else - if (!strcmp(res,"Widget")) - { - strcpy(valcp,val); - done = 1; - } - } - - done = 0; - - while (got_line && (!done)) - { - got_line = mib_read_line(fin, res, val); - if (!strcmp(res, "Children")) - n = 0; - else - if (!strcmp(res, "Parent")) /* don't support complete widget tree yet */ - n = 0; - else - if (!strcmp(res,"Public-")) - n = 0; - else - if (!strcmp(res,"Name")) - { - val[strlen(val)-1] = '\0'; - mib_load_mib_class(&thisw, root, valcp, &(val[1]), fin); - thisw->name = (char *)ACE_OS::malloc(strlen(val)); - sprintf(thisw->name,"%s",&(val[1])); - thisw->mib_mynum = mynum; - done = 1; - } - else - return 0; - } - - if (!got_line) - return NULL; - - done = 0; - - /* second loop reads public info */ - while (got_line && (!done)) - { - got_line = mib_read_line(fin, res, val); - if (!strcmp(res,"Xmwidth")) - sscanf(val,"%d",&(thisw->width)); - else - if (!strcmp(res,"Xmheight")) - sscanf(val,"%d",&(thisw->height)); - else - if (!strcmp(res,"XmtopAttachment")) - sscanf(val,"%d",&(thisw->topAttachment)); - else - if (!strcmp(res,"XmbottomAttachment")) - sscanf(val,"%d",&(thisw->bottomAttachment)); - else - if (!strcmp(res,"XmleftAttachment")) - sscanf(val,"%d",&(thisw->leftAttachment)); - else - if (!strcmp(res,"XmrightAttachment")) - sscanf(val,"%d",&(thisw->rightAttachment)); - else - if (!strcmp(res,"XmtopOffset")) - sscanf(val,"%d",&(thisw->topOffset)); - else - if (!strcmp(res,"XmbottomOffset")) - sscanf(val,"%d",&(thisw->bottomOffset)); - else - if (!strcmp(res,"XmleftOffset")) - sscanf(val,"%d",&(thisw->leftOffset)); - else - if (!strcmp(res,"XmrightOffset")) - sscanf(val,"%d",&(thisw->rightOffset)); - else - if (!strcmp(res,"Private-")) - done = 1; - } - - n = 0; - if ((fin->buf_type == MI_EDITFROMFILE) || - (fin->buf_type == MI_EDITFROMSTRING)) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, thisw->leftOffset); n++; - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, thisw->topOffset); n++; - if (thisw == root) - { - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightOffset, thisw->rightOffset); n++; - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, thisw->bottomOffset); n++; - } - } - else - { - if (thisw->leftAttachment) - { - XtSetArg (args[n], XmNleftAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNleftOffset, thisw->leftOffset);n++; - } - if (thisw->topAttachment) - { - XtSetArg (args[n], XmNtopAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNtopOffset, thisw->topOffset);n++; - } - if (thisw->bottomAttachment) - { - XtSetArg (args[n], XmNbottomAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNbottomOffset, thisw->bottomOffset);n++; - } - if (thisw->rightAttachment) - { - XtSetArg (args[n], XmNrightAttachment, XmATTACH_FORM); n++; - XtSetArg (args[n], XmNrightOffset, thisw->rightOffset);n++; - } - } - - XtSetArg (args[n], XmNwidth, thisw->width); n++; - XtSetArg (args[n], XmNheight, thisw->height); n++; - - XtSetValues(thisw->me, args, n); - - return thisw; -} - -/*****************************************************************************/ - -int mib_load_private(mib_Widget *thisw, mib_Buffer *fin) -{ - - if (thisw->mib_class_num == MIB_NULL) - return 1; - - if ((thisw->mib_class_num < 1) || (thisw->mib_class_num > MI_NUMCLASSES)) - return 0; - - mwfuncs[thisw->mib_class_num].mib_load(thisw, fin); - - return 1; -} - -/*****************************************************************************/ - -int mib_load_Root(Widget parent, mib_Widget **thisw, mib_Buffer *fin) -{ - - char res[MI_MAXSTRLEN]; - char val[MI_MAXSTRLEN]; - char name[MI_MAXSTRLEN]; - int num_widgets, count, n, got_line; - Arg args[20]; - XGCValues gcvals; - XtGCMask val_mask; - mib_Widget *temp; - - got_line = mib_read_line(fin, res, val); - if (!strcmp(res,"TotalWidgets")) - sscanf(val, "%d", &num_widgets); - else - return 0; - - (*thisw) = mib_new_mib_Widget(); - (*thisw)->mib_class = (char*)ACE_OS::malloc(9); - sprintf((*thisw)->mib_class,"RootForm"); - -/* (*thisw)->me = XmCreateForm(parent, "MainForm", args, 0); */ - - (*thisw)->me = parent; - - if (!mib_load_public((*thisw), (*thisw), fin)) - return 0; - - /* we don't expect any private resources for the root widget */ - - got_line = mib_read_line(fin, res, val); - if (strcmp(res,"EndWidget.")) - return 0; - -/* XtManageChild((*thisw)->me); -*/ - XtVaSetValues((*thisw)->me, XmNresizePolicy, XmRESIZE_NONE, NULL); - - count = num_widgets - 1; - while (count > 0) - { - - if (!(temp = mib_load_public((*thisw), temp, fin))) - { - /* delete temp */ - return 0; - } - - if (!mib_load_private(temp,fin)) - { - /* delete temp */ - return 0; - } - count--; - - } - - mib_reset_size((*thisw)); - - XtVaSetValues((*thisw)->me, XmNresizePolicy, XmRESIZE_ANY, NULL); - - val_mask = (long)0; - mib_gc = XtGetGC((*thisw)->me, val_mask, &gcvals); - - return 1; -} - -/*****************************************************************************/ - -int mib_read_line(mib_Buffer *bufin, char *res, char *val) -{ - FILE *fin; - char *strin; - char ch; - int count, mark; - char inbuf[MI_MAXSTRLEN]; - - if ((bufin->buf_type == MI_FROMFILE) || (bufin->buf_type == MI_EDITFROMFILE)) - { - fin = (FILE *)bufin->buffer; - ch = '\0'; - count = 0; - mark = 0; - while ((ch != '\n')&&(!feof(fin))&&(count<MI_MAXSTRLEN)) - { - ch = (char)fgetc(fin); - if ((mark == 0) && (ch == ':')) - mark = count; - if ((ch != '\\')&&(ch != '\n')) - { - inbuf[count] = ch; - count++; - } - } - if (feof(fin)) - return 0; - inbuf[count] = '\0'; - if (count > 0) - { - if (inbuf[count-1] == 'n') - inbuf[count-1] = '\0'; - } - else - return 0; - - } - else - if ((bufin->buf_type == MI_FROMSTRING) || - (bufin->buf_type == MI_EDITFROMSTRING)) - { - strin = (char *)bufin->buffer; - count = bufin->point; - mark = 0; - - if (count >= bufin->buflen) - return 0; - - while ((strin[count] != '\n') && (count < bufin->buflen)) - { - if ((mark == 0) && (strin[count] == ':')) - mark = count; - count++; - } - - strin[count] = '\0'; - if (count >= bufin->buflen) - return 0; - sprintf(inbuf,"%s",&(strin[bufin->point])); - strin[count] = '\n'; - if (mark != 0) - mark -= bufin->point; - bufin->point = count+1; - } - else - return 0; - - if (mark == 0) - { - sprintf(res,"%s",inbuf); - sprintf(val,"\0"); - } - else - { - inbuf[mark] = '\0'; - sprintf(res,"%s",inbuf); - inbuf[mark] = ' '; - if ((int)(strlen(inbuf)-mark) > 1) - sprintf(val,"%s",&(inbuf[mark+2])); - else - sprintf(val,"\0"); - } - - return 1; -} - -/*****************************************************************************/ - -void mib_reset_size(mib_Widget *temp) -{ - Arg args[5]; - int n; - - mib_Widget *child = temp->child; - - if (temp->mib_class_num != MIB_NULL) - { - n = 0; - XtSetArg (args[n], XmNwidth, temp->width); n++; - XtSetArg (args[n], XmNheight, temp->height); n++; - - XtSetValues(temp->me, args, n); - } - - if (child != NULL) - mib_reset_size(child); - - child = temp->sibling; - if (child != NULL) - mib_reset_size(child); -} - -/*****************************************************************************/ - -#ifdef __cplusplus -void mib_set_eventhandlers(void a(Widget, XtPointer, - XEvent *, Boolean * ), - void b( Widget, XtPointer, - XEvent *, Boolean* ), - void c(Widget, XtPointer, - XEvent *, Boolean *) - ) -#else -void mib_set_eventhandlers(void * a, void * b, void * c) -#endif -{ - mib_events.mib_pick_mib_Widget = a; - mib_events.mib_move_mib_Widget = b; - mib_events.mib_unpick_mib_Widget = c; -} - -/*****************************************************************************/ - -void mib_apply_eventhandlers(Widget thisw, mib_Widget *actual) -{ - XtAddEventHandler(thisw, ButtonPressMask, FALSE, - mib_events.mib_pick_mib_Widget, (XtPointer)actual); - XtAddEventHandler(thisw, Button3MotionMask, FALSE, - mib_events.mib_move_mib_Widget, (XtPointer)actual); - XtAddEventHandler(thisw, ButtonReleaseMask, FALSE, - mib_events.mib_unpick_mib_Widget, (XtPointer)actual); - -} - -/*****************************************************************************/ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h deleted file mode 100644 index 3b20908a333..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h +++ /dev/null @@ -1,168 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -#include <stdio.h> -#include <X11/Intrinsic.h> -#include <X11/Shell.h> -#include <Xm/Xm.h> -#include <Xm/Text.h> -#include <Xm/TextF.h> -#include <Xm/RowColumn.h> -#include <Xm/MainW.h> -#include <Xm/Label.h> -#include <Xm/PushB.h> -#include <Xm/PushBG.h> -#include <Xm/ToggleB.h> -#include <Xm/ToggleBG.h> -#include <Xm/DrawingA.h> -#include <Xm/CascadeBG.h> -#include <Xm/SeparatoG.h> -#include <Xm/Frame.h> -#include <Xm/BulletinB.h> -#include <Xm/Scale.h> -#include <Xm/ScrollBar.h> -#include <Xm/Form.h> -#include <Xm/List.h> -#include <Xm/FileSB.h> -#include <Xm/AtomMgr.h> -#include <Xm/Protocols.h> -#include <Xm/MwmUtil.h> -#include "ace/OS.h" - - -/* Structure of mib_Widget */ -/*****************************************************************************/ - -typedef struct _mib_Widget { - char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ - int mib_class_num; /* class number for ez reference :) */ - int mib_mynum; /* numbering for storage format */ - Widget me; /* Xt widget */ - int mib_selected; /* is selected */ - int mib_resizing; /* is resizing 1, or being moved 0 */ - int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ - int mib_allowresize; /* can this widget be resized ? */ - - int clkx, clky; /* where user clicked */ - - void *myres; /* my resources (different for each widget) */ - - char *name; /* reference name of this widget */ - int width, height; /* width and height */ - - int topAttachment, bottomAttachment, leftAttachment, rightAttachment; - /* attachments 1=attached 0=not-attached */ - - int topOffset, bottomOffset, leftOffset, rightOffset; - /* offsets if attached */ - - struct _mib_Widget *parent; /* pointer to parent */ - struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */ - struct _mib_Widget *prev; /* previous sibling or parent */ - struct _mib_Widget *child; /* linked list of children widgets */ -} mib_Widget; - -/* mib_Buffer structure */ -/*****************************************************************************/ - -typedef struct _mib_Buffer { - void *buffer; /* pointer to either a file or a char string */ - int buf_type; /* type of buffer (defined above) */ - int point; /* pointer for string */ - int buflen; /* length of string buffer */ -} mib_Buffer; - -/* mib_Widget functions */ -/*****************************************************************************/ - -void mib_add_mib_Widget(mib_Widget *, mib_Widget *); -void mib_add_backward(mib_Widget *, mib_Widget *); -void mib_remove_mib_Widget(mib_Widget *); -void mib_clear_myres(mib_Widget *); -#ifdef __cplusplus -mib_Widget *mib_new_mib_Widget(); -#else -mib_Widget *mib_new_mib_Widget(); -#endif -mib_Widget *mib_find_name(mib_Widget *, char *); -mib_Widget *mib_load_interface(Widget, char *, int); -int mib_count_all(mib_Widget *, int); -int mib_load_Root(Widget, mib_Widget **, mib_Buffer *); -mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *); -int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *, - mib_Buffer *); -int mib_load_private(mib_Widget *, mib_Buffer *); -void mib_reset_size(mib_Widget *); -int mib_read_line(mib_Buffer *, char *, char *); -#ifdef __cplusplus -void mib_set_eventhandlers(void (a)(...), void (b)(...), void (c)(...)); -#else -void mib_set_eventhandlers(void *, void *, void *); -#endif -void mib_apply_eventhandlers(Widget, mib_Widget *); - -/* supporting functions and structures */ -/*****************************************************************************/ - -typedef struct _menu_item { - char *label; - WidgetClass *wclass; - char mnemonic; - char *accelerator; - char *accel_text; -#ifdef __cplusplus - void (*callback)(Widget,void*,void*); -#else - void (*callback)(); -#endif - XtPointer callback_data; - struct _menu_item *subitems; -} MenuItem; - -Widget BuildMenu(Widget, int, char *, char, MenuItem *); - -/* mib class numbers */ - -#define MIB_NULL 0 -#define MIB_TEXTBOX 1 -#define MIB_BUTTON 2 -#define MIB_TOGGLE 3 -#define MIB_RADIOBOX 4 -#define MIB_DRAWINGAREA 5 -#define MIB_LABEL 6 -#define MIB_FRAME 7 -#define MIB_SCROLLBAR 8 -#define MIB_TEXTBIG 9 -#define MIB_LIST 10 -#define MIB_SCALE 11 -#define MIB_MENU 12 - -/* number of classes */ -#define MI_NUMCLASSES 12 - -/* for specifying creation of a widget with - default private values, no values at all (empty), - or no values and editable */ - -#define WDEFAULT 1 -#define WEMPTY 2 -#define WEDIT 3 - -/* for specifing whether we are loading an - interface from a file or from a string and whether it - is editable :) */ - -#define MI_FROMFILE 1 -#define MI_EDITFROMFILE 2 -#define MI_FROMSTRING 3 -#define MI_EDITFROMSTRING 4 - -#define MI_MAXSTRLEN 200 /* maximum string length */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h deleted file mode 100644 index 778e2338682..00000000000 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h +++ /dev/null @@ -1,225 +0,0 @@ -/* $Id$ */ -/* Copyright (c) 1994 The Geometry Center; University of Minnesota - 1300 South Second Street; Minneapolis, MN 55454, USA; - -This file is free software; you can redistribute it and/or modify it only -under the the terms of the GNU GENERAL PUBLIC LICENSE which should be -included along with this file. This software may be obtained via anonymous -ftp from geom.umn.edu; email: software@geom.umn.edu. */ - -/* Author: Daeron Meyer */ - -/* Structure of mib_TextBox */ -/*****************************************************************************/ - -typedef struct _mib_TextBox { - char *init_contents; /* initial text contents */ - -} mib_TextBox; - -/* mib_TextBox functions */ -/*****************************************************************************/ -mib_Widget *mib_create_TextBox(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_TextBox(mib_Widget *); -void mib_save_TextBox(mib_Widget *, FILE *); -int mib_load_TextBox(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Button */ -/*****************************************************************************/ - -typedef struct _mib_Button { - char *label; /* label on button */ - -} mib_Button; - -/* mib_Button functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Button(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Button(mib_Widget *); -void mib_save_Button(mib_Widget *, FILE *); -int mib_load_Button(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Toggle */ -/*****************************************************************************/ - -typedef struct _mib_Toggle { - char *label; /* label on toggle */ - int isize; - -} mib_Toggle; - -/* mib_Toggle functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Toggle(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Toggle(mib_Widget *); -void mib_save_Toggle(mib_Widget *, FILE *); -int mib_load_Toggle(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_RadioBox */ -/*****************************************************************************/ -typedef struct _mib_RadioBox { - char **labels; /* array of labels */ - int numlabel; /* number of labels */ - Widget *buttons; /* pointers to each button */ - -} mib_RadioBox; - -/* mib_RadioBox functions */ - -/*****************************************************************************/ -mib_Widget *mib_create_RadioBox(mib_Widget *, char *, char*, int, int, int, - int, int); -void mib_delete_RadioBox(mib_Widget *); -void mib_save_RadioBox(mib_Widget *, FILE *); -int mib_load_RadioBox(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_DrawingArea */ -/*****************************************************************************/ -typedef struct _mib_DrawingArea { - int nothing; /* couldn't think of anything yet */ - -} mib_DrawingArea; - -/* mib_DrawingArea functions */ -/*****************************************************************************/ -mib_Widget *mib_create_DrawingArea(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_DrawingArea(mib_Widget *); -void mib_save_DrawingArea(mib_Widget *, FILE *); -int mib_load_DrawingArea(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Label */ -/*****************************************************************************/ -typedef struct _mib_Label { - char *label; /* text in label */ - -} mib_Label; - -/* mib_Label functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Label(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Label(mib_Widget *); -void mib_save_Label(mib_Widget *, FILE *); -int mib_load_Label(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_Frame */ -/*****************************************************************************/ -typedef struct _mib_Frame { - int shadowtype; /* 0 = in, 1 = out, 2 = etched_in, 3 = etched_out */ - -} mib_Frame; - -/* mib_Frame functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Frame(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Frame(mib_Widget *); -void mib_save_Frame(mib_Widget *, FILE *); -int mib_load_Frame(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_ScrollBar */ -/*****************************************************************************/ -typedef struct _mib_ScrollBar { - int orientation; - -} mib_ScrollBar; - -/* mib_ScrollBar functions */ -/*****************************************************************************/ -mib_Widget *mib_create_ScrollBar(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_ScrollBar(mib_Widget *); -void mib_save_ScrollBar(mib_Widget *, FILE *); -int mib_load_ScrollBar(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_TextBig */ -/*****************************************************************************/ -typedef struct _mib_TextBig { - int nothing; /* couldn't think of anything yet */ - -} mib_TextBig; - -/* mib_TextBig functions */ -/*****************************************************************************/ -mib_Widget *mib_create_TextBig(mib_Widget *, char *, char *, int, int, int, int, int); -void mib_delete_TextBig(mib_Widget *); -void mib_save_TextBig(mib_Widget *, FILE *); -int mib_load_TextBig(mib_Widget *, mib_Buffer *); - - -/* Structure of mib_List */ -/*****************************************************************************/ -typedef struct _mib_List { - Widget real_list; - -} mib_List; - -/* mib_List functions */ -/*****************************************************************************/ -mib_Widget *mib_create_List(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_List(mib_Widget *); -void mib_save_List(mib_Widget *, FILE *); -int mib_load_List(mib_Widget *, mib_Buffer *); - -/* Structure of mib_Scale */ -/*****************************************************************************/ -typedef struct _mib_Scale { - int orientation; - -} mib_Scale; - -/* mib_Scale functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Scale(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Scale(mib_Widget *); -void mib_save_Scale(mib_Widget *, FILE *); -int mib_load_Scale(mib_Widget *, mib_Buffer *); - -/* Structure of mib_Menu */ -/*****************************************************************************/ -typedef struct _mib_Menu { - int numitems; /* number of items in menu*/ - MenuItem *my_menu; /* array of menu items */ - Widget *items; /* pointers to each item */ - -} mib_Menu; - -/* mib_Menu functions */ -/*****************************************************************************/ -mib_Widget *mib_create_Menu(mib_Widget *, char *, char *, int, int, int, - int, int); -void mib_delete_Menu(mib_Widget *); -void mib_save_Menu(mib_Widget *, FILE *); -int mib_load_Menu(mib_Widget *, mib_Buffer *); - -/*****************************************************************************/ - -typedef struct _mib_widget_funcs { - char *name; -#ifdef __cplusplus - mib_Widget *(*mib_create)(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill); - void (*mib_delete)(mib_Widget *thisw); - void (*mib_save)(mib_Widget *thisw, FILE *fout); - int (*mib_load)(mib_Widget *thisw, mib_Buffer *fin); -#else - mib_Widget *(*mib_create)(); - void (*mib_delete)(); - void (*mib_save)(); - int (*mib_load)(); -#endif -} mib_widget_funcs; |