Adapted the ClassicBe decorator to the new DecorAddOn interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37858 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b6ba2290fc
commit
1649544d81
@ -5,6 +5,7 @@
|
||||
* Authors:
|
||||
* DarkWyrm <bpmagic@columbus.rr.com>
|
||||
* Stephan Aßmus <superstippi@gmx.de>
|
||||
* Clemens Zeidler <haiku@clemens-zeidler.de>
|
||||
*/
|
||||
|
||||
|
||||
@ -13,6 +14,7 @@
|
||||
|
||||
#include "BeDecorator.h"
|
||||
|
||||
#include <new>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "DesktopSettings.h"
|
||||
@ -83,6 +85,29 @@ make_blend_color(rgb_color colorA, rgb_color colorB, float position)
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
BeDecorAddOn::BeDecorAddOn(image_id id, const char* name)
|
||||
:
|
||||
DecorAddOn(id, name)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
float
|
||||
BeDecorAddOn::Version()
|
||||
{
|
||||
return 1.00;
|
||||
}
|
||||
|
||||
|
||||
Decorator*
|
||||
BeDecorAddOn::_AllocateDecorator(DesktopSettings& settings, BRect rect,
|
||||
window_look look, uint32 flags)
|
||||
{
|
||||
return new (std::nothrow)BeDecorator(settings, rect, look, flags);
|
||||
}
|
||||
|
||||
|
||||
// TODO: get rid of DesktopSettings here, and introduce private accessor
|
||||
// methods to the Decorator base class
|
||||
|
||||
@ -1262,13 +1287,8 @@ BeDecorator::_LayoutTabItems(const BRect& tabRect)
|
||||
fTruncatedTitleLength = fTruncatedTitle.Length();
|
||||
}
|
||||
|
||||
extern "C" float get_decorator_version(void)
|
||||
{
|
||||
return 1.00;
|
||||
}
|
||||
|
||||
extern "C" Decorator *(instantiate_decorator)(DesktopSettings &desktopSetting, BRect rec,
|
||||
window_look loo, uint32 flag)
|
||||
extern "C" DecorAddOn* (instantiate_decor_addon)(image_id id, const char* name)
|
||||
{
|
||||
return (new BeDecorator(desktopSetting, rec, loo, flag));
|
||||
return new (std::nothrow)BeDecorAddOn(id, name);
|
||||
}
|
||||
|
@ -1,22 +1,36 @@
|
||||
/*
|
||||
* Copyright 2001-2006, Haiku.
|
||||
* Copyright 2001-2010, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* DarkWyrm <bpmagic@columbus.rr.com>
|
||||
* Stephan Aßmus <superstippi@gmx.de>
|
||||
* Clemens Zeidler <haiku@clemens-zeidler.de>
|
||||
*/
|
||||
#ifndef DEFAULT_DECORATOR_H
|
||||
#define DEFAULT_DECORATOR_H
|
||||
|
||||
|
||||
#include "Decorator.h"
|
||||
#include <Region.h>
|
||||
|
||||
#include "DecorManager.h"
|
||||
#include "RGBColor.h"
|
||||
|
||||
|
||||
class Desktop;
|
||||
|
||||
|
||||
class BeDecorAddOn : public DecorAddOn
|
||||
{
|
||||
public:
|
||||
BeDecorAddOn(image_id id, const char* name);
|
||||
|
||||
float Version();
|
||||
protected:
|
||||
virtual Decorator* _AllocateDecorator(DesktopSettings& settings,
|
||||
BRect rect, window_look look, uint32 flags);
|
||||
};
|
||||
|
||||
|
||||
class BeDecorator: public Decorator {
|
||||
public:
|
||||
BeDecorator(DesktopSettings& settings,
|
||||
|
Loading…
Reference in New Issue
Block a user