xref: /haiku/headers/os/interface/ControlLook.h (revision 71452e98334eaac603bf542d159e24788a46bebb)
1 /*
2  * Copyright 2009-2015, Haiku, Inc. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _CONTROL_LOOK_H
6 #define _CONTROL_LOOK_H
7 
8 
9 #include <Alignment.h>
10 #include <Font.h>
11 #include <Rect.h>
12 #include <Slider.h>
13 
14 
15 class BBitmap;
16 class BControl;
17 class BGradientLinear;
18 class BView;
19 
20 
21 // WARNING! This is experimental API and may change! Be prepared to
22 // recompile your software in a next version of haiku.
23 
24 
25 namespace BPrivate {
26 
27 
28 class BControlLook {
29 public:
30 								BControlLook();
31 	virtual						~BControlLook();
32 
33 	// TODO: Probably more convenient to pull these enums into global
34 	// namespace and rename them to e.g. "B_CONTROL_LOOK_FOCUSED" instead of
35 	// "BControlLook::B_FOCUSED".
36 
37 	enum frame_type {
38 		B_BUTTON_FRAME,
39 		B_GROUP_FRAME,
40 		B_MENU_FIELD_FRAME,
41 		B_SCROLL_VIEW_FRAME,
42 		B_TEXT_CONTROL_FRAME,
43 	};
44 
45 	enum background_type {
46 		B_BUTTON_BACKGROUND,
47 		B_BUTTON_WITH_POP_UP_BACKGROUND,
48 		B_MENU_BACKGROUND,
49 		B_MENU_BAR_BACKGROUND,
50 		B_MENU_FIELD_BACKGROUND,
51 		B_MENU_ITEM_BACKGROUND,
52 		B_HORIZONTAL_SCROLL_BAR_BACKGROUND,
53 		B_VERTICAL_SCROLL_BAR_BACKGROUND,
54 	};
55 
56 	enum {
57 		B_LEFT_BORDER		= 1 << 0,
58 		B_RIGHT_BORDER		= 1 << 1,
59 		B_TOP_BORDER		= 1 << 2,
60 		B_BOTTOM_BORDER		= 1 << 3,
61 
62 		B_ALL_BORDERS		= B_LEFT_BORDER | B_RIGHT_BORDER
63 								| B_TOP_BORDER | B_BOTTOM_BORDER
64 	};
65 
66 	enum {
67 		B_LEFT_ARROW		= 0,
68 		B_RIGHT_ARROW		= 1,
69 		B_UP_ARROW			= 2,
70 		B_DOWN_ARROW		= 3,
71 		B_LEFT_UP_ARROW		= 4,
72 		B_RIGHT_UP_ARROW	= 5,
73 		B_RIGHT_DOWN_ARROW	= 6,
74 		B_LEFT_DOWN_ARROW	= 7
75 	};
76 
77 	enum {
78 		B_FOCUSED				= 1 << 0,
79 		B_CLICKED				= 1 << 1, // some controls activate on mouse up
80 		B_ACTIVATED				= 1 << 2,
81 		B_HOVER					= 1 << 3,
82 		B_DISABLED				= 1 << 4,
83 		B_DEFAULT_BUTTON		= 1 << 5,
84 		B_IGNORE_OUTLINE		= 1 << 6,
85 		B_PARTIALLY_ACTIVATED	= 1 << 7, // like B_ACTIVATED, but for tri-state
86 		B_FLAT					= 1 << 8, // flat look (e.g. button background)
87 		B_INVALID				= 1 << 9, // invalid value, use B_FAILURE_COLOR
88 		B_IS_CONTROL			= 1 << 10, // use control colors
89 
90 		B_BLEND_FRAME			= 1 << 16,
91 	};
92 
93 	virtual BAlignment			DefaultLabelAlignment() const;
94 	virtual float				DefaultLabelSpacing() const;
95 
96 	// TODO: Make methods virtual before R1 release
97 	/*virtual*/	float			DefaultItemSpacing() const;
98 
99 	static	float				ComposeSpacing(float spacing);
100 
101 	/*virtual*/ uint32			Flags(BControl* control) const;
102 
103 	virtual	void				DrawButtonFrame(BView* view, BRect& rect,
104 									const BRect& updateRect,
105 									const rgb_color& base,
106 									const rgb_color& background,
107 									uint32 flags = 0,
108 									uint32 borders = B_ALL_BORDERS);
109 	/*virtual*/	void			DrawButtonFrame(BView* view, BRect& rect,
110 									const BRect& updateRect,
111 									float radius,
112 									const rgb_color& base,
113 									const rgb_color& background,
114 									uint32 flags = 0,
115 									uint32 borders = B_ALL_BORDERS);
116 	/*virtual*/	void			DrawButtonFrame(BView* view, BRect& rect,
117 									const BRect& updateRect,
118 									float leftTopRadius,
119 									float rightTopRadius,
120 									float leftBottomRadius,
121 									float rightBottomRadius,
122 									const rgb_color& base,
123 									const rgb_color& background,
124 									uint32 flags = 0,
125 									uint32 borders = B_ALL_BORDERS);
126 
127 	virtual	void				DrawButtonBackground(BView* view, BRect& rect,
128 									const BRect& updateRect,
129 									const rgb_color& base,
130 									uint32 flags = 0,
131 									uint32 borders = B_ALL_BORDERS,
132 									orientation orientation = B_HORIZONTAL);
133 	/*virtual*/	void			DrawButtonBackground(BView* view, BRect& rect,
134 									const BRect& updateRect,
135 									float radius,
136 									const rgb_color& base,
137 									uint32 flags = 0,
138 									uint32 borders = B_ALL_BORDERS,
139 									orientation orientation = B_HORIZONTAL);
140 	/*virtual*/	void			DrawButtonBackground(BView* view, BRect& rect,
141 									const BRect& updateRect,
142 									float leftTopRadius,
143 									float rightTopRadius,
144 									float leftBottomRadius,
145 									float rightBottomRadius,
146 									const rgb_color& base,
147 									uint32 flags = 0,
148 									uint32 borders = B_ALL_BORDERS,
149 									orientation orientation = B_HORIZONTAL);
150 
151 	virtual	void				DrawMenuBarBackground(BView* view, BRect& rect,
152 									const BRect& updateRect,
153 									const rgb_color& base,
154 									uint32 flags = 0,
155 									uint32 borders = B_ALL_BORDERS);
156 
157 	virtual	void				DrawMenuFieldFrame(BView* view, BRect& rect,
158 									const BRect& updateRect,
159 									const rgb_color& base,
160 									const rgb_color& background,
161 									uint32 flags = 0,
162 									uint32 borders = B_ALL_BORDERS);
163 	/*virtual*/	void			DrawMenuFieldFrame(BView* view, BRect& rect,
164 									const BRect& updateRect,
165 									float radius,
166 									const rgb_color& base,
167 									const rgb_color& background,
168 									uint32 flags = 0,
169 									uint32 borders = B_ALL_BORDERS);
170 	/*virtual*/	void			DrawMenuFieldFrame(BView* view, BRect& rect,
171 									const BRect& updateRect,
172 									float leftTopRadius,
173 									float rightTopRadius,
174 									float leftBottomRadius,
175 									float rightBottomRadius,
176 									const rgb_color& base,
177 									const rgb_color& background,
178 									uint32 flags = 0,
179 									uint32 borders = B_ALL_BORDERS);
180 
181 	virtual	void				DrawMenuFieldBackground(BView* view,
182 									BRect& rect, const BRect& updateRect,
183 									const rgb_color& base, bool popupIndicator,
184 									uint32 flags = 0);
185 	/*virtual*/	void			DrawMenuFieldBackground(BView* view,
186 									BRect& rect, const BRect& updateRect,
187 									float radius, const rgb_color& base,
188 									bool popupIndicator, uint32 flags = 0);
189 	/*virtual*/	void			DrawMenuFieldBackground(BView* view,
190 									BRect& rect, const BRect& updateRect,
191 									float leftTopRadius,
192 									float rightTopRadius,
193 									float leftBottomRadius,
194 									float rightBottomRadius,
195 									const rgb_color& base,
196 									bool popupIndicator, uint32 flags = 0);
197 	virtual	void				DrawMenuFieldBackground(BView* view,
198 									BRect& rect, const BRect& updateRect,
199 									const rgb_color& base, uint32 flags = 0,
200 									uint32 borders = B_ALL_BORDERS);
201 
202 	virtual	void				DrawMenuBackground(BView* view,
203 									BRect& rect, const BRect& updateRect,
204 									const rgb_color& base, uint32 flags = 0,
205 									uint32 borders = B_ALL_BORDERS);
206 
207 	virtual	void				DrawMenuItemBackground(BView* view,
208 									BRect& rect, const BRect& updateRect,
209 									const rgb_color& base, uint32 flags = 0,
210 									uint32 borders = B_ALL_BORDERS);
211 
212 	virtual	void				DrawStatusBar(BView* view, BRect& rect,
213 									const BRect& updateRect,
214 									const rgb_color& base,
215 									const rgb_color& barColor,
216 									float progressPosition);
217 
218 	virtual	void				DrawCheckBox(BView* view, BRect& rect,
219 									const BRect& updateRect,
220 									const rgb_color& base,
221 									uint32 flags = 0);
222 
223 	virtual	void				DrawRadioButton(BView* view, BRect& rect,
224 									const BRect& updateRect,
225 									const rgb_color& base,
226 									uint32 flags = 0);
227 
228 	virtual	void				DrawScrollBarBackground(BView* view,
229 									BRect& rect1, BRect& rect2,
230 									const BRect& updateRect,
231 									const rgb_color& base, uint32 flags,
232 									orientation orientation);
233 	virtual	void				DrawScrollBarBackground(BView* view,
234 									BRect& rect, const BRect& updateRect,
235 									const rgb_color& base, uint32 flags,
236 									orientation orientation);
237 
238 	/*virtual*/	void			DrawScrollViewFrame(BView* view,
239 									BRect& rect, const BRect& updateRect,
240 									BRect verticalScrollBarFrame,
241 									BRect horizontalScrollBarFrame,
242 									const rgb_color& base,
243 									border_style borderStyle,
244 									uint32 flags = 0,
245 									uint32 borders = B_ALL_BORDERS);
246 
247 	/*virtual*/	void			DrawArrowShape(BView* view,
248 									BRect& rect, const BRect& updateRect,
249 									const rgb_color& base, uint32 direction,
250 									uint32 flags = 0,
251 									float tint = B_DARKEN_MAX_TINT);
252 
253 	virtual	rgb_color			SliderBarColor(const rgb_color& base);
254 
255 	virtual	void				DrawSliderBar(BView* view, BRect rect,
256 									const BRect& updateRect,
257 									const rgb_color& base,
258 									rgb_color leftFillColor,
259 									rgb_color rightFillColor,
260 									float sliderScale, uint32 flags,
261 									orientation orientation);
262 	virtual	void				DrawSliderBar(BView* view, BRect rect,
263 									const BRect& updateRect,
264 									const rgb_color& base, rgb_color fillColor,
265 									uint32 flags, orientation orientation);
266 
267 	virtual	void				DrawSliderThumb(BView* view, BRect& rect,
268 									const BRect& updateRect,
269 									const rgb_color& base, uint32 flags,
270 									orientation orientation);
271 
272 	/*virtual*/	void			DrawSliderTriangle(BView* view, BRect& rect,
273 									const BRect& updateRect,
274 									const rgb_color& base, uint32 flags,
275 									orientation orientation);
276 	virtual	void				DrawSliderTriangle(BView* view, BRect& rect,
277 									const BRect& updateRect,
278 									const rgb_color& base,
279 									const rgb_color& fill, uint32 flags,
280 									orientation orientation);
281 
282 	virtual	void				DrawSliderHashMarks(BView* view, BRect& rect,
283 									const BRect& updateRect,
284 									const rgb_color& base, int32 count,
285 									hash_mark_location location,
286 									uint32 flags, orientation orientation);
287 
288 	virtual	void				DrawActiveTab(BView* view, BRect& rect,
289 									const BRect& updateRect,
290 									const rgb_color& base, uint32 flags = 0,
291 									uint32 borders = B_ALL_BORDERS);
292 
293 	virtual	void				DrawInactiveTab(BView* view, BRect& rect,
294 									const BRect& updateRect,
295 									const rgb_color& base, uint32 flags = 0,
296 									uint32 borders = B_ALL_BORDERS);
297 
298 	/*virtual*/	void			DrawSplitter(BView* view, BRect& rect,
299 									const BRect& updateRect,
300 									const rgb_color& base,
301 									orientation orientation,
302 									uint32 flags = 0,
303 									uint32 borders = B_ALL_BORDERS);
304 
305 	// various borders
306 
307 	virtual	void				DrawBorder(BView* view, BRect& rect,
308 									const BRect& updateRect,
309 									const rgb_color& base,
310 									border_style borderStyle, uint32 flags = 0,
311 									uint32 borders = B_ALL_BORDERS);
312 
313 	virtual	void				DrawRaisedBorder(BView* view, BRect& rect,
314 									const BRect& updateRect,
315 									const rgb_color& base, uint32 flags = 0,
316 									uint32 borders = B_ALL_BORDERS);
317 
318 	virtual	void				DrawGroupFrame(BView* view, BRect& rect,
319 									const BRect& updateRect,
320 									const rgb_color& base,
321 									uint32 borders = B_ALL_BORDERS);
322 
323 	virtual	void				DrawTextControlBorder(BView* view, BRect& rect,
324 									const BRect& updateRect,
325 									const rgb_color& base, uint32 flags = 0,
326 									uint32 borders = B_ALL_BORDERS);
327 
328 	// aligned labels
329 
330 	/*virtual*/	void			DrawLabel(BView* view, const char* label,
331 									BRect rect, const BRect& updateRect,
332 									const rgb_color& base, uint32 flags,
333 									const rgb_color* textColor = NULL);
334 	virtual	void				DrawLabel(BView* view, const char* label,
335 									BRect rect, const BRect& updateRect,
336 									const rgb_color& base, uint32 flags,
337 									const BAlignment& alignment,
338 									const rgb_color* textColor = NULL);
339 	// TODO: Would be nice to have a (non-virtual) version of this method
340 	// which takes an array of labels and locations. That would save some
341 	// setup with the view graphics state.
342 	/*virtual*/	void			DrawLabel(BView* view, const char* label,
343 									const rgb_color& base, uint32 flags,
344 									const BPoint& where,
345 									const rgb_color* textColor = NULL);
346 
347 			void				DrawLabel(BView* view, const char* label,
348 									const BBitmap* icon, BRect rect,
349 									const BRect& updateRect,
350 									const rgb_color& base, uint32 flags,
351 									const rgb_color* textColor = NULL);
352 	virtual	void				DrawLabel(BView* view, const char* label,
353 									const BBitmap* icon, BRect rect,
354 									const BRect& updateRect,
355 									const rgb_color& base, uint32 flags,
356 									const BAlignment& alignment,
357 									const rgb_color* textColor = NULL);
358 
359 	virtual	void				GetFrameInsets(frame_type frameType,
360 									uint32 flags, float& _left, float& _top,
361 									float& _right, float& _bottom);
362 	virtual	void				GetBackgroundInsets(
363 									background_type backgroundType,
364 									uint32 flags, float& _left, float& _top,
365 									float& _right, float& _bottom);
366 			void				GetInsets(frame_type frameType,
367 									background_type backgroundType,
368 									uint32 flags, float& _left, float& _top,
369 									float& _right, float& _bottom);
370 
371 	virtual	void				DrawButtonWithPopUpBackground(BView* view,
372 									BRect& rect, const BRect& updateRect,
373 									const rgb_color& base,
374 									uint32 flags = 0,
375 									uint32 borders = B_ALL_BORDERS,
376 									orientation orientation = B_HORIZONTAL);
377 	virtual	void				DrawButtonWithPopUpBackground(BView* view,
378 									BRect& rect, const BRect& updateRect,
379 									float radius,
380 									const rgb_color& base,
381 									uint32 flags = 0,
382 									uint32 borders = B_ALL_BORDERS,
383 									orientation orientation = B_HORIZONTAL);
384 	virtual	void				DrawButtonWithPopUpBackground(BView* view,
385 									BRect& rect, const BRect& updateRect,
386 									float leftTopRadius,
387 									float rightTopRadius,
388 									float leftBottomRadius,
389 									float rightBottomRadius,
390 									const rgb_color& base,
391 									uint32 flags = 0,
392 									uint32 borders = B_ALL_BORDERS,
393 									orientation orientation = B_HORIZONTAL);
394 
395 			void				SetBackgroundInfo(
396 									const BMessage& backgroundInfo);
397 
398 protected:
399 			void				_DrawButtonFrame(BView* view, BRect& rect,
400 									const BRect& updateRect,
401 									float leftTopRadius,
402 									float rightTopRadius,
403 									float leftBottomRadius,
404 									float rightBottomRadius,
405 									const rgb_color& base,
406 									const rgb_color& background,
407 									float contrast, float brightness = 1.0,
408 									uint32 flags = 0,
409 									uint32 borders = B_ALL_BORDERS);
410 
411 			void				_DrawOuterResessedFrame(BView* view,
412 									BRect& rect, const rgb_color& base,
413 									float contrast = 1.0f,
414 									float brightness = 1.0f,
415 									uint32 flags = 0,
416 									uint32 borders = B_ALL_BORDERS);
417 
418 			void				_DrawFrame(BView* view, BRect& rect,
419 									const rgb_color& left,
420 									const rgb_color& top,
421 									const rgb_color& right,
422 									const rgb_color& bottom,
423 									uint32 borders = B_ALL_BORDERS);
424 			void				_DrawFrame(BView* view, BRect& rect,
425 									const rgb_color& left,
426 									const rgb_color& top,
427 									const rgb_color& right,
428 									const rgb_color& bottom,
429 									const rgb_color& rightTop,
430 									const rgb_color& leftBottom,
431 									uint32 borders = B_ALL_BORDERS);
432 
433 			void				_DrawButtonBackground(BView* view, BRect& rect,
434 									const BRect& updateRect,
435 									float leftTopRadius,
436 									float rightTopRadius,
437 									float leftBottomRadius,
438 									float rightBottomRadius,
439 									const rgb_color& base,
440 									bool popupIndicator = false,
441 									uint32 flags = 0,
442 									uint32 borders = B_ALL_BORDERS,
443 									orientation orientation = B_HORIZONTAL);
444 			void				_DrawFlatButtonBackground(BView* view,
445 									BRect& rect, const BRect& updateRect,
446 									const rgb_color& base,
447 									bool popupIndicator = false,
448 									uint32 flags = 0,
449 									uint32 borders = B_ALL_BORDERS,
450 									orientation orientation = B_HORIZONTAL);
451 			void				_DrawNonFlatButtonBackground(BView* view,
452 									BRect& rect, const BRect& updateRect,
453 									BRegion& clipping,
454 									float leftTopRadius,
455 									float rightTopRadius,
456 									float leftBottomRadius,
457 									float rightBottomRadius,
458 									const rgb_color& base,
459 									bool popupIndicator = false,
460 									uint32 flags = 0,
461 									uint32 borders = B_ALL_BORDERS,
462 									orientation orientation = B_HORIZONTAL);
463 
464 			void				_DrawPopUpMarker(BView* view, const BRect& rect,
465 									const rgb_color& base, uint32 flags);
466 
467 			void				_DrawMenuFieldBackgroundOutside(BView* view,
468 									BRect& rect, const BRect& updateRect,
469 									float leftTopRadius,
470 									float rightTopRadius,
471 									float leftBottomRadius,
472 									float rightBottomRadius,
473 									const rgb_color& base,
474 									bool popupIndicator = false,
475 									uint32 flags = 0);
476 
477 			void				_DrawMenuFieldBackgroundInside(BView* view,
478 									BRect& rect, const BRect& updateRect,
479 									float leftTopRadius,
480 									float rightTopRadius,
481 									float leftBottomRadius,
482 									float rightBottomRadius,
483 									const rgb_color& base, uint32 flags = 0,
484 									uint32 borders = B_ALL_BORDERS);
485 
486 	// Rounded corner methods
487 			void				_DrawRoundCornerLeftTop(BView* view,
488 									BRect& cornerRect, const BRect& updateRect,
489 									const rgb_color& background,
490 									const rgb_color& edgeColor,
491 									const rgb_color& frameColor,
492 									const rgb_color& bevelColor,
493 									const BGradientLinear& fillGradient);
494 
495 			void				_DrawRoundCornerFrameLeftTop(BView* view,
496 									BRect& cornerRect, const BRect& updateRect,
497 									const rgb_color& background,
498 									const rgb_color& edgeColor,
499 									const rgb_color& frameColor);
500 
501 			void				_DrawRoundCornerBackgroundLeftTop(BView* view,
502 									BRect& cornerRect, const BRect& updateRect,
503 									const rgb_color& bevelColor,
504 									const BGradientLinear& fillGradient);
505 
506 			void				_DrawRoundCornerRightTop(BView* view,
507 									BRect& cornerRect, const BRect& updateRect,
508 									const rgb_color& background,
509 									const rgb_color& edgeTopColor,
510 									const rgb_color& edgeRightColor,
511 									const rgb_color& frameTopColor,
512 									const rgb_color& frameRightColor,
513 									const rgb_color& bevelTopColor,
514 									const rgb_color& bevelRightColor,
515 									const BGradientLinear& fillGradient);
516 
517 			void				_DrawRoundCornerFrameRightTop(BView* view,
518 									BRect& cornerRect, const BRect& updateRect,
519 									const rgb_color& background,
520 									const rgb_color& edgeTopColor,
521 									const rgb_color& edgeRightColor,
522 									const rgb_color& frameTopColor,
523 									const rgb_color& frameRightColor);
524 
525 			void				_DrawRoundCornerBackgroundRightTop(BView* view,
526 									BRect& cornerRect, const BRect& updateRect,
527 									const rgb_color& bevelTopColor,
528 									const rgb_color& bevelRightColor,
529 									const BGradientLinear& fillGradient);
530 
531 			void				_DrawRoundCornerLeftBottom(BView* view,
532 									BRect& cornerRect, const BRect& updateRect,
533 									const rgb_color& background,
534 									const rgb_color& edgeLeftColor,
535 									const rgb_color& edgeBottomColor,
536 									const rgb_color& frameLeftColor,
537 									const rgb_color& frameBottomColor,
538 									const rgb_color& bevelLeftColor,
539 									const rgb_color& bevelBottomColor,
540 									const BGradientLinear& fillGradient);
541 
542 			void				_DrawRoundCornerFrameLeftBottom(BView* view,
543 									BRect& cornerRect, const BRect& updateRect,
544 									const rgb_color& background,
545 									const rgb_color& edgeLeftColor,
546 									const rgb_color& edgeBottomColor,
547 									const rgb_color& frameLeftColor,
548 									const rgb_color& frameBottomColor);
549 
550 			void				_DrawRoundCornerBackgroundLeftBottom(BView* view,
551 									BRect& cornerRect, const BRect& updateRect,
552 									const rgb_color& bevelLeftColor,
553 									const rgb_color& bevelBottomColor,
554 									const BGradientLinear& fillGradient);
555 
556 			void				_DrawRoundCornerRightBottom(BView* view,
557 									BRect& cornerRect, const BRect& updateRect,
558 									const rgb_color& background,
559 									const rgb_color& edgeColor,
560 									const rgb_color& frameColor,
561 									const rgb_color& bevelColor,
562 									const BGradientLinear& fillGradient);
563 
564 			void				_DrawRoundCornerFrameRightBottom(BView* view,
565 									BRect& cornerRect, const BRect& updateRect,
566 									const rgb_color& background,
567 									const rgb_color& edgeColor,
568 									const rgb_color& frameColor);
569 
570 			void				_DrawRoundCornerBackgroundRightBottom(
571 									BView* view,
572 									BRect& cornerRect, const BRect& updateRect,
573 									const rgb_color& bevelColor,
574 									const BGradientLinear& fillGradient);
575 
576 			void				_DrawRoundBarCorner(BView* view, BRect& rect,
577 									const BRect& updateRect,
578 									const rgb_color& edgeLightColor,
579 									const rgb_color& edgeShadowColor,
580 									const rgb_color& frameLightColor,
581 									const rgb_color& frameShadowColor,
582 									const rgb_color& fillLightColor,
583 									const rgb_color& fillShadowColor,
584 									float leftInset, float topInset,
585 									float rightInset, float bottomInset,
586 									orientation orientation);
587 
588 	// Border color methods
589 			rgb_color			_EdgeLightColor(const rgb_color& base,
590 									float contrast, float brightness,
591 									uint32 flags);
592 
593 			rgb_color			_EdgeShadowColor(const rgb_color& base,
594 									float contrast, float brightness,
595 									uint32 flags);
596 
597 			rgb_color			_FrameLightColor(const rgb_color& base,
598 									uint32 flags);
599 
600 			rgb_color			_FrameShadowColor(const rgb_color& base,
601 									uint32 flags);
602 
603 			rgb_color			_BevelLightColor(const rgb_color& base,
604 									uint32 flags);
605 
606 			rgb_color			_BevelShadowColor(const rgb_color& base,
607 									uint32 flags);
608 
609 	// Background gradient methods
610 			void				_FillGradient(BView* view, const BRect& rect,
611 									const rgb_color& base, float topTint,
612 									float bottomTint,
613 									orientation orientation = B_HORIZONTAL);
614 
615 			void				_FillGlossyGradient(BView* view,
616 									const BRect& rect, const rgb_color& base,
617 									float topTint, float middle1Tint,
618 									float middle2Tint, float bottomTint,
619 									orientation orientation = B_HORIZONTAL);
620 
621 			void				_MakeGradient(BGradientLinear& gradient,
622 									const BRect& rect, const rgb_color& base,
623 									float topTint, float bottomTint,
624 									orientation orientation = B_HORIZONTAL) const;
625 
626 			void				_MakeGlossyGradient(BGradientLinear& gradient,
627 									const BRect& rect, const rgb_color& base,
628 									float topTint, float middle1Tint,
629 									float middle2Tint, float bottomTint,
630 									orientation orientation = B_HORIZONTAL) const;
631 
632 			void				_MakeButtonGradient(BGradientLinear& gradient,
633 									BRect& rect, const rgb_color& base,
634 									uint32 flags, orientation orientation = B_HORIZONTAL) const;
635 
636 			bool				_RadioButtonAndCheckBoxMarkColor(
637 									const rgb_color& base, rgb_color& color,
638 									uint32 flags) const;
639 
640 private:
641 			bool				fCachedOutline;
642 			int32				fCachedWorkspace;
643 			BMessage			fBackgroundInfo;
644 
645 			uint32				_reserved[20];
646 };
647 
648 extern BControlLook* be_control_look;
649 
650 
651 } // namespace BPrivate
652 
653 using BPrivate::BControlLook;
654 using BPrivate::be_control_look;
655 
656 
657 #endif // _CONTROL_LOOK_H
658