05bd1efe5b
* moved the system default font functionality into the DesktopSettings class. * ServerFont::SetStyle() is now a public method. * Improved font fallback routines: they will never end up without a font if there is at least one font installed. * fixed some minor bugs in the DecorManager. * Decorator now get a DesktopSettings object passed - dunno if that's a good idea (since we'll have to open the DesktopSettings header), but it works for now (and something like this is probably needed anyway). * a clean ServerFont is now set to the system default font - and not to the (user chosen) desktop default font anymore (since the font manager doesn't know about that one). * Improved font directory scanning in the font manager a bit, it's now using find_directory() instead of hard-coded paths. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14666 a95241bf-73f2-0310-859d-f6bbb57e9c96
86 lines
2.0 KiB
C++
86 lines
2.0 KiB
C++
/*
|
|
* Copyright 2001-2005, Haiku.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* DarkWyrm <bpmagic@columbus.rr.com>
|
|
* Stephan Aßmus <superstippi@gmx.de>
|
|
*/
|
|
#ifndef DEFAULT_DECORATOR_H
|
|
#define DEFAULT_DECORATOR_H
|
|
|
|
|
|
#include "Decorator.h"
|
|
#include <Region.h>
|
|
|
|
class Desktop;
|
|
|
|
|
|
class DefaultDecorator: public Decorator {
|
|
public:
|
|
DefaultDecorator(DesktopSettings& settings, BRect frame,
|
|
int32 look, int32 feel, int32 flags);
|
|
virtual ~DefaultDecorator();
|
|
|
|
virtual void MoveBy(float x, float y);
|
|
virtual void MoveBy(BPoint pt);
|
|
virtual void ResizeBy(float x, float y);
|
|
virtual void ResizeBy(BPoint pt);
|
|
|
|
virtual void Draw(BRect r);
|
|
virtual void Draw();
|
|
|
|
virtual void GetSizeLimits(float* minWidth, float* minHeight,
|
|
float* maxWidth, float* maxHeight) const;
|
|
|
|
virtual void GetFootprint(BRegion *region);
|
|
|
|
virtual click_type Clicked(BPoint pt, int32 buttons,
|
|
int32 modifiers);
|
|
|
|
protected:
|
|
virtual void _DoLayout();
|
|
|
|
virtual void _DrawFrame(BRect r);
|
|
virtual void _DrawTab(BRect r);
|
|
|
|
virtual void _DrawClose(BRect r);
|
|
virtual void _DrawTitle(BRect r);
|
|
virtual void _DrawZoom(BRect r);
|
|
|
|
virtual void _SetFocus();
|
|
virtual void _SetColors();
|
|
|
|
private:
|
|
void _DrawBlendedRect(BRect r, bool down);
|
|
void _GetButtonSizeAndOffset(const BRect& tabRect,
|
|
float* offset, float*size) const;
|
|
void _LayoutTabItems(const BRect& tabRect);
|
|
|
|
RGBColor fButtonHighColor;
|
|
RGBColor fButtonLowColor;
|
|
RGBColor fTextColor;
|
|
RGBColor fTabColor;
|
|
|
|
RGBColor* fFrameColors;
|
|
|
|
// Individual rects for handling window frame
|
|
// rendering the proper way
|
|
BRect fRightBorder;
|
|
BRect fLeftBorder;
|
|
BRect fTopBorder;
|
|
BRect fBottomBorder;
|
|
|
|
int32 fBorderWidth;
|
|
|
|
uint32 fTabOffset;
|
|
float fTextOffset;
|
|
|
|
float fMinTabWidth;
|
|
float fMaxTabWidth;
|
|
BString fTruncatedTitle;
|
|
int32 fTruncatedTitleLength;
|
|
};
|
|
|
|
#endif /* DEFAULT_DECORATOR_H */
|