void drawReminder() { fb_setClipping(3,41,252, 150); fb_drawRect(0,37,255,148,textAreaFillColor); setFont(font_arial_9); setColor(textAreaTextColor); setWrapToBorder(); if(blinkOn()) { if(isInsert()) setCursorProperties(cursorNormalColor, 1, -1, 0); else setCursorProperties(cursorOverwriteColor, 1, -1, 0); showCursor(); setCursorPos(getKBCursor()); } setFakeHighlight(); fb_dispString(0,-3,reminder); setWrapNormal(); hideCursor(); clearHighlight(); drawCurDay(); }
const char *Rowop::opcodeString(int code) { const char *def = "?"; const char *res = enum2string(opcodes, code, def); if (res == def) { // for the unknown opcodes, get at least the general sense if (isInsert(code) && isDelete(code)) return "[ID]"; else if (isInsert(code)) return "[I]"; else if (isDelete(code)) return "[D]"; else return "[NOP]"; } else { return res; } }
//------------------------------------------------------------------------------------- BOHGE_FORCEINLINE bool isInsert( const aabrect<T>& rect ) const { //你是否在我的范围内 if ( isInsert(rect.m_LeftBottom) ) { return true; } else if( isInsert(rect.m_RightTop) ) { return true; } else if( isInsert( vector2<T>( rect.m_LeftBottom.m_x, rect.m_RightTop.m_y ) ) ) { return true; } else if( isInsert( vector2<T>( rect.m_RightTop.m_x, rect.m_LeftBottom.m_y ) ) ) { return true; } //我是否在你的范围内 else if ( rect.isInsert(m_LeftBottom) ) { return true; } else if( rect.isInsert(m_RightTop) ) { return true; } else if( rect.isInsert( vector2<T>( m_LeftBottom.m_x, m_RightTop.m_y ) ) ) { return true; } else if( rect.isInsert( vector2<T>( m_RightTop.m_x, m_LeftBottom.m_y ) ) ) { return true; } return false; }
void insertChar(char *tmpBuffer, int size, char c) { if(isInsert()) { if((int)strlen(tmpBuffer) >= size) { return; } int z; for(z=size;z > getKBCursor();z--) { tmpBuffer[z] = tmpBuffer[z-1]; } } tmpBuffer[getKBCursor()] = c; if(getKBCursor() < size) { moveKBCursorRelative(CURSOR_FORWARD); } }