CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
BUI::CEditLine类 参考

行编辑类 更多...

+ 类 BUI::CEditLine 继承关系图:

Public 成员函数

 CEditLine (CEditLineStyle *style)
 
 ~CEditLine ()
 
void OnMessageEdit (UINT message, WPARAM wp, LPARAM lp)
 
bool IsFontChange () const
 
void SetFontChange (bool changed)
 
int InsertChars (int pos, LPCTSTR text, int count=-1, GFont *font=NULL, COLORREF *color=NULL)
 
int AppendPreimeChars (LPCTSTR text, int count=-1, GFont *font=NULL, COLORREF *color=NULL)
 
void EndPreInput (LPCTSTR text, int count=-1)
 
BeString GetText () const
 
LPCTSTR GetTextPtr (int pos)
 
BOOL IsEmpty () const
 
void SetCharStyle (int pos, int count, GFont *font=NULL, COLORREF *color=NULL)
 
void ClearCharStyle ()
 清除文本自定义风格
 
int CharCount () const
 
int FindLocateCoord (RECT &rcText, int dx, int dy)
 
int GetPixelWidth (int count) const
 
BOOL DeleteChars (int pos, int count)
 
BOOL DeleteSelectChars ()
 
void SelectRange (int pos, int count)
 
void SetErrorCodeState (int code)
 
int ErrorCodeState () const
 
int UpdateWordWrapLine (int width)
 重新计算换行信息,在视窗区域变化和每插入和删除一个字符时触发
 
void UpdateCharsSize (int pos, int count)
 
void UpdateSurfaceCharsSize (ISurface *pSurface, int pos, int count)
 
int CharCursorPos () const
 
void SetCharCursorPos (int cursor)
 
int CharFixHeadPos () const
 
void SetCharFixHeadPos (int pos)
 
int LineBottomPos () const
 
void SetLineBottomPos (int pos)
 
int GetLineWidth () const
 
int GetLineHeight (BOOL isSingleLine=FALSE) const
 
int GetPreInputPos () const
 
int GetPreInputLength () const
 
int GetWraplineHeight (int sub_line, BOOL nearTop) const
 
int GetWraplineIndex (int cursor) const
 
int GetWraplineCount () const
 
void AppendSelectText (BasicStringBuffer &buffer) const
 
void AppendText (BeString &buffer) const
 
void DrawLineCursor (ISurface *psurface, int paintState, int dx, RECT rcLine, COLORSTYLE &textcolor, POINT &ptCursor, BOOL isFocus=FALSE)
 
void DrawLineTextOut (ISurface *psurface, int paintState, int dx, RECT rcLine, COLORREF crbgSelected, COLORSTYLE &textcolor, UINT txtFlags)
 

Protected 成员函数

void DrawWrapLineTextOut (ISurface *psurface, int paintState, int dx, RECT rcLine, COLORREF crbgSelected, COLORSTYLE &textcolor, UINT txtFlags)
 
void DrawTextRangePos (ISurface *psurface, GFont *defaultFont, int start, int end, int &x0, int &y0, const TCHAR *&p, RECT &rcLine, COLORREF &textcolor)
 
void insertCharsInternal (int pos, LPCTSTR text, int count, GFont *font, COLORREF *color)
 
int GetBytesLength (LPCTSTR text, int pos, int count)
 
BOOL CheckDecimal (const TCHAR *text)
 
int PreCheckBeforeInsert (int pos, LPCTSTR text, int count, UINT textFlag, BasicStringBuffer &buffer)
 
void GetCharFont (int pos, GFont *&font)
 
CharStyleGetCharStyle2 (int pos) const
 

Protected 属性

CEditLineStylem_style
 
BeString m_text
 
std::vector< CharSizem_sizes
 
std::vector< CharStyle * > m_charStyle
 
std::vector< int > m_charState
 
bool m_is_font_size_change
 
SIZE m_lineSize
 
int m_cursor_pos
 
int m_cursor_offset
 
int m_select_start
 
int m_select_count
 
int m_select_rect_left
 
int m_select_rect_width
 
int m_stringBytes
 
int m_stringCount
 
int m_preInputPos
 
int m_preInputCount
 
int m_fix_head_pos
 
int m_nLineBottomPos
 
int m_nErrorCode
 
std::vector< WordWrapLineInfom_wordwrap
 
int m_fisrt_printf_pos
 
int m_fisrt_printf_head
 

详细描述

行编辑类

构造及析构函数说明

◆ CEditLine()

BUI::CEditLine::CEditLine ( CEditLineStyle style)

◆ ~CEditLine()

BUI::CEditLine::~CEditLine ( )

成员函数说明

◆ AppendPreimeChars()

int BUI::CEditLine::AppendPreimeChars ( LPCTSTR  text,
int  count = -1,
GFont font = NULL,
COLORREF color = NULL 
)

◆ AppendSelectText()

void BUI::CEditLine::AppendSelectText ( BasicStringBuffer buffer) const

◆ AppendText()

void BUI::CEditLine::AppendText ( BeString buffer) const

◆ CharCount()

int BUI::CEditLine::CharCount ( ) const

◆ CharCursorPos()

int BUI::CEditLine::CharCursorPos ( ) const

◆ CharFixHeadPos()

int BUI::CEditLine::CharFixHeadPos ( ) const

◆ CheckDecimal()

BOOL BUI::CEditLine::CheckDecimal ( const TCHAR text)
protected

◆ ClearCharStyle()

void BUI::CEditLine::ClearCharStyle ( )

清除文本自定义风格

◆ DeleteChars()

BOOL BUI::CEditLine::DeleteChars ( int  pos,
int  count 
)

◆ DeleteSelectChars()

BOOL BUI::CEditLine::DeleteSelectChars ( )

◆ DrawLineCursor()

void BUI::CEditLine::DrawLineCursor ( ISurface psurface,
int  paintState,
int  dx,
RECT  rcLine,
COLORSTYLE textcolor,
POINT ptCursor,
BOOL  isFocus = FALSE 
)

◆ DrawLineTextOut()

void BUI::CEditLine::DrawLineTextOut ( ISurface psurface,
int  paintState,
int  dx,
RECT  rcLine,
COLORREF  crbgSelected,
COLORSTYLE textcolor,
UINT  txtFlags 
)

◆ DrawTextRangePos()

void BUI::CEditLine::DrawTextRangePos ( ISurface psurface,
GFont defaultFont,
int  start,
int  end,
int &  x0,
int &  y0,
const TCHAR *&  p,
RECT rcLine,
COLORREF textcolor 
)
protected

◆ DrawWrapLineTextOut()

void BUI::CEditLine::DrawWrapLineTextOut ( ISurface psurface,
int  paintState,
int  dx,
RECT  rcLine,
COLORREF  crbgSelected,
COLORSTYLE textcolor,
UINT  txtFlags 
)
protected

◆ EndPreInput()

void BUI::CEditLine::EndPreInput ( LPCTSTR  text,
int  count = -1 
)

◆ ErrorCodeState()

int BUI::CEditLine::ErrorCodeState ( ) const

◆ FindLocateCoord()

int BUI::CEditLine::FindLocateCoord ( RECT rcText,
int  dx,
int  dy 
)

◆ GetBytesLength()

int BUI::CEditLine::GetBytesLength ( LPCTSTR  text,
int  pos,
int  count 
)
protected

◆ GetCharFont()

void BUI::CEditLine::GetCharFont ( int  pos,
GFont *&  font 
)
protected

◆ GetCharStyle2()

CharStyle * BUI::CEditLine::GetCharStyle2 ( int  pos) const
protected

◆ GetLineHeight()

int BUI::CEditLine::GetLineHeight ( BOOL  isSingleLine = FALSE) const

◆ GetLineWidth()

int BUI::CEditLine::GetLineWidth ( ) const

◆ GetPixelWidth()

int BUI::CEditLine::GetPixelWidth ( int  count) const

◆ GetPreInputLength()

int BUI::CEditLine::GetPreInputLength ( ) const

◆ GetPreInputPos()

int BUI::CEditLine::GetPreInputPos ( ) const

◆ GetText()

BeString BUI::CEditLine::GetText ( ) const

◆ GetTextPtr()

LPCTSTR BUI::CEditLine::GetTextPtr ( int  pos)

◆ GetWraplineCount()

int BUI::CEditLine::GetWraplineCount ( ) const

◆ GetWraplineHeight()

int BUI::CEditLine::GetWraplineHeight ( int  sub_line,
BOOL  nearTop 
) const

◆ GetWraplineIndex()

int BUI::CEditLine::GetWraplineIndex ( int  cursor) const

◆ InsertChars()

int BUI::CEditLine::InsertChars ( int  pos,
LPCTSTR  text,
int  count = -1,
GFont font = NULL,
COLORREF color = NULL 
)

◆ insertCharsInternal()

void BUI::CEditLine::insertCharsInternal ( int  pos,
LPCTSTR  text,
int  count,
GFont font,
COLORREF color 
)
protected

◆ IsEmpty()

BOOL BUI::CEditLine::IsEmpty ( ) const

◆ IsFontChange()

bool BUI::CEditLine::IsFontChange ( ) const

◆ LineBottomPos()

int BUI::CEditLine::LineBottomPos ( ) const

◆ OnMessageEdit()

void BUI::CEditLine::OnMessageEdit ( UINT  message,
WPARAM  wp,
LPARAM  lp 
)

◆ PreCheckBeforeInsert()

int BUI::CEditLine::PreCheckBeforeInsert ( int  pos,
LPCTSTR  text,
int  count,
UINT  textFlag,
BasicStringBuffer buffer 
)
protected

◆ SelectRange()

void BUI::CEditLine::SelectRange ( int  pos,
int  count 
)

◆ SetCharCursorPos()

void BUI::CEditLine::SetCharCursorPos ( int  cursor)

◆ SetCharFixHeadPos()

void BUI::CEditLine::SetCharFixHeadPos ( int  pos)

◆ SetCharStyle()

void BUI::CEditLine::SetCharStyle ( int  pos,
int  count,
GFont font = NULL,
COLORREF color = NULL 
)

◆ SetErrorCodeState()

void BUI::CEditLine::SetErrorCodeState ( int  code)

◆ SetFontChange()

void BUI::CEditLine::SetFontChange ( bool  changed)

◆ SetLineBottomPos()

void BUI::CEditLine::SetLineBottomPos ( int  pos)

◆ UpdateCharsSize()

void BUI::CEditLine::UpdateCharsSize ( int  pos,
int  count 
)

◆ UpdateSurfaceCharsSize()

void BUI::CEditLine::UpdateSurfaceCharsSize ( ISurface pSurface,
int  pos,
int  count 
)

◆ UpdateWordWrapLine()

int BUI::CEditLine::UpdateWordWrapLine ( int  width)

重新计算换行信息,在视窗区域变化和每插入和删除一个字符时触发

参数
width
返回
int 返回高度差=新高度 - 旧高度

类成员变量说明

◆ m_charState

std::vector<int> BUI::CEditLine::m_charState
protected

◆ m_charStyle

std::vector<CharStyle*> BUI::CEditLine::m_charStyle
protected

◆ m_cursor_offset

int BUI::CEditLine::m_cursor_offset
protected

◆ m_cursor_pos

int BUI::CEditLine::m_cursor_pos
protected

◆ m_fisrt_printf_head

int BUI::CEditLine::m_fisrt_printf_head
protected

◆ m_fisrt_printf_pos

int BUI::CEditLine::m_fisrt_printf_pos
protected

◆ m_fix_head_pos

int BUI::CEditLine::m_fix_head_pos
protected

◆ m_is_font_size_change

bool BUI::CEditLine::m_is_font_size_change
protected

◆ m_lineSize

SIZE BUI::CEditLine::m_lineSize
protected

◆ m_nErrorCode

int BUI::CEditLine::m_nErrorCode
protected

◆ m_nLineBottomPos

int BUI::CEditLine::m_nLineBottomPos
protected

◆ m_preInputCount

int BUI::CEditLine::m_preInputCount
protected

◆ m_preInputPos

int BUI::CEditLine::m_preInputPos
protected

◆ m_select_count

int BUI::CEditLine::m_select_count
protected

◆ m_select_rect_left

int BUI::CEditLine::m_select_rect_left
protected

◆ m_select_rect_width

int BUI::CEditLine::m_select_rect_width
protected

◆ m_select_start

int BUI::CEditLine::m_select_start
protected

◆ m_sizes

std::vector<CharSize> BUI::CEditLine::m_sizes
protected

◆ m_stringBytes

int BUI::CEditLine::m_stringBytes
protected

◆ m_stringCount

int BUI::CEditLine::m_stringCount
protected

◆ m_style

CEditLineStyle* BUI::CEditLine::m_style
protected

◆ m_text

BeString BUI::CEditLine::m_text
protected

◆ m_wordwrap

std::vector<WordWrapLineInfo> BUI::CEditLine::m_wordwrap
protected
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有