summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjim <empty>1989-10-11 11:52:22 +0000
committerjim <empty>1989-10-11 11:52:22 +0000
commit4aae061cabd48f43c02e0f53845845de5f1bea99 (patch)
treecb97d942927091589eedc0e95a80c934f2d378a3
parent3157466ccb690b5a5742225a4549559396dc3e0c (diff)
new sme naming scheme
-rw-r--r--xc/lib/Xaw/Imakefile24
-rw-r--r--xc/lib/Xaw/SimpleMenP.h16
-rw-r--r--xc/lib/Xaw/SimpleMenu.c60
-rw-r--r--xc/lib/Xaw/SimpleMenu.h4
-rw-r--r--xc/lib/Xaw/Sme.c39
-rw-r--r--xc/lib/Xaw/Sme.h22
-rw-r--r--xc/lib/Xaw/SmeBSB.c208
-rw-r--r--xc/lib/Xaw/SmeBSB.h22
-rw-r--r--xc/lib/Xaw/SmeBSBP.h44
-rw-r--r--xc/lib/Xaw/SmeLine.c66
-rw-r--r--xc/lib/Xaw/SmeLine.h22
-rw-r--r--xc/lib/Xaw/SmeLineP.h50
-rw-r--r--xc/lib/Xaw/SmeP.h38
-rw-r--r--xc/programs/xmh/folder.c4
-rw-r--r--xc/programs/xmh/screen.c6
-rw-r--r--xc/programs/xmh/tocutil.c9
-rw-r--r--xc/programs/xmh/xmh.h6
17 files changed, 327 insertions, 313 deletions
diff --git a/xc/lib/Xaw/Imakefile b/xc/lib/Xaw/Imakefile
index d189c8140..1e3203f4a 100644
--- a/xc/lib/Xaw/Imakefile
+++ b/xc/lib/Xaw/Imakefile
@@ -13,8 +13,6 @@ HEADERS = \
AsciiSrcP.h \
AsciiText.h \
AsciiTextP.h \
- BSBMenuEnt.h \
- BSBMenuEnP.h \
Box.h \
BoxP.h \
Cardinals.h \
@@ -30,8 +28,6 @@ HEADERS = \
GripP.h \
Label.h \
LabelP.h \
- LineMenuEn.h \
- LineMenuEP.h \
List.h \
ListP.h \
Logo.h \
@@ -40,8 +36,6 @@ HEADERS = \
MailboxP.h \
MenuButton.h \
MenuButtoP.h \
- MenuEntry.h \
- MenuEntryP.h \
Paned.h \
PanedP.h \
Scroll.h \
@@ -50,6 +44,12 @@ HEADERS = \
SimpleP.h \
SimpleMenu.h \
SimpleMenP.h \
+ Sme.h \
+ SmeP.h \
+ SmeBSB.h \
+ SmeBSBP.h \
+ SmeLine.h \
+ SmeLineP.h \
StripChart.h \
StripCharP.h \
Template.c \
@@ -72,7 +72,6 @@ SRCS = \
AsciiSink.c \
AsciiSrc.c \
AsciiText.c \
- BSBMenuEnt.c \
Box.c \
Clock.c \
Command.c \
@@ -80,16 +79,17 @@ SRCS = \
Form.c \
Grip.c \
Label.c \
- LineMenuEn.c \
List.c \
Logo.c \
Mailbox.c \
MenuButton.c \
- MenuEntry.c \
Paned.c \
Scroll.c \
Simple.c \
SimpleMenu.c \
+ Sme.c \
+ SmeBSB.c \
+ SmeLine.c \
StripChart.c \
Text.c \
TextSink.c \
@@ -106,7 +106,6 @@ OBJS = \
AsciiSink.o \
AsciiSrc.o \
AsciiText.o \
- BSBMenuEnt.o \
Box.o \
Clock.o \
Command.o \
@@ -114,16 +113,17 @@ OBJS = \
Form.o \
Grip.o \
Label.o \
- LineMenuEn.o \
List.o \
Logo.o \
Mailbox.o \
MenuButton.o \
- MenuEntry.o \
Paned.o \
Scroll.o \
Simple.o \
SimpleMenu.o \
+ Sme.o \
+ SmeBSB.o \
+ SmeLine.o \
StripChart.o \
Text.o \
TextSink.o \
diff --git a/xc/lib/Xaw/SimpleMenP.h b/xc/lib/Xaw/SimpleMenP.h
index 8c7d0f102..ecab0d3c2 100644
--- a/xc/lib/Xaw/SimpleMenP.h
+++ b/xc/lib/Xaw/SimpleMenP.h
@@ -1,6 +1,6 @@
/***********************************************************
- "$XConsortium: SimpleMenP.h,v 1.9 89/09/29 19:03:37 kit Exp $";
+ "$XConsortium: SimpleMenP.h,v 1.10 89/10/02 19:13:59 kit Exp $";
Copyright 1989 by the Massachusetts Institute of Technology,
Cambridge, Massachusetts.
@@ -39,13 +39,13 @@ SOFTWARE.
#define _SimpleMenuP_h
#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/MenuEntryP.h>
+#include <X11/Xaw/SmeP.h>
#include <X11/ShellP.h>
#define ForAllChildren(smw, childP) \
- for ( (childP) = (MenuEntryObject *) (smw)->composite.children ; \
- (childP) < (MenuEntryObject *) ( (smw)->composite.children + \
- (smw)->composite.num_children ) ; \
+ for ( (childP) = (SmeObject *) (smw)->composite.children ; \
+ (childP) < (SmeObject *) ( (smw)->composite.children + \
+ (smw)->composite.num_children ) ; \
(childP)++ )
typedef struct {
@@ -67,7 +67,7 @@ typedef struct _SimpleMenuPart {
/* resources */
String label_string; /* The string for the label or NULL. */
- MenuEntryObject label; /* If label_string is non-NULL then this is
+ SmeObject label; /* If label_string is non-NULL then this is
the label widget. */
WidgetClass label_class; /* Widget Class of the menu label object. */
@@ -76,7 +76,7 @@ typedef struct _SimpleMenuPart {
Dimension row_height; /* height of each row (menu entry) */
Cursor cursor; /* The menu's cursor. */
- MenuEntryObject popup_entry; /* The entry to position the cursor on for
+ SmeObject popup_entry; /* The entry to position the cursor on for
when using XawPositionSimpleMenu. */
Boolean menu_on_screen; /* Force the menus to be fully on the screen.*/
int backing_store; /* What type of backing store to use. */
@@ -89,7 +89,7 @@ typedef struct _SimpleMenuPart {
core.width */
Boolean menu_height; /* Just like menu_width, but for height. */
- MenuEntryObject entry_set; /* The entry that is currently set or
+ SmeObject entry_set; /* The entry that is currently set or
highlighted. */
} SimpleMenuPart;
diff --git a/xc/lib/Xaw/SimpleMenu.c b/xc/lib/Xaw/SimpleMenu.c
index 091ed63e9..10061729f 100644
--- a/xc/lib/Xaw/SimpleMenu.c
+++ b/xc/lib/Xaw/SimpleMenu.c
@@ -1,5 +1,5 @@
#if ( !defined(lint) && !defined(SABER) )
-static char Xrcsid[] = "$XConsortium: SimpleMenu.c,v 1.26 89/10/06 18:38:15 jim Exp $";
+static char Xrcsid[] = "$XConsortium: SimpleMenu.c,v 1.27 89/10/09 16:20:54 jim Exp $";
#endif
/***********************************************************
@@ -42,7 +42,7 @@ SOFTWARE.
#include <X11/Xaw/XawInit.h>
#include <X11/Xaw/SimpleMenP.h>
-#include <X11/Xaw/BSBMenuEnt.h>
+#include <X11/Xaw/SmeBSB.h>
#include <X11/Xaw/Cardinals.h>
#include <X11/Xmu/Initer.h>
@@ -121,7 +121,7 @@ static void MakeSetValuesRequest(), CreateLabel(), Layout();
static void AddPositionAction(), PositionMenu(), ChangeCursorOnGrab();
static Dimension GetMenuWidth(), GetMenuHeight();
static Widget FindMenu();
-static MenuEntryObject GetEventEntry();
+static SmeObject GetEventEntry();
static XtActionsRec actionsList[] =
{
@@ -250,7 +250,7 @@ Widget request, new;
XmuCallInitializers(XtWidgetToApplicationContext(new));
if (smw->simple_menu.label_class == NULL)
- smw->simple_menu.label_class = bSBMenuEntryObjectClass;
+ smw->simple_menu.label_class = smeBSBObjectClass;
smw->simple_menu.label = NULL;
smw->simple_menu.entry_set = NULL;
@@ -296,8 +296,8 @@ XEvent * event;
Region region;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject * entry;
- MenuEntryObjectClass class;
+ SmeObject * entry;
+ SmeObjectClass class;
if (region == NULL)
XClearWindow(XtDisplay(w), XtWindow(w));
@@ -320,7 +320,7 @@ Region region;
default:
continue;
}
- class = (MenuEntryObjectClass) (*entry)->object.widget_class;
+ class = (SmeObjectClass) (*entry)->object.widget_class;
if (class->rect_class.expose != NULL)
(class->rect_class.expose)( (Widget) *entry, NULL, NULL);
@@ -391,7 +391,7 @@ Resize(w)
Widget w;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject * entry;
+ SmeObject * entry;
if ( !XtIsRealized(w) ) return;
@@ -524,7 +524,7 @@ Widget w;
XtWidgetGeometry * request, * reply;
{
SimpleMenuWidget smw = (SimpleMenuWidget) XtParent(w);
- MenuEntryObject entry = (MenuEntryObject) w;
+ SmeObject entry = (SmeObject) w;
XtGeometryMask mode = request->request_mode;
XtGeometryResult answer;
Dimension old_height, old_width;
@@ -689,14 +689,14 @@ String * params;
Cardinal * num_params;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject entry = smw->simple_menu.entry_set;
- MenuEntryObjectClass class;
+ SmeObject entry = smw->simple_menu.entry_set;
+ SmeObjectClass class;
if ( entry == NULL) return;
smw->simple_menu.entry_set = NULL;
- class = (MenuEntryObjectClass) entry->object.widget_class;
- (class->menu_entry_class.unhighlight) ( (Widget) entry);
+ class = (SmeObjectClass) entry->object.widget_class;
+ (class->sme_class.unhighlight) ( (Widget) entry);
}
/* Function Name: Highlight
@@ -716,8 +716,8 @@ String * params;
Cardinal * num_params;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject entry;
- MenuEntryObjectClass class;
+ SmeObject entry;
+ SmeObjectClass class;
if ( !XtIsSensitive(w) ) return;
@@ -735,9 +735,9 @@ Cardinal * num_params;
}
smw->simple_menu.entry_set = entry;
- class = (MenuEntryObjectClass) entry->object.widget_class;
+ class = (SmeObjectClass) entry->object.widget_class;
- (class->menu_entry_class.highlight) ( (Widget) entry);
+ (class->sme_class.highlight) ( (Widget) entry);
}
/* Function Name: Notify
@@ -757,13 +757,13 @@ String * params;
Cardinal * num_params;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject entry = smw->simple_menu.entry_set;
- MenuEntryObjectClass class;
+ SmeObject entry = smw->simple_menu.entry_set;
+ SmeObjectClass class;
if ( (entry == NULL) || !XtIsSensitive((Widget) entry) ) return;
- class = (MenuEntryObjectClass) entry->object.widget_class;
- (class->menu_entry_class.notify)( (Widget) entry );
+ class = (SmeObjectClass) entry->object.widget_class;
+ (class->sme_class.notify)( (Widget) entry );
}
/************************************************************
@@ -854,7 +854,7 @@ Widget w;
XtSetArg(args[0], XtNlabel, smw->simple_menu.label_string);
XtSetArg(args[1], XtNjustify, XtJustifyCenter);
- smw->simple_menu.label = (MenuEntryObject)
+ smw->simple_menu.label = (SmeObject)
XtCreateManagedWidget("menuLabel",
smw->simple_menu.label_class, w,
args, TWO);
@@ -891,7 +891,7 @@ Layout(w, width_ret, height_ret)
Widget w;
Dimension *width_ret, *height_ret;
{
- MenuEntryObject current_entry, *entry;
+ SmeObject current_entry, *entry;
SimpleMenuWidget smw;
Dimension width, height;
Boolean do_layout = ((height_ret == NULL) || (width_ret == NULL));
@@ -902,7 +902,7 @@ Dimension *width_ret, *height_ret;
}
else {
smw = (SimpleMenuWidget) XtParent(w);
- current_entry = (MenuEntryObject) w;
+ current_entry = (SmeObject) w;
}
if ( smw->simple_menu.menu_height )
@@ -1000,7 +1000,7 @@ Widget w;
XPoint * location;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject entry;
+ SmeObject entry;
XPoint t_point;
static void MoveMenu();
@@ -1145,10 +1145,10 @@ static Dimension
GetMenuWidth(w, w_ent)
Widget w, w_ent;
{
- MenuEntryObject cur_entry = (MenuEntryObject) w_ent;
+ SmeObject cur_entry = (SmeObject) w_ent;
SimpleMenuWidget smw = (SimpleMenuWidget) w;
Dimension width, widest = (Dimension) 0;
- MenuEntryObject * entry;
+ SmeObject * entry;
if ( smw->simple_menu.menu_width )
return(smw->core.width);
@@ -1187,7 +1187,7 @@ GetMenuHeight(w)
Widget w;
{
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject * entry;
+ SmeObject * entry;
Dimension height;
if (smw->simple_menu.menu_height)
@@ -1212,14 +1212,14 @@ Widget w;
* Returns: the entry that this point is in.
*/
-static MenuEntryObject
+static SmeObject
GetEventEntry(w, event)
Widget w;
XEvent * event;
{
Position x_loc, y_loc;
SimpleMenuWidget smw = (SimpleMenuWidget) w;
- MenuEntryObject * entry;
+ SmeObject * entry;
switch (event->type) {
case MotionNotify:
diff --git a/xc/lib/Xaw/SimpleMenu.h b/xc/lib/Xaw/SimpleMenu.h
index eea4ff5a7..a54737e10 100644
--- a/xc/lib/Xaw/SimpleMenu.h
+++ b/xc/lib/Xaw/SimpleMenu.h
@@ -2,7 +2,7 @@
Copyright 1989 by the Massachusetts Institute of Technology,
Cambridge, Massachusetts.
- "$XConsortium: SimpleMenu.h,v 1.14 89/09/29 19:03:44 kit Exp $";
+ "$XConsortium: SimpleMenu.h,v 1.15 89/10/02 19:14:08 kit Exp $";
All Rights Reserved
@@ -68,7 +68,7 @@ SOFTWARE.
destroyCallback Callback Pointer NULL
height Height Dimension 0
label Label String NULL (No label)
- labelClass LabelClass Pointer bSBMenuEntryClass
+ labelClass LabelClass Pointer smeBSBObjectClass
mappedWhenManaged MappedWhenManaged Boolean True
rowHeight RowHeight Dimension Height of Font
sensitive Sensitive Boolean True
diff --git a/xc/lib/Xaw/Sme.c b/xc/lib/Xaw/Sme.c
index f9b833e3b..142f09e22 100644
--- a/xc/lib/Xaw/Sme.c
+++ b/xc/lib/Xaw/Sme.c
@@ -1,5 +1,5 @@
#if ( !defined(lint) && !defined(SABER) )
-static char Xrcsid[] = "$XConsortium: MenuEntry.c,v 1.2 89/09/29 19:03:48 kit Exp $";
+static char Xrcsid[] = "$XConsortium: Sme.c,v 1.3 89/10/09 16:21:16 jim Exp $";
#endif
/***********************************************************
@@ -27,7 +27,7 @@ SOFTWARE.
******************************************************************/
/*
- * MenuEntry.c - Source code for the generic menu entry
+ * Sme.c - Source code for the generic menu entry
*
* Date: September 26, 1989
*
@@ -41,10 +41,10 @@ SOFTWARE.
#include <X11/StringDefs.h>
#include <X11/Xaw/XawInit.h>
-#include <X11/Xaw/MenuEntryP.h>
+#include <X11/Xaw/SmeP.h>
#include <X11/Xaw/Cardinals.h>
-#define offset(field) XtOffset(MenuEntryObject, menu_entry.field)
+#define offset(field) XtOffset(SmeObject, sme.field)
static XtResource resources[] = {
{XtNcallback, XtCCallback, XtRCallback, sizeof(caddr_t),
offset(callbacks), XtRCallback, (caddr_t)NULL},
@@ -60,11 +60,11 @@ static XtGeometryResult QueryGeometry();
#define SUPERCLASS (&rectObjClassRec)
-MenuEntryClassRec menuEntryClassRec = {
+SmeClassRec smeClassRec = {
{
/* superclass */ (WidgetClass) SUPERCLASS,
- /* class_name */ "MenuEntry",
- /* size */ sizeof(MenuEntryRec),
+ /* class_name */ "Sme",
+ /* size */ sizeof(SmeRec),
/* class_initialize */ XawInitializeWidgetSet,
/* class_part_initialize*/ ClassPartInitialize,
/* Class init'ed */ FALSE,
@@ -95,7 +95,7 @@ MenuEntryClassRec menuEntryClassRec = {
/* display_accelerator*/ NULL,
/* extension */ NULL
},{
- /* Menu Entry Fields */
+ /* Simple Menu Entry Fields */
/* highlight */ Highlight,
/* unhighlight */ Unhighlight,
@@ -104,7 +104,7 @@ MenuEntryClassRec menuEntryClassRec = {
}
};
-WidgetClass menuEntryObjectClass = (WidgetClass) &menuEntryClassRec;
+WidgetClass smeObjectClass = (WidgetClass) &smeClassRec;
/************************************************************
*
@@ -122,25 +122,24 @@ static void
ClassPartInitialize(class)
WidgetClass class;
{
- MenuEntryObjectClass m_ent, superC;
+ SmeObjectClass m_ent, superC;
- m_ent = (MenuEntryObjectClass) class;
- superC = (MenuEntryObjectClass) m_ent->rect_class.superclass;
+ m_ent = (SmeObjectClass) class;
+ superC = (SmeObjectClass) m_ent->rect_class.superclass;
/*
* We don't need to check for null super since we'll get to TextSink
* eventually.
*/
- if (m_ent->menu_entry_class.highlight == XtInheritHighlight)
- m_ent->menu_entry_class.highlight = superC->menu_entry_class.highlight;
+ if (m_ent->sme_class.highlight == XtInheritHighlight)
+ m_ent->sme_class.highlight = superC->sme_class.highlight;
- if (m_ent->menu_entry_class.unhighlight == XtInheritUnhighlight)
- m_ent->menu_entry_class.unhighlight =
- superC->menu_entry_class.unhighlight;
+ if (m_ent->sme_class.unhighlight == XtInheritUnhighlight)
+ m_ent->sme_class.unhighlight = superC->sme_class.unhighlight;
- if (m_ent->menu_entry_class.notify == XtInheritNotify)
- m_ent->menu_entry_class.notify = superC->menu_entry_class.notify;
+ if (m_ent->sme_class.notify == XtInheritNotify)
+ m_ent->sme_class.notify = superC->sme_class.notify;
}
/* Function Name: Highlight
@@ -200,7 +199,7 @@ QueryGeometry(w, intended, return_val)
Widget w;
XtWidgetGeometry *intended, *return_val;
{
- MenuEntryObject entry = (MenuEntryObject) w;
+ SmeObject entry = (SmeObject) w;
Dimension width;
XtGeometryResult ret_val = XtGeometryYes;
XtGeometryMask mode = intended->request_mode;
diff --git a/xc/lib/Xaw/Sme.h b/xc/lib/Xaw/Sme.h
index 6ce778a05..7fdd9f35a 100644
--- a/xc/lib/Xaw/Sme.h
+++ b/xc/lib/Xaw/Sme.h
@@ -2,7 +2,7 @@
Copyright 1989 by the Massachusetts Institute of Technology,
Cambridge, Massachusetts.
- "$XConsortium: MenuEntry.h,v 1.1 89/09/28 16:44:50 kit Exp $";
+ "$XConsortium: Sme.h,v 1.2 89/09/29 19:03:50 kit Exp $";
All Rights Reserved
@@ -24,21 +24,21 @@ SOFTWARE.
******************************************************************/
-#ifndef _MenuEntry_h
-#define _MenuEntry_h
+#ifndef _Sme_h
+#define _Sme_h
#include <X11/RectObj.h>
/****************************************************************
*
- * MenuEntry Object
+ * Sme Object
*
****************************************************************/
/*
- * MenuEntry.h - Public Header file for MenuEntry object.
+ * Sme.h - Public Header file for Sme object.
*
- * This is the public header file for the Athena MenuEntry object.
+ * This is the public header file for the Athena Sme object.
* It is intended to be used with the simple menu widget.
*
* Date: April 3, 1989
@@ -48,7 +48,7 @@ SOFTWARE.
* kit@expo.lcs.mit.edu
*/
-/* Menu Entry Resources:
+/* Simple Menu Entry Resources:
Name Class RepType Default Value
---- ----- ------- -------------
@@ -62,9 +62,9 @@ SOFTWARE.
*/
-typedef struct _MenuEntryClassRec* MenuEntryObjectClass;
-typedef struct _MenuEntryRec* MenuEntryObject;
+typedef struct _SmeClassRec* SmeObjectClass;
+typedef struct _SmeRec* SmeObject;
-extern WidgetClass menuEntryObjectClass;
+extern WidgetClass smeObjectClass;
-#endif /* _MenuEntry_h */
+#endif /* _Sme_h */
diff --git a/xc/lib/Xaw/SmeBSB.c b/xc/lib/Xaw/SmeBSB.c
index 6063b071d..fc301a913 100644
--- a/xc/lib/Xaw/SmeBSB.c
+++ b/xc/lib/Xaw/SmeBSB.c
@@ -1,5 +1,5 @@
#if ( !defined(lint) && !defined(SABER) )
-static char Xrcsid[] = "$XConsortium: BSBMenuEnt.c,v 1.4 89/10/05 17:50:36 kit Exp $";
+static char Xrcsid[] = "$XConsortium: BSBMenuEnt.c,v 1.5 89/10/09 16:21:14 jim Exp $";
#endif
/***********************************************************
@@ -27,7 +27,7 @@ SOFTWARE.
******************************************************************/
/*
- * BSBMenuEntry.c - Source code file for BSB Menu Entry object.
+ * SmeBSB.c - Source code file for BSB Menu Entry object.
*
* Date: September 26, 1989
*
@@ -44,12 +44,12 @@ SOFTWARE.
#include <X11/Xaw/XawInit.h>
#include <X11/Xaw/SimpleMenu.h>
-#include <X11/Xaw/BSBMenuEnP.h>
+#include <X11/Xaw/SmeBSBP.h>
#include <X11/Xaw/Cardinals.h>
#define ONE_HUNDRED 100
-#define offset(field) XtOffset(BSBMenuEntryObject, bsb_entry.field)
+#define offset(field) XtOffset(SmeBSBObject, sme_bsb.field)
static XtResource resources[] = {
{XtNlabel, XtCLabel, XtRString, sizeof(String),
@@ -89,12 +89,12 @@ static XtGeometryResult QueryGeometry();
static void GetDefaultSize(), DrawBitmaps(), GetBitmapInfo();
static void CreateGCs(), DestroyGCs();
-#define superclass (&menuEntryClassRec)
-BSBMenuEntryClassRec bSBMenuEntryClassRec = {
+#define superclass (&smeClassRec)
+SmeBSBClassRec smeBSBClassRec = {
{
/* superclass */ (WidgetClass) superclass,
- /* class_name */ "BSBMenuEntry",
- /* size */ sizeof(BSBMenuEntryRec),
+ /* class_name */ "SmeBSB",
+ /* size */ sizeof(SmeBSBRec),
/* class_initializer */ ClassInitialize,
/* class_part_initialize*/ NULL,
/* Class init'ed */ FALSE,
@@ -138,7 +138,7 @@ BSBMenuEntryClassRec bSBMenuEntryClassRec = {
}
};
-WidgetClass bSBMenuEntryObjectClass = (WidgetClass) &bSBMenuEntryClassRec;
+WidgetClass smeBSBObjectClass = (WidgetClass) &smeBSBClassRec;
/************************************************************
*
@@ -147,7 +147,7 @@ WidgetClass bSBMenuEntryObjectClass = (WidgetClass) &bSBMenuEntryClassRec;
************************************************************/
/* Function Name: ClassInitialize
- * Description: Initializes the BSBMenuEntryObject.
+ * Description: Initializes the SmeBSBObject.
* Arguments: none.
* Returns: none.
*/
@@ -172,12 +172,12 @@ static void
Initialize(request, new)
Widget request, new;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) new;
+ SmeBSBObject entry = (SmeBSBObject) new;
- if (entry->bsb_entry.label == NULL)
- entry->bsb_entry.label = XtName(new);
+ if (entry->sme_bsb.label == NULL)
+ entry->sme_bsb.label = XtName(new);
else
- entry->bsb_entry.label = XtNewString( entry->bsb_entry.label );
+ entry->sme_bsb.label = XtNewString( entry->sme_bsb.label );
GetDefaultSize(new, &(entry->rectangle.width), &(entry->rectangle.height));
CreateGCs(new);
@@ -212,45 +212,45 @@ XEvent * event;
Region region;
{
GC gc;
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
int font_ascent, font_descent, y_loc;
- font_ascent = entry->bsb_entry.font->max_bounds.ascent;
- font_descent = entry->bsb_entry.font->max_bounds.descent;
+ font_ascent = entry->sme_bsb.font->max_bounds.ascent;
+ font_descent = entry->sme_bsb.font->max_bounds.descent;
y_loc = entry->rectangle.y;
if (XtIsSensitive(w) && XtIsSensitive( XtParent(w) ) ) {
if ( w == XawSimpleMenuGetActiveEntry(XtParent(w)) ) {
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
- entry->bsb_entry.norm_gc, 0, y_loc,
+ entry->sme_bsb.norm_gc, 0, y_loc,
(unsigned int) entry->rectangle.width,
(unsigned int) entry->rectangle.height);
- gc = entry->bsb_entry.rev_gc;
+ gc = entry->sme_bsb.rev_gc;
}
else
- gc = entry->bsb_entry.norm_gc;
+ gc = entry->sme_bsb.norm_gc;
}
else
- gc = entry->bsb_entry.norm_gray_gc;
+ gc = entry->sme_bsb.norm_gray_gc;
- if (entry->bsb_entry.label != NULL) {
- int x_loc = entry->bsb_entry.left_margin;
- int len = strlen(entry->bsb_entry.label);
- char * label = entry->bsb_entry.label;
+ if (entry->sme_bsb.label != NULL) {
+ int x_loc = entry->sme_bsb.left_margin;
+ int len = strlen(entry->sme_bsb.label);
+ char * label = entry->sme_bsb.label;
- switch(entry->bsb_entry.justify) {
+ switch(entry->sme_bsb.justify) {
int width, t_width;
case XtJustifyCenter:
- t_width = XTextWidth(entry->bsb_entry.font, label, len);
- width = entry->rectangle.width - (entry->bsb_entry.left_margin +
- entry->bsb_entry.right_margin);
+ t_width = XTextWidth(entry->sme_bsb.font, label, len);
+ width = entry->rectangle.width - (entry->sme_bsb.left_margin +
+ entry->sme_bsb.right_margin);
x_loc += (width - t_width)/2;
break;
case XtJustifyRight:
- t_width = XTextWidth(entry->bsb_entry.font, label, len);
- x_loc = entry->rectangle.width - (entry->bsb_entry.right_margin +
+ t_width = XTextWidth(entry->sme_bsb.font, label, len);
+ x_loc = entry->rectangle.width - (entry->sme_bsb.right_margin +
t_width);
break;
case XtJustifyLeft:
@@ -282,16 +282,16 @@ static Boolean
SetValues(current, request, new)
Widget current, request, new;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) new;
- BSBMenuEntryObject old_entry = (BSBMenuEntryObject) current;
+ SmeBSBObject entry = (SmeBSBObject) new;
+ SmeBSBObject old_entry = (SmeBSBObject) current;
Boolean ret_val = FALSE;
- if (old_entry->bsb_entry.label != entry->bsb_entry.label) {
- if (old_entry->bsb_entry.label != XtName( new ) )
- XtFree( (char *) old_entry->bsb_entry.label );
+ if (old_entry->sme_bsb.label != entry->sme_bsb.label) {
+ if (old_entry->sme_bsb.label != XtName( new ) )
+ XtFree( (char *) old_entry->sme_bsb.label );
- if (entry->bsb_entry.label != XtName(new) )
- entry->bsb_entry.label = XtNewString( entry->bsb_entry.label );
+ if (entry->sme_bsb.label != XtName(new) )
+ entry->sme_bsb.label = XtNewString( entry->sme_bsb.label );
ret_val = True;
}
@@ -299,18 +299,18 @@ Widget current, request, new;
if (entry->rectangle.sensitive != old_entry->rectangle.sensitive )
ret_val = TRUE;
- if (entry->bsb_entry.left_bitmap != old_entry->bsb_entry.left_bitmap) {
+ if (entry->sme_bsb.left_bitmap != old_entry->sme_bsb.left_bitmap) {
GetBitmapInfo(new, TRUE);
ret_val = TRUE;
}
- if (entry->bsb_entry.right_bitmap != old_entry->bsb_entry.right_bitmap) {
+ if (entry->sme_bsb.right_bitmap != old_entry->sme_bsb.right_bitmap) {
GetBitmapInfo(new, FALSE);
ret_val = TRUE;
}
- if ( (old_entry->bsb_entry.font != entry->bsb_entry.font) ||
- (old_entry->bsb_entry.foreground != entry->bsb_entry.foreground) ) {
+ if ( (old_entry->sme_bsb.font != entry->sme_bsb.font) ||
+ (old_entry->sme_bsb.foreground != entry->sme_bsb.foreground) ) {
DestroyGCs(current);
CreateGCs(new);
ret_val = TRUE;
@@ -354,7 +354,7 @@ QueryGeometry(w, intended, return_val)
Widget w;
XtWidgetGeometry *intended, *return_val;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
Dimension width, height;
XtGeometryResult ret_val = XtGeometryYes;
XtGeometryMask mode = intended->request_mode;
@@ -396,10 +396,10 @@ static void
FlipColors(w)
Widget w;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
- entry->bsb_entry.invert_gc, 0, (int) entry->rectangle.y,
+ entry->sme_bsb.invert_gc, 0, (int) entry->rectangle.y,
(unsigned int) entry->rectangle.width,
(unsigned int) entry->rectangle.height);
}
@@ -423,21 +423,21 @@ GetDefaultSize(w, width, height)
Widget w;
Dimension * width, * height;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
- if (entry->bsb_entry.label == NULL)
+ if (entry->sme_bsb.label == NULL)
*width = 0;
else
- *width = XTextWidth(entry->bsb_entry.font, entry->bsb_entry.label,
- strlen(entry->bsb_entry.label));
+ *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label,
+ strlen(entry->sme_bsb.label));
- *width += entry->bsb_entry.left_margin + entry->bsb_entry.right_margin;
+ *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin;
- *height = (entry->bsb_entry.font->max_bounds.ascent +
- entry->bsb_entry.font->max_bounds.descent);
+ *height = (entry->sme_bsb.font->max_bounds.ascent +
+ entry->sme_bsb.font->max_bounds.descent);
*height = (*height * ( ONE_HUNDRED +
- entry->bsb_entry.vert_space )) / ONE_HUNDRED;
+ entry->sme_bsb.vert_space )) / ONE_HUNDRED;
}
/* Function Name: DrawBitmaps
@@ -453,38 +453,38 @@ Widget w;
GC gc;
{
int x_loc, y_loc;
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
- if ( (entry->bsb_entry.left_bitmap == None) &&
- (entry->bsb_entry.right_bitmap == None) ) return;
+ if ( (entry->sme_bsb.left_bitmap == None) &&
+ (entry->sme_bsb.right_bitmap == None) ) return;
y_loc = entry->rectangle.y + (entry->rectangle.height -
- entry->bsb_entry.left_bitmap_height) / 2;
+ entry->sme_bsb.left_bitmap_height) / 2;
/*
* Draw Left Bitmap.
*/
- if (entry->bsb_entry.left_bitmap != None) {
- x_loc = (entry->bsb_entry.left_margin -
- entry->bsb_entry.left_bitmap_width) / 2;
- XCopyPlane(XtDisplayOfObject(w), entry->bsb_entry.left_bitmap,
+ if (entry->sme_bsb.left_bitmap != None) {
+ x_loc = (entry->sme_bsb.left_margin -
+ entry->sme_bsb.left_bitmap_width) / 2;
+ XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap,
XtWindowOfObject(w), gc, 0, 0,
- entry->bsb_entry.left_bitmap_width,
- entry->bsb_entry.left_bitmap_height, x_loc, y_loc, 1);
+ entry->sme_bsb.left_bitmap_width,
+ entry->sme_bsb.left_bitmap_height, x_loc, y_loc, 1);
}
/*
* Draw Right Bitmap.
*/
- if (entry->bsb_entry.right_bitmap != None) {
- x_loc = entry->rectangle.width - (entry->bsb_entry.right_margin -
- entry->bsb_entry.right_bitmap_width) / 2;
- XCopyPlane(XtDisplayOfObject(w), entry->bsb_entry.right_bitmap,
+ if (entry->sme_bsb.right_bitmap != None) {
+ x_loc = entry->rectangle.width - (entry->sme_bsb.right_margin -
+ entry->sme_bsb.right_bitmap_width) / 2;
+ XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap,
XtWindowOfObject(w), gc, 0, 0,
- entry->bsb_entry.right_bitmap_width,
- entry->bsb_entry.right_bitmap_height, x_loc, y_loc, 1);
+ entry->sme_bsb.right_bitmap_width,
+ entry->sme_bsb.right_bitmap_height, x_loc, y_loc, 1);
}
}
@@ -501,7 +501,7 @@ GetBitmapInfo(w, is_left)
Widget w;
Boolean is_left;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
unsigned int depth, bw;
Window root;
int x, y;
@@ -509,42 +509,42 @@ Boolean is_left;
char buf[BUFSIZ];
if (is_left) {
- if (entry->bsb_entry.left_bitmap != None) {
+ if (entry->sme_bsb.left_bitmap != None) {
if (!XGetGeometry(XtDisplayOfObject(w),
- entry->bsb_entry.left_bitmap, &root,
+ entry->sme_bsb.left_bitmap, &root,
&x, &y, &width, &height, &bw, &depth)) {
- sprintf(buf, "BSBMenuEntry Object: %s %s \"%s\".", "Could not",
+ sprintf(buf, "SmeBSB Object: %s %s \"%s\".", "Could not",
"get Left Bitmap geometry information for menu entry ",
XtName(w));
XtAppError(XtWidgetToApplicationContext(w), buf);
}
if (depth != 1) {
- sprintf(buf, "BSBMenuEntry Object: %s \"%s\"%s.",
+ sprintf(buf, "SmeBSB Object: %s \"%s\"%s.",
"Left Bitmap of entry ",
XtName(w), " is not one bit deep.");
XtAppError(XtWidgetToApplicationContext(w), buf);
}
- entry->bsb_entry.left_bitmap_width = (Dimension) width;
- entry->bsb_entry.left_bitmap_height = (Dimension) height;
+ entry->sme_bsb.left_bitmap_width = (Dimension) width;
+ entry->sme_bsb.left_bitmap_height = (Dimension) height;
}
}
- else if (entry->bsb_entry.right_bitmap != None) {
+ else if (entry->sme_bsb.right_bitmap != None) {
if (!XGetGeometry(XtDisplayOfObject(w),
- entry->bsb_entry.right_bitmap, &root,
+ entry->sme_bsb.right_bitmap, &root,
&x, &y, &width, &height, &bw, &depth)) {
- sprintf(buf, "BSBMenuEntry Object: %s %s \"%s\".", "Could not",
+ sprintf(buf, "SmeBSB Object: %s %s \"%s\".", "Could not",
"get Right Bitmap geometry information for menu entry ",
XtName(w));
XtAppError(XtWidgetToApplicationContext(w), buf);
}
if (depth != 1) {
- sprintf(buf, "BSBMenuEntry Object: %s \"%s\"%s.",
+ sprintf(buf, "SmeBSB Object: %s \"%s\"%s.",
"Right Bitmap of entry ", XtName(w),
" is not one bit deep.");
XtAppError(XtWidgetToApplicationContext(w), buf);
}
- entry->bsb_entry.right_bitmap_width = (Dimension) width;
- entry->bsb_entry.right_bitmap_height = (Dimension) height;
+ entry->sme_bsb.right_bitmap_width = (Dimension) width;
+ entry->sme_bsb.right_bitmap_height = (Dimension) height;
}
}
@@ -558,35 +558,35 @@ static void
CreateGCs(w)
Widget w;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
XGCValues values;
XtGCMask mask;
values.foreground = XtParent(w)->core.background_pixel;
- values.background = entry->bsb_entry.foreground;
- values.font = entry->bsb_entry.font->fid;
+ values.background = entry->sme_bsb.foreground;
+ values.font = entry->sme_bsb.font->fid;
values.graphics_exposures = FALSE;
mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
- entry->bsb_entry.rev_gc = XtGetGC(w, mask, &values);
+ entry->sme_bsb.rev_gc = XtGetGC(w, mask, &values);
- values.foreground = entry->bsb_entry.foreground;
+ values.foreground = entry->sme_bsb.foreground;
values.background = XtParent(w)->core.background_pixel;
- entry->bsb_entry.norm_gc = XtGetGC(w, mask, &values);
+ entry->sme_bsb.norm_gc = XtGetGC(w, mask, &values);
values.fill_style = FillTiled;
values.tile = XmuCreateStippledPixmap(XtScreenOfObject(w),
- entry->bsb_entry.foreground,
+ entry->sme_bsb.foreground,
XtParent(w)->core.background_pixel,
XtParent(w)->core.depth);
values.graphics_exposures = FALSE;
mask |= GCTile | GCFillStyle;
- entry->bsb_entry.norm_gray_gc = XtGetGC(w, mask, &values);
+ entry->sme_bsb.norm_gray_gc = XtGetGC(w, mask, &values);
values.foreground ^= values.background;
values.background = 0;
values.function = GXxor;
mask = GCForeground | GCBackground | GCGraphicsExposures | GCFunction;
- entry->bsb_entry.invert_gc = XtGetGC(w, mask, &values);
+ entry->sme_bsb.invert_gc = XtGetGC(w, mask, &values);
}
/* Function Name: DestroyGCs
@@ -599,10 +599,26 @@ static void
DestroyGCs(w)
Widget w;
{
- BSBMenuEntryObject entry = (BSBMenuEntryObject) w;
+ SmeBSBObject entry = (SmeBSBObject) w;
- XtReleaseGC(w, entry->bsb_entry.norm_gc);
- XtReleaseGC(w, entry->bsb_entry.norm_gray_gc);
- XtReleaseGC(w, entry->bsb_entry.rev_gc);
- XtReleaseGC(w, entry->bsb_entry.invert_gc);
+ XtReleaseGC(w, entry->sme_bsb.norm_gc);
+ XtReleaseGC(w, entry->sme_bsb.norm_gray_gc);
+ XtReleaseGC(w, entry->sme_bsb.rev_gc);
+ XtReleaseGC(w, entry->sme_bsb.invert_gc);
}
+
+#ifdef apollo
+
+/*
+ * The apollo compiler that we have optomizes out my code for
+ * FlipColors() since it is static. and no one executes it in this
+ * file. I am setting the function pointer into the class structure so
+ * that it can be called by my parent who will tell me to when to
+ * highlight and unhighlight.
+ */
+
+void _XawSmeBSBApolloHack ()
+{
+ FlipColors();
+}
+#endif /* apollo */
diff --git a/xc/lib/Xaw/SmeBSB.h b/xc/lib/Xaw/SmeBSB.h
index 4611e9949..3e71387a8 100644
--- a/xc/lib/Xaw/SmeBSB.h
+++ b/xc/lib/Xaw/SmeBSB.h
@@ -2,7 +2,7 @@
Copyright 1989 by the Massachusetts Institute of Technology,
Cambridge, Massachusetts.
- "$XConsortium: BSBMenuEnt.h,v 1.2 89/09/29 19:03:59 kit Exp $";
+ "$XConsortium: SmeBSB.h,v 1.3 89/10/05 17:50:39 kit Exp $";
All Rights Reserved
@@ -24,23 +24,23 @@ SOFTWARE.
******************************************************************/
-#ifndef _BSBMenuEntry_h
-#define _BSBMenuEntry_h
+#ifndef _SmeBSB_h
+#define _SmeBSB_h
#include <X11/Xmu/Converters.h>
-#include <X11/Xaw/MenuEntry.h>
+#include <X11/Xaw/Sme.h>
/****************************************************************
*
- * BSBMenuEntry object
+ * SmeBSB object
*
****************************************************************/
/*
- * BSBMenuEntry.h - Public Header file for BSBMenuEntry object.
+ * SmeBSB.h - Public Header file for SmeBSB object.
*
- * This is the public header file for the Athena BSB MenuEntry object.
+ * This is the public header file for the Athena BSB Sme object.
* It is intended to be used with the simple menu widget. This object
* provides bitmap - string - bitmap style entries.
*
@@ -73,10 +73,10 @@ SOFTWARE.
*/
-typedef struct _BSBMenuEntryClassRec *BSBMenuEntryObjectClass;
-typedef struct _BSBMenuEntryRec *BSBMenuEntryObject;
+typedef struct _SmeBSBClassRec *SmeBSBObjectClass;
+typedef struct _SmeBSBRec *SmeBSBObject;
-extern WidgetClass bSBMenuEntryObjectClass;
+extern WidgetClass smeBSBObjectClass;
#define XtNleftBitmap "leftBitmap"
#define XtNleftMargin "leftMargin"
@@ -89,4 +89,4 @@ extern WidgetClass bSBMenuEntryObjectClass;
#define XtCRightBitmap "RightBitmap"
#define XtCVertSpace "VertSpace"
-#endif /* _BSBMenuEntry_h */
+#endif /* _SmeBSB_h */
diff --git a/xc/lib/Xaw/SmeBSBP.h b/xc/lib/Xaw/SmeBSBP.h
index bc5dacb57..d2d765144 100644
--- a/xc/lib/Xaw/SmeBSBP.h
+++ b/xc/lib/Xaw/SmeBSBP.h
@@ -1,5 +1,5 @@
/*
-* $XConsortium: BSBMenuEnP.h,v 1.2 89/09/29 19:03:55 kit Exp $
+* $XConsortium: SmeBSBP.h,v 1.3 89/10/05 17:50:35 kit Exp $
*/
@@ -28,42 +28,42 @@ SOFTWARE.
******************************************************************/
/*
- * MenuEntryP.h - Private definitions for MenuEntry object
+ * SmeP.h - Private definitions for Sme object
*
*/
-#ifndef _XawBSBMenuEntryP_h
-#define _XawBSBMenuEntryP_h
+#ifndef _XawSmeBSBP_h
+#define _XawSmeBSBP_h
/***********************************************************************
*
- * MenuEntry Object Private Data
+ * Sme Object Private Data
*
***********************************************************************/
-#include <X11/Xaw/MenuEntryP.h>
-#include <X11/Xaw/BSBMenuEnt.h>
+#include <X11/Xaw/SmeP.h>
+#include <X11/Xaw/SmeBSB.h>
/************************************************************
*
- * New fields for the MenuEntry Object class record.
+ * New fields for the Sme Object class record.
*
************************************************************/
-typedef struct _BSBMenuEntryClassPart {
+typedef struct _SmeBSBClassPart {
XtPointer extension;
-} BSBMenuEntryClassPart;
+} SmeBSBClassPart;
/* Full class record declaration */
-typedef struct _BSBMenuEntryClassRec {
+typedef struct _SmeBSBClassRec {
RectObjClassPart rect_class;
- MenuEntryClassPart menu_entry_class;
- BSBMenuEntryClassPart bsb_entry_class;
-} BSBMenuEntryClassRec;
+ SmeClassPart sme_class;
+ SmeBSBClassPart sme_bsb_class;
+} SmeBSBClassRec;
-extern BSBMenuEntryClassRec bSBMenuEntryClassRec;
+extern SmeBSBClassRec smeBSBClassRec;
-/* New fields for the MenuEntry Object record */
+/* New fields for the Sme Object record */
typedef struct {
/* resources */
String label; /* The entry label. */
@@ -87,7 +87,7 @@ typedef struct {
Dimension right_bitmap_width;
Dimension right_bitmap_height;
-} BSBMenuEntryPart;
+} SmeBSBPart;
/****************************************************************
*
@@ -95,12 +95,12 @@ typedef struct {
*
****************************************************************/
-typedef struct _BSBMenuEntryRec {
+typedef struct _SmeBSBRec {
ObjectPart object;
RectObjPart rectangle;
- MenuEntryPart menu_entry;
- BSBMenuEntryPart bsb_entry;
-} BSBMenuEntryRec;
+ SmePart sme;
+ SmeBSBPart sme_bsb;
+} SmeBSBRec;
/************************************************************
*
@@ -108,4 +108,4 @@ typedef struct _BSBMenuEntryRec {
*
************************************************************/
-#endif /* _XawBSBMenuEntryP_h */
+#endif /* _XawSmeBSBP_h */
diff --git a/xc/lib/Xaw/SmeLine.c b/xc/lib/Xaw/SmeLine.c
index 359c21731..839c1dc38 100644
--- a/xc/lib/Xaw/SmeLine.c
+++ b/xc/lib/Xaw/SmeLine.c
@@ -1,5 +1,5 @@
#if ( !defined(lint) && !defined(SABER) )
-static char Xrcsid[] = "$XConsortium: LineMenuEn.c,v 1.3 89/10/09 16:21:17 jim Exp $";
+static char Xrcsid[] = "$XConsortium: SmeLine.c,v 1.4 89/10/09 16:51:50 jim Exp $";
#endif
/***********************************************************
@@ -27,7 +27,7 @@ SOFTWARE.
******************************************************************/
/*
- * MenuEntry.c - Source code for the generic menu entry
+ * Sme.c - Source code for the generic menu entry
*
* Date: September 26, 1989
*
@@ -41,10 +41,10 @@ SOFTWARE.
#include <X11/StringDefs.h>
#include <X11/Xaw/XawInit.h>
-#include <X11/Xaw/LineMenuEP.h>
+#include <X11/Xaw/SmeLineP.h>
#include <X11/Xaw/Cardinals.h>
-#define offset(field) XtOffset(LineMenuEntryObject, line_entry.field)
+#define offset(field) XtOffset(SmeLineObject, sme_line.field)
static XtResource resources[] = {
{XtNlineWidth, XtCLineWidth, XtRDimension, sizeof(Dimension),
offset(line_width), XtRImmediate, (XtPointer) 1},
@@ -65,13 +65,13 @@ static Boolean SetValues();
static XtGeometryResult QueryGeometry();
-#define SUPERCLASS (&menuEntryClassRec)
+#define SUPERCLASS (&smeClassRec)
-LineMenuEntryClassRec lineMenuEntryClassRec = {
+SmeLineClassRec smeLineClassRec = {
{
/* superclass */ (WidgetClass) SUPERCLASS,
- /* class_name */ "LineMenuEntry",
- /* size */ sizeof(LineMenuEntryRec),
+ /* class_name */ "SmeLine",
+ /* size */ sizeof(SmeLineRec),
/* class_initialize */ ClassInitialize,
/* class_part_initialize*/ NULL,
/* Class init'ed */ FALSE,
@@ -114,7 +114,7 @@ LineMenuEntryClassRec lineMenuEntryClassRec = {
}
};
-WidgetClass lineMenuEntryObjectClass = (WidgetClass) &lineMenuEntryClassRec;
+WidgetClass smeLineObjectClass = (WidgetClass) &smeLineClassRec;
/************************************************************
*
@@ -154,10 +154,10 @@ static void
Initialize(request, new)
Widget request, new;
{
- LineMenuEntryObject entry = (LineMenuEntryObject) new;
+ SmeLineObject entry = (SmeLineObject) new;
if (entry->rectangle.height == 0)
- entry->rectangle.height = entry->line_entry.line_width;
+ entry->rectangle.height = entry->sme_line.line_width;
CreateGC(new);
}
@@ -175,25 +175,25 @@ static void
CreateGC(w)
Widget w;
{
- LineMenuEntryObject entry = (LineMenuEntryObject) w;
+ SmeLineObject entry = (SmeLineObject) w;
XGCValues values;
XtGCMask mask = GCForeground | GCGraphicsExposures | GCLineWidth ;
- values.foreground = entry->line_entry.foreground;
+ values.foreground = entry->sme_line.foreground;
values.graphics_exposures = FALSE;
- values.line_width = entry->line_entry.line_width;
+ values.line_width = entry->sme_line.line_width;
- if (entry->line_entry.stipple != XtUnspecifiedPixmap) {
- values.stipple = entry->line_entry.stipple;
+ if (entry->sme_line.stipple != XtUnspecifiedPixmap) {
+ values.stipple = entry->sme_line.stipple;
values.fill_style = FillStippled;
mask |= GCStipple | GCFillStyle;
- entry->line_entry.gc = XCreateGC(XtDisplayOfObject(w),
+ entry->sme_line.gc = XCreateGC(XtDisplayOfObject(w),
RootWindowOfScreen(XtScreenOfObject(w)),
mask, &values);
}
else
- entry->line_entry.gc = XtGetGC(w, mask, &values);
+ entry->sme_line.gc = XtGetGC(w, mask, &values);
}
/* Function Name: DestroyGC
@@ -206,12 +206,12 @@ static void
DestroyGC(w)
Widget w;
{
- LineMenuEntryObject entry = (LineMenuEntryObject) w;
+ SmeLineObject entry = (SmeLineObject) w;
- if (entry->line_entry.stipple == XtUnspecifiedPixmap)
- XFreeGC(XtDisplayOfObject(w), entry->line_entry.gc);
+ if (entry->sme_line.stipple == XtUnspecifiedPixmap)
+ XFreeGC(XtDisplayOfObject(w), entry->sme_line.gc);
else
- XtReleaseGC(w, entry->line_entry.gc);
+ XtReleaseGC(w, entry->sme_line.gc);
}
/* Function Name: Redisplay
@@ -227,17 +227,17 @@ Widget w;
XEvent * event;
Region region;
{
- LineMenuEntryObject entry = (LineMenuEntryObject) w;
+ SmeLineObject entry = (SmeLineObject) w;
int y = entry->rectangle.y +
- (entry->rectangle.height - entry->line_entry.line_width) / 2;
+ (entry->rectangle.height - entry->sme_line.line_width) / 2;
- if (entry->line_entry.stipple != XtUnspecifiedPixmap)
- XSetTSOrigin(XtDisplayOfObject(w), entry->line_entry.gc, 0, y);
+ if (entry->sme_line.stipple != XtUnspecifiedPixmap)
+ XSetTSOrigin(XtDisplayOfObject(w), entry->sme_line.gc, 0, y);
XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w),
- entry->line_entry.gc,
+ entry->sme_line.gc,
0, y, (unsigned int) entry->rectangle.width,
- (unsigned int) entry->line_entry.line_width );
+ (unsigned int) entry->sme_line.line_width );
}
/* Function Name: SetValues
@@ -253,11 +253,11 @@ static Boolean
SetValues(current, request, new)
Widget current, request, new;
{
- LineMenuEntryObject entry = (LineMenuEntryObject) new;
- LineMenuEntryObject old_entry = (LineMenuEntryObject) current;
+ SmeLineObject entry = (SmeLineObject) new;
+ SmeLineObject old_entry = (SmeLineObject) current;
- if ( (entry->line_entry.line_width != old_entry->line_entry.line_width) &&
- (entry->line_entry.stipple != old_entry->line_entry.stipple) ) {
+ if ( (entry->sme_line.line_width != old_entry->sme_line.line_width) &&
+ (entry->sme_line.stipple != old_entry->sme_line.stipple) ) {
DestroyGC(current);
CreateGC(new);
return(TRUE);
@@ -280,7 +280,7 @@ QueryGeometry(w, intended, return_val)
Widget w;
XtWidgetGeometry *intended, *return_val;
{
- MenuEntryObject entry = (MenuEntryObject) w;
+ SmeObject entry = (SmeObject) w;
Dimension width;
XtGeometryResult ret_val = XtGeometryYes;
XtGeometryMask mode = intended->request_mode;
diff --git a/xc/lib/Xaw/SmeLine.h b/xc/lib/Xaw/SmeLine.h
index eaed463ea..b8ddac483 100644
--- a/xc/lib/Xaw/SmeLine.h
+++ b/xc/lib/Xaw/SmeLine.h
@@ -2,7 +2,7 @@
Copyright 1989 by the Massachusetts Institute of Technology,
Cambridge, Massachusetts.
- "$XConsortium: MenuEntry.h,v 1.1 89/09/28 16:44:50 kit Exp $";
+ "$XConsortium: SmeLine.h,v 1.1 89/09/29 19:04:03 kit Exp $";
All Rights Reserved
@@ -24,22 +24,22 @@ SOFTWARE.
******************************************************************/
-#ifndef _LineMenuEntry_h
-#define _LineMenuEntry_h
+#ifndef _SmeLine_h
+#define _SmeLine_h
-#include <X11/Xaw/MenuEntry.h>
+#include <X11/Xaw/Sme.h>
#include <X11/Xmu/Converters.h>
/****************************************************************
*
- * LineMenuEntry Object
+ * SmeLine Object
*
****************************************************************/
/*
- * LineMenuEntry.h - Public Header file for LineMenuEntry object.
+ * SmeLine.h - Public Header file for SmeLine object.
*
- * This is the public header file for the Athena LineMenuEntry object.
+ * This is the public header file for the Athena SmeLine object.
* It is intended to be used with the simple menu widget.
*
* Date: April 3, 1989
@@ -69,9 +69,9 @@ SOFTWARE.
#define XtNlineWidth "lineWidth"
#define XtNstipple "stipple"
-typedef struct _LineMenuEntryClassRec* LineMenuEntryObjectClass;
-typedef struct _LineMenuEntryRec* LineMenuEntryObject;
+typedef struct _SmeLineClassRec* SmeLineObjectClass;
+typedef struct _SmeLineRec* SmeLineObject;
-extern WidgetClass lineMenuEntryObjectClass;
+extern WidgetClass smeLineObjectClass;
-#endif /* _LineMenuEntry_h */
+#endif /* _SmeLine_h */
diff --git a/xc/lib/Xaw/SmeLineP.h b/xc/lib/Xaw/SmeLineP.h
index e84fb78ae..06af6c655 100644
--- a/xc/lib/Xaw/SmeLineP.h
+++ b/xc/lib/Xaw/SmeLineP.h
@@ -1,5 +1,5 @@
/*
-* $XConsortium: LineMenuEntryP.h,v 1.1 89/09/28 16:44:51 kit Exp $
+* $XConsortium: SmeLineP.h,v 1.1 89/09/29 19:04:02 kit Exp $
*/
@@ -28,42 +28,42 @@ SOFTWARE.
******************************************************************/
/*
- * LineMenuEntryP.h - Private definitions for LineMenuEntry widget
+ * SmeLineP.h - Private definitions for SmeLine widget
*
*/
-#ifndef _XawLineMenuEntryP_h
-#define _XawLineMenuEntryP_h
+#ifndef _XawSmeLineP_h
+#define _XawSmeLineP_h
/***********************************************************************
*
- * LineMenuEntry Widget Private Data
+ * SmeLine Widget Private Data
*
***********************************************************************/
-#include <X11/Xaw/MenuEntryP.h>
-#include <X11/Xaw/LineMenuEn.h>
+#include <X11/Xaw/SmeP.h>
+#include <X11/Xaw/SmeLine.h>
/************************************************************
*
- * New fields for the LineMenuEntry widget class record.
+ * New fields for the SmeLine widget class record.
*
************************************************************/
-typedef struct _LineMenuEntryClassPart {
+typedef struct _SmeLineClassPart {
XtPointer extension;
-} LineMenuEntryClassPart;
+} SmeLineClassPart;
/* Full class record declaration */
-typedef struct _LineMenuEntryClassRec {
- RectObjClassPart rect_class;
- MenuEntryClassPart menu_entry_class;
- LineMenuEntryClassPart line_entry_class;
-} LineMenuEntryClassRec;
+typedef struct _SmeLineClassRec {
+ RectObjClassPart rect_class;
+ SmeClassPart sme_class;
+ SmeLineClassPart sme_line_class;
+} SmeLineClassRec;
-extern LineMenuEntryClassRec lineMenuEntryClassRec;
+extern SmeLineClassRec smeLineClassRec;
-/* New fields for the LineMenuEntry widget record */
+/* New fields for the SmeLine widget record */
typedef struct {
/* resources */
Pixel foreground; /* Foreground color. */
@@ -73,7 +73,7 @@ typedef struct {
/* private data. */
GC gc; /* Graphics context for drawing line. */
-} LineMenuEntryPart;
+} SmeLinePart;
/****************************************************************
*
@@ -81,12 +81,12 @@ typedef struct {
*
****************************************************************/
-typedef struct _LineMenuEntryRec {
- ObjectPart object;
- RectObjPart rectangle;
- MenuEntryPart menu_entry;
- LineMenuEntryPart line_entry;
-} LineMenuEntryRec;
+typedef struct _SmeLineRec {
+ ObjectPart object;
+ RectObjPart rectangle;
+ SmePart sme;
+ SmeLinePart sme_line;
+} SmeLineRec;
/************************************************************
*
@@ -94,4 +94,4 @@ typedef struct _LineMenuEntryRec {
*
************************************************************/
-#endif /* _XawLineMenuEntryP_h */
+#endif /* _XawSmeLineP_h */
diff --git a/xc/lib/Xaw/SmeP.h b/xc/lib/Xaw/SmeP.h
index b33a266b4..79f294e11 100644
--- a/xc/lib/Xaw/SmeP.h
+++ b/xc/lib/Xaw/SmeP.h
@@ -1,5 +1,5 @@
/*
-* $XConsortium: MenuEntryP.h,v 1.1 89/09/28 16:44:51 kit Exp $
+* $XConsortium: SmeP.h,v 1.2 89/09/29 19:03:52 kit Exp $
*/
@@ -28,49 +28,49 @@ SOFTWARE.
******************************************************************/
/*
- * MenuEntryP.h - Private definitions for MenuEntry widget
+ * SmeP.h - Private definitions for Sme widget
*
*/
-#ifndef _XawMenuEntryP_h
-#define _XawMenuEntryP_h
+#ifndef _XawSmeP_h
+#define _XawSmeP_h
/***********************************************************************
*
- * MenuEntry Widget Private Data
+ * Sme Widget Private Data
*
***********************************************************************/
#include <X11/RectObjP.h>
-#include <X11/Xaw/MenuEntry.h>
+#include <X11/Xaw/Sme.h>
/************************************************************
*
- * New fields for the MenuEntry widget class record.
+ * New fields for the Sme widget class record.
*
************************************************************/
-typedef struct _MenuEntryClassPart {
+typedef struct _SmeClassPart {
void (*highlight)();
void (*unhighlight)();
void (*notify)();
XtPointer extension;
-} MenuEntryClassPart;
+} SmeClassPart;
/* Full class record declaration */
-typedef struct _MenuEntryClassRec {
+typedef struct _SmeClassRec {
RectObjClassPart rect_class;
- MenuEntryClassPart menu_entry_class;
-} MenuEntryClassRec;
+ SmeClassPart sme_class;
+} SmeClassRec;
-extern MenuEntryClassRec menuEntryClassRec;
+extern SmeClassRec smeClassRec;
-/* New fields for the MenuEntry widget record */
+/* New fields for the Sme widget record */
typedef struct {
/* resources */
XtCallbackList callbacks; /* The callback list */
-} MenuEntryPart;
+} SmePart;
/****************************************************************
*
@@ -78,11 +78,11 @@ typedef struct {
*
****************************************************************/
-typedef struct _MenuEntryRec {
+typedef struct _SmeRec {
ObjectPart object;
RectObjPart rectangle;
- MenuEntryPart menu_entry;
-} MenuEntryRec;
+ SmePart sme;
+} SmeRec;
/************************************************************
*
@@ -96,4 +96,4 @@ typedef void (*_XawEntryVoidFunc)();
#define XtInheritUnhighlight XtInheritHighlight
#define XtInheritNotify XtInheritHighlight
-#endif /* _XawMenuEntryP_h */
+#endif /* _XawSmeP_h */
diff --git a/xc/programs/xmh/folder.c b/xc/programs/xmh/folder.c
index 913283d72..526a2b774 100644
--- a/xc/programs/xmh/folder.c
+++ b/xc/programs/xmh/folder.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: folder.c,v 2.19 89/09/27 19:15:01 converse Exp $
+ * $XConsortium: folder.c,v 2.20 89/10/06 15:02:30 converse Exp $
*
*
* COPYRIGHT 1987, 1989
@@ -557,7 +557,7 @@ static void AddFolderMenuEntry(button, entryname)
else name = subfolder;
XtFree(parent);
}
- XtCreateManagedWidget(name, bSBMenuEntryObjectClass, button->menu,
+ XtCreateManagedWidget(name, smeBSBObjectClass, button->menu,
args, n);
}
diff --git a/xc/programs/xmh/screen.c b/xc/programs/xmh/screen.c
index ee5154c0a..03059da6a 100644
--- a/xc/programs/xmh/screen.c
+++ b/xc/programs/xmh/screen.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: screen.c,v 2.49 89/09/27 19:16:26 converse Exp $
+ * $XConsortium: screen.c,v 2.50 89/10/06 15:03:31 converse Exp $
*
*
* COPYRIGHT 1987, 1989
@@ -173,9 +173,9 @@ static void MakeCommandMenu(scrn, mbd)
XtSetArg(args[n], XtNcallback, callbacks); n++;
if (indent) { XtSetArg(args[n], XtNleftMargin, 18); n++; }
- widgetclass = bSBMenuEntryObjectClass;
+ widgetclass = smeBSBObjectClass;
} else
- widgetclass = lineMenuEntryObjectClass;
+ widgetclass = smeLineObjectClass;
XtCreateManagedWidget(e->name, widgetclass, menu, args, n);
}
diff --git a/xc/programs/xmh/tocutil.c b/xc/programs/xmh/tocutil.c
index c217157d3..8e79f4a9e 100644
--- a/xc/programs/xmh/tocutil.c
+++ b/xc/programs/xmh/tocutil.c
@@ -1,5 +1,5 @@
/*
- * $XConsortium: tocutil.c,v 2.32 89/09/27 19:16:47 converse Exp $
+ * $XConsortium: tocutil.c,v 2.33 89/10/06 15:04:03 converse Exp $
*
*
* COPYRIGHT 1987, 1989
@@ -94,7 +94,7 @@ static void CheckSequenceMenu(toc)
/* Assume that the label is the first entry in the list. */
- if (XtClass(entry_list[0]) != bSBMenuEntryObjectClass) /* a label */
+ if (XtClass(entry_list[0]) != smeBSBObjectClass) /* a label */
stable_entry_count++;
/* See if the sequences in the menu need to be rebuilt. */
@@ -131,9 +131,8 @@ static void CheckSequenceMenu(toc)
callbacks[0].closure = (XtPointer) scrn;
/* start at 1, skipping "all" */
for (i=1; i < toc->numsequences; i++)
- XtCreateManagedWidget(toc->seqlist[i]->name,
- bSBMenuEntryObjectClass, menu,
- args, XtNumber(args));
+ XtCreateManagedWidget(toc->seqlist[i]->name, smeBSBObjectClass,
+ menu, args, XtNumber(args));
}
/* Insure that the correct sequence is indicated in the menu. */
diff --git a/xc/programs/xmh/xmh.h b/xc/programs/xmh/xmh.h
index bdadc8d03..ef18045f6 100644
--- a/xc/programs/xmh/xmh.h
+++ b/xc/programs/xmh/xmh.h
@@ -1,5 +1,5 @@
/*
- * $XConsortium: xmh.h,v 2.24 89/09/27 19:11:51 converse Exp $
+ * $XConsortium: xmh.h,v 2.25 89/10/06 14:51:03 converse Exp $
*
*
* COPYRIGHT 1987
@@ -37,13 +37,13 @@
#include <X11/StringDefs.h>
#include <X11/Shell.h>
#include <X11/Xaw/AsciiText.h>
-#include <X11/Xaw/BSBMenuEnt.h>
+#include <X11/Xaw/SmeBSB.h>
#include <X11/Xaw/Box.h>
#include <X11/Xaw/Command.h>
#include <X11/Xaw/Dialog.h>
#include <X11/Xaw/Form.h>
#include <X11/Xaw/Label.h>
-#include <X11/Xaw/LineMenuEn.h>
+#include <X11/Xaw/SmeLine.h>
#include <X11/Xaw/MenuButton.h>
#include <X11/Xaw/Scroll.h>
#include <X11/Xaw/SimpleMenu.h>