Back to index

tetex-bin  3.0
xlwradioP.h
Go to the documentation of this file.
00001 /* adapted from xlwradio.c in the XEmacs distribution.
00002    Changes are Copyright (C) 2002-2004 the xdvik development team
00003    Original copyright follows:
00004 */
00005 
00006 /* Radio Widget for XEmacs.
00007    Copyright (C) 1999 Edward A. Falk
00008 
00009 This file is part of XEmacs.
00010 
00011 XEmacs is free software; you can redistribute it and/or modify it
00012 under the terms of the GNU General Public License as published by the
00013 Free Software Foundation; either version 2, or (at your option) any
00014 later version.
00015 
00016 XEmacs is distributed in the hope that it will be useful, but WITHOUT
00017 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019 for more details.
00020 
00021 You should have received a copy of the GNU General Public License
00022 along with XEmacs; see the file COPYING.  If not, write to
00023 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00024 Boston, MA 02111-1307, USA.  */
00025 
00026 /*
00027  * RadioP.h - Private definitions for Radio widget
00028  * 
00029  * Author: Edward A. Falk
00030  *         falk@falconer.vip.best.com
00031  *  
00032  * Date:   June 30, 1997
00033  *
00034  */
00035 
00036 #ifndef _XawRadioP_h
00037 #define _XawRadioP_h
00038 
00039 #include "xdvi-config.h"
00040 
00041 #include "xlwradio.h"
00042 
00043 #ifndef MOTIF
00044 
00045 #include <X11/IntrinsicP.h>
00046 #include <X11/StringDefs.h>
00047 #include <X11/Intrinsic.h>
00048 #include <X11/StringDefs.h>
00049 #include <X11/Xos.h>
00050 #include <X11/Xaw/Text.h>
00051 #include <X11/Xaw/AsciiText.h>
00052 
00053 #include <X11/Xaw/ToggleP.h>
00054 
00055 /***********************************************************************
00056  *
00057  * Radio Widget Private Data
00058  *
00059  ***********************************************************************/
00060 
00061 typedef void (*XawDiamondProc) (Widget);
00062 
00063 void RadioSet (Widget   w,
00064               XEvent   *event,
00065               String   *params,      /* unused */
00066               Cardinal *num_params); /* unused */
00067 
00068 void RadioUnset (Widget   w,
00069                XEvent   *event,
00070                String   *params,      /* unused */
00071                Cardinal *num_params); /* unused */
00072 
00073 /************************************
00074  *
00075  *  Class structure
00076  *
00077  ***********************************/
00078 
00079 /* New fields for the Radio widget class record */
00080 typedef struct _RadioClass  {
00081     Dimension dsize;        /* diamond size */
00082     XawDiamondProc drawDiamond;
00083     /* pixmaps for the button */
00084     Pixmap sel_radio;              /* selected state */
00085     Pixmap unsel_radio;            /* unselected state */
00086     Pixmap sel_menu;        /* selected state */
00087     Pixmap unsel_menu;             /* unselected state */
00088     /* TODO: 3-d and xaw-xpm features? */
00089     XtPointer extension;
00090 } RadioClassPart;
00091 
00092 #define       XtInheritDrawDiamond ((XawDiamondProc)_XtInherit)
00093 
00094 /* Full class record declaration */
00095 typedef struct _RadioClassRec {
00096     CoreClassPart    core_class;
00097     SimpleClassPart  simple_class;
00098 #ifdef _ThreeDP_h
00099     ThreeDClassPart  threeD_class;
00100 #endif
00101     LabelClassPart   label_class;
00102     CommandClassPart command_class;
00103     ToggleClassPart  toggle_class;
00104     RadioClassPart   radio_class;
00105 } RadioClassRec;
00106 
00107 extern RadioClassRec radioClassRec;
00108 
00109 /***************************************
00110  *
00111  *  Instance (widget) structure 
00112  *
00113  **************************************/
00114 
00115 /* New fields for the Radio widget record */
00116 typedef struct {
00117     /* resources */
00118     Boolean isRadio;        /* radio if True, checkbox else */
00119     /* TODO: 3-d and xaw-xpm features? */
00120 
00121     /* private data */
00122     XtPointer extension;
00123 } RadioPart;
00124 
00125    /* Full widget declaration */
00126 typedef struct _RadioRec {
00127     CorePart  core;
00128     SimplePart       simple;
00129 #ifdef _ThreeDP_h
00130     ThreeDPart       threeD;
00131 #endif
00132     LabelPart label;
00133     CommandPart      command;
00134     TogglePart       toggle;
00135     RadioPart radio;
00136 } RadioRec;
00137 
00138 #endif /* MOTIF */
00139 
00140 #endif /* _XawRadioP_h */