From a2336b86ccf21c07de3c73e585c2f962c6225a75 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Wed, 22 Sep 2010 22:27:31 +0000 Subject: [PATCH] Round the the window move target positions, this should fix jumping windows. Coding style. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38789 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../decorators/SATDecorator/SATGroup.cpp | 1 + .../decorators/SATDecorator/SATGroup.h | 256 +++++++++--------- .../decorators/SATDecorator/SATWindow.cpp | 13 +- .../decorators/SATDecorator/SATWindow.h | 174 ++++++------ .../decorators/SATDecorator/StackAndTile.cpp | 1 + .../decorators/SATDecorator/StackAndTile.h | 58 ++-- 6 files changed, 261 insertions(+), 242 deletions(-) diff --git a/src/add-ons/decorators/SATDecorator/SATGroup.cpp b/src/add-ons/decorators/SATDecorator/SATGroup.cpp index 915e393924..af0ab7b6a6 100644 --- a/src/add-ons/decorators/SATDecorator/SATGroup.cpp +++ b/src/add-ons/decorators/SATDecorator/SATGroup.cpp @@ -6,6 +6,7 @@ * Clemens Zeidler */ + #include "SATGroup.h" #include diff --git a/src/add-ons/decorators/SATDecorator/SATGroup.h b/src/add-ons/decorators/SATDecorator/SATGroup.h index 2701123a75..8a36046bd5 100644 --- a/src/add-ons/decorators/SATDecorator/SATGroup.h +++ b/src/add-ons/decorators/SATDecorator/SATGroup.h @@ -8,6 +8,7 @@ #ifndef SAT_GROUP_H #define SAT_GROUP_H + #include #include "ObjectList.h" @@ -50,21 +51,22 @@ public: class Crossing : public BReferenceable { public: - Crossing(Tab* vertical, Tab* horizontal); - ~Crossing(); + Crossing(Tab* vertical, Tab* horizontal); + ~Crossing(); - Corner* GetCorner(Corner::position_t corner) const; - Corner* GetOppositeCorner(Corner::position_t corner) const; + Corner* GetCorner(Corner::position_t corner) const; + Corner* GetOppositeCorner( + Corner::position_t corner) const; - Corner* LeftTopCorner() { return &fLeftTop; } - Corner* RightTopCorner() { return &fRightTop; } - Corner* LeftBottomCorner() { return &fLeftBottom; } - Corner* RightBottomCorner() { return &fRightBottom; } + Corner* LeftTopCorner() { return &fLeftTop; } + Corner* RightTopCorner() { return &fRightTop; } + Corner* LeftBottomCorner() { return &fLeftBottom; } + Corner* RightBottomCorner() { return &fRightBottom; } - Tab* VerticalTab() const; - Tab* HorizontalTab() const; + Tab* VerticalTab() const; + Tab* HorizontalTab() const; - void Trace() const; + void Trace() const; private: Corner* _GetCorner(Corner::position_t corner) const; @@ -92,34 +94,35 @@ public: kHorizontal }; - Tab(SATGroup* group, Variable* variable, - orientation_t orientation); - ~Tab(); + Tab(SATGroup* group, Variable* variable, + orientation_t orientation); + ~Tab(); - float Position() const; - void SetPosition(float position); - orientation_t Orientation() const; + float Position() const; + void SetPosition(float position); + orientation_t Orientation() const; - //! Caller takes ownership of the constraint. - Constraint* Connect(Variable* variable); + //! Caller takes ownership of the constraint. + Constraint* Connect(Variable* variable); - BReference AddCrossing(Tab* tab); - bool RemoveCrossing(Crossing* crossing); - int32 FindCrossingIndex(Tab* tab); - int32 FindCrossingIndex(float tabPosition); - Crossing* FindCrossing(Tab* tab); - Crossing* FindCrossing(float tabPosition); + BReference AddCrossing(Tab* tab); + bool RemoveCrossing(Crossing* crossing); + int32 FindCrossingIndex(Tab* tab); + int32 FindCrossingIndex(float tabPosition); + Crossing* FindCrossing(Tab* tab); + Crossing* FindCrossing(float tabPosition); - const CrossingList* GetCrossingList() const; + const CrossingList* GetCrossingList() const; - static int CompareFunction(const Tab* tab1, const Tab* tab2); + static int CompareFunction(const Tab* tab1, + const Tab* tab2); private: - SATGroup* fGroup; - Variable* fVariable; - orientation_t fOrientation; + SATGroup* fGroup; + Variable* fVariable; + orientation_t fOrientation; - CrossingList fCrossingList; + CrossingList fCrossingList; }; @@ -130,66 +133,67 @@ public: Crossing* rightBottom); ~WindowArea(); - bool SetGroup(SATGroup* group); + bool SetGroup(SATGroup* group); - const SATWindowList& WindowList() { return fWindowList; } - const SATWindowList& LayerOrder() { return fWindowLayerOrder; } - bool MoveWindowToPosition(SATWindow* window, + const SATWindowList& WindowList() { return fWindowList; } + const SATWindowList& LayerOrder() { return fWindowLayerOrder; } + bool MoveWindowToPosition(SATWindow* window, int32 index); - void UpdateSizeLimits(); + void UpdateSizeLimits(); - Crossing* LeftTopCrossing() + Crossing* LeftTopCrossing() { return fLeftTopCrossing.Get(); } - Crossing* RightTopCrossing() + Crossing* RightTopCrossing() { return fRightTopCrossing.Get(); } - Crossing* LeftBottomCrossing() + Crossing* LeftBottomCrossing() { return fLeftBottomCrossing.Get(); } - Crossing* RightBottomCrossing() + Crossing* RightBottomCrossing() { return fRightBottomCrossing.Get(); } - Tab* LeftTab(); - Tab* RightTab(); - Tab* TopTab(); - Tab* BottomTab(); + Tab* LeftTab(); + Tab* RightTab(); + Tab* TopTab(); + Tab* BottomTab(); - BRect Frame(); + BRect Frame(); - bool PropagateToGroup(SATGroup* group); + bool PropagateToGroup(SATGroup* group); - bool MoveToTopLayer(SATWindow* window); + bool MoveToTopLayer(SATWindow* window); private: friend class SATGroup; - /*! SATGroup adds new windows to the area. */ - bool _AddWindow(SATWindow* window, + /*! SATGroup adds new windows to the area. */ + bool _AddWindow(SATWindow* window, SATWindow* after = NULL); - /*! After the last window has been removed the WindowArea delete himself - and clean up all crossings. */ - bool _RemoveWindow(SATWindow* window); + /*! After the last window has been removed the WindowArea delete + himself and clean up all crossings. */ + bool _RemoveWindow(SATWindow* window); - inline void _InitCorners(); - inline void _CleanupCorners(); - inline void _SetToWindowCorner(Corner* corner); - inline void _SetToNeighbourCorner(Corner* neighbour); - inline void _UnsetWindowCorner(Corner* corner); + inline void _InitCorners(); + inline void _CleanupCorners(); + inline void _SetToWindowCorner(Corner* corner); + inline void _SetToNeighbourCorner(Corner* neighbour); + inline void _UnsetWindowCorner(Corner* corner); //! opponent is the other neighbour of the neighbour - inline void _UnsetNeighbourCorner(Corner* neighbour, + inline void _UnsetNeighbourCorner(Corner* neighbour, Corner* opponent); - // Find crossing by tab position in group and if not exist create it. - BReference _CrossingByPosition(Crossing* crossing, - SATGroup* group); + // Find crossing by tab position in group and if not exist create + // it. + BReference _CrossingByPosition(Crossing* crossing, + SATGroup* group); - SATGroup* fGroup; + SATGroup* fGroup; - SATWindowList fWindowList; + SATWindowList fWindowList; - SATWindowList fWindowLayerOrder; + SATWindowList fWindowLayerOrder; - BReference fLeftTopCrossing; - BReference fRightTopCrossing; - BReference fLeftBottomCrossing; - BReference fRightBottomCrossing; + BReference fLeftTopCrossing; + BReference fRightTopCrossing; + BReference fLeftBottomCrossing; + BReference fRightBottomCrossing; }; @@ -203,77 +207,83 @@ public: friend class WindowArea; friend class GroupCookie; - SATGroup(); - ~SATGroup(); + SATGroup(); + ~SATGroup(); - LinearSpec* GetLinearSpec() { return &fLinearSpec; } + LinearSpec* GetLinearSpec() { return &fLinearSpec; } - void AdjustWindows(SATWindow* triggerWindow); + void AdjustWindows(SATWindow* triggerWindow); - /*! Create a new WindowArea from the crossing and add the window. */ - bool AddWindow(SATWindow* window, Tab* left, Tab* top, - Tab* right, Tab* bottom); - /*! Add a window to an existing window area. */ - bool AddWindow(SATWindow* window, WindowArea* area, - SATWindow* after = NULL); - bool RemoveWindow(SATWindow* window); - int32 CountItems(); - SATWindow* WindowAt(int32 index); + /*! Create a new WindowArea from the crossing and add the window. */ + bool AddWindow(SATWindow* window, Tab* left, Tab* top, + Tab* right, Tab* bottom); + /*! Add a window to an existing window area. */ + bool AddWindow(SATWindow* window, WindowArea* area, + SATWindow* after = NULL); + bool RemoveWindow(SATWindow* window); + int32 CountItems(); + SATWindow* WindowAt(int32 index); - const WindowAreaList& GetAreaList() { return fWindowAreaList; } - - /*! \return a sorted tab list. */ - const TabList* HorizontalTabs(); - const TabList* VerticalTabs(); + const WindowAreaList& GetAreaList() { return fWindowAreaList; } + + /*! \return a sorted tab list. */ + const TabList* HorizontalTabs(); + const TabList* VerticalTabs(); - Tab* FindHorizontalTab(float position); - Tab* FindVerticalTab(float position); + Tab* FindHorizontalTab(float position); + Tab* FindVerticalTab(float position); private: - BReference _AddHorizontalTab(float position = 0); - BReference _AddVerticalTab(float position = 0); + BReference _AddHorizontalTab(float position = 0); + BReference _AddVerticalTab(float position = 0); - bool _RemoveHorizontalTab(Tab* tab); - bool _RemoveVerticalTab(Tab* tab); + bool _RemoveHorizontalTab(Tab* tab); + bool _RemoveVerticalTab(Tab* tab); - Tab* _FindTab(const TabList& list, float position); + Tab* _FindTab(const TabList& list, float position); - void _SplitGroupIfNecessary(SATWindow* removedWindow); - void _FillNeighbourList(WindowAreaList& neighbourWindows, - WindowArea* area); - void _LeftNeighbours(WindowAreaList& neighbourWindows, - WindowArea* window); - void _TopNeighbours(WindowAreaList& neighbourWindows, - WindowArea* window); - void _RightNeighbours(WindowAreaList& neighbourWindows, - WindowArea* window); - void _BottomNeighbours(WindowAreaList& neighbourWindows, - WindowArea* window); - bool _FindConnectedGroup(WindowAreaList& seedList, - SATWindow* removedWindow, - WindowAreaList& newGroup); - void _FollowSeed(WindowArea* area, WindowArea* veto, - WindowAreaList& seedList, - WindowAreaList& newGroup); - void _SpawnNewGroup(const WindowAreaList& newGroup); + void _SplitGroupIfNecessary( + SATWindow* removedWindow); + void _FillNeighbourList( + WindowAreaList& neighbourWindows, + WindowArea* area); + void _LeftNeighbours( + WindowAreaList& neighbourWindows, + WindowArea* window); + void _TopNeighbours( + WindowAreaList& neighbourWindows, + WindowArea* window); + void _RightNeighbours( + WindowAreaList& neighbourWindows, + WindowArea* window); + void _BottomNeighbours( + WindowAreaList& neighbourWindows, + WindowArea* window); + bool _FindConnectedGroup(WindowAreaList& seedList, + SATWindow* removedWindow, + WindowAreaList& newGroup); + void _FollowSeed(WindowArea* area, WindowArea* veto, + WindowAreaList& seedList, + WindowAreaList& newGroup); + void _SpawnNewGroup(const WindowAreaList& newGroup); - void _EnsureGroupIsOnScreen(SATGroup* group); - inline void _CallculateXOffset(BPoint& offset, BRect& frame, - BRect& screen); - inline void _CallculateYOffset(BPoint& offset, BRect& frame, - BRect& screen); + void _EnsureGroupIsOnScreen(SATGroup* group); + inline void _CallculateXOffset(BPoint& offset, BRect& frame, + BRect& screen); + inline void _CallculateYOffset(BPoint& offset, BRect& frame, + BRect& screen); protected: - WindowAreaList fWindowAreaList; - SATWindowList fSATWindowList; + WindowAreaList fWindowAreaList; + SATWindowList fSATWindowList; - LinearSpec fLinearSpec; + LinearSpec fLinearSpec; private: - TabList fHorizontalTabs; - bool fHorizontalTabsSorted; - TabList fVerticalTabs; - bool fVerticalTabsSorted; + TabList fHorizontalTabs; + bool fHorizontalTabsSorted; + TabList fVerticalTabs; + bool fVerticalTabsSorted; }; diff --git a/src/add-ons/decorators/SATDecorator/SATWindow.cpp b/src/add-ons/decorators/SATDecorator/SATWindow.cpp index 8a7f223385..1e4ea607a9 100644 --- a/src/add-ons/decorators/SATDecorator/SATWindow.cpp +++ b/src/add-ons/decorators/SATDecorator/SATWindow.cpp @@ -6,6 +6,7 @@ * Clemens Zeidler */ + #include "SATWindow.h" #include @@ -118,14 +119,14 @@ GroupCookie::MoveWindow(int32 workspace) Desktop* desktop = window->Desktop(); BRect frame = fSATWindow->CompleteWindowFrame(); - desktop->MoveWindowBy(window, fLeftBorder->Value() - frame.left, - fTopBorder->Value() - frame.top, workspace); + desktop->MoveWindowBy(window, round(fLeftBorder->Value() - frame.left), + round(fTopBorder->Value() - frame.top), workspace); // Update frame to the new position - frame.OffsetBy(fLeftBorder->Value() - frame.left, - fTopBorder->Value() - frame.top); - desktop->ResizeWindowBy(window, fRightBorder->Value() - frame.right, - fBottomBorder->Value() - frame.bottom); + frame.OffsetBy(round(fLeftBorder->Value() - frame.left), + round(fTopBorder->Value() - frame.top)); + desktop->ResizeWindowBy(window, round(fRightBorder->Value() - frame.right), + round(fBottomBorder->Value() - frame.bottom)); _UpdateWindowSize(frame); } diff --git a/src/add-ons/decorators/SATDecorator/SATWindow.h b/src/add-ons/decorators/SATDecorator/SATWindow.h index 0ce7ff0ca4..fad6d64d01 100644 --- a/src/add-ons/decorators/SATDecorator/SATWindow.h +++ b/src/add-ons/decorators/SATDecorator/SATWindow.h @@ -24,129 +24,131 @@ class Window; class GroupCookie { public: - GroupCookie(SATWindow* satWindow); - ~GroupCookie(); + GroupCookie(SATWindow* satWindow); + ~GroupCookie(); - bool Init(SATGroup* group, WindowArea* area); - void Uninit(); + bool Init(SATGroup* group, WindowArea* area); + void Uninit(); - void DoGroupLayout(SATWindow* triggerWindow); - void MoveWindow(int32 workspace); - void SetSizeLimits(int32 minWidth, int32 maxWidth, - int32 minHeight, int32 maxHeight); + void DoGroupLayout(SATWindow* triggerWindow); + void MoveWindow(int32 workspace); + void SetSizeLimits(int32 minWidth, int32 maxWidth, + int32 minHeight, int32 maxHeight); - SATGroup* GetGroup() { return fSATGroup.Get(); } + SATGroup* GetGroup() { return fSATGroup.Get(); } - WindowArea* GetWindowArea() { return fWindowArea; } + WindowArea* GetWindowArea() { return fWindowArea; } - bool PropagateToGroup(SATGroup* group, WindowArea* area); + bool PropagateToGroup(SATGroup* group, + WindowArea* area); private: - void _UpdateWindowSize(const BRect& frame); + void _UpdateWindowSize(const BRect& frame); - SATWindow* fSATWindow; + SATWindow* fSATWindow; - BReference fSATGroup; + BReference fSATGroup; - WindowArea* fWindowArea; + WindowArea* fWindowArea; - Variable* fLeftBorder; - Variable* fTopBorder; - Variable* fRightBorder; - Variable* fBottomBorder; + Variable* fLeftBorder; + Variable* fTopBorder; + Variable* fRightBorder; + Variable* fBottomBorder; - Constraint* fLeftBorderConstraint; - Constraint* fTopBorderConstraint; - Constraint* fRightBorderConstraint; - Constraint* fBottomBorderConstraint; + Constraint* fLeftBorderConstraint; + Constraint* fTopBorderConstraint; + Constraint* fRightBorderConstraint; + Constraint* fBottomBorderConstraint; - Constraint* fLeftConstraint; - Constraint* fTopConstraint; - Constraint* fMinWidthConstraint; - Constraint* fMinHeightConstraint; - Constraint* fMaxWidthConstraint; - Constraint* fMaxHeightConstraint; - Constraint* fWidthConstraint; - Constraint* fHeightConstraint; + Constraint* fLeftConstraint; + Constraint* fTopConstraint; + Constraint* fMinWidthConstraint; + Constraint* fMinHeightConstraint; + Constraint* fMaxWidthConstraint; + Constraint* fMaxHeightConstraint; + Constraint* fWidthConstraint; + Constraint* fHeightConstraint; }; class SATWindow { public: - SATWindow(StackAndTile* sat, Window* window); - ~SATWindow(); + SATWindow(StackAndTile* sat, Window* window); + ~SATWindow(); - Window* GetWindow() { return fWindow; } - SATDecorator* GetDecorator(); - StackAndTile* GetStackAndTile() { return fStackAndTile; } - Desktop* GetDesktop() { return fDesktop; } - //! Can be NULL if memory allocation failed! - SATGroup* GetGroup(); - WindowArea* GetWindowArea() { - return fGroupCookie->GetWindowArea(); } + Window* GetWindow() { return fWindow; } + SATDecorator* GetDecorator(); + StackAndTile* GetStackAndTile() { return fStackAndTile; } + Desktop* GetDesktop() { return fDesktop; } + //! Can be NULL if memory allocation failed! + SATGroup* GetGroup(); + WindowArea* GetWindowArea() { + return fGroupCookie->GetWindowArea(); } - bool HandleMessage(SATWindow* sender, - BPrivate::ServerLink& link); + bool HandleMessage(SATWindow* sender, + BPrivate::ServerLink& link); - bool PropagateToGroup(SATGroup* group, WindowArea* area); + bool PropagateToGroup(SATGroup* group, + WindowArea* area); - //! Move the window to the tab's position. - void MoveWindowToSAT(int32 workspace); + //! Move the window to the tab's position. + void MoveWindowToSAT(int32 workspace); - // hook function called from SATGroup - bool AddedToGroup(SATGroup* group, WindowArea* area); - bool RemovedFromGroup(SATGroup* group); - void RemovedFromArea(WindowArea* area); + // hook function called from SATGroup + bool AddedToGroup(SATGroup* group, WindowArea* area); + bool RemovedFromGroup(SATGroup* group); + void RemovedFromArea(WindowArea* area); - bool StackWindow(SATWindow* child); + bool StackWindow(SATWindow* child); - void FindSnappingCandidates(); - bool JoinCandidates(); - void DoWindowLayout(); - void DoGroupLayout(); + void FindSnappingCandidates(); + bool JoinCandidates(); + void DoWindowLayout(); + void DoGroupLayout(); - void SetSizeLimits(int32 minWidth, int32 maxWidth, - int32 minHeight, int32 maxHeight); + void SetSizeLimits(int32 minWidth, int32 maxWidth, + int32 minHeight, int32 maxHeight); - //! \return the complete window frame including the Decorator - BRect CompleteWindowFrame(); - void GetSizeLimits(int32* minWidth, int32* maxWidth, - int32* minHeight, int32* maxHeight) const; + //! \return the complete window frame including the Decorator + BRect CompleteWindowFrame(); + void GetSizeLimits(int32* minWidth, int32* maxWidth, + int32* minHeight, int32* maxHeight) const; - //! \return true if window is in a group with a least another window - bool PositionManagedBySAT(); + //! \return true if window is in a group with a least another window + bool PositionManagedBySAT(); - bool HighlightTab(bool active); - bool HighlightBorders(bool active); - bool IsTabHighlighted(); - bool IsBordersHighlighted(); + bool HighlightTab(bool active); + bool HighlightBorders(bool active); + bool IsTabHighlighted(); + bool IsBordersHighlighted(); - bool SetStackedMode(bool stacked = true); - bool SetStackedTabLength(float length); - bool SetStackedTabMoving(bool moving = true); - void TabLocationMoved(float location, bool shifting); + bool SetStackedMode(bool stacked = true); + bool SetStackedTabLength(float length); + bool SetStackedTabMoving(bool moving = true); + void TabLocationMoved(float location, bool shifting); private: - void _InitGroup(); + void _InitGroup(); - Window* fWindow; - StackAndTile* fStackAndTile; - Desktop* fDesktop; + Window* fWindow; + StackAndTile* fStackAndTile; + Desktop* fDesktop; - //! Current group. - GroupCookie* fGroupCookie; - /*! If the window is added to another group the own group is cached - here. */ - GroupCookie fOwnGroupCookie; - GroupCookie fForeignGroupCookie; + //! Current group. + GroupCookie* fGroupCookie; + /*! If the window is added to another group the own group is cached + here. */ + GroupCookie fOwnGroupCookie; + GroupCookie fForeignGroupCookie; - SATSnappingBehaviour* fOngoingSnapping; - SATStacking fSATStacking; - SATTiling fSATTiling; + SATSnappingBehaviour* fOngoingSnapping; + SATStacking fSATStacking; + SATTiling fSATTiling; - SATSnappingBehaviourList fSATSnappingBehaviourList; + SATSnappingBehaviourList fSATSnappingBehaviourList; - bool fShutdown; + bool fShutdown; }; diff --git a/src/add-ons/decorators/SATDecorator/StackAndTile.cpp b/src/add-ons/decorators/SATDecorator/StackAndTile.cpp index aa99a80e42..a47f788d9b 100644 --- a/src/add-ons/decorators/SATDecorator/StackAndTile.cpp +++ b/src/add-ons/decorators/SATDecorator/StackAndTile.cpp @@ -6,6 +6,7 @@ * Clemens Zeidler */ + #include "StackAndTile.h" #include diff --git a/src/add-ons/decorators/SATDecorator/StackAndTile.h b/src/add-ons/decorators/SATDecorator/StackAndTile.h index 2c6d9390af..a8813ff643 100644 --- a/src/add-ons/decorators/SATDecorator/StackAndTile.h +++ b/src/add-ons/decorators/SATDecorator/StackAndTile.h @@ -8,6 +8,7 @@ #ifndef STACK_AND_TILE_H #define STACK_AND_TILE_H + #include #include @@ -107,60 +108,63 @@ private: class GroupIterator { public: - GroupIterator(StackAndTile* sat, Desktop* desktop); + GroupIterator(StackAndTile* sat, + Desktop* desktop); - void RewindToFront(); - SATGroup* NextGroup(); + void RewindToFront(); + SATGroup* NextGroup(); private: - StackAndTile* fStackAndTile; - Desktop* fDesktop; - Window* fCurrentWindow; - SATGroup* fCurrentGroup; + StackAndTile* fStackAndTile; + Desktop* fDesktop; + Window* fCurrentWindow; + SATGroup* fCurrentGroup; }; class WindowIterator { public: - WindowIterator(SATGroup* group, - bool reverseLayerOrder = false); + WindowIterator(SATGroup* group, + bool reverseLayerOrder = false); - void Rewind(); - /*! Iterates over all areas in the group and return the windows in the - areas. Within one area the windows are ordered by their layer position. - If reverseLayerOrder is false the bottommost window comes first. */ - SATWindow* NextWindow(); + void Rewind(); + /*! Iterates over all areas in the group and return the windows in + the areas. Within one area the windows are ordered by their layer + position. If reverseLayerOrder is false the bottommost window comes + first. */ + SATWindow* NextWindow(); private: - SATWindow* _ReverseNextWindow(); - void _ReverseRewind(); + SATWindow* _ReverseNextWindow(); + void _ReverseRewind(); - SATGroup* fGroup; - bool fReverseLayerOrder; + SATGroup* fGroup; + bool fReverseLayerOrder; - WindowArea* fCurrentArea; - int32 fAreaIndex; - int32 fWindowIndex; + WindowArea* fCurrentArea; + int32 fAreaIndex; + int32 fWindowIndex; }; class SATSnappingBehaviour { public: - virtual ~SATSnappingBehaviour(); + virtual ~SATSnappingBehaviour(); /*! Find all window candidates which possibly can join the group. Found candidates are marked here visual. */ - virtual bool FindSnappingCandidates(SATGroup* group) = 0; + virtual bool FindSnappingCandidates(SATGroup* group) = 0; /*! Join all candidates found in FindSnappingCandidates to the group. Previously visually mark should be removed here. \return true if integration has been succeed. */ - virtual bool JoinCandidates() = 0; + virtual bool JoinCandidates() = 0; /*! Update the window tab values, solve the layout and move all windows in the group accordantly. */ - virtual void DoWindowLayout() = 0; - virtual void RemovedFromArea(WindowArea* area) {} - virtual void TabLocationMoved(float location, bool shifting) {} + virtual void DoWindowLayout() = 0; + virtual void RemovedFromArea(WindowArea* area) {} + virtual void TabLocationMoved(float location, bool shifting) + {} };