MacDecorator:

- Style cleanup and sync with DefaultDecorator to some extent
- Don't draw a titlebar and border around menus
- Allow the client to draw something inside the window by returning the correct BRegion. (still not perfect, but it is useable, at least)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34756 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues
2009-12-23 15:18:40 +00:00
parent e71b48d3c1
commit 541987c85d
2 changed files with 625 additions and 601 deletions
File diff suppressed because it is too large Load Diff
@@ -1,63 +1,88 @@
/*
Copyright 2009, Haiku.
Distributed under the terms of the MIT License.
*/
#ifndef _MAC_DECORATOR_H_
#define _MAC_DECORATOR_H_
#include "Decorator.h"
#include "RGBColor.h"
class MacDecorator: public Decorator {
public:
MacDecorator(DesktopSettings& settings,
BRect frame,
window_look look,
uint32 flags);
~MacDecorator(void);
MacDecorator(DesktopSettings& settings,
BRect frame, window_look look,
uint32 flags);
~MacDecorator();
// SetTitle
// SetLook
// SetFlags
// void SetTitle(const char* string,
// BRegion* updateRegion = NULL);
// void FontsChanged(DesktopSettings& settings,
// BRegion* updateRegion);
// void SetLook(DesktopSettings& settings,
// BRegion* updateRegion = NULL);
// void SetFlags(uint32 flags,
// BRegion* updateRegion = NULL);
//void MoveBy(float x, float y);
void MoveBy(BPoint pt);
// void ResizeBy(float x, float y);
void ResizeBy(BPoint pt, BRegion* diirty);
void MoveBy(BPoint offset);
void ResizeBy(BPoint offset, BRegion* dirty);
// SetTabLocation
// TabLocation
//
// SetSettings
// GetSettings
void Draw(BRect r);
void Draw(void);
void Draw(BRect updateRect);
void Draw();
//GetSizeLimits
void GetFootprint(BRegion *region);
click_type Clicked(BPoint pt, int32 buttons, int32 modifiers);
void GetFootprint(BRegion *region);
protected:
void _DoLayout(void);
void _DrawFrame(BRect r);
void _DrawTab(BRect r);
void _DrawClose(BRect r);
void _DrawTitle(BRect r);
void _DrawZoom(BRect r);
void _DrawMinimize(BRect r);
// SetFocus
// void _SetColors(void);
void DrawBlendedRect(BRect r, bool down);
uint32 taboffset;
private:
RGBColor tab_col;
RGBColor button_highcol,button_lowcol;
RGBColor frame_highcol, frame_midcol, frame_lowcol, frame_lowercol;
RGBColor textcol,inactive_textcol;
uint64 solidhigh, solidlow;
click_type Clicked(BPoint pt, int32 buttons,
int32 modifiers);
BString fTruncatedTitle;
int32 fTruncatedTitleLength;
protected:
void _DoLayout();
bool slidetab;
int textoffset;
float titlepixelwidth;
void _DrawFrame(BRect r);
void _DrawTab(BRect r);
void _DrawClose(BRect r);
void _DrawTitle(BRect r);
void _DrawZoom(BRect r);
void _DrawMinimize(BRect r);
// void _SetFocus();
// void _SetColors();
private:
void _DrawBlendedRect(DrawingEngine* engine,
BRect r, bool down);
rgb_color fButtonHighColor;
rgb_color fButtonLowColor;
rgb_color fTabColor;
rgb_color frame_highcol;
rgb_color frame_midcol;
rgb_color frame_lowcol;
rgb_color frame_lowercol;
rgb_color fFocusTextColor;
rgb_color fNonFocusTextColor;
uint64 solidhigh, solidlow;
BString fTruncatedTitle;
int32 fTruncatedTitleLength;
int32 fBorderWidth;
bool slidetab;
int textoffset;
float titlepixelwidth;
};
#endif