Removed more unused stuff. Cleanups.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21700 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d75fc05829
commit
f14a8c5801
src/apps/terminal
@ -128,9 +128,8 @@ TermView::TermView(BRect frame, const char *command)
|
||||
fCursorBlinkingFlag(CURON),
|
||||
fCursorRedrawFlag(CURON),
|
||||
fCursorHeight(0),
|
||||
fInverseFlag(0),
|
||||
fBoldFlag(0),
|
||||
fUnderlineFlag(0),
|
||||
fCurPos(0, 0),
|
||||
fCurStack(0, 0),
|
||||
fBufferStartPos(-1),
|
||||
fTermRows(PrefHandler::Default()->getInt32(PREF_ROWS)),
|
||||
fTermColumns(PrefHandler::Default()->getInt32(PREF_COLS)),
|
||||
@ -141,20 +140,23 @@ TermView::TermView(BRect frame, const char *command)
|
||||
fScrBot(fTermRows - 1),
|
||||
fScrBufSize(PrefHandler::Default()->getInt32(PREF_HISTORY_SIZE)),
|
||||
fScrRegionSet(0),
|
||||
fMouseImage(false),
|
||||
fPreviousMousePoint(0, 0),
|
||||
fSelStart(-1, -1),
|
||||
fSelEnd(-1, -1),
|
||||
fMouseTracking(false),
|
||||
fMouseThread(-1),
|
||||
fQuitting(false),
|
||||
fIMflag(false)
|
||||
fIMflag(false)
|
||||
{
|
||||
_InitObject(command);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TermView::_InitObject(const char *command)
|
||||
{
|
||||
// Reset cursor
|
||||
fCurPos.Set(0, 0);
|
||||
fCurStack.Set(0, 0);
|
||||
fPreviousMousePoint.Set(0, 0);
|
||||
fSelStart.Set(-1, -1);
|
||||
fSelEnd.Set(-1, -1);
|
||||
|
||||
SetMouseCursor();
|
||||
|
||||
SetTermFont(be_fixed_font, be_fixed_font);
|
||||
SetTermColor();
|
||||
|
||||
@ -468,11 +470,9 @@ TermView::TermDrawSelectedRegion(CurPos start, CurPos end)
|
||||
}
|
||||
|
||||
if (start.y == end.y) {
|
||||
Redraw(start.x, start.y,
|
||||
end.x, end.y);
|
||||
Redraw(start.x, start.y, end.x, end.y);
|
||||
} else {
|
||||
Redraw(start.x, start.y,
|
||||
fTermColumns, start.y);
|
||||
Redraw(start.x, start.y, fTermColumns, start.y);
|
||||
|
||||
if (end.y - start.y > 0)
|
||||
Redraw(0, start.y + 1, fTermColumns, end.y - 1);
|
||||
@ -501,15 +501,12 @@ TermView::TermDrawRegion(CurPos start, CurPos end)
|
||||
end.y += top;
|
||||
|
||||
if (start.y == end.y) {
|
||||
Redraw(start.x, start.y,
|
||||
end.x, end.y);
|
||||
Redraw(start.x, start.y, end.x, end.y);
|
||||
} else {
|
||||
Redraw(start.x, start.y,
|
||||
fTermColumns - 1, start.y);
|
||||
Redraw(start.x, start.y, fTermColumns - 1, start.y);
|
||||
|
||||
if (end.y - start.y > 0) {
|
||||
Redraw(0, start.y + 1,
|
||||
fTermColumns - 1, end.y - 1);
|
||||
Redraw(0, start.y + 1, fTermColumns - 1, end.y - 1);
|
||||
}
|
||||
Redraw(0, end.y, end.x, end.y);
|
||||
}
|
||||
|
@ -140,6 +140,8 @@ protected:
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
|
||||
private:
|
||||
void _InitObject(const char *command);
|
||||
|
||||
static int32 MouseTracking(void *);
|
||||
|
||||
status_t _InitMouseThread(void);
|
||||
@ -221,14 +223,8 @@ private:
|
||||
bool fCursorStatus;
|
||||
bool fCursorBlinkingFlag;
|
||||
bool fCursorRedrawFlag;
|
||||
|
||||
int fCursorHeight;
|
||||
|
||||
// terminal text attribute flag.
|
||||
bool fInverseFlag;
|
||||
bool fBoldFlag;
|
||||
bool fUnderlineFlag;
|
||||
|
||||
// Cursor position.
|
||||
CurPos fCurPos;
|
||||
CurPos fCurStack;
|
||||
@ -247,11 +243,6 @@ private:
|
||||
TermBuffer *fTextBuffer;
|
||||
BScrollBar *fScrollBar;
|
||||
|
||||
// Offscreen Bitmap and View.
|
||||
|
||||
BRect fSrcRect;
|
||||
BRect fDstRect;
|
||||
|
||||
// Color and Attribute.
|
||||
|
||||
rgb_color fTextForeColor, fTextBackColor;
|
||||
@ -285,7 +276,6 @@ private:
|
||||
BString fIMString;
|
||||
bool fIMflag;
|
||||
BMessenger fIMMessenger;
|
||||
|
||||
int32 fImCodeState;
|
||||
};
|
||||
|
||||
|
@ -58,12 +58,17 @@ TermWindow::TermWindow(BRect frame, const char* title, const char *command)
|
||||
{
|
||||
fTermView = new TermView(Bounds(), command);
|
||||
AddChild(fTermView);
|
||||
|
||||
float width, height;
|
||||
fTermView->GetPreferredSize(&width, &height);
|
||||
ResizeTo(width, height);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
TermWindow::TermWindow(BRect frame, const char* title, const char *command)
|
||||
: BWindow(frame, title, B_DOCUMENT_WINDOW, B_CURRENT_WORKSPACE|B_QUIT_ON_WINDOW_CLOSE),
|
||||
fTermView(NULL),
|
||||
fMenubar(NULL),
|
||||
fFilemenu(NULL),
|
||||
fEditmenu(NULL),
|
||||
@ -72,7 +77,6 @@ TermWindow::TermWindow(BRect frame, const char* title, const char *command)
|
||||
fFontMenu(NULL),
|
||||
fWindowSizeMenu(NULL),
|
||||
fNewFontMenu(NULL),
|
||||
fTermView(NULL),
|
||||
fPrintSettings(NULL),
|
||||
fPrefWindow(NULL),
|
||||
fFindPanel(NULL),
|
||||
@ -87,7 +91,7 @@ TermWindow::TermWindow(BRect frame, const char* title, const char *command)
|
||||
{
|
||||
_InitWindow(command);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
TermWindow::~TermWindow()
|
||||
{
|
||||
@ -145,7 +149,7 @@ TermWindow::_InitWindow(const char *command)
|
||||
fTermView->SetTermFont(&halfFont, &fullFont);
|
||||
|
||||
BRect rect = fTermView->SetTermSize(PrefHandler::Default()->getInt32(PREF_ROWS),
|
||||
PrefHandler::Default()->getInt32(PREF_COLS), 1);
|
||||
PrefHandler::Default()->getInt32(PREF_COLS), true);
|
||||
|
||||
int width, height;
|
||||
fTermView->GetFontSize(&width, &height);
|
||||
@ -677,4 +681,5 @@ TermWindow::_DoPrint()
|
||||
|
||||
job.CommitJob();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <String.h>
|
||||
#include <Window.h>
|
||||
|
||||
|
||||
class BMenu;
|
||||
class BMenuBar;
|
||||
class FindWindow;
|
||||
@ -62,6 +63,7 @@ private:
|
||||
status_t _DoPageSetup();
|
||||
void _DoPrint();
|
||||
|
||||
TermView *fTermView;
|
||||
BMenuBar *fMenubar;
|
||||
BMenu *fFilemenu,
|
||||
*fEditmenu,
|
||||
@ -70,7 +72,7 @@ private:
|
||||
*fFontMenu,
|
||||
*fWindowSizeMenu,
|
||||
*fNewFontMenu;
|
||||
TermView *fTermView;
|
||||
|
||||
BMessage *fPrintSettings;
|
||||
PrefWindow *fPrefWindow;
|
||||
FindWindow *fFindPanel;
|
||||
|
Loading…
x
Reference in New Issue
Block a user