File: appPaperChooser.h

package info (click to toggle)
ted 2.16-5
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,944 kB
  • ctags: 20,273
  • sloc: ansic: 167,980; makefile: 12,518; sh: 263
file content (85 lines) | stat: -rw-r--r-- 2,295 bytes parent folder | download | duplicates (2)
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
#   ifndef	APP_PAPER_CHOOSER_H
#   define	APP_PAPER_CHOOSER_H

#   include	<appFrame.h>
#   include	<utilPropMask.h>

/************************************************************************/
/*									*/
/*  A paper chooser to be embedded in another window.			*/
/*									*/
/************************************************************************/

struct PaperChooser;

typedef void (*PaperChooserCallback)(
				struct PaperChooser *		pc,
				void *				through,
				const DocumentGeometry *	dg );

typedef struct PaperChooser
    {
    APP_WIDGET			pcFrame;
    APP_WIDGET			pcVerticalColumn;

    AppOptionmenu		pcOptionmenu;
    APP_WIDGET			pcSizeText;

    APP_WIDGET			pcOrientationRow;
    APP_WIDGET			pcPortraitRadio;
    APP_WIDGET			pcLandscapeRadio;

    int				pcCustomPaperSize;
    int				pcSizeChosen;
    int				pcLandscapeChosen;
    DocumentGeometry		pcGeometryChosen;

    int				pcSizeOptionCount;
    APP_WIDGET *		pcSizeOptions;

    int				pcUnitType;

    PaperChooserCallback	pcCallback;
    void *			pcCallbackThrough;

    int				pcProgrammatic;
    } PaperChooser;

# define appPaperChooserRetreshMenuWidth( pc ) \
			    appOptionmenuRefreshWidth( &((pc)->pcOptionmenu) )

/************************************************************************/
/*									*/
/*  Routine declarations.						*/
/*									*/
/************************************************************************/

extern void appPaperChooserShowSize(	PaperChooser *		pc,
					int			sizeChosen );

extern int appPaperChooserGetSize(	PropertyMask *		pUpdMask,
					PaperChooser *		pc,
					DocumentGeometry *	dg );

extern void appPaperChooserFillMenu(	PaperChooser *		pc,
					const char *		customLabel );

extern void appPaperChooserAdaptToGeometry(
				PaperChooser *			pc,
				const DocumentGeometry *	dg );

extern void appMakePaperChooserWidgets(	APP_WIDGET		parent,
					const char *		title,
					int			unitType,
					PaperChooser *		pc,
					PaperChooserCallback	callback,
					void *			through );

extern void appPaperChooserAddOrientationToggles( PaperChooser * pc,
					const char *		portrait,
					const char *		landscape );

extern void appInitPaperChooser(	PaperChooser *		pc );
extern void appCleanPaperChooser(	PaperChooser *		pc );

#   endif	/*  APP_PAPER_CHOOSER_H  */