2 * Copyright 2010-2014 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * John Scipione, jscipione@gmail.com
7 * Clemens Zeidler, haiku@clemens-zeidler.de
15 #include "SATDecorator.h"
29 SATWindow(StackAndTile
* sat
, Window
* window
);
32 Window
* GetWindow() { return fWindow
; }
33 SATDecorator
* GetDecorator() const;
34 StackAndTile
* GetStackAndTile() { return fStackAndTile
; }
35 Desktop
* GetDesktop() { return fDesktop
; }
36 //! Can be NULL if memory allocation failed!
38 WindowArea
* GetWindowArea() { return fWindowArea
; }
40 bool HandleMessage(SATWindow
* sender
,
41 BPrivate::LinkReceiver
& link
,
42 BPrivate::LinkSender
& reply
);
44 bool PropagateToGroup(SATGroup
* group
);
46 // hook function called from SATGroup
47 bool AddedToGroup(SATGroup
* group
, WindowArea
* area
);
48 bool RemovedFromGroup(SATGroup
* group
,
50 void RemovedFromArea(WindowArea
* area
);
51 void WindowLookChanged(window_look look
);
53 bool StackWindow(SATWindow
* child
);
55 void FindSnappingCandidates();
56 bool JoinCandidates();
59 void AdjustSizeLimits(BRect targetFrame
);
60 void SetOriginalSizeLimits(int32 minWidth
,
61 int32 maxWidth
, int32 minHeight
,
63 void GetSizeLimits(int32
* minWidth
, int32
* maxWidth
,
64 int32
* minHeight
, int32
* maxHeight
) const;
65 void AddDecorator(int32
* minWidth
, int32
* maxWidth
,
66 int32
* minHeight
, int32
* maxHeight
);
67 void AddDecorator(BRect
& frame
);
69 // hook called when window has been resized form the outside
71 bool IsHResizeable() const;
72 bool IsVResizeable() const;
74 //! \return the complete window frame including the Decorator
75 BRect
CompleteWindowFrame();
77 //! \return true if window is in a group with a least another window
78 bool PositionManagedBySAT();
80 bool HighlightTab(bool active
);
81 bool HighlightBorders(Decorator::Region region
,
83 bool IsTabHighlighted();
84 bool IsBordersHighlighted();
88 bool SetSettings(const BMessage
& message
);
89 void GetSettings(BMessage
& message
);
93 void _UpdateSizeLimits();
94 void _RestoreOriginalSize(
95 bool stayBelowMouse
= true);
98 StackAndTile
* fStackAndTile
;
102 WindowArea
* fWindowArea
;
104 SATSnappingBehaviour
* fOngoingSnapping
;
105 SATStacking fSATStacking
;
106 SATTiling fSATTiling
;
108 SATSnappingBehaviourList fSATSnappingBehaviourList
;
110 int32 fOriginalMinWidth
;
111 int32 fOriginalMaxWidth
;
112 int32 fOriginalMinHeight
;
113 int32 fOriginalMaxHeight
;
115 float fOriginalWidth
;
116 float fOriginalHeight
;
120 float fOldTabLocatiom
;