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

行编辑类 更多...

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

Public 成员函数

 CEditLine (CEditLineStyle *style)
 
 ~CEditLine ()
 
void OnMessageEdit (UINT message, WPARAM wp, LPARAM lp)
 
void Clear ()
 
int InsertChars (int pos, LPCTSTR text, int count=-1)
 
int AppendPreimeChars (LPCTSTR text, int count=-1)
 
void EndPreInput (LPCTSTR text, int count=-1)
 
BOOL DeleteChars (int pos, int count)
 删除文本
 
int SelectCount () const
 
BOOL DeleteSelectChars ()
 
void SelectRange (int pos, int count)
 将字符串的一部分设置为选中模式
 
BeString GetText () const
 
LPCTSTR GetTextPtr (int pos)
 
int CharCount () const
 
void SetCharStyle (int pos, int count, std::shared_ptr< CharStyle > &style)
 设置子串的样式索引号.在渲染时会调用CEditLineStyle::GetCharStyle(style_index)获得对应的样式.
 
int FindLocateCoord (RECT &rcText, int dx, int dy)
 根据鼠标输入位置(dx,dy)。获得光标索引
 
int GetPixelWidth (int count) const
 
void SetErrorCodeState (int code)
 
int ErrorCodeState () const
 
int UpdateWordWrapLine (int width)
 重新计算换行信息,在视窗区域变化和每插入和删除一个字符时触发
 
void UpdateCharsSize (int pos, int count)
 
void UpdateCharsLex (const StateTransfer *lex, int32_t current_state, 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
 
int32_t GetLexState (int pos)
 
UINT ChangeFlags () const
 
void SetChangeFlags (UINT changed, UINT op)
 Set the Change Flags object
 
void PeekSelectText (BasicStringBuffer &buffer) const
 提取选中文本
 
void PeekText (BeString &buffer) const
 提取全部文本
 
void DrawLineCursor (ISurface *psurface, int paintState, int dx, RECT rcLine, GBrushArray &text_bru, POINT &ptCursor, BOOL isFocus=FALSE)
 
void DrawLineTextOut (ISurface *psurface, int paintState, int dx, RECT rcLine, const GColor &crbgSelected, GBrushArray &text_bru, UINT txtFlags, BOOL fill=FALSE)
 

Protected 成员函数

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

Protected 属性

CEditLineStylem_style
 
BeString m_text_line
 
std::vector< CharSizem_sizes
 
std::vector< std::shared_ptr< CharStyle > > m_char_ui
 
int32_t m_first_state
 
int32_t m_last_state
 
std::vector< int32_t > m_lex_state
 
std::vector< std::shared_ptr< int32_t > > m_lex_result
 
UINT m_change_flags
 
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_string_bytes
 
int m_string_count
 
int m_pre_input_pos
 
int m_pre_input_count
 
int m_fix_head_pos
 
int m_line_bottom_pos
 
int m_error_code
 
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 
)

◆ ChangeFlags()

UINT BUI::CEditLine::ChangeFlags ( ) 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

◆ Clear()

void BUI::CEditLine::Clear ( )

◆ DeleteChars()

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

删除文本

参数
pos删除起点位置
count删除符号个数(注意不是字节数)
返回
BOOL: 若成功,返回TRUE。否则返回FALSE

◆ DeleteSelectChars()

BOOL BUI::CEditLine::DeleteSelectChars ( )

◆ DrawLineCursor()

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

◆ DrawLineTextOut()

void BUI::CEditLine::DrawLineTextOut ( ISurface psurface,
int  paintState,
int  dx,
RECT  rcLine,
const GColor crbgSelected,
GBrushArray text_bru,
UINT  txtFlags,
BOOL  fill = FALSE 
)

◆ DrawTextRangePos()

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

◆ DrawWrapLineTextOut()

void BUI::CEditLine::DrawWrapLineTextOut ( ISurface psurface,
int  paintState,
int  dx,
RECT  rcLine,
const GColor crbgSelected,
GBrushArray text_bru,
UINT  txtFlags,
BOOL  is_select_fill 
)
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 
)

根据鼠标输入位置(dx,dy)。获得光标索引

参数
rcText文本输入区域
dx坐标x
dy坐标y
返回
int: 返回命中的字符索引

◆ GetBytesLength()

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

◆ GetCharFont()

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

◆ GetCharLexStyle()

BOOL BUI::CEditLine::GetCharLexStyle ( int  pos,
GColor color 
) const
protected

◆ GetCharStyle()

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

◆ GetLexState()

int32_t BUI::CEditLine::GetLexState ( int  pos)

◆ 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 
)

◆ insertCharsInternal()

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

◆ LineBottomPos()

int BUI::CEditLine::LineBottomPos ( ) const

◆ OnMessageEdit()

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

◆ PeekSelectText()

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

提取选中文本

参数
buffer:输出参数。用于接收文本

◆ PeekText()

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

提取全部文本

参数
buffer:输出参数。用于接收文本

◆ PreCheckBeforeInsert()

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

◆ SelectCount()

int BUI::CEditLine::SelectCount ( ) const

◆ SelectRange()

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

将字符串的一部分设置为选中模式

参数
pos选中的起点位置
count选中符号数量(注意不是字节数)

◆ SetChangeFlags()

void BUI::CEditLine::SetChangeFlags ( UINT  changed,
UINT  op 
)

Set the Change Flags object

参数
changed:字体变更(0x01),词法变更(0x02)
opADD_FLAGS-添加属性,REMOVE_FLAGS-删除属性

◆ SetCharCursorPos()

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

◆ SetCharFixHeadPos()

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

◆ SetCharStyle()

void BUI::CEditLine::SetCharStyle ( int  pos,
int  count,
std::shared_ptr< CharStyle > &  style 
)

设置子串的样式索引号.在渲染时会调用CEditLineStyle::GetCharStyle(style_index)获得对应的样式.

参数
pos子串起点
count子串长度
std::shared_ptr<CharStyle>&style 风格样式

◆ SetErrorCodeState()

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

◆ SetLineBottomPos()

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

◆ UpdateCharsLex()

void BUI::CEditLine::UpdateCharsLex ( const StateTransfer lex,
int32_t  current_state,
int  pos,
int  count 
)

◆ 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_change_flags

UINT BUI::CEditLine::m_change_flags
protected

◆ m_char_ui

std::vector<std::shared_ptr<CharStyle> > BUI::CEditLine::m_char_ui
protected

◆ m_cursor_offset

int BUI::CEditLine::m_cursor_offset
protected

◆ m_cursor_pos

int BUI::CEditLine::m_cursor_pos
protected

◆ m_error_code

int BUI::CEditLine::m_error_code
protected

◆ m_first_state

int32_t BUI::CEditLine::m_first_state
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_last_state

int32_t BUI::CEditLine::m_last_state
protected

◆ m_lex_result

std::vector<std::shared_ptr<int32_t> > BUI::CEditLine::m_lex_result
protected

◆ m_lex_state

std::vector<int32_t> BUI::CEditLine::m_lex_state
protected

◆ m_line_bottom_pos

int BUI::CEditLine::m_line_bottom_pos
protected

◆ m_lineSize

SIZE BUI::CEditLine::m_lineSize
protected

◆ m_pre_input_count

int BUI::CEditLine::m_pre_input_count
protected

◆ m_pre_input_pos

int BUI::CEditLine::m_pre_input_pos
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_string_bytes

int BUI::CEditLine::m_string_bytes
protected

◆ m_string_count

int BUI::CEditLine::m_string_count
protected

◆ m_style

CEditLineStyle* BUI::CEditLine::m_style
protected

◆ m_text_line

BeString BUI::CEditLine::m_text_line
protected

◆ m_wordwrap

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