Removed unused BWindow friend classes, renamed some BView member
variables to fit our guidelines. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24912 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -632,12 +632,12 @@ private:
|
|||||||
int16 fShowLevel;
|
int16 fShowLevel;
|
||||||
bool fTopLevelView;
|
bool fTopLevelView;
|
||||||
bool fNoISInteraction;
|
bool fNoISInteraction;
|
||||||
BPicture* cpicture;
|
BPicture* fCurrentPicture;
|
||||||
_array_data_* comm;
|
_array_data_* fCommArray;
|
||||||
|
|
||||||
BScrollBar* fVerScroller;
|
BScrollBar* fVerScroller;
|
||||||
BScrollBar* fHorScroller;
|
BScrollBar* fHorScroller;
|
||||||
bool f_is_printing;
|
bool fIsPrinting;
|
||||||
bool fAttached;
|
bool fAttached;
|
||||||
bool _unused_bool1;
|
bool _unused_bool1;
|
||||||
bool _unused_bool2;
|
bool _unused_bool2;
|
||||||
|
|||||||
@@ -259,14 +259,12 @@ private:
|
|||||||
|
|
||||||
friend class BApplication;
|
friend class BApplication;
|
||||||
friend class BBitmap;
|
friend class BBitmap;
|
||||||
friend class BScrollBar;
|
|
||||||
friend class BView;
|
friend class BView;
|
||||||
friend class BMenuItem;
|
friend class BMenuItem;
|
||||||
friend class BWindowScreen;
|
friend class BWindowScreen;
|
||||||
friend class BDirectWindow;
|
friend class BDirectWindow;
|
||||||
friend class BFilePanel;
|
friend class BFilePanel;
|
||||||
friend class BHandler;
|
|
||||||
friend class _BEventMask;
|
|
||||||
friend void _set_menu_sem_(BWindow* w, sem_id sem);
|
friend void _set_menu_sem_(BWindow* w, sem_id sem);
|
||||||
friend status_t _safe_get_server_token_(const BLooper*, int32*);
|
friend status_t _safe_get_server_token_(const BLooper*, int32*);
|
||||||
|
|
||||||
|
|||||||
@@ -663,13 +663,13 @@ BPrintJob::_RecurseView(BView *view, BPoint origin, BPicture *picture,
|
|||||||
region.Set(BRect(rect.left, rect.top, rect.right, rect.bottom));
|
region.Set(BRect(rect.left, rect.top, rect.right, rect.bottom));
|
||||||
|
|
||||||
view->AppendToPicture(picture);
|
view->AppendToPicture(picture);
|
||||||
view->f_is_printing = true;
|
view->fIsPrinting = true;
|
||||||
view->PushState();
|
view->PushState();
|
||||||
view->SetOrigin(origin);
|
view->SetOrigin(origin);
|
||||||
view->ConstrainClippingRegion(®ion);
|
view->ConstrainClippingRegion(®ion);
|
||||||
view->Draw(rect);
|
view->Draw(rect);
|
||||||
view->PopState();
|
view->PopState();
|
||||||
view->f_is_printing = false;
|
view->fIsPrinting = false;
|
||||||
view->EndPicture();
|
view->EndPicture();
|
||||||
|
|
||||||
BView *child = view->ChildAt(0);
|
BView *child = view->ChildAt(0);
|
||||||
@@ -684,13 +684,13 @@ BPrintJob::_RecurseView(BView *view, BPoint origin, BPicture *picture,
|
|||||||
|
|
||||||
if (view->Flags() & B_DRAW_ON_CHILDREN) {
|
if (view->Flags() & B_DRAW_ON_CHILDREN) {
|
||||||
view->AppendToPicture(picture);
|
view->AppendToPicture(picture);
|
||||||
view->f_is_printing = true;
|
view->fIsPrinting = true;
|
||||||
view->PushState();
|
view->PushState();
|
||||||
view->SetOrigin(origin);
|
view->SetOrigin(origin);
|
||||||
view->ConstrainClippingRegion(®ion);
|
view->ConstrainClippingRegion(®ion);
|
||||||
view->DrawAfterChildren(rect);
|
view->DrawAfterChildren(rect);
|
||||||
view->PopState();
|
view->PopState();
|
||||||
view->f_is_printing = false;
|
view->fIsPrinting = false;
|
||||||
view->EndPicture();
|
view->EndPicture();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+39
-36
@@ -966,7 +966,7 @@ BView::IsHidden() const
|
|||||||
bool
|
bool
|
||||||
BView::IsPrinting() const
|
BView::IsPrinting() const
|
||||||
{
|
{
|
||||||
return f_is_printing;
|
return fIsPrinting;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3017,20 +3017,20 @@ BView::BeginLineArray(int32 count)
|
|||||||
|
|
||||||
_CheckLock();
|
_CheckLock();
|
||||||
|
|
||||||
if (comm) {
|
if (fCommArray) {
|
||||||
debugger("Can't nest BeginLineArray calls");
|
debugger("Can't nest BeginLineArray calls");
|
||||||
// not fatal, but it helps during
|
// not fatal, but it helps during
|
||||||
// development of your app and is in
|
// development of your app and is in
|
||||||
// line with R5...
|
// line with R5...
|
||||||
delete [] comm->array;
|
delete [] fCommArray->array;
|
||||||
delete comm;
|
delete fCommArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
comm = new _array_data_;
|
fCommArray = new _array_data_;
|
||||||
|
|
||||||
comm->maxCount = count;
|
fCommArray->maxCount = count;
|
||||||
comm->count = 0;
|
fCommArray->count = 0;
|
||||||
comm->array = new _array_hdr_[count];
|
fCommArray->array = new _array_hdr_[count];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3040,19 +3040,20 @@ BView::AddLine(BPoint pt0, BPoint pt1, rgb_color col)
|
|||||||
if (fOwner == NULL)
|
if (fOwner == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!comm)
|
if (!fCommArray)
|
||||||
debugger("BeginLineArray must be called before using AddLine");
|
debugger("BeginLineArray must be called before using AddLine");
|
||||||
|
|
||||||
_CheckLock();
|
_CheckLock();
|
||||||
|
|
||||||
if (comm->count < comm->maxCount) {
|
const uint32 &arrayCount = fCommArray->count;
|
||||||
comm->array[comm->count].startX = pt0.x;
|
if (arrayCount < fCommArray->maxCount) {
|
||||||
comm->array[comm->count].startY = pt0.y;
|
fCommArray->array[arrayCount].startX = pt0.x;
|
||||||
comm->array[comm->count].endX = pt1.x;
|
fCommArray->array[arrayCount].startY = pt0.y;
|
||||||
comm->array[comm->count].endY = pt1.y;
|
fCommArray->array[arrayCount].endX = pt1.x;
|
||||||
comm->array[comm->count].color = col;
|
fCommArray->array[arrayCount].endY = pt1.y;
|
||||||
|
fCommArray->array[arrayCount].color = col;
|
||||||
|
|
||||||
comm->count++;
|
fCommArray->count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3063,14 +3064,15 @@ BView::EndLineArray()
|
|||||||
if (fOwner == NULL)
|
if (fOwner == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!comm)
|
if (!fCommArray)
|
||||||
debugger("Can't call EndLineArray before BeginLineArray");
|
debugger("Can't call EndLineArray before BeginLineArray");
|
||||||
|
|
||||||
_CheckLockAndSwitchCurrent();
|
_CheckLockAndSwitchCurrent();
|
||||||
|
|
||||||
fOwner->fLink->StartMessage(AS_STROKE_LINEARRAY);
|
fOwner->fLink->StartMessage(AS_STROKE_LINEARRAY);
|
||||||
fOwner->fLink->Attach<int32>(comm->count);
|
fOwner->fLink->Attach<int32>(fCommArray->count);
|
||||||
fOwner->fLink->Attach(comm->array, comm->count * sizeof(_array_hdr_));
|
fOwner->fLink->Attach(fCommArray->array,
|
||||||
|
fCommArray->count * sizeof(_array_hdr_));
|
||||||
|
|
||||||
_FlushIfNotInTransaction();
|
_FlushIfNotInTransaction();
|
||||||
|
|
||||||
@@ -3094,9 +3096,10 @@ BView::SetDiskMode(char* filename, long offset)
|
|||||||
void
|
void
|
||||||
BView::BeginPicture(BPicture *picture)
|
BView::BeginPicture(BPicture *picture)
|
||||||
{
|
{
|
||||||
if (_CheckOwnerLockAndSwitchCurrent() && picture && picture->fUsurped == NULL) {
|
if (_CheckOwnerLockAndSwitchCurrent()
|
||||||
picture->Usurp(cpicture);
|
&& picture && picture->fUsurped == NULL) {
|
||||||
cpicture = picture;
|
picture->Usurp(fCurrentPicture);
|
||||||
|
fCurrentPicture = picture;
|
||||||
|
|
||||||
fOwner->fLink->StartMessage(AS_VIEW_BEGIN_PICTURE);
|
fOwner->fLink->StartMessage(AS_VIEW_BEGIN_PICTURE);
|
||||||
}
|
}
|
||||||
@@ -3115,8 +3118,8 @@ BView::AppendToPicture(BPicture *picture)
|
|||||||
BeginPicture(picture);
|
BeginPicture(picture);
|
||||||
} else {
|
} else {
|
||||||
picture->SetToken(-1);
|
picture->SetToken(-1);
|
||||||
picture->Usurp(cpicture);
|
picture->Usurp(fCurrentPicture);
|
||||||
cpicture = picture;
|
fCurrentPicture = picture;
|
||||||
fOwner->fLink->StartMessage(AS_VIEW_APPEND_TO_PICTURE);
|
fOwner->fLink->StartMessage(AS_VIEW_APPEND_TO_PICTURE);
|
||||||
fOwner->fLink->Attach<int32>(token);
|
fOwner->fLink->Attach<int32>(token);
|
||||||
}
|
}
|
||||||
@@ -3127,7 +3130,7 @@ BView::AppendToPicture(BPicture *picture)
|
|||||||
BPicture *
|
BPicture *
|
||||||
BView::EndPicture()
|
BView::EndPicture()
|
||||||
{
|
{
|
||||||
if (_CheckOwnerLockAndSwitchCurrent() && cpicture) {
|
if (_CheckOwnerLockAndSwitchCurrent() && fCurrentPicture) {
|
||||||
int32 token;
|
int32 token;
|
||||||
|
|
||||||
fOwner->fLink->StartMessage(AS_VIEW_END_PICTURE);
|
fOwner->fLink->StartMessage(AS_VIEW_END_PICTURE);
|
||||||
@@ -3136,8 +3139,8 @@ BView::EndPicture()
|
|||||||
if (fOwner->fLink->FlushWithReply(code) == B_OK
|
if (fOwner->fLink->FlushWithReply(code) == B_OK
|
||||||
&& code == B_OK
|
&& code == B_OK
|
||||||
&& fOwner->fLink->Read<int32>(&token) == B_OK) {
|
&& fOwner->fLink->Read<int32>(&token) == B_OK) {
|
||||||
BPicture *picture = cpicture;
|
BPicture *picture = fCurrentPicture;
|
||||||
cpicture = picture->StepDown();
|
fCurrentPicture = picture->StepDown();
|
||||||
picture->SetToken(token);
|
picture->SetToken(token);
|
||||||
|
|
||||||
return picture;
|
return picture;
|
||||||
@@ -4223,13 +4226,13 @@ BView::_InitData(BRect frame, const char *name, uint32 resizingMode, uint32 flag
|
|||||||
fShowLevel = 0;
|
fShowLevel = 0;
|
||||||
fTopLevelView = false;
|
fTopLevelView = false;
|
||||||
|
|
||||||
cpicture = NULL;
|
fCurrentPicture = NULL;
|
||||||
comm = NULL;
|
fCommArray = NULL;
|
||||||
|
|
||||||
fVerScroller = NULL;
|
fVerScroller = NULL;
|
||||||
fHorScroller = NULL;
|
fHorScroller = NULL;
|
||||||
|
|
||||||
f_is_printing = false;
|
fIsPrinting = false;
|
||||||
fAttached = false;
|
fAttached = false;
|
||||||
|
|
||||||
fState = new BPrivate::ViewState;
|
fState = new BPrivate::ViewState;
|
||||||
@@ -4248,10 +4251,10 @@ BView::_InitData(BRect frame, const char *name, uint32 resizingMode, uint32 flag
|
|||||||
void
|
void
|
||||||
BView::_RemoveCommArray()
|
BView::_RemoveCommArray()
|
||||||
{
|
{
|
||||||
if (comm) {
|
if (fCommArray) {
|
||||||
delete [] comm->array;
|
delete [] fCommArray->array;
|
||||||
delete comm;
|
delete fCommArray;
|
||||||
comm = NULL;
|
fCommArray = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4927,10 +4930,10 @@ BView::_PrintToStream()
|
|||||||
fBounds.left, fBounds.top, fBounds.right, fBounds.bottom,
|
fBounds.left, fBounds.top, fBounds.right, fBounds.bottom,
|
||||||
fShowLevel,
|
fShowLevel,
|
||||||
fTopLevelView ? "YES" : "NO",
|
fTopLevelView ? "YES" : "NO",
|
||||||
cpicture? "YES" : "NULL",
|
fCurrentPicture? "YES" : "NULL",
|
||||||
fVerScroller? "YES" : "NULL",
|
fVerScroller? "YES" : "NULL",
|
||||||
fHorScroller? "YES" : "NULL",
|
fHorScroller? "YES" : "NULL",
|
||||||
f_is_printing? "YES" : "NO",
|
fIsPrinting? "YES" : "NO",
|
||||||
fShelf? "YES" : "NO",
|
fShelf? "YES" : "NO",
|
||||||
fEventMask,
|
fEventMask,
|
||||||
fEventOptions);
|
fEventOptions);
|
||||||
|
|||||||
Reference in New Issue
Block a user