From 638d9c8039a5a086aa8d58891ad42d0b4b063e2d Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 25 Nov 2010 14:42:28 +0000 Subject: [PATCH] * Coding style cleanup. * Made inline getters in SATDecorator const. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39626 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../decorators/SATDecorator/SATDecorator.cpp | 4 +- .../decorators/SATDecorator/SATDecorator.h | 67 ++++++++++--------- 2 files changed, 39 insertions(+), 32 deletions(-) diff --git a/src/add-ons/decorators/SATDecorator/SATDecorator.cpp b/src/add-ons/decorators/SATDecorator/SATDecorator.cpp index 18e1d1fe63..b51b795ebd 100644 --- a/src/add-ons/decorators/SATDecorator/SATDecorator.cpp +++ b/src/add-ons/decorators/SATDecorator/SATDecorator.cpp @@ -6,6 +6,7 @@ * Clemens Zeidler */ + #include "SATDecorator.h" #include @@ -468,7 +469,7 @@ SATDecorator::_DrawTab(BRect invalid) // Draw the buttons if we're supposed to if (!(fFlags & B_NOT_CLOSABLE) && invalid.Intersects(fCloseRect)) _DrawClose(fCloseRect); - + if (fStackedMode) { if (fStackedDrawZoom && invalid.Intersects(fZoomRect)) _DrawZoom(fZoomRect); @@ -541,4 +542,3 @@ extern "C" DecorAddOn* (instantiate_decor_addon)(image_id id, const char* name) { return new (std::nothrow)SATDecorAddOn(id, name); } - diff --git a/src/add-ons/decorators/SATDecorator/SATDecorator.h b/src/add-ons/decorators/SATDecorator/SATDecorator.h index 9ce20ca8c3..0f123fecc2 100644 --- a/src/add-ons/decorators/SATDecorator/SATDecorator.h +++ b/src/add-ons/decorators/SATDecorator/SATDecorator.h @@ -19,55 +19,62 @@ public: SATDecorAddOn(image_id id, const char* name); virtual status_t InitCheck() const; - float Version(); + float Version(); protected: virtual Decorator* _AllocateDecorator(DesktopSettings& settings, BRect rect, window_look look, uint32 flags); - StackAndTile fStackAndTile; + StackAndTile fStackAndTile; }; class SATDecorator : public DefaultDecorator { public: - SATDecorator(DesktopSettings& settings, - BRect frame, window_look look, uint32 flags); + SATDecorator(DesktopSettings& settings, + BRect frame, window_look look, + uint32 flags); - void HighlightTab(bool active, BRegion* dirty); - void HighlightBorders(bool active, BRegion* dirty); - bool IsTabHighlighted() { return fTabHighlighted; } - bool IsBordersHighlighted() { return fBordersHighlighted; } + void HighlightTab(bool active, BRegion* dirty); + void HighlightBorders(bool active, BRegion* dirty); + bool IsTabHighlighted() const + { return fTabHighlighted; } + bool IsBordersHighlighted() const + { return fBordersHighlighted; } - /*! Indicates that window is stacked */ - void SetStackedMode(bool stacked, BRegion* dirty); - bool StackedMode() { return fStackedMode; }; + /*! Indicates that window is stacked */ + void SetStackedMode(bool stacked, BRegion* dirty); + bool StackedMode() const + { return fStackedMode; }; - /*! Set the tab length if the decorator is in stacked mode and if the - tab is the last one in the tab bar. */ - void SetStackedTabLength(float length, BRegion* dirty); - float StackedTabLength() { return fStackedTabLength; } + /*! Set the tab length if the decorator is in stacked mode and if + the tab is the last one in the tab bar. */ + void SetStackedTabLength(float length, + BRegion* dirty); + float StackedTabLength() const + { return fStackedTabLength; } protected: - void _DoLayout(); - void _DrawTab(BRect r); - void _LayoutTabItems(const BRect& tabRect); + void _DoLayout(); + void _DrawTab(BRect r); + void _LayoutTabItems(const BRect& tabRect); - bool _SetTabLocation(float location, - BRegion* updateRegion = NULL); - void _SetFocus(); + bool _SetTabLocation(float location, + BRegion* updateRegion = NULL); + void _SetFocus(); private: - bool fTabHighlighted; - bool fBordersHighlighted; - rgb_color fHighlightTabColor; - rgb_color fNonHighlightFrameColors[4]; - rgb_color fHighlightFrameColors[6]; + bool fTabHighlighted; + bool fBordersHighlighted; + rgb_color fHighlightTabColor; + rgb_color fNonHighlightFrameColors[4]; + rgb_color fHighlightFrameColors[6]; - bool fStackedMode; - bool fStackedDrawZoom; - float fStackedTabLength; - bool fStackedTabShifting; + bool fStackedMode; + bool fStackedDrawZoom; + float fStackedTabLength; + bool fStackedTabShifting; }; + #endif