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