summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/hdr/modern_row.h
blob: 47b9582c297be388976988ff91085e919f7b8b26 (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
#ifndef modern_row_h__
#define modern_row_h__

#pragma once


// Types of cells
#define TC_TEXT1 1
#define TC_TEXT2 2
#define TC_TEXT3 3
#define TC_STATUS 4
#define TC_AVATAR 5
#define TC_EXTRA 6
#define TC_EXTRA1 7
#define TC_EXTRA2 8
#define TC_EXTRA3 9
#define TC_EXTRA4 10
#define TC_EXTRA5 11
#define TC_EXTRA6 12
#define TC_EXTRA7 13
#define TC_EXTRA8 14
#define TC_EXTRA9 15
#define TC_TIME 16
#define TC_SPACE 17
#define TC_FIXED 18


#define TC_ELEMENTSCOUNT 18

// Containers
#define TC_ROOT 50
#define TC_ROW 51
#define TC_COL 52
#define TC_FLOAT 53

// Alignes
#define TC_LEFT 0
#define TC_HCENTER 100
#define TC_RIGHT 101

#define TC_TOP 0
#define TC_VCENTER 102
#define TC_BOTTOM 103

// Sizes
#define TC_WIDTH 104
#define TC_HEIGHT 105



// Ñòðóêòóðà, îïèñûâàþùàÿ êîíòåéíåð ýëåìåíòà êîíòàêòà
//
typedef struct tagRowCell
{
	int cont;				// Òèï êîíòåéíåðà - êîíòàêò, ñòîðîêà, ñòîëáåö
	int type;				// Òèï ýëåìåíòà, ñîäåðæàùåãîñÿ â êîíòåéíåðå, åñëè 0 - ïóñòîé êîíòåéíåð
	int halign;				// Ãîðèçîíòàëüíîå âûðàâíèâàíèå âíóòðè êîíòåéíåðà
	int valign;				// Âåðòèêàëüíîå âûðàâíèâàíèå âíóòðè êîíòåéíåðà

	int	w;					// Øèðèíà ýëåìåíòà êîíòàêòà, äëÿ òåêñòîâûõ ïîëåé èãíîðèðóåòñÿ
	int	h;					// Âûñîòà ýëåìåíòà êîòíàêòà

	BOOL sizing;			// Ïàðàìåòð, ïîêàçûâàþùèé íàëè÷èå òåêñòîâûõ ïîëåé â äî÷åðíèõ êîíòåéíåðàõ
	BOOL layer;				// Ïàðàìåòð, ïîêàçûâàþùèé, ÷òî êîíòåéíåð îáðàçóåò íîâûé ñëîé
  
  BOOL hasfixed;    // Ïàðàìåòð ïîêàçûâàþùèé ÷òî åñòü âëîæåííûå ôèêñèðîâàííûå ýëåìåíòû
  BOOL fitwidth;    // Ïàðàìåòð óêàçûâàþùèé ÷òî ïîñëåäíèé ýëåìåíò çàïîëíÿåò âñå îñòàâøååñÿ 
                    // Ïðîñòðàíñòâî (ðàññòÿãèâàåò ðîäèòåëÿ.îâåðëåé)

  int fixed_width;
  int full_width;

	RECT r;					// Ïðÿìîóãîëüíèê äëÿ ðèñîâàíèÿ ýëåìåíòà
	struct tagRowCell * next;		// Ïîëå ñâÿçè 
	struct tagRowCell * child;		// Ïîëå ñâÿçè ñì. ôàéë îïèñàíèÿ
} ROWCELL, *pROWCELL;

// Ñòðóêòóðà äëÿ äîñòóïà ê êîíòåéíåðàì ýëåìåíòà êîíòàêòà âíóòðè äåðåâà îïèâàíèÿ
#ifndef _CPPCODE
  int cppCalculateRowHeight(ROWCELL	*RowRoot);
  void cppCalculateRowItemsPos(ROWCELL	*RowRoot, int width);
  ROWCELL *cppInitModernRow(ROWCELL	** tabAccess);
  void cppDeleteTree(ROWCELL	* RowRoot);
#endif

#endif // modern_row_h__