OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 29 matching lines...) Expand all Loading... |
40 virtual FontDescription controlFont(ControlPart, const FontDescription&, flo
at zoomFactor) const; | 40 virtual FontDescription controlFont(ControlPart, const FontDescription&, flo
at zoomFactor) const; |
41 | 41 |
42 virtual LengthSize controlSize(ControlPart, const FontDescription&, const Le
ngthSize&, float zoomFactor) const; | 42 virtual LengthSize controlSize(ControlPart, const FontDescription&, const Le
ngthSize&, float zoomFactor) const; |
43 virtual LengthSize minimumControlSize(ControlPart, const FontDescription&, f
loat zoomFactor) const; | 43 virtual LengthSize minimumControlSize(ControlPart, const FontDescription&, f
loat zoomFactor) const; |
44 | 44 |
45 virtual LengthBox controlPadding(ControlPart, const FontDescription&, const
LengthBox& zoomedBox, float zoomFactor) const; | 45 virtual LengthBox controlPadding(ControlPart, const FontDescription&, const
LengthBox& zoomedBox, float zoomFactor) const; |
46 virtual LengthBox controlBorder(ControlPart, const FontDescription&, const L
engthBox& zoomedBox, float zoomFactor) const; | 46 virtual LengthBox controlBorder(ControlPart, const FontDescription&, const L
engthBox& zoomedBox, float zoomFactor) const; |
47 | 47 |
48 virtual bool controlRequiresPreWhiteSpace(ControlPart part) const { return p
art == PushButtonPart; } | 48 virtual bool controlRequiresPreWhiteSpace(ControlPart part) const { return p
art == PushButtonPart; } |
49 | 49 |
50 virtual void paint(ControlPart, ControlStates, GraphicsContext&, const IntRe
ct&, float zoomFactor, ScrollableArea*) const; | |
51 virtual void addVisualOverflow(ControlPart, ControlStates, float zoomFactor,
IntRect& borderBox) const; | 50 virtual void addVisualOverflow(ControlPart, ControlStates, float zoomFactor,
IntRect& borderBox) const; |
52 | 51 |
53 // Inflate an IntRect to accout for specific padding around margins. | 52 // Inflate an IntRect to accout for specific padding around margins. |
54 enum { | 53 enum { |
55 TopMargin = 0, | 54 TopMargin = 0, |
56 RightMargin = 1, | 55 RightMargin = 1, |
57 BottomMargin = 2, | 56 BottomMargin = 2, |
58 LeftMargin = 3 | 57 LeftMargin = 3 |
59 }; | 58 }; |
60 static PLATFORM_EXPORT IntRect inflateRect(const IntRect&, const IntSize&, c
onst int* margins, float zoomLevel = 1.0f); | 59 static PLATFORM_EXPORT IntRect inflateRect(const IntRect&, const IntSize&, c
onst int* margins, float zoomLevel = 1.0f); |
61 | 60 |
62 // Inflate an IntRect to account for any bleeding that would happen due to a
nti-aliasing. | 61 // Inflate an IntRect to account for any bleeding that would happen due to a
nti-aliasing. |
63 static PLATFORM_EXPORT IntRect inflateRectForAA(const IntRect&); | 62 static PLATFORM_EXPORT IntRect inflateRectForAA(const IntRect&); |
64 | 63 |
65 // Inflate an IntRect to account for its focus ring. | 64 // Inflate an IntRect to account for its focus ring. |
66 // TODO: Consider using computing the focus ring's bounds with | 65 // TODO: Consider using computing the focus ring's bounds with |
67 // -[NSCell focusRingMaskBoundsForFrame:inView:]). | 66 // -[NSCell focusRingMaskBoundsForFrame:inView:]). |
68 static PLATFORM_EXPORT IntRect inflateRectForFocusRing(const IntRect&); | 67 static PLATFORM_EXPORT IntRect inflateRectForFocusRing(const IntRect&); |
| 68 |
| 69 static PLATFORM_EXPORT LengthSize checkboxSize(const FontDescription&, const
LengthSize& zoomedSize, float zoomFactor); |
| 70 static PLATFORM_EXPORT NSButtonCell *checkbox(ControlStates, const IntRect&
zoomedRect, float zoomFactor); |
| 71 static PLATFORM_EXPORT const IntSize* checkboxSizes(); |
| 72 static PLATFORM_EXPORT const int* checkboxMargins(NSControlSize); |
| 73 static PLATFORM_EXPORT NSView* ensuredView(ScrollableArea*); |
| 74 |
| 75 static PLATFORM_EXPORT const IntSize* radioSizes(); |
| 76 static PLATFORM_EXPORT const int* radioMargins(NSControlSize); |
| 77 static PLATFORM_EXPORT LengthSize radioSize(const FontDescription&, const Le
ngthSize& zoomedSize, float zoomFactor); |
| 78 static PLATFORM_EXPORT NSButtonCell *radio(ControlStates, const IntRect& zoo
medRect, float zoomFactor); |
| 79 |
| 80 static PLATFORM_EXPORT const IntSize* buttonSizes(); |
| 81 static PLATFORM_EXPORT const int* buttonMargins(NSControlSize); |
| 82 static PLATFORM_EXPORT NSButtonCell *button(ControlPart, ControlStates, cons
t IntRect& zoomedRect, float zoomFactor); |
| 83 |
| 84 static PLATFORM_EXPORT NSControlSize controlSizeFromPixelSize(const IntSize*
sizes, const IntSize& minZoomedSize, float zoomFactor); |
| 85 static PLATFORM_EXPORT const IntSize* stepperSizes(); |
69 }; | 86 }; |
70 | 87 |
71 } // namespace blink | 88 } // namespace blink |
72 | 89 |
73 #endif // ThemeMac_h | 90 #endif // ThemeMac_h |
OLD | NEW |