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
102
103
|
/*
* ScriptParse.h
*
* Created on: 2009-3-15
* Author: Tony.Liu
*/
#ifndef SCRIPTPARSE_H_
#define SCRIPTPARSE_H_
//compile all pattern
bool CompileAllPtn();
//free all regex objects
void FreeAllRegex();
//is a space line?
bool IsSpaceLine(const char *string);
//match slide count line and return the count
bool GetSlideCount( const char *string, unsigned int *slidenum);
//check slide size line is correct
bool IsSlideSizeString(const char *string);
//match slide width line and return the width
bool GetSlideWidth( const char *string, unsigned int *slidewidth);
//match slide height line and return the height
bool GetSlideHeight( const char *string, unsigned int *slideheight);
//Is Display Box section starting?
bool IsDispBoxSectionStart(const char *string);
//match link top line and return link top position
bool GetDispBoxTop(const char *string, unsigned int *top);
//match link left line and return link left position
bool GetDispBoxLeft(const char *string, unsigned int *left);
//match link width line and return width value
bool GetDispBoxWidth(const char *string, unsigned int *width);
//match link width line and return width value
bool GetDispBoxHeight(const char *string, unsigned int *height);
//match hyperlink line and return link count
bool GetLinkCount(const char *string, unsigned int *linkcnt);
//match link address line and return the address
bool GetLinkAddr(const char *string, char *link);
//match link top line and return link top position
bool GetLinkTop(const char *string, unsigned int *top);
//match link left line and return link left position
bool GetLinkLeft(const char *string, unsigned int *left);
//match link width line and return width value
bool GetLinkWidth(const char *string, unsigned int *width);
//match link width line and return width value
bool GetLinkHeight(const char *string, unsigned int *height);
//Parse slide section of script
//Parse slide section of script
bool ParseSlideSection(const char *string, \
unsigned int *slideindex, \
unsigned int *slidewidth, \
unsigned int *slideheight);
//Parse hyperlink section of script
bool ParseLinkSection(const char *string, \
unsigned int *linkindex, \
char *linkstr, \
unsigned int *linktop, \
unsigned int *linkleft, \
unsigned int *linkwidth, \
unsigned int *linkheight);
//Parse display box section of script
bool ParseDispBoxSection(const char *string, \
unsigned int *disptop, \
unsigned int *displeft, \
unsigned int *dispwidth, \
unsigned int *dispheight);
//Parse slide properties section of script
bool ParsePropertiesSection(const char *string, \
char *pOnInitCmds, \
char *pOnRefreshCmds, \
char *pOnCloseCmds);
//Is slide section starting?
bool IsSlideSectionStart(const char *string);
//Is hyperlink section starting?
bool IsLinkSectionStart(const char *string);
//Is slide properties section starting?
bool IsPropertiesSectionStart(const char *string);
#endif /* SCRIPTPARSE_H_ */
|