summaryrefslogtreecommitdiff
path: root/support/dktools/dk4align.h
blob: 1c1c03b919c856da3d42757e34ecec27f7dde71d (plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
/*
Copyright 2020, Dirk Krause. All rights reserved.
SPDX-License-Identifier:	BSD-3-Clause
*/

#ifndef	DK4ALIGN_H_INCLUDED
/**	Protection against multiple inclusions. */
#define	DK4ALIGN_H_INCLUDED 1

/**	@file	dk4align.h	Definitions for horizontal and vertical
	alignment.
*/

/**	How to align a text horizontally.
*/
typedef enum {
							/**	Text origin is at left side of text.
							*/
	DK4_TEXT_ALIGN_H_LEFT	= 0,

							/**	Text origin is at center of text.
							*/
	DK4_TEXT_ALIGN_H_CENTERED ,

							/** Text origin is at right side of text.
							*/
	DK4_TEXT_ALIGN_H_RIGHT ,

} dk4_text_align_h_t;


/**	How to align a text vertically.
*/
typedef enum {
								/**	Text origin is at top of text.
								*/
	DK4_TEXT_ALIGN_V_TOP		= 0,

								/**	Text origin is at center of text.
								*/
	DK4_TEXT_ALIGN_V_CENTERED ,

								/**	Text origin is at bottom of text.
								*/
	DK4_TEXT_ALIGN_V_BOTTOM ,

								/**	Text origin is at text base line.
								*/
	DK4_TEXT_ALIGN_V_BASELINE

} dk4_text_align_v_t;


/**	How to align an image horizontally within the available room.
*/
typedef enum {
								/**	Place image on the left.
								*/
	DK4_IMAGE_ALIGN_H_LEFT		= DK4_TEXT_ALIGN_H_LEFT ,

								/**	Place image centered.
								*/
	DK4_IMAGE_ALIGN_H_CENTERED	= DK4_TEXT_ALIGN_H_CENTERED ,

								/**	Place image on the right.
								*/
	DK4_IMAGE_ALIGN_H_RIGHT		= DK4_TEXT_ALIGN_H_RIGHT ,

								/**	Stretch image to use room completely.
								*/
	DK4_IMAGE_ALIGN_H_STRETCH	= (DK4_IMAGE_ALIGN_H_RIGHT + 1)

} dk4_image_align_h_t;


/**	How to align an image vertically in the available room.
*/
typedef enum {
								/**	Place image on top.
								*/
	DK4_IMAGE_ALIGN_V_TOP		= DK4_TEXT_ALIGN_V_TOP ,

								/**	Place image centered.
								*/
	DK4_IMAGE_ALIGN_V_CENTERED	= DK4_TEXT_ALIGN_V_CENTERED ,

								/**	Place image on bottom.
								*/
	DK4_IMAGE_ALIGN_V_BOTTOM	= DK4_TEXT_ALIGN_V_BOTTOM ,

								/**	Stretch image to fill room.
								*/
	DK4_IMAGE_ALIGN_V_STRETCH	= DK4_TEXT_ALIGN_V_BASELINE

} dk4_image_align_v_t;


/* vim: set ai sw=4 ts=4 : */

#endif