minor fixes to make my version match with the one in CVS

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6049 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2004-01-13 00:20:52 +00:00
parent 07e5e0d1a2
commit b19660cbd8
+23 -27
View File
@@ -390,7 +390,7 @@ BRect BView::Bounds() const{
if (fState->flags & B_VIEW_COORD_BIT)
if (owner){
check_lock();
owner->session->WriteInt32( AS_LAYER_GET_COORD );
owner->session->Sync();
@@ -705,15 +705,12 @@ BRect BView::Frame() const {
//---------------------------------------------------------------------------
void
BView::Hide()
{
if (owner && fShowLevel == 0) {
void BView::Hide(){
// TODO: You may hide it by relocating with -17000 coord units to the left???
if ( owner && fShowLevel == 0){
check_lock();
owner->fServerLink->SetOpCode(AS_LAYER_HIDE);
// TODO: this probably needs the view's handler ID attached
owner->Flush();
owner->session->WriteInt32( AS_LAYER_HIDE );
}
fShowLevel++;
@@ -728,9 +725,7 @@ void BView::Show(){
if (owner && fShowLevel == 0){
check_lock();
owner->fServerLink->SetOpCode(AS_LAYER_SHOW);
// TODO: this probably needs the view's handler ID attached
owner->Flush();
owner->session->WriteInt32( AS_LAYER_SHOW );
}
}
@@ -771,6 +766,7 @@ BView::IsHidden(const BView *lookingFrom) const
return false;
}
//---------------------------------------------------------------------------
bool
BView::IsHidden() const
@@ -869,7 +865,7 @@ void BView::SetViewCursor(const BCursor *cursor, bool sync) {
debugger("View method requires owner and doesn't have one");
check_lock();
if (sync){
owner->session->WriteInt32( AS_LAYER_CURSOR );
owner->session->WriteInt32( cursor->m_serverToken );
@@ -1076,13 +1072,13 @@ void BView::DragMessage(BMessage* aMessage, BRect dragRect,
int32 bufSize = aMessage->FlattenedSize();
char *buffer = new char[ bufSize ];
aMessage->Flatten( buffer, bufSize );
owner->fServerLink->SetOpCode( AS_LAYER_DRAG_RECT );
owner->fServerLink->Attach<BRect>( dragRect );
owner->fServerLink->Attach<BPoint>( offset );
owner->fServerLink->Attach<int32>( bufSize );
owner->fServerLink->Attach( buffer, bufSize );
owner->fServerLink->Flush();
owner->session->WriteInt32( AS_LAYER_DRAG_RECT );
owner->session->WriteRect( dragRect );
owner->session->WritePoint( offset );
owner->session->WriteInt32( bufSize );
owner->session->WriteData( buffer, bufSize );
owner->session->Sync();
delete buffer;
}
@@ -1137,12 +1133,12 @@ void BView::DragMessage(BMessage* aMessage, BBitmap* anImage,
char *buffer = new char[ bufSize ];
aMessage->Flatten( buffer, bufSize );
owner->fServerLink->SetOpCode( AS_LAYER_DRAG_IMAGE );
owner->fServerLink->Attach<int32>( anImage->get_server_token() );
owner->fServerLink->Attach<int32>( (int32)dragMode );
owner->fServerLink->Attach<BPoint>( offset );
owner->fServerLink->Attach<int32>( bufSize );
owner->fServerLink->Attach( buffer, bufSize );
owner->session->WriteInt32( AS_LAYER_DRAG_IMAGE );
owner->session->WriteInt32( anImage->get_server_token() );
owner->session->WriteInt32( (int32)dragMode );
owner->session->WritePoint( offset );
owner->session->WriteInt32( bufSize );
owner->session->WriteData( buffer, bufSize );
delete buffer;
/* TODO: in app_server the bitmap refCount must be incremented
@@ -3849,7 +3845,7 @@ void BView::initCachedState(){
fState->viewColor.green = 255;
fState->viewColor.alpha = 255;
fState->patt=B_SOLID_HIGH;
fState->patt = B_SOLID_HIGH;
fState->drawingMode = B_OP_COPY;