📄 gleparag.c
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -