CBlueUI
C++ 跨平台跨框架的数据可视化工具
|
行编辑类 更多...
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) |
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_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< 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 |
int BUI::CEditLine::CharCursorPos | ( | ) | const |
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 |
||
) |
|
protected |
int BUI::CEditLine::LineBottomPos | ( | ) | const |
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 | ) |
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::SetLineBottomPos | ( | 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 |