* 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
This commit is contained in:
Ingo Weinhold
2010-11-25 14:42:28 +00:00
parent e29729e2a5
commit 638d9c8039
2 changed files with 39 additions and 32 deletions
@@ -6,6 +6,7 @@
* Clemens Zeidler <[email protected]>
*/
#include "SATDecorator.h"
#include <new>
@@ -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);
}
@@ -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