1 /************************************************************************/ 2 /* */ 3 /* Image property tool: */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef TED_BITMAP_TOOL_H 8 # define TED_BITMAP_TOOL_H 9 10 # include <bitmap.h> 11 # include <appFrame.h> 12 # include <appInspector.h> 13 # include <docBuf.h> 14 # include <docPictureProperties.h> 15 # include <docSelectionDescription.h> 16 17 /************************************************************************/ 18 /* */ 19 /* Resources for the 'Image' page. */ 20 /* */ 21 /************************************************************************/ 22 23 typedef struct ImagePageResources 24 { 25 char * iprObjectType; 26 char * iprImageType; 27 char * iprPixelSize; 28 char * iprTotalBytes; 29 char * iprImageWide; 30 char * iprImageHigh; 31 char * iprXScale; 32 char * iprYScale; 33 } ImagePageResources; 34 35 /************************************************************************/ 36 /* */ 37 /* A bitmap tool, i.e. the 'Image' page of the format tool. */ 38 /* */ 39 /************************************************************************/ 40 41 typedef struct ImageTool 42 { 43 EditApplication * itApplication; 44 AppInspector * itInspector; 45 const ImagePageResources * itPageResources; 46 47 int itPictureHasBitmap; 48 int itTotalBytes; 49 BitmapDescription itBitmapDescription; 50 int itObjectType; 51 int itImageType; 52 53 PictureProperties itPropertiesChosen; 54 PictureProperties itPropertiesSet; 55 56 int itImageHighAbsChanged; 57 int itImageWideAbsChanged; 58 59 APP_WIDGET itObjectTypeRow; 60 APP_WIDGET itObjectTypeLabel; 61 APP_WIDGET itObjectTypeText; 62 63 APP_WIDGET itImageTypeRow; 64 APP_WIDGET itImageTypeLabel; 65 APP_WIDGET itImageTypeText; 66 67 APP_WIDGET itPixelSizeRow; 68 APP_WIDGET itPixelsSizeLabel; 69 APP_WIDGET itPixelsSizeText; 70 71 APP_WIDGET itByteSizeRow; 72 APP_WIDGET itByteSizeLabel; 73 APP_WIDGET itByteSizeText; 74 75 APP_WIDGET itImageWideRow; 76 APP_WIDGET itImageWideLabel; 77 APP_WIDGET itImageWideText; 78 79 APP_WIDGET itImageHighRow; 80 APP_WIDGET itImageHighLabel; 81 APP_WIDGET itImageHighText; 82 83 APP_WIDGET itXScaleRow; 84 APP_WIDGET itXScaleLabel; 85 APP_WIDGET itXScaleText; 86 87 APP_WIDGET itYScaleRow; 88 APP_WIDGET itYScaleLabel; 89 APP_WIDGET itYScaleText; 90 } ImageTool; 91 92 /************************************************************************/ 93 /* */ 94 /* Routine declarations. */ 95 /* */ 96 /************************************************************************/ 97 98 void tedImageToolGetImageResourceTable( 99 EditApplication * ea, 100 ImagePageResources * ipr, 101 InspectorSubjectResources * isr ); 102 103 extern void tedImagePageFillChoosers( 104 ImageTool * it, 105 const ImagePageResources * ipr ); 106 107 extern void tedImageFinishImagePage( 108 ImageTool * it, 109 const ImagePageResources * ipr ); 110 111 extern void tedFormatFillImagePage( 112 ImageTool * it, 113 const ImagePageResources * ipr, 114 InspectorSubject * is, 115 APP_WIDGET pageWidget, 116 const InspectorSubjectResources * isr ); 117 118 extern void tedRefreshImageTool( 119 ImageTool * it, 120 int * pEnabled, 121 int * pPref, 122 InspectorSubject * is, 123 const DocumentSelection * ds, 124 const SelectionDescription * sd, 125 BufferDocument * bd, 126 const unsigned char * cmdEnabled ); 127 128 extern void tedCleanImageTool( ImageTool * it ); 129 extern void tedInitImageTool( ImageTool * it ); 130 131 extern void tedImageToolGetResourceTable( 132 EditApplication * ea, 133 ImagePageResources * ipr, 134 InspectorSubjectResources * isr ); 135 136 # endif /* TED_BITMAP_TOOL_H */ 137