/**
*
* 文 件 名:WEdit.h
*
* 描 述:
*
* 创 建 者:赵平智 <[email protected]>
*
* 创建日期:20091116
*
* 备 注:
*
*
* * 维护历史 *
*
* <日期> <修改者>
* <修改内容...>
*
**/
#ifndef __WEDIT_H__
#define __WEDIT_H__
#include "../go.h"
#include "../../../se/wgi.h"
#include "../WGrinterface/WGrinterface.h"
#include "../WControl/WControl.h"
/*
*
* Edit styles
*/
#define ES_SINGLELINE 0x00000001L // 1: Single-line, 0: Multi-line
#define ES_UNEDITABLE 0x00000002L // 1: Uneditable, 0: Editable
#define ES_UNCOPYABLE 0x00000004L // 1: Uncopyable, 0: Copyable
#define ES_UNAUTOLINEFEED 0x00000008L // 1: Un-auto-linefeed, 0: Auto-linefeed
#define ES_HSCROLLBAR 0x00000010L // 1: With horizontal scroll bar, 0: No horizontal scroll bar
#define ES_VSCROLLBAR 0x00000020L // 1: With vertical scroll bar, 0: No vertical scroll bar
/*=======================+ INIT +========================*/
/*
*
* NAME: INIT_WEDIT
*/
typedef struct TAG_INIT_WEDIT
{
UI32 style; // style
int nSpcRow; // spacing of row
int nSpcClm; // spacing of column
TCHAR* text;
long cpty; // capacity
long clen; // current length
UI8 format; // text format.
HFONT font;
COLORREF crnor; // text normal color
COLORREF crsel; // color of text selected
COLORREF crbgsel; // background color of text selected
int nHSBHeight; // height of horizontal scroll bar.
int nVSBWidth; // width of vertical scroll bar.
HBITMAP hBmpLRIntArea; // The lower-right intersection area bitmap of vertical and horizontal scroll bars.
void (*GetBitmapsForHScrollBar) (OBJECT* pParentWnd, SCROLLBARBITMAPS* pSBBmps);
void (*GetBitmapsForVScrollBar) (OBJECT* pParentWnd, SCROLLBARBITMAPS* pSBBmps);
}INIT_WEDIT;
/*==================+ Extended Member +==================*/
/*
*
* 名称:EM_WEDIT
*/
typedef struct TAG_EM_WEDIT
{
OBJECT* pWGrinterface;
OBJECT* pWControl;
UI32 style; // style
BOOL bFocus;
BOOL bCaretVisible;
SI32 CttWidth; // Content's width
SI32 CttHeight; // Content's height
SI32 lastCttWidth; // last content's width
SI32 lastCttHeight; // last content's height
int xDelta;
int yDelta;
int nSpcRow; // spacing of row
int nSpcClm; // spacing of column
int nCaretRow; // the row at which caret is.
int nCaretClm; // the column at which caret is.
int nCaretChar; // the char behind which caret is.
int NumRow; // number of row.
int CaretX; // caret horizontal position
int CaretY; // caret vertical position
int CaretWidth; // caret width
int CharHeight;
TCHAR* text;
long cpty; // capacity
long clen; // current length
UI8 format; // text format.
HFONT font;
COLORREF crnor; // text normal color
COLORREF crsel; // color of text selected
COLORREF crbgsel; // background color of text selected
POINT* pAPWC; // pointer to array of position of wide character.
OBJECT* pHScrBar; // pointer to horizontal scroll bar.
OBJECT* pVScrBar; // pointer to vertical scroll bar.
int nHSBHeight; // height of horizontal scroll bar.
int nVSBWidth; // width of vertical scroll bar.
HBITMAP hBmpLRIntArea; // The lower-right intersection area bitmap of vertical and horizontal scroll bars.
void (*GetBitmapsForHScrollBar) (OBJECT* pParentWnd, SCROLLBARBITMAPS* pSBBmps);
void (*GetBitmapsForVScrollBar) (OBJECT* pParentWnd, SCROLLBARBITMAPS* pSBBmps);
}EM_WEDIT;
#endif /* #ifndef __WEDIT_H__ */