19aa228fdSmrg/* 29aa228fdSmrg 39aa228fdSmrgCopyright 1993, 1998 The Open Group 49aa228fdSmrg 59aa228fdSmrgPermission to use, copy, modify, distribute, and sell this software and its 69aa228fdSmrgdocumentation for any purpose is hereby granted without fee, provided that 79aa228fdSmrgthe above copyright notice appear in all copies and that both that 89aa228fdSmrgcopyright notice and this permission notice appear in supporting 99aa228fdSmrgdocumentation. 109aa228fdSmrg 119aa228fdSmrgThe above copyright notice and this permission notice shall be included 129aa228fdSmrgin all copies or substantial portions of the Software. 139aa228fdSmrg 149aa228fdSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 159aa228fdSmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 169aa228fdSmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 179aa228fdSmrgIN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 189aa228fdSmrgOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 199aa228fdSmrgARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 209aa228fdSmrgOTHER DEALINGS IN THE SOFTWARE. 219aa228fdSmrg 229aa228fdSmrgExcept as contained in this notice, the name of The Open Group shall 239aa228fdSmrgnot be used in advertising or otherwise to promote the sale, use or 249aa228fdSmrgother dealings in this Software without prior written authorization 259aa228fdSmrgfrom The Open Group. 269aa228fdSmrg 279aa228fdSmrg*/ 289aa228fdSmrg 299aa228fdSmrg#ifndef _XawScale_h 309aa228fdSmrg#define _XawScale_h 319aa228fdSmrg 329aa228fdSmrg/*********************************************************************** 339aa228fdSmrg * 349aa228fdSmrg * Scale Widget 359aa228fdSmrg * 369aa228fdSmrg ***********************************************************************/ 379aa228fdSmrg 389aa228fdSmrg#include <X11/Xaw/Simple.h> 399aa228fdSmrg#include <X11/Xmu/Converters.h> 409aa228fdSmrg 419aa228fdSmrg/* Resources: 429aa228fdSmrg 439aa228fdSmrg All the SimpleWidget resources plus... 449aa228fdSmrg Name Class RepType Default Value 459aa228fdSmrg ---- ----- ------- ------------- 469aa228fdSmrg aspectRatio AspectRatio Float 1.0 479aa228fdSmrg autoscale Autoscale Boolean True 489aa228fdSmrg bufferSize BufferSize Cardinal 1024 499aa228fdSmrg foreground Foreground Pixel XtDefaultForeground 509aa228fdSmrg gravity Gravity XtGravity ForgetGravity 519aa228fdSmrg image Image XImage* NULL 529aa228fdSmrg internalHeight Height Dimension 2 539aa228fdSmrg internalWidth Width Dimension 2 549aa228fdSmrg pasteBuffer PasteBuffer Boolean False 559aa228fdSmrg precision Precision Float 0.001 569aa228fdSmrg proportional Proportional Boolean False 579aa228fdSmrg resize Resize Boolean True 589aa228fdSmrg scaleX ScaleValue Float 1.0 599aa228fdSmrg scaleY ScaleValue Float 1.0 609aa228fdSmrg userData UserData XtPointer NULL 619aa228fdSmrg visual Visual Visual* CopyFromParent 629aa228fdSmrg*/ 639aa228fdSmrg 649aa228fdSmrg#ifndef _XtStringDefs_h_ 659aa228fdSmrg#define XtNforeground "foreground" 669aa228fdSmrg#define XtNinternalWidth "internalWidth" 679aa228fdSmrg#define XtNinternalHeight "internalHeight" 689aa228fdSmrg#define XtNresize "resize" 699aa228fdSmrg#define XtCResize "Resize" 709aa228fdSmrg#endif 719aa228fdSmrg 729aa228fdSmrg#define XtNaspectRatio "aspectRatio" 739aa228fdSmrg#define XtCAspectRatio "AspectRatio" 749aa228fdSmrg#define XtNbufferSize "bufferSize" 759aa228fdSmrg#define XtCBufferSize "BufferSize" 769aa228fdSmrg#define XtNscaleX "scaleX" 779aa228fdSmrg#define XtNscaleY "scaleY" 789aa228fdSmrg#define XtCScaleFactor "ScaleFactor" 799aa228fdSmrg#define XtNautoscale "autoscale" 809aa228fdSmrg#define XtCAutoscale "Autoscale" 819aa228fdSmrg#define XtNproportional "proportional" 829aa228fdSmrg#define XtCProportional "Proportional" 839aa228fdSmrg#define XtNprecision "precision" 849aa228fdSmrg#define XtCPrecision "Precision" 859aa228fdSmrg#define XtNgravity "gravity" 869aa228fdSmrg#define XtCGravity "Gravity" 879aa228fdSmrg#define XtNpasteBuffer "pasteBuffer" 889aa228fdSmrg#define XtCPasteBuffer "PasteBuffer" 899aa228fdSmrg#define XtNimage "image" 909aa228fdSmrg#define XtCImage "image" 919aa228fdSmrg#define XtNexponent "exponent" 929aa228fdSmrg#define XtCExponent "Exponent" 939aa228fdSmrg#define XtNuserData "userData" 949aa228fdSmrg#define XtCuserData "UserData" 959aa228fdSmrg#define XtRuserData "UserData" 969aa228fdSmrg#define XtRImage "Image" 979aa228fdSmrg#ifndef XtNvisual 989aa228fdSmrg#define XtNvisual "visual" 999aa228fdSmrg#endif 1009aa228fdSmrg#define XtCvisual "Visual" 1019aa228fdSmrg#define XtRvisual "Visual" 1029aa228fdSmrg 1039aa228fdSmrg 1049aa228fdSmrg/* Class record constants */ 1059aa228fdSmrg 1069aa228fdSmrgextern WidgetClass scaleWidgetClass; 1079aa228fdSmrg 1089aa228fdSmrgtypedef struct _ScaleClassRec *ScaleWidgetClass; 1099aa228fdSmrgtypedef struct _ScaleRec *ScaleWidget; 1109aa228fdSmrg 1110c7e83b2Smrgextern int SWGetImagePixel ( Widget w, Position x, Position y, 1120c7e83b2Smrg Position *img_x, Position *img_y, 1139aa228fdSmrg Pixel *img_pixel ); 1140c7e83b2Smrgextern void SWUnscale ( Widget w, XEvent *event, String *params, 1159aa228fdSmrg Cardinal *num_params ); 1160c7e83b2Smrgextern void SWAutoscale ( Widget w, XEvent *event, String *params, 1179aa228fdSmrg Cardinal *num_params ); 1180c7e83b2Smrgextern void SWInitialSize ( Widget w, XEvent *event, String *params, 1199aa228fdSmrg Cardinal *num_params ); 1209aa228fdSmrgextern void SWSetImage ( Widget w, XImage *image ); 1210c7e83b2Smrgextern void RequestSelection ( Widget w, XEvent *event, String *params, 1229aa228fdSmrg Cardinal *num_params ); 1230c7e83b2Smrgextern void GrabSelection ( Widget w, XEvent *event, String *params, 1249aa228fdSmrg Cardinal *num_params ); 1259aa228fdSmrgextern Pixmap SWGetPixmap ( Widget w ); 1269aa228fdSmrg 1279aa228fdSmrg#endif /* _XawScale_h */ 1289aa228fdSmrg 129