Renamed more methods, fixed a warning

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23604 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-01-18 10:52:20 +00:00
parent e97cd7f18b
commit 2fa152e4f0
4 changed files with 26 additions and 40 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
static bool sUsageRequested = false; static bool sUsageRequested = false;
static bool sGeometryRequested = false; //static bool sGeometryRequested = false;
const ulong MSG_ACTIVATE_TERM = 'msat'; const ulong MSG_ACTIVATE_TERM = 'msat';
+10 -10
View File
@@ -349,7 +349,7 @@ TermParse::EscParse()
case CASE_PRINT: case CASE_PRINT:
cbuf[0] = c; cbuf[0] = c;
cbuf[1] = '\0'; cbuf[1] = '\0';
fView->PutChar(cbuf, attr); fView->Insert(cbuf, attr);
break; break;
case CASE_PRINT_GR: case CASE_PRINT_GR:
@@ -390,7 +390,7 @@ TermParse::EscParse()
else else
CodeConv::ConvertToInternal((char*)cbuf, -1, (char*)dstbuf, B_EUC_CONVERSION); CodeConv::ConvertToInternal((char*)cbuf, -1, (char*)dstbuf, B_EUC_CONVERSION);
fView->PutChar(dstbuf, attr); fView->Insert(dstbuf, attr);
break; break;
case CASE_PRINT_CS96: case CASE_PRINT_CS96:
@@ -399,22 +399,22 @@ TermParse::EscParse()
cbuf[1] |= 0x80; cbuf[1] |= 0x80;
cbuf[2] = 0; cbuf[2] = 0;
CodeConv::ConvertToInternal((char*)cbuf, 2, (char*)dstbuf, B_EUC_CONVERSION); CodeConv::ConvertToInternal((char*)cbuf, 2, (char*)dstbuf, B_EUC_CONVERSION);
fView->PutChar(dstbuf, attr); fView->Insert(dstbuf, attr);
break; break;
case CASE_LF: case CASE_LF:
fView->PutLF(); fView->InsertLF();
break; break;
case CASE_CR: case CASE_CR:
fView->PutCR(); fView->InsertCR();
break; break;
case CASE_SJIS_KANA: case CASE_SJIS_KANA:
cbuf[0] = (uchar)c; cbuf[0] = (uchar)c;
cbuf[1] = '\0'; cbuf[1] = '\0';
CodeConv::ConvertToInternal((char*)cbuf, 1, (char*)dstbuf, now_coding); CodeConv::ConvertToInternal((char*)cbuf, 1, (char*)dstbuf, now_coding);
fView->PutChar(dstbuf, attr); fView->Insert(dstbuf, attr);
break; break;
case CASE_SJIS_INSTRING: case CASE_SJIS_INSTRING:
@@ -422,7 +422,7 @@ TermParse::EscParse()
GetReaderBuf(cbuf[1]); GetReaderBuf(cbuf[1]);
cbuf[2] = '\0'; cbuf[2] = '\0';
CodeConv::ConvertToInternal((char*)cbuf, 2, (char*)dstbuf, now_coding); CodeConv::ConvertToInternal((char*)cbuf, 2, (char*)dstbuf, now_coding);
fView->PutChar(dstbuf, attr); fView->Insert(dstbuf, attr);
break; break;
case CASE_UTF8_2BYTE: case CASE_UTF8_2BYTE:
@@ -433,7 +433,7 @@ TermParse::EscParse()
cbuf[1] = (uchar)c; cbuf[1] = (uchar)c;
cbuf[2] = '\0'; cbuf[2] = '\0';
fView->PutChar(cbuf, attr); fView->Insert(cbuf, attr);
break; break;
case CASE_UTF8_3BYTE: case CASE_UTF8_3BYTE:
@@ -448,7 +448,7 @@ TermParse::EscParse()
break; break;
cbuf[2] = c; cbuf[2] = c;
cbuf[3] = '\0'; cbuf[3] = '\0';
fView->PutChar(cbuf, attr); fView->Insert(cbuf, attr);
break; break;
case CASE_MBCS: case CASE_MBCS:
@@ -622,7 +622,7 @@ TermParse::EscParse()
/* IL */ /* IL */
if ((row = param[0]) < 1) if ((row = param[0]) < 1)
row = 1; row = 1;
fView->PutNL(row); fView->InsertNewLine(row);
parsestate = groundtable; parsestate = groundtable;
break; break;
+6 -15
View File
@@ -565,7 +565,7 @@ TermView::Clear()
//! Print one character //! Print one character
void void
TermView::PutChar(uchar *string, ushort attr) TermView::Insert(uchar *string, ushort attr)
{ {
int width = CodeConv::UTF8GetFontWidth((char*)string); int width = CodeConv::UTF8GetFontWidth((char*)string);
if (width == FULL_WIDTH) if (width == FULL_WIDTH)
@@ -597,7 +597,7 @@ TermView::PutChar(uchar *string, ushort attr)
//! Print a CR and move the cursor //! Print a CR and move the cursor
void void
TermView::PutCR() TermView::InsertCR()
{ {
UpdateLine(); UpdateLine();
fTextBuffer->WriteCR(fCurPos); fTextBuffer->WriteCR(fCurPos);
@@ -607,7 +607,7 @@ TermView::PutCR()
//! Print a LF and move the cursor //! Print a LF and move the cursor
void void
TermView::PutLF() TermView::InsertLF()
{ {
UpdateLine(); UpdateLine();
@@ -629,7 +629,7 @@ TermView::PutLF()
//! Print a NL and move the cursor //! Print a NL and move the cursor
void void
TermView::PutNL(int num) TermView::InsertNewLine(int num)
{ {
ScrollRegion(fCurPos.y, -1, SCRDOWN, num); ScrollRegion(fCurPos.y, -1, SCRDOWN, num);
} }
@@ -858,8 +858,8 @@ TermView::MoveCurRight(int num)
if (fCurPos.x + num >= fTermColumns) { if (fCurPos.x + num >= fTermColumns) {
// Wrap around // Wrap around
fCurPos.x = 0; fCurPos.x = 0;
PutCR(); InsertCR();
PutLF(); InsertLF();
} else } else
fCurPos.x += num; fCurPos.x += num;
} }
@@ -2184,15 +2184,6 @@ TermView::GetFrameSize(float *width, float *height)
} }
// Sets terninal rows and cols.
void
TermView::GetFontInfo(int *width, int *height)
{
*width = fFontWidth;
*height = fFontHeight;
}
// Find a string, and select it if found // Find a string, and select it if found
bool bool
TermView::Find(const BString &str, bool forwardSearch, bool matchCase, bool matchWord) TermView::Find(const BString &str, bool forwardSearch, bool matchCase, bool matchWord)
+9 -14
View File
@@ -65,10 +65,10 @@ public:
void Clear(); void Clear();
// Output Charactor // Output Charactor
void PutChar(uchar *string, ushort attr); void Insert(uchar *string, ushort attr);
void PutCR(void); void InsertCR();
void PutLF(void); void InsertLF();
void PutNL(int num); void InsertNewLine(int num);
void SetInsertMode(int flag); void SetInsertMode(int flag);
void InsertSpace(int num); void InsertSpace(int num);
@@ -111,7 +111,6 @@ public:
void ScrollScreen(); void ScrollScreen();
void ScrollScreenDraw(); void ScrollScreenDraw();
void GetFrameSize(float *width, float *height); void GetFrameSize(float *width, float *height);
void GetFontInfo(int *, int*);
bool Find(const BString &str, bool forwardSearch, bool matchCase, bool matchWord); bool Find(const BString &str, bool forwardSearch, bool matchCase, bool matchWord);
void GetSelection(BString &str); void GetSelection(BString &str);
@@ -141,7 +140,6 @@ protected:
private: private:
status_t _InitObject(int32 argc, const char **argv); status_t _InitObject(int32 argc, const char **argv);
status_t _InitMouseThread();
status_t _AttachShell(Shell *shell); status_t _AttachShell(Shell *shell);
void _DetachShell(); void _DetachShell();
@@ -166,10 +164,8 @@ private:
// void _DoIMChange (BMessage* message); // void _DoIMChange (BMessage* message);
// void _DoIMLocation (BMessage* message); // void _DoIMLocation (BMessage* message);
// void _DoIMConfirm (void); // void _DoIMConfirm (void);
void _ConfirmString(const char *, int32); // void _ConfirmString(const char *, int32);
int32 _GetCharFromUTF8String(const char *, char *);
int32 _GetWidthFromUTF8String(const char *);
// Mouse select // Mouse select
void _Select(CurPos start, CurPos end); void _Select(CurPos start, CurPos end);
void _AddSelectRegion(CurPos); void _AddSelectRegion(CurPos);
@@ -192,6 +188,7 @@ private:
static void _FixFontAttributes(BFont &font); static void _FixFontAttributes(BFont &font);
private:
Shell *fShell; Shell *fShell;
BMessageRunner *fWinchRunner; BMessageRunner *fWinchRunner;
@@ -205,10 +202,10 @@ private:
// Flags // Flags
// Update flag (Set on PutChar). // Update flag (Set on Insert).
bool fUpdateFlag; bool fUpdateFlag;
// Terminal insertmode flag (use PutChar). // Terminal insertmode flag (use Insert).
bool fInsertModeFlag; bool fInsertModeFlag;
// Scroll count, range. // Scroll count, range.
@@ -242,12 +239,10 @@ private:
int fTop; int fTop;
// Object pointer. // Object pointer.
TermBuffer *fTextBuffer; TermBuffer *fTextBuffer;
BScrollBar *fScrollBar; BScrollBar *fScrollBar;
// Color and Attribute. // Color and Attribute.
rgb_color fTextForeColor, fTextBackColor; rgb_color fTextForeColor, fTextBackColor;
rgb_color fCursorForeColor, fCursorBackColor; rgb_color fCursorForeColor, fCursorBackColor;
rgb_color fSelectForeColor, fSelectBackColor; rgb_color fSelectForeColor, fSelectBackColor;