Fix line array bugs, missing breaks, gcc3 incompatibilities, and a few typos

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5301 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
haydentech 2003-11-10 19:47:16 +00:00
parent 64b98d2378
commit 84e57fc918
2 changed files with 46 additions and 47 deletions

View File

@ -191,12 +191,7 @@ BView::BView(BMessage *archive)
SetEventMask( evMask, options ); SetEventMask( evMask, options );
} }
/*
NOTE: this flag is not used any more
uint32 dBuf;
if ( archive->FindInt32("_dbuf", (int32*)&dBuf) == B_OK ){
}
*/
BPoint origin; BPoint origin;
if ( archive->FindPoint("_origin", &origin) == B_OK) if ( archive->FindPoint("_origin", &origin) == B_OK)
SetOrigin( origin ); SetOrigin( origin );
@ -342,6 +337,8 @@ NOTE: we do not use this flag any more
data->AddMessage( "_views", &childArchive ); data->AddMessage( "_views", &childArchive );
} }
} }
return retval;
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -679,7 +676,7 @@ void BView::SetFlags( uint32 flags ){
} }
} }
/* Some usefull info: /* Some useful info:
fFlags is a unsigned long (32 bits) fFlags is a unsigned long (32 bits)
* bits 1-16 are used for BView's flags * bits 1-16 are used for BView's flags
* bits 17-32 are used for BView' resize mask * bits 17-32 are used for BView' resize mask
@ -1804,7 +1801,7 @@ void BView:GetFont(BFont* font){
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void BView::GetFontHeight(font_height* height) const{ void BView::GetFontHeight(font_height* height) const{
return fState->font.GetHeight( height ); fState->font.GetHeight( height );
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -2689,9 +2686,9 @@ void BView::AddLine(BPoint pt0, BPoint pt1, rgb_color col){
if (comm->count < comm->maxCount){ if (comm->count < comm->maxCount){
comm->array[ comm->count ].startX = pt0.x; comm->array[ comm->count ].startX = pt0.x;
comm->array[ comm->count ].startX = pt0.y; comm->array[ comm->count ].startY = pt0.y;
comm->array[ comm->count ].endX = pt1.x; comm->array[ comm->count ].endX = pt1.x;
comm->array[ comm->count ].endX = pt1.y; comm->array[ comm->count ].endY = pt1.y;
_set_ptr_rgb_color( &(comm->array[ comm->count ].color), _set_ptr_rgb_color( &(comm->array[ comm->count ].color),
col.red, col.green, col.blue, col.alpha ); col.red, col.green, col.blue, col.alpha );
@ -2716,6 +2713,7 @@ void BView::EndLineArray(){
delete comm->array; delete comm->array;
delete comm; delete comm;
comm = NULL;
} }
} }
@ -2950,7 +2948,7 @@ void BView::Invalidate(BRect invalRect){
owner->session->WriteInt32( AS_LAYER_INVAL_RECT ); owner->session->WriteInt32( AS_LAYER_INVAL_RECT );
owner->session->WriteRect( invalRect ); owner->session->WriteRect( invalRect );
// ... becasue we want to see the results ASAP // ... because we want to see the results ASAP
owner->session->Sync(); owner->session->Sync();
} }
} }

View File

@ -2227,14 +2227,15 @@ void BWindow::decomposeType(window_type type,
case B_BORDERED_WINDOW: case B_BORDERED_WINDOW:
*look = B_BORDERED_WINDOW_LOOK; *look = B_BORDERED_WINDOW_LOOK;
*feel = B_NORMAL_WINDOW_FEEL; *feel = B_NORMAL_WINDOW_FEEL;
break;
case B_UNTYPED_WINDOW: case B_UNTYPED_WINDOW:
*look = B_TITLED_WINDOW_LOOK; *look = B_TITLED_WINDOW_LOOK;
*feel = B_NORMAL_WINDOW_FEEL; *feel = B_NORMAL_WINDOW_FEEL;
break;
default: default:
*look = B_TITLED_WINDOW_LOOK; *look = B_TITLED_WINDOW_LOOK;
*feel = B_NORMAL_WINDOW_FEEL; *feel = B_NORMAL_WINDOW_FEEL;
break;
} }
} }
@ -3202,21 +3203,21 @@ void BWindow::_ReservedWindow7() { }
void BWindow::_ReservedWindow8() { } void BWindow::_ReservedWindow8() { }
void BWindow::PrintToStream() const{ void BWindow::PrintToStream() const{
printf("BWindow '%s' data: printf("BWindow '%s' data:\
Title = %s Title = %s\
Token = %ld Token = %ld\
InTransaction = %s InTransaction = %s\
Active = %s Active = %s\
fShowLevel = %d fShowLevel = %d\
Flags = %lx Flags = %lx\
send_port = %ld send_port = %ld\
receive_port = %ld receive_port = %ld\
top_view name = %s top_view name = %s\
focus view name = %s focus view name = %s\
lastMouseMoved = %s lastMouseMoved = %s\
session = %s session = %s\
KeyMenuBar name = %s KeyMenuBar name = %s\
DefaultButton = %s DefaultButton = %s\
# of shortcuts = %ld", # of shortcuts = %ld",
Name(), Name(),
fTitle!=NULL? fTitle:"NULL", fTitle!=NULL? fTitle:"NULL",
@ -3241,25 +3242,25 @@ void BWindow::PrintToStream() const{
key->message->PrintToStream(); key->message->PrintToStream();
} }
*/ */
printf(" printf("\
topViewToken = %ld topViewToken = %ld\
pluseEnabled = %s pluseEnabled = %s\
isFilePanel = %s isFilePanel = %s\
MaskActivated = %s MaskActivated = %s\
pulseRate = %lld pulseRate = %lld\
waitingForMenu = %s waitingForMenu = %s\
minimized = %s minimized = %s\
Menu semaphore = %ld Menu semaphore = %ld\
maxZoomHeight = %f maxZoomHeight = %f\
maxZoomWidth = %f maxZoomWidth = %f\
minWindHeight = %f minWindHeight = %f\
minWindWidth = %f minWindWidth = %f\
maxWindHeight = %f maxWindHeight = %f\
maxWindWidth = %f maxWindWidth = %f\
frame = ( %f, %f, %f, %f ) frame = ( %f, %f, %f, %f )\
look = %d look = %d\
feel = %d feel = %d\
lastViewToken = %ld lastViewToken = %ld\
pulseRUNNER = %s\n", pulseRUNNER = %s\n",
fTopViewToken, fTopViewToken,
fPulseEnabled==true?"Yes":"No", fPulseEnabled==true?"Yes":"No",