📄 formpage.c
字号:
/****************************************************************
** *
** FILE : FormPage.c *
** *
** By : Cyb 2007.07.01 *
****************************************************************/
#define FORMPAGE_GLOBALS
#include "includes.h"
#include "FormPage.h"
#include "WinStack.h"
#include "DisplayTask.h"
void FormPageInitProc(FORMPAGE *formpage)
{
void (*execfunc)(void);
execfunc = formpage->initfunc;
if (execfunc != NULL) (*execfunc)();
execfunc = formpage->createfunc;
if (execfunc != NULL) (*execfunc)();
}
void FormPageHdlKeyProc(FORMPAGE *formpage)
{
void (*hdlkeyfunc)(void);
INT8U recvkey;
recvkey = GetCurKey();
hdlkeyfunc = formpage->hdlkeyfunc;
if (hdlkeyfunc != NULL)
{
(*hdlkeyfunc)();
return ;
}
if (recvkey == KEY_CLR)
{
PopFormStack();
}
}
void FormPageDestroyProc(FORMPAGE *formpage)
{
void (*execfunc)(void);
execfunc = formpage->destroyfunc;
if (execfunc != NULL) (*execfunc)();
}
void FormPageSuspendProc(FORMPAGE *formpage)
{
void (*execfunc)(void);
execfunc = formpage->suspendfunc;
if (execfunc != NULL) (*execfunc)();
}
void FormPageResumeProc(FORMPAGE *formpage)
{
void (*execfunc)(void);
execfunc = formpage->resuinitfunc;
if (execfunc != NULL) (*execfunc)();
execfunc = formpage->resumefunc;
if (execfunc != NULL) (*execfunc)();
}
void SetFormPageLifeTime(FORMPAGE *formpage,INT8U lifetime)
{
formpage->lifetime = lifetime;
}
void CreateFormPage(void)
{
PushFormStack();
}
void RefreshFormPage(void)
{
RefreshFormStack();
}
void CloseFormPage(void)
{
PopFormStack();
}
void CloseMultipleFormPage(INT8U closenum)
{
INT8U curdepth;
curdepth = GetFormPageDepth();
if (curdepth <= closenum) {
ReturnSpecifiedPage(0);
} else {
curdepth -= closenum;
ReturnSpecifiedPage(curdepth);
}
}
void ResetFormPage(FORMPAGE *formpage)
{
memset((INT8U*)formpage,0,sizeof(FORMPAGE));
formpage->lifetime = PAGELIFE_NORMAL;
formpage->formattrib = NORMALFORMPAGE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -