Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Side by Side Diff: sky/engine/public/platform/WebFallbackThemeEngine.h

Issue 879993004: Remove ScrollableArea and Scrollbar (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/engine/platform/scroll/Scrollbar.cpp ('k') | sky/engine/public/web/WebRuntimeFeatures.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "sky/engine/public/platform/WebSize.h" 36 #include "sky/engine/public/platform/WebSize.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 struct WebRect; 40 struct WebRect;
41 41
42 class WebFallbackThemeEngine { 42 class WebFallbackThemeEngine {
43 public: 43 public:
44 // The UI part which is being accessed. 44 // The UI part which is being accessed.
45 enum Part { 45 enum Part {
46 // ScrollbarTheme parts
47 PartScrollbarDownArrow,
48 PartScrollbarLeftArrow,
49 PartScrollbarRightArrow,
50 PartScrollbarUpArrow,
51 PartScrollbarHorizontalThumb,
52 PartScrollbarVerticalThumb,
53 PartScrollbarHorizontalTrack,
54 PartScrollbarVerticalTrack,
55
56 // RenderTheme parts 46 // RenderTheme parts
57 PartCheckbox, 47 PartCheckbox,
58 PartRadio, 48 PartRadio,
59 PartButton, 49 PartButton,
60 PartMenuList, 50 PartMenuList,
61 PartSliderTrack, 51 PartSliderTrack,
62 PartSliderThumb, 52 PartSliderThumb,
63 PartInnerSpinButton, 53 PartInnerSpinButton,
64 PartProgressBar 54 PartProgressBar
65 }; 55 };
66 56
67 // The current state of the associated Part. 57 // The current state of the associated Part.
68 enum State { 58 enum State {
69 StateDisabled, 59 StateDisabled,
70 StateHover, 60 StateHover,
71 StateNormal, 61 StateNormal,
72 StatePressed, 62 StatePressed,
73 }; 63 };
74 64
75 // Extra parameters for drawing the PartScrollbarHorizontalTrack and
76 // PartScrollbarVerticalTrack.
77 struct ScrollbarTrackExtraParams {
78 // The bounds of the entire track, as opposed to the part being painted.
79 int trackX;
80 int trackY;
81 int trackWidth;
82 int trackHeight;
83 };
84
85 // Extra parameters for PartCheckbox, PartPushButton and PartRadio. 65 // Extra parameters for PartCheckbox, PartPushButton and PartRadio.
86 struct ButtonExtraParams { 66 struct ButtonExtraParams {
87 bool checked; 67 bool checked;
88 bool indeterminate; // Whether the button state is indeterminate. 68 bool indeterminate; // Whether the button state is indeterminate.
89 bool isDefault; // Whether the button is default button. 69 bool isDefault; // Whether the button is default button.
90 bool hasBorder; 70 bool hasBorder;
91 WebColor backgroundColor; 71 WebColor backgroundColor;
92 }; 72 };
93 73
94 // Extra parameters for PartMenuList 74 // Extra parameters for PartMenuList
(...skipping 20 matching lines...) Expand all
115 // Extra parameters for PartProgressBar 95 // Extra parameters for PartProgressBar
116 struct ProgressBarExtraParams { 96 struct ProgressBarExtraParams {
117 bool determinate; 97 bool determinate;
118 int valueRectX; 98 int valueRectX;
119 int valueRectY; 99 int valueRectY;
120 int valueRectWidth; 100 int valueRectWidth;
121 int valueRectHeight; 101 int valueRectHeight;
122 }; 102 };
123 103
124 union ExtraParams { 104 union ExtraParams {
125 ScrollbarTrackExtraParams scrollbarTrack;
126 ButtonExtraParams button; 105 ButtonExtraParams button;
127 MenuListExtraParams menuList; 106 MenuListExtraParams menuList;
128 SliderExtraParams slider; 107 SliderExtraParams slider;
129 InnerSpinButtonExtraParams innerSpin; 108 InnerSpinButtonExtraParams innerSpin;
130 ProgressBarExtraParams progressBar; 109 ProgressBarExtraParams progressBar;
131 }; 110 };
132 111
133 // Gets the size of the given theme part. For variable sized items 112 // Gets the size of the given theme part. For variable sized items
134 // like vertical scrollbar thumbs, the width will be the required width of 113 // like vertical scrollbar thumbs, the width will be the required width of
135 // the track while the height will be the minimum height. 114 // the track while the height will be the minimum height.
136 virtual WebSize getSize(Part) { return WebSize(); } 115 virtual WebSize getSize(Part) { return WebSize(); }
137 // Paint the given the given theme part. 116 // Paint the given the given theme part.
138 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam s*) { } 117 virtual void paint(WebCanvas*, Part, State, const WebRect&, const ExtraParam s*) { }
139 }; 118 };
140 119
141 } // namespace blink 120 } // namespace blink
142 121
143 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBFALLBACKTHEMEENGINE_H_ 122 #endif // SKY_ENGINE_PUBLIC_PLATFORM_WEBFALLBACKTHEMEENGINE_H_
OLDNEW
« no previous file with comments | « sky/engine/platform/scroll/Scrollbar.cpp ('k') | sky/engine/public/web/WebRuntimeFeatures.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698