|
CBlueUI
C++ 跨平台跨框架的数据可视化工具
|
行编辑类 更多...
类 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) |
| 在pos位置插入文本 | |
| 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 |
| 返回字符符号数量(注意这里不等于字节数)。当返回值为0,可以判定为空串 | |
| 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 |
| Edit光标位置 | |
| void | SetCharCursorPos (int cursor) |
| 设置EditInput光标位置 | |
| int | CharFixHeadPos () const |
| void | SetCharFixHeadPos (int pos) |
| int | LineBottomY () const |
| 行底部Y位置 | |
| void | SetLineBottomY (int pos) |
| int | GetLineWidth () const |
| 获得行宽度 | |
| int | GetLineHeight (BOOL isSingleLine=FALSE) const |
| 获得行高度,isSingleLine=TRUE,表示单行模式 | |
| 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) |
| CharStyle * | GetCharStyle (int pos) const |
| BOOL | GetCharLexStyle (int pos, GColor &color) const |
Protected 属性 | |
| CEditLineStyle * | m_style |
| BeString | m_text_line |
| std::vector< CharSize > | m_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_line_size |
| 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< WordWrapLineInfo > | m_wordwrap |
| int | m_fisrt_printf_pos |
| int | m_fisrt_printf_head |
行编辑类
| BUI::CEditLine::CEditLine | ( | CEditLineStyle * | style | ) |
| BUI::CEditLine::~CEditLine | ( | ) |
| int BUI::CEditLine::AppendPreimeChars | ( | LPCTSTR | text, |
| int | count = -1 |
||
| ) |
输入法预输入
| UINT BUI::CEditLine::ChangeFlags | ( | ) | const |
获得属性标记
| int BUI::CEditLine::CharCount | ( | ) | const |
返回字符符号数量(注意这里不等于字节数)。当返回值为0,可以判定为空串
| int BUI::CEditLine::CharCursorPos | ( | ) | const |
Edit光标位置
| int BUI::CEditLine::CharFixHeadPos | ( | ) | const |
| void BUI::CEditLine::Clear | ( | ) |
清空所有文本和风格
| BOOL BUI::CEditLine::DeleteChars | ( | int | pos, |
| int | count | ||
| ) |
删除文本
| pos | 删除起点位置 |
| count | 删除符号个数(注意不是字节数) |
| BOOL BUI::CEditLine::DeleteSelectChars | ( | ) |
删除被选中的字符串
| void BUI::CEditLine::DrawLineCursor | ( | ISurface * | psurface, |
| int | paintState, | ||
| int | dx, | ||
| RECT | rcLine, | ||
| GBrushArray & | text_bru, | ||
| POINT & | ptCursor, | ||
| BOOL | isFocus = FALSE |
||
| ) |
| void BUI::CEditLine::DrawLineTextOut | ( | ISurface * | psurface, |
| int | paintState, | ||
| int | dx, | ||
| RECT | rcLine, | ||
| const GColor & | crbgSelected, | ||
| GBrushArray & | text_bru, | ||
| UINT | txtFlags, | ||
| BOOL | fill = FALSE |
||
| ) |
|
protected |
|
protected |
| void BUI::CEditLine::EndPreInput | ( | LPCTSTR | text, |
| int | count = -1 |
||
| ) |
输入法提交最后确定文本
| int BUI::CEditLine::ErrorCodeState | ( | ) | const |
| int BUI::CEditLine::FindLocateCoord | ( | RECT & | rcText, |
| int | dx, | ||
| int | dy | ||
| ) |
根据鼠标输入位置(dx,dy)。获得光标索引
| rcText | 文本输入区域 |
| dx | 坐标x |
| dy | 坐标y |
|
protected |
|
protected |
|
protected |
| int32_t BUI::CEditLine::GetLexState | ( | int | pos | ) |
获得词法状态
| int BUI::CEditLine::GetLineWidth | ( | ) | const |
获得行宽度
| int BUI::CEditLine::GetPixelWidth | ( | int | count | ) | const |
获得字符串像素宽度
| int BUI::CEditLine::GetPreInputLength | ( | ) | const |
获得输入法待插入文本长度
| int BUI::CEditLine::GetPreInputPos | ( | ) | const |
获得输入法预插入位置
| BeString BUI::CEditLine::GetText | ( | ) | const |
获得文本内容
| LPCTSTR BUI::CEditLine::GetTextPtr | ( | int | pos | ) |
获得指定位置文本内容
| int BUI::CEditLine::GetWraplineCount | ( | ) | const |
| int BUI::CEditLine::GetWraplineHeight | ( | int | sub_line, |
| BOOL | nearTop | ||
| ) | const |
| int BUI::CEditLine::GetWraplineIndex | ( | int | cursor | ) | const |
| int BUI::CEditLine::InsertChars | ( | int | pos, |
| LPCTSTR | text, | ||
| int | count = -1 |
||
| ) |
在pos位置插入文本
|
protected |
| int BUI::CEditLine::LineBottomY | ( | ) | const |
行底部Y位置
| void BUI::CEditLine::PeekSelectText | ( | BasicStringBuffer & | buffer | ) | const |
提取选中文本
| buffer:输出参数。用于接收文本 |
| void BUI::CEditLine::PeekText | ( | BeString & | buffer | ) | const |
提取全部文本
| buffer:输出参数。用于接收文本 |
|
protected |
| int BUI::CEditLine::SelectCount | ( | ) | const |
选中字符个数
| void BUI::CEditLine::SelectRange | ( | int | pos, |
| int | count | ||
| ) |
将字符串的一部分设置为选中模式
| pos | 选中的起点位置 |
| count | 选中符号数量(注意不是字节数) |
Set the Change Flags object
| changed | :字体变更(0x01),词法变更(0x02) |
| op | ADD_FLAGS-添加属性,REMOVE_FLAGS-删除属性 |
| void BUI::CEditLine::SetCharCursorPos | ( | int | cursor | ) |
设置EditInput光标位置
| void BUI::CEditLine::SetCharFixHeadPos | ( | int | pos | ) |
| void BUI::CEditLine::SetCharStyle | ( | int | pos, |
| int | count, | ||
| std::shared_ptr< CharStyle > & | style | ||
| ) |
设置子串的样式索引号.在渲染时会调用CEditLineStyle::GetCharStyle(style_index)获得对应的样式.
| pos | 子串起点 |
| count | 子串长度 |
| std::shared_ptr<CharStyle>& | style 风格样式 |
| void BUI::CEditLine::SetErrorCodeState | ( | int | code | ) |
| void BUI::CEditLine::SetLineBottomY | ( | int | pos | ) |
| void BUI::CEditLine::UpdateCharsLex | ( | const StateTransfer * | lex, |
| int32_t | current_state, | ||
| int | pos, | ||
| int | count | ||
| ) |
更新词法状态
| void BUI::CEditLine::UpdateCharsSize | ( | int | pos, |
| int | count | ||
| ) |
更新单个字符尺寸
| void BUI::CEditLine::UpdateSurfaceCharsSize | ( | ISurface * | pSurface, |
| int | pos, | ||
| int | count | ||
| ) |
更新字符尺寸信息
| int BUI::CEditLine::UpdateWordWrapLine | ( | int | width | ) |
重新计算换行信息,在视窗区域变化和每插入和删除一个字符时触发
| width |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |