2 * Copyright 2006, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _CONTROL_THEME_H
6 #define _CONTROL_THEME_H
10 #include <MediaDefs.h>
22 virtual ~BMediaTheme();
27 bool GetRef(entry_ref
* ref
);
29 static BView
* ViewFor(BParameterWeb
* web
, const BRect
* hintRect
= NULL
,
30 BMediaTheme
* usingTheme
= NULL
);
32 static status_t
SetPreferredTheme(BMediaTheme
* defaultTheme
= NULL
);
33 static BMediaTheme
* PreferredTheme();
35 virtual BControl
* MakeControlFor(BParameter
* control
) = 0;
54 virtual BBitmap
* BackgroundBitmapFor(bg_kind bg
= B_GENERAL_BG
);
55 virtual rgb_color
BackgroundColorFor(bg_kind bg
= B_GENERAL_BG
);
56 virtual rgb_color
ForegroundColorFor(fg_kind fg
= B_GENERAL_FG
);
59 BMediaTheme(const char* name
, const char* info
,
60 const entry_ref
* addOn
= NULL
, int32 themeID
= 0);
62 virtual BView
* MakeViewFor(BParameterWeb
* web
,
63 const BRect
* hintRect
= NULL
) = 0;
65 static BControl
* MakeFallbackViewFor(BParameter
* control
);
68 BMediaTheme(); /* private unimplemented */
69 BMediaTheme(const BMediaTheme
& other
);
70 BMediaTheme
& operator=(const BMediaTheme
& other
);
72 virtual status_t
_Reserved_ControlTheme_0(void *);
73 virtual status_t
_Reserved_ControlTheme_1(void *);
74 virtual status_t
_Reserved_ControlTheme_2(void *);
75 virtual status_t
_Reserved_ControlTheme_3(void *);
76 virtual status_t
_Reserved_ControlTheme_4(void *);
77 virtual status_t
_Reserved_ControlTheme_5(void *);
78 virtual status_t
_Reserved_ControlTheme_6(void *);
79 virtual status_t
_Reserved_ControlTheme_7(void *);
89 static BMediaTheme
* sDefaultTheme
;
93 // Theme add-ons should export these functions:
94 #if defined(_BUILDING_THEME_ADDON)
95 extern "C" BMediaTheme
* make_theme(int32 id
, image_id you
);
96 extern "C" status_t
get_theme_at(int32 index
, const char** _name
,
97 const char** _info
, int32
* _id
);
98 #endif // _BUILDING_THEME_ADDON
100 #endif // _CONTROL_THEME_H