gleparag.c
来自「是一个手机功能的模拟程序」· C语言 代码 · 共 59 行
C
59 行
/*
* Copyright (C) AU-System AB, 2000.
* All rights reserved.
*
* This software is covered by the license agreement between
* the end user and AU-System AB, and may be used and copied
* only in accordance with the terms of the said agreement.
*
* AU-System AB does not assume any responsibility or
* liability for any errors or inaccuracies in this
* software, or any consequential, incidental or indirect
* damage arising out of the use of the Generic Layout Engine
* software.
*/
#include "gleparag.h"
#include "tapimmi.h"
VOID* WIPAlloc(UINT32 size);
VOID WIPFree( VOID* memory );
BOOL GleParagraphRenderX(GleParagraph* self, INT16 *xSum, INT16 *ySum, INT16 *ascentMax, INT16 *descenderMax, GleElementType *gleType, UINT16 *currentFontLineHeight, INT8 *myAlign, BOOL *myWrap, INT16 *columnLeftX, INT16 *columnWidth, VOID* viewP){
*gleType = self->type;
*myWrap = self->wrap;
*myAlign = self->align;
#ifdef SUPPORT_NOWRAP
if(!*myWrap)
*myAlign = ALIGN_LEFT;
#endif
return FALSE;
}
GleElement *GleParagraphConstruct(INT8 align, BOOL wrap){
GleParagraph *self;
UINT32 chunkSize;
chunkSize = sizeof(GleParagraph);
self = (GleParagraph*)WIPAlloc(chunkSize);
self->type=Paragraph;
self->chunkSize = chunkSize;
self->align = align;
self->wrap = wrap;
#ifdef SUPPORT_PEN_NAVIGATION
self->Contains=&GleElementContains;
#endif
self->Draw=&GleElementDraw; /* *(p->Draw)();*/
self->RenderX=&GleParagraphRenderX;
self->RenderY=&GleElementRenderY;
self->Destruct=&GleElementDestruct; /* *(p->Destruct)();*/
#ifdef SUPPORT_KEY_NAVIGATION
self->IsMarkable=&GleElementIsMarkable;
#endif
self->Selected=&GleElementSelected;
return (GleElement*)self;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?