haiku/headers/private/media/DefaultMediaTheme.h
Augustin Cavalier a4f5124fcc Media Kit: Rewrite DefaultMediaTheme to use layouts.
The old fixed-rect method was very error-prone in corner-cases,
resulting in half-visible (cut off) parameters, incorrectly
sized controls, etc. on various devices, which often made it
impossible to use.

While there are still a few rough edges (scrollbar behavior could
be further improved, though it's already much better than it was before),
this method is much better than the previous one.

Fixes #11592 and related tickets.

Change-Id: I65175f760bda98e42d1fc68ba8e526470bf17c25
Reviewed-on: https://review.haiku-os.org/c/889
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-01-22 14:25:09 +00:00

37 lines
847 B
C++

/*
* Copyright 2003-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef DEFAULT_MEDIA_THEME_H
#define DEFAULT_MEDIA_THEME_H
#include <MediaTheme.h>
class BParameterGroup;
namespace BPrivate {
class DefaultMediaTheme : public BMediaTheme {
public:
DefaultMediaTheme();
virtual BControl* MakeControlFor(BParameter* parameter);
static BControl* MakeViewFor(BParameter* parameter);
// this is also called by the BMediaTheme::MakeFallbackViewFor()
// method - that's why it's a static.
protected:
virtual BView* MakeViewFor(BParameterWeb* web, const BRect* hintRect = NULL);
private:
BView* MakeViewFor(BParameterGroup& group);
BView* MakeSelfHostingViewFor(BParameter& parameter);
};
} // namespace BPrivate
#endif /* DEFAULT_MEDIA_THEME_H */