home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / m / motifpg2.zip / ch04 / BitmapEdiP.h next >
C/C++ Source or Header  |  1992-07-08  |  2KB  |  71 lines

  1. /*
  2.  * Copyright 1989, 1992 O'Reilly and Associates, Inc.
  3.  * See ../Copyright for complete rights and liability information.
  4.  */
  5.  
  6.  
  7. /* 
  8.  * BitmapEditP.h - Private definitions for BitmapEdit widget
  9.  */
  10.  
  11. #ifndef _ORABitmapEditP_h
  12. #define _ORABitmapEditP_h
  13.  
  14. /*
  15.  * Include private header file of superclass.
  16.  */
  17. #include <Xm/PrimitiveP.h>   
  18.  
  19. /*
  20.  * Include public header file for this widget.
  21.  */
  22. #include "BitmapEdit.h"
  23.  
  24. /* New fields for the BitmapEdit widget class record */
  25.  
  26. typedef struct {
  27.     int make_compiler_happy;    /* keep compiler happy */
  28. } BitmapEditClassPart;
  29.  
  30. /* Full class record declaration */
  31. typedef struct _BitmapEditClassRec {
  32.     CoreClassPart    core_class;
  33.     XmPrimitiveClassPart    primitive_class;
  34.     BitmapEditClassPart    bitmapEdit_class;
  35. } BitmapEditClassRec;
  36.  
  37. extern BitmapEditClassRec bitmapEditClassRec;
  38.  
  39. /* New fields for the BitmapEdit widget record */
  40. typedef struct {
  41.     /* resources */
  42.     Pixel    foreground;
  43.     XtCallbackList callback;    /* application installed callback function(s) */
  44.     Dimension    pixmap_width_in_cells;
  45.     Dimension     pixmap_height_in_cells;
  46.     int cell_size_in_pixels;
  47.     char *cell;    /* array for keeping track of array of bits */
  48.     Boolean show_all;  /* whether bitmap should display entire bitmap */
  49.  
  50.     /* private state */
  51.     int cur_x, cur_y;  /* position of visible corner in big pixmap */
  52.     Dimension    pixmap_width_in_pixels;
  53.     Dimension    pixmap_height_in_pixels;
  54.     Pixmap big_picture;
  55.     GC        draw_gc;    /* one plane, for drawing into pixmap */
  56.     GC        undraw_gc;    /* one plane, for drawing into pixmap */
  57.     GC        copy_gc;    /* defaultdepthofscreen, for copying pixmap into window */
  58.     Boolean user_allocated;  /* whether user allocated cell array */
  59. } BitmapEditPart;
  60.  
  61. /*
  62.  * Full instance record declaration
  63.  */
  64. typedef struct _BitmapEditRec {
  65.     CorePart            core;
  66.     XmPrimitivePart        primitive;
  67.     BitmapEditPart        bitmapEdit;
  68. } BitmapEditRec;
  69.  
  70. #endif /* _ORABitmapEditP_h */
  71.