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:
@@ -32,7 +32,7 @@
|
||||
|
||||
|
||||
static bool sUsageRequested = false;
|
||||
static bool sGeometryRequested = false;
|
||||
//static bool sGeometryRequested = false;
|
||||
|
||||
|
||||
const ulong MSG_ACTIVATE_TERM = 'msat';
|
||||
|
||||
@@ -349,7 +349,7 @@ TermParse::EscParse()
|
||||
case CASE_PRINT:
|
||||
cbuf[0] = c;
|
||||
cbuf[1] = '\0';
|
||||
fView->PutChar(cbuf, attr);
|
||||
fView->Insert(cbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_PRINT_GR:
|
||||
@@ -390,7 +390,7 @@ TermParse::EscParse()
|
||||
else
|
||||
CodeConv::ConvertToInternal((char*)cbuf, -1, (char*)dstbuf, B_EUC_CONVERSION);
|
||||
|
||||
fView->PutChar(dstbuf, attr);
|
||||
fView->Insert(dstbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_PRINT_CS96:
|
||||
@@ -399,22 +399,22 @@ TermParse::EscParse()
|
||||
cbuf[1] |= 0x80;
|
||||
cbuf[2] = 0;
|
||||
CodeConv::ConvertToInternal((char*)cbuf, 2, (char*)dstbuf, B_EUC_CONVERSION);
|
||||
fView->PutChar(dstbuf, attr);
|
||||
fView->Insert(dstbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_LF:
|
||||
fView->PutLF();
|
||||
fView->InsertLF();
|
||||
break;
|
||||
|
||||
case CASE_CR:
|
||||
fView->PutCR();
|
||||
fView->InsertCR();
|
||||
break;
|
||||
|
||||
case CASE_SJIS_KANA:
|
||||
cbuf[0] = (uchar)c;
|
||||
cbuf[1] = '\0';
|
||||
CodeConv::ConvertToInternal((char*)cbuf, 1, (char*)dstbuf, now_coding);
|
||||
fView->PutChar(dstbuf, attr);
|
||||
fView->Insert(dstbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_SJIS_INSTRING:
|
||||
@@ -422,7 +422,7 @@ TermParse::EscParse()
|
||||
GetReaderBuf(cbuf[1]);
|
||||
cbuf[2] = '\0';
|
||||
CodeConv::ConvertToInternal((char*)cbuf, 2, (char*)dstbuf, now_coding);
|
||||
fView->PutChar(dstbuf, attr);
|
||||
fView->Insert(dstbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_UTF8_2BYTE:
|
||||
@@ -433,7 +433,7 @@ TermParse::EscParse()
|
||||
cbuf[1] = (uchar)c;
|
||||
cbuf[2] = '\0';
|
||||
|
||||
fView->PutChar(cbuf, attr);
|
||||
fView->Insert(cbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_UTF8_3BYTE:
|
||||
@@ -448,7 +448,7 @@ TermParse::EscParse()
|
||||
break;
|
||||
cbuf[2] = c;
|
||||
cbuf[3] = '\0';
|
||||
fView->PutChar(cbuf, attr);
|
||||
fView->Insert(cbuf, attr);
|
||||
break;
|
||||
|
||||
case CASE_MBCS:
|
||||
@@ -622,7 +622,7 @@ TermParse::EscParse()
|
||||
/* IL */
|
||||
if ((row = param[0]) < 1)
|
||||
row = 1;
|
||||
fView->PutNL(row);
|
||||
fView->InsertNewLine(row);
|
||||
parsestate = groundtable;
|
||||
break;
|
||||
|
||||
|
||||
@@ -565,7 +565,7 @@ TermView::Clear()
|
||||
|
||||
//! Print one character
|
||||
void
|
||||
TermView::PutChar(uchar *string, ushort attr)
|
||||
TermView::Insert(uchar *string, ushort attr)
|
||||
{
|
||||
int width = CodeConv::UTF8GetFontWidth((char*)string);
|
||||
if (width == FULL_WIDTH)
|
||||
@@ -597,7 +597,7 @@ TermView::PutChar(uchar *string, ushort attr)
|
||||
|
||||
//! Print a CR and move the cursor
|
||||
void
|
||||
TermView::PutCR()
|
||||
TermView::InsertCR()
|
||||
{
|
||||
UpdateLine();
|
||||
fTextBuffer->WriteCR(fCurPos);
|
||||
@@ -607,7 +607,7 @@ TermView::PutCR()
|
||||
|
||||
//! Print a LF and move the cursor
|
||||
void
|
||||
TermView::PutLF()
|
||||
TermView::InsertLF()
|
||||
{
|
||||
UpdateLine();
|
||||
|
||||
@@ -629,7 +629,7 @@ TermView::PutLF()
|
||||
|
||||
//! Print a NL and move the cursor
|
||||
void
|
||||
TermView::PutNL(int num)
|
||||
TermView::InsertNewLine(int num)
|
||||
{
|
||||
ScrollRegion(fCurPos.y, -1, SCRDOWN, num);
|
||||
}
|
||||
@@ -858,8 +858,8 @@ TermView::MoveCurRight(int num)
|
||||
if (fCurPos.x + num >= fTermColumns) {
|
||||
// Wrap around
|
||||
fCurPos.x = 0;
|
||||
PutCR();
|
||||
PutLF();
|
||||
InsertCR();
|
||||
InsertLF();
|
||||
} else
|
||||
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
|
||||
bool
|
||||
TermView::Find(const BString &str, bool forwardSearch, bool matchCase, bool matchWord)
|
||||
|
||||
@@ -65,10 +65,10 @@ public:
|
||||
void Clear();
|
||||
|
||||
// Output Charactor
|
||||
void PutChar(uchar *string, ushort attr);
|
||||
void PutCR(void);
|
||||
void PutLF(void);
|
||||
void PutNL(int num);
|
||||
void Insert(uchar *string, ushort attr);
|
||||
void InsertCR();
|
||||
void InsertLF();
|
||||
void InsertNewLine(int num);
|
||||
void SetInsertMode(int flag);
|
||||
void InsertSpace(int num);
|
||||
|
||||
@@ -111,7 +111,6 @@ public:
|
||||
void ScrollScreen();
|
||||
void ScrollScreenDraw();
|
||||
void GetFrameSize(float *width, float *height);
|
||||
void GetFontInfo(int *, int*);
|
||||
bool Find(const BString &str, bool forwardSearch, bool matchCase, bool matchWord);
|
||||
void GetSelection(BString &str);
|
||||
|
||||
@@ -141,7 +140,6 @@ protected:
|
||||
|
||||
private:
|
||||
status_t _InitObject(int32 argc, const char **argv);
|
||||
status_t _InitMouseThread();
|
||||
|
||||
status_t _AttachShell(Shell *shell);
|
||||
void _DetachShell();
|
||||
@@ -166,10 +164,8 @@ private:
|
||||
// void _DoIMChange (BMessage* message);
|
||||
// void _DoIMLocation (BMessage* message);
|
||||
// void _DoIMConfirm (void);
|
||||
void _ConfirmString(const char *, int32);
|
||||
int32 _GetCharFromUTF8String(const char *, char *);
|
||||
int32 _GetWidthFromUTF8String(const char *);
|
||||
|
||||
// void _ConfirmString(const char *, int32);
|
||||
|
||||
// Mouse select
|
||||
void _Select(CurPos start, CurPos end);
|
||||
void _AddSelectRegion(CurPos);
|
||||
@@ -192,6 +188,7 @@ private:
|
||||
|
||||
static void _FixFontAttributes(BFont &font);
|
||||
|
||||
private:
|
||||
Shell *fShell;
|
||||
|
||||
BMessageRunner *fWinchRunner;
|
||||
@@ -205,10 +202,10 @@ private:
|
||||
|
||||
// Flags
|
||||
|
||||
// Update flag (Set on PutChar).
|
||||
// Update flag (Set on Insert).
|
||||
bool fUpdateFlag;
|
||||
|
||||
// Terminal insertmode flag (use PutChar).
|
||||
// Terminal insertmode flag (use Insert).
|
||||
bool fInsertModeFlag;
|
||||
|
||||
// Scroll count, range.
|
||||
@@ -242,12 +239,10 @@ private:
|
||||
int fTop;
|
||||
|
||||
// Object pointer.
|
||||
|
||||
TermBuffer *fTextBuffer;
|
||||
BScrollBar *fScrollBar;
|
||||
|
||||
// Color and Attribute.
|
||||
|
||||
rgb_color fTextForeColor, fTextBackColor;
|
||||
rgb_color fCursorForeColor, fCursorBackColor;
|
||||
rgb_color fSelectForeColor, fSelectBackColor;
|
||||
|
||||
Reference in New Issue
Block a user