* Removed the line view again. Sorry, but this is pretty useless, had a small
fixed size, didn't follow our coding style, etc. * I did not remove the back-end code in the StyledEditView, though (nor did I had a look at it for coding style violations :-)). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30006 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -15,7 +15,6 @@
|
|||||||
#include "StyledEditView.h"
|
#include "StyledEditView.h"
|
||||||
#include "StyledEditWindow.h"
|
#include "StyledEditWindow.h"
|
||||||
|
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
#include <CharacterSet.h>
|
#include <CharacterSet.h>
|
||||||
@@ -31,15 +30,16 @@
|
|||||||
#include <Rect.h>
|
#include <Rect.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
#include <ScrollView.h>
|
#include <ScrollView.h>
|
||||||
#include <StringView.h>
|
|
||||||
#include <TextControl.h>
|
#include <TextControl.h>
|
||||||
#include <TextView.h>
|
#include <TextView.h>
|
||||||
#include <TranslationUtils.h>
|
#include <TranslationUtils.h>
|
||||||
|
|
||||||
using namespace BPrivate;
|
using namespace BPrivate;
|
||||||
|
|
||||||
|
|
||||||
const float kLineViewWidth = 30.0;
|
const float kLineViewWidth = 30.0;
|
||||||
|
|
||||||
|
|
||||||
StyledEditWindow::StyledEditWindow(BRect frame, int32 id, uint32 encoding)
|
StyledEditWindow::StyledEditWindow(BRect frame, int32 id, uint32 encoding)
|
||||||
: BWindow(frame, "untitled", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS)
|
: BWindow(frame, "untitled", B_DOCUMENT_WINDOW, B_ASYNCHRONOUS_CONTROLS)
|
||||||
{
|
{
|
||||||
@@ -120,15 +120,6 @@ StyledEditWindow::InitWindow(uint32 encoding)
|
|||||||
AddChild(fScrollView);
|
AddChild(fScrollView);
|
||||||
fTextView->MakeFocus(true);
|
fTextView->MakeFocus(true);
|
||||||
|
|
||||||
BScrollBar* HScrollBar = fScrollView->ScrollBar(B_HORIZONTAL);
|
|
||||||
HScrollBar->MoveBy(kLineViewWidth + 1, 0);
|
|
||||||
HScrollBar->ResizeBy((-1 * kLineViewWidth) - 1, 0);
|
|
||||||
|
|
||||||
fStringView = new BStringView(BRect(0,0,kLineViewWidth,B_H_SCROLL_BAR_HEIGHT), "stringview", "1", B_FOLLOW_LEFT | B_FOLLOW_BOTTOM);
|
|
||||||
fStringView->SetAlignment(B_ALIGN_CENTER);
|
|
||||||
fScrollView->AddChild(fStringView);
|
|
||||||
fStringView->MoveTo(0.0, HScrollBar->Frame().top);
|
|
||||||
|
|
||||||
// Add "File"-menu:
|
// Add "File"-menu:
|
||||||
BMenu* menu = new BMenu("File");
|
BMenu* menu = new BMenu("File");
|
||||||
fMenuBar->AddItem(menu);
|
fMenuBar->AddItem(menu);
|
||||||
@@ -542,11 +533,6 @@ StyledEditWindow::MessageReceived(BMessage *message)
|
|||||||
fCopyItem->SetEnabled(false);
|
fCopyItem->SetEnabled(false);
|
||||||
fClearItem->SetEnabled(false);
|
fClearItem->SetEnabled(false);
|
||||||
break;
|
break;
|
||||||
case UPDATE_LINE:
|
|
||||||
char buf[20];
|
|
||||||
sprintf(buf, "%ld", fTextView->CurrentLine() + 1);
|
|
||||||
fStringView->SetText(buf);
|
|
||||||
break;
|
|
||||||
case TEXT_CHANGED:
|
case TEXT_CHANGED:
|
||||||
if (fUndoFlag) {
|
if (fUndoFlag) {
|
||||||
if (fUndoCleans) {
|
if (fUndoCleans) {
|
||||||
|
|||||||
@@ -23,7 +23,6 @@ class BMenuBar;
|
|||||||
class BMenuItem;
|
class BMenuItem;
|
||||||
class BFilePanel;
|
class BFilePanel;
|
||||||
class BScrollView;
|
class BScrollView;
|
||||||
class BStringView;
|
|
||||||
class StyledEditView;
|
class StyledEditView;
|
||||||
|
|
||||||
|
|
||||||
@@ -116,7 +115,6 @@ class StyledEditWindow : public BWindow {
|
|||||||
|
|
||||||
StyledEditView *fTextView;
|
StyledEditView *fTextView;
|
||||||
BScrollView *fScrollView;
|
BScrollView *fScrollView;
|
||||||
BStringView *fStringView;
|
|
||||||
|
|
||||||
BFilePanel *fSavePanel;
|
BFilePanel *fSavePanel;
|
||||||
BMenu *fSavePanelEncodingMenu;
|
BMenu *fSavePanelEncodingMenu;
|
||||||
|
|||||||
Reference in New Issue
Block a user