本文整理汇总了C++中MoveCursor函数的典型用法代码示例。如果您正苦于以下问题:C++ MoveCursor函数的具体用法?C++ MoveCursor怎么用?C++ MoveCursor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MoveCursor函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: end_screen
void
end_screen(char *message, int exit_val)
{
int footer_rows_was_one = 0;
if(panicking())
return;
if(FOOTER_ROWS(ps_global) == 1){
footer_rows_was_one++;
FOOTER_ROWS(ps_global) = 3;
mark_status_unknown();
}
flush_status_messages(exit_val ? 0 : 1);
blank_keymenu(_lines - 2, 0);
if(message){
StartInverse();
PutLine0(_lines - 2, 0, message);
}
EndInverse();
MoveCursor(_lines - 1, 0);
mswin_showcaret(F_ON(F_SHOW_CURSOR, ps_global));
if(footer_rows_was_one){
FOOTER_ROWS(ps_global) = 1;
mark_status_unknown();
}
}
示例2: MoveSelection
bool FullDisassemblyView::MoveSelection(s32 xOffset, s32 yOffset, bool& rInvalidateView)
{
if (!MoveCursor(xOffset, yOffset, rInvalidateView))
return false;
m_SelectionEnd = m_Cursor;
return true;
}
示例3: outbyte
void SimpleConsole::OutputChar( int ch )
{
outbyte(0xE9,ch); //for bochs
if(ch=='\t')
{
do{
OutputChar(' ');
}while( (cursorX-1)%4 );
return;
}
if(ch=='\n')
{
NextLine();
}
else if( ch == 8 )
{
OutputChar( charStyle, cursorY, --cursorX );
}
else if ( isprint((unsigned char)ch) )
{
OutputChar( charStyle | ch, cursorY, cursorX++ );
}
if(cursorX >= width )
{
NextLine();
}
MoveCursor();
}
示例4: GetCursorPos
void CGUIDialogKeyboardGeneric::OnPasteClipboard(void)
{
CStdStringW unicode_text;
CStdStringA utf8_text;
// Get text from the clipboard
utf8_text = g_Windowing.GetClipboardText();
// Insert the pasted text at the current cursor position.
if (utf8_text.length() > 0)
{
g_charsetConverter.utf8ToW(utf8_text, unicode_text);
size_t i = GetCursorPos();
if (i > m_strEdit.size())
i = m_strEdit.size();
CStdStringW left_end = m_strEdit.substr(0, i);
CStdStringW right_end = m_strEdit.substr(i);
m_strEdit = left_end;
m_strEdit.append(unicode_text);
m_strEdit.append(right_end);
UpdateLabel();
MoveCursor(unicode_text.length());
}
}
示例5: DrawBox
void DrawBox( int up_left_row, int up_left_col,
int num_rows, int num_cols ) {
MoveCursor( up_left_row, up_left_col) ;
UpLeftCorner() ;
DrawHorizontal (num_cols - 2) ;
UpRightCorner() ;
CursorToLeft(1) ;
CursorDown(1) ;
DrawVertical (num_rows - 2) ;
MoveCursor (up_left_row, up_left_col ) ;
CursorDown(1) ;
DrawVertical( num_rows - 2 ) ;
LowerLeftCorner() ;
DrawHorizontal( num_cols - 2 ) ;
LowerRightCorner() ;
}
示例6: dlgTextEntryHighscoreType
static void
dlgTextEntryHighscoreType(TCHAR *text, size_t width,
const TCHAR* caption)
{
wf = NULL;
wGrid = NULL;
if (width == 0)
width = MAX_TEXTENTRY;
max_width = std::min(MAX_TEXTENTRY, width);
wf = LoadDialog(CallBackTable, UIGlobals::GetMainWindow(),
_T("IDR_XML_TEXTENTRY"));
assert(wf != nullptr);
if (caption)
wf->SetCaption(caption);
wGrid = (WndOwnerDrawFrame*)wf->FindByName(_T("frmGrid"));
cursor = 0;
CopyString(edittext, text, max_width);
MoveCursor();
wf->SetKeyDownFunction(FormKeyDown);
if (wf->ShowModal() == mrOK) {
TrimRight(edittext);
CopyString(text, edittext, max_width);
}
delete wf;
}
示例7: _ASSERTE
BOOL COledbRecordset::MoveBottom()
{
_ASSERTE(IsOpen());
// Restart and then move backwards...
m_spRowset->RestartPosition(DB_NULL_HCHAPTER);
return MoveCursor(-1, 1);
}
示例8: do_PutLine
static void do_PutLine(int x, int y, const char *line)
{
if (x >= 0 && y >= 0)
MoveCursor(x, y);
while (*line)
WriteChar(*line++);
}
示例9: stow_cursor
/*
* Move the cursor to the lower-left of the screen, where it won't be annoying
*/
void
stow_cursor(
void)
{
if (!cmd_line)
MoveCursor(cLINES, 0);
}
示例10: SendMessage
/*
VMenu2:Call() (т.е. функция обработки меню)
должна возвращать true если она обработала событие и дальше ничего делать не надо
(вне зависимости что говорит енц. о кодах возврата различных DN_*).
*/
int VMenu2::Call(int Msg, void *param)
{
if(!mfn)
return 0;
SendMessage(DM_ENABLEREDRAW, 0, nullptr);
int r=mfn(Msg, param);
bool Visible;
DWORD Size;
SHORT X, Y;
GetCursorType(Visible, Size);
GetCursorPos(X, Y);
if(SendMessage(DM_ENABLEREDRAW, -1, nullptr)<0)
SendMessage(DM_ENABLEREDRAW, 1, nullptr);
if(NeedResize)
Resize();
SetCursorType(Visible, Size);
MoveCursor(X, Y);
if(closing)
{
closing=false;
if(Msg==DN_CLOSE)
return false;
SendMessage(DM_CLOSE, -1, nullptr);
}
return r;
}
示例11: UpdateLabel
void CGUIDialogKeyboardGeneric::SetText(const CStdString& aTextString)
{
m_strEdit.Empty();
g_charsetConverter.utf8ToW(aTextString, m_strEdit);
UpdateLabel();
MoveCursor(m_strEdit.size());
}
示例12: DlgHistoryKey
extern bool DlgHistoryKey( gui_window *gui, void *param, int edit, int list )
{
gui_ctl_id id;
gui_key key;
GUI_GET_KEY_CONTROL( param, id, key );
switch( key ) {
case GUI_KEY_UP:
MoveCursor( gui, edit, list, -1 );
return( true );
case GUI_KEY_DOWN:
MoveCursor( gui, edit, list, 1 );
return( true );
default:
return( false );
}
}
示例13: MoveCursorLeft
bool MoveCursorLeft() {
if (cursor < 1)
return false;
--cursor;
MoveCursor();
return true;
}
示例14: memsetw
void SimpleConsole::ClearScreen()
{
memsetw( buffer, charStyle, width * height );
RefreshBuffer();
cursorX = 0;
cursorY = 0;
MoveCursor();
}
示例15: MoveCursorRight
bool MoveCursorRight() {
if (cursor + 2 >= max_width)
return false; // max width
++cursor;
MoveCursor();
return true;
}