1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
|
/* $Id: RulerP.h,v 1.1 1999/08/27 18:33:57 falk Exp $
*
* RulerP.h - Private definitions for Index Ruler widget
*
*/
#ifndef _MwRulerP_h
#define _MwRulerP_h
/***********************************************************************
*
* Ruler Widget Private Data
*
***********************************************************************/
#include <X11/IntrinsicP.h>
#include <X11/Xmu/Converters.h>
#include "MwRuler.h"
/* New fields for the Ruler widget class record */
typedef struct {XtPointer extension;} MwRulerClassPart;
/* Full class record declaration */
typedef struct _MwRulerClassRec {
CoreClassPart core_class;
MwRulerClassPart ruler_class;
} MwRulerClassRec;
extern MwRulerClassRec mwRulerClassRec;
/****************************************************************
*
* instance record declaration
*
****************************************************************/
/* New fields for the MwRuler widget record */
typedef struct {
/* resources */
int labelStep ; /* want labels this many units apart */
int labelDiv ; /* want this many labels/unit */
XtLabelStyle labelStyle ; /* fractions or decimal */
int markStep ; /* want marks this many units apart */
int markDiv ; /* want this many marks/unit */
int orientation ; /* N/S/E/W */
Pixel foreground ;
Pixel pointerColor ;
Boolean showPointer ; /* flag: show pointer */
float minValue ; /* left/top-most value */
float scale ; /* pixels/unit */
float value ; /* current pointer position */
int iValue ; /* same, in pixels */
Cursor cursor ; /* normal cursor */
XFontStruct *font, *fracFont ;
XtCallbackList callbacks ;
XtPointer userData ;
/* private state */
GC foregroundGC ;
GC fracGC ;
GC pointerGC ;
int drag ; /* cursor tracking */
Region clip ; /* full region */
Pixmap indexPm ; /* saved pixels under index */
Boolean indexSaved ; /* pixels have been saved */
/* Here is the info used to redraw the ruler: */
int length ; /* length of working area of ruler */
int lStep ; /* actual label step */
int lDiv ; /* actual label divisions */
int mStep ; /* actual mark step to use */
int mDiv ; /* actual mark divisions */
long l0 ; /* pixel value of base label */
float v0 ; /* value of base label */
int txtWid ;
Boolean needs_layout ;
} MwRulerPart;
typedef struct _MwRulerRec {
CorePart core;
MwRulerPart ruler;
} MwRulerRec;
#endif /* _MwRulerP_h */
|