app_server, sometimes needs to hide some windows without affecting a window's original hidden state. For that I introduced 2 new methods in WinBorder and made Layer::IsHidden() virtual.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8375 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
038d30aae7
commit
b0a5df7a0f
@ -1174,7 +1174,7 @@ void Layer::PrintToStream(void)
|
|||||||
|
|
||||||
printf("Frame: (%f, %f, %f, %f)", fFrame.left, fFrame.top, fFrame.right, fFrame.bottom);
|
printf("Frame: (%f, %f, %f, %f)", fFrame.left, fFrame.top, fFrame.right, fFrame.bottom);
|
||||||
printf("Token: %ld\n",fViewToken);
|
printf("Token: %ld\n",fViewToken);
|
||||||
printf("Hidden - direct: %s\n", fHidden?"true":"false");
|
printf("Hidden - direct: %s\n", IsHidden()?"true":"false");
|
||||||
printf("Hidden - indirect: %s\n", IsHidden()?"true":"false");
|
printf("Hidden - indirect: %s\n", IsHidden()?"true":"false");
|
||||||
printf("ResizingMode: %lx\n", fResizeMode);
|
printf("ResizingMode: %lx\n", fResizeMode);
|
||||||
printf("Flags: %lx\n", fFlags);
|
printf("Flags: %lx\n", fFlags);
|
||||||
|
@ -80,7 +80,7 @@ public:
|
|||||||
|
|
||||||
virtual void Show(bool invalidate=true);
|
virtual void Show(bool invalidate=true);
|
||||||
virtual void Hide(bool invalidate=true);
|
virtual void Hide(bool invalidate=true);
|
||||||
bool IsHidden(void) const;
|
virtual bool IsHidden(void) const;
|
||||||
|
|
||||||
BRect Bounds(void) const;
|
BRect Bounds(void) const;
|
||||||
BRect Frame(void) const;
|
BRect Frame(void) const;
|
||||||
|
@ -90,6 +90,7 @@ WinBorder::WinBorder(const BRect &r, const char *name, const int32 look, const i
|
|||||||
|
|
||||||
fMouseButtons = 0;
|
fMouseButtons = 0;
|
||||||
fKeyModifiers = 0;
|
fKeyModifiers = 0;
|
||||||
|
fServerHidden = false;
|
||||||
fMainWinBorder = NULL;
|
fMainWinBorder = NULL;
|
||||||
fDecorator = NULL;
|
fDecorator = NULL;
|
||||||
fTopLayer = NULL;
|
fTopLayer = NULL;
|
||||||
@ -410,6 +411,21 @@ void WinBorder::ResizeBy(float x, float y)
|
|||||||
Layer::ResizeBy(x,y);
|
Layer::ResizeBy(x,y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool WinBorder::IsHidden() const{
|
||||||
|
if (fServerHidden)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return Layer::IsHidden();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinBorder::ServerHide(){
|
||||||
|
fServerHidden = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void WinBorder::ServerUnhide(){
|
||||||
|
fServerHidden = false;
|
||||||
|
}
|
||||||
|
|
||||||
bool WinBorder::HasPoint(const BPoint& pt) const
|
bool WinBorder::HasPoint(const BPoint& pt) const
|
||||||
{
|
{
|
||||||
return fFullVisible.Contains(pt);
|
return fFullVisible.Contains(pt);
|
||||||
@ -479,7 +495,7 @@ void WinBorder::AddToSubsetOf(WinBorder* main)
|
|||||||
{
|
{
|
||||||
// if the main window is hidden also hide this one.
|
// if the main window is hidden also hide this one.
|
||||||
if(main->IsHidden())
|
if(main->IsHidden())
|
||||||
fHidden = true;
|
Hide();//fHidden = true;
|
||||||
|
|
||||||
// add to main window's subset
|
// add to main window's subset
|
||||||
main->Window()->fWinFMWList.AddItem(this);
|
main->Window()->fWinFMWList.AddItem(this);
|
||||||
@ -587,7 +603,7 @@ void WinBorder::PrintToStream()
|
|||||||
if (fLevel == B_NORMAL_FEEL)
|
if (fLevel == B_NORMAL_FEEL)
|
||||||
printf("\t%s", "B_NORMAL_WINDOW_FEEL");
|
printf("\t%s", "B_NORMAL_WINDOW_FEEL");
|
||||||
|
|
||||||
printf("\t%s\n", fHidden?"hidden" : "not hidden");
|
printf("\t%s\n", IsHidden()"hidden" : "not hidden");
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinBorder::UpdateColors(void)
|
void WinBorder::UpdateColors(void)
|
||||||
|
@ -52,6 +52,10 @@ public:
|
|||||||
|
|
||||||
virtual void RebuildFullRegion(void);
|
virtual void RebuildFullRegion(void);
|
||||||
|
|
||||||
|
virtual bool IsHidden() const;
|
||||||
|
void ServerHide();
|
||||||
|
void ServerUnhide();
|
||||||
|
|
||||||
void MouseDown(PortMessage *msg, bool sendMessage);
|
void MouseDown(PortMessage *msg, bool sendMessage);
|
||||||
void MouseMoved(PortMessage *msg);
|
void MouseMoved(PortMessage *msg);
|
||||||
void MouseUp(PortMessage *msg);
|
void MouseUp(PortMessage *msg);
|
||||||
@ -89,6 +93,7 @@ protected:
|
|||||||
int32 fKeyModifiers;
|
int32 fKeyModifiers;
|
||||||
BPoint fLastMousePosition;
|
BPoint fLastMousePosition;
|
||||||
|
|
||||||
|
bool fServerHidden;
|
||||||
WinBorder *fMainWinBorder;
|
WinBorder *fMainWinBorder;
|
||||||
bool fIsMoving;
|
bool fIsMoving;
|
||||||
bool fIsResizing;
|
bool fIsResizing;
|
||||||
|
Loading…
Reference in New Issue
Block a user