1 /************************************************************************/ 2 /* */ 3 /* Page Layout page on an inspector: */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef APP_PAGE_LAYOUT_TOOL_H 8 # define APP_PAGE_LAYOUT_TOOL_H 9 10 # include "appFrame.h" 11 # include "appPaperChooser.h" 12 # include "appMarginTool.h" 13 # include "appInspector.h" 14 15 /************************************************************************/ 16 /* */ 17 /* Resources for the 'Page Layout' page. */ 18 /* */ 19 /************************************************************************/ 20 21 typedef struct PageLayoutPageResources 22 { 23 char * plprUnitType; 24 25 char * plprPage; 26 char * plprCustomPageSizeText; 27 char * plprLandscapeText; 28 char * plprPortraitText; 29 30 MarginToolResources plprMarginToolResources; 31 char * plprPositionsText; 32 char * plprHeaderPositionText; 33 char * plprFooterPositionText; 34 35 char * plprRevertSelectionText; 36 char * plprChangeSelectionText; 37 } PageLayoutPageResources; 38 39 /************************************************************************/ 40 /* */ 41 /* A page layout tool, i.e. the 'Page Layout' page of the format tool. */ 42 /* */ 43 /************************************************************************/ 44 45 typedef struct PageLayoutTool 46 { 47 EditApplication * pltApplication; 48 AppInspector * pltInspector; 49 const PageLayoutPageResources * pltPageResources; 50 51 int pltManageHeadersFooters; 52 int pltManageSelection; 53 54 int pltUnitType; 55 double pltPixelsPerTwip; 56 int pltPageHighMm; 57 58 unsigned char pltCanChangeSelection; 59 unsigned char pltCanChangeDocument; 60 61 DocumentGeometry pltGeometrySetSelection; 62 DocumentGeometry pltGeometrySetDocument; 63 DocumentGeometry pltGeometryChosen; 64 65 APP_WIDGET pltPageDrawing; 66 PaperChooser pltPaperChooser; 67 AppMarginTool pltMarginTool; 68 DrawingSurface pltDrawingSurface; 69 RGB8Color pltBackgroundColor; 70 71 APP_WIDGET pltHeaderFooterFrame; 72 APP_WIDGET pltHeaderFooterInside; 73 APP_WIDGET pltHeaderFooterLeftColumn; 74 APP_WIDGET pltHeaderFooterRightColumn; 75 APP_WIDGET pltHeaderPositionText; 76 APP_WIDGET pltFooterPositionText; 77 78 APP_WIDGET pltRevertSelectionWidget; 79 APP_WIDGET pltChangeSelectionWidget; 80 APP_WIDGET pltRevertDocumentWidget; 81 APP_WIDGET pltChangeDocumentWidget; 82 } PageLayoutTool; 83 84 /************************************************************************/ 85 /* */ 86 /* Routine Declarations. */ 87 /* */ 88 /************************************************************************/ 89 90 extern void appPageLayoutPageGetResourceTable( 91 EditApplication * ea, 92 PageLayoutPageResources * plpr, 93 InspectorSubjectResources * isr ); 94 95 extern void appPageLayoutPageRefresh( 96 PageLayoutTool * plt, 97 InspectorSubject * is, 98 const DocumentGeometry * dgSelection, 99 const DocumentGeometry * dgDoc ); 100 101 extern void appPageLayoutPageFillPage( 102 PageLayoutTool * plt, 103 int doHdFt, 104 int doSelection, 105 const PageLayoutPageResources * plpr, 106 InspectorSubject * is, 107 APP_WIDGET pageWidget, 108 const InspectorSubjectResources * isr ); 109 110 extern void appPageLayoutPageFillChoosers( 111 PageLayoutTool * plt, 112 const PageLayoutPageResources * plpr ); 113 114 extern void appPageLayoutPageFinishPage( 115 PageLayoutTool * plt, 116 const PageLayoutPageResources * plpr ); 117 118 extern void appCleanPageLayoutTool( PageLayoutTool * plt ); 119 120 # endif /* APP_PAGE_LAYOUT_TOOL_H */ 121