OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #include "SkWidget.h" | 8 #include "SkWidget.h" |
9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
10 #include "SkKey.h" | 10 #include "SkKey.h" |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 | 302 |
303 // if (this->getButtonState() == kOn_State) | 303 // if (this->getButtonState() == kOn_State) |
304 // p.setColor(SK_ColorRED); | 304 // p.setColor(SK_ColorRED); |
305 // else | 305 // else |
306 p.setColor(SK_ColorWHITE); | 306 p.setColor(SK_ColorWHITE); |
307 | 307 |
308 box.draw(canvas, label.c_str(), label.size(), p); | 308 box.draw(canvas, label.c_str(), label.size(), p); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 SkView::Click* SkPushButtonWidget::onFindClickHandler(SkScalar x, SkScalar y) | 312 SkView::Click* SkPushButtonWidget::onFindClickHandler(SkScalar x, SkScalar y, un
signed modi) |
313 { | 313 { |
314 this->acceptFocus(); | 314 this->acceptFocus(); |
315 return new Click(this); | 315 return new Click(this); |
316 } | 316 } |
317 | 317 |
318 bool SkPushButtonWidget::onClick(Click* click) | 318 bool SkPushButtonWidget::onClick(Click* click) |
319 { | 319 { |
320 SkRect r; | 320 SkRect r; |
321 State state = kOff_State; | 321 State state = kOff_State; |
322 | 322 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 void SkBitmapView::onInflate(const SkDOM& dom, const SkDOM::Node* node) | 551 void SkBitmapView::onInflate(const SkDOM& dom, const SkDOM::Node* node) |
552 { | 552 { |
553 this->INHERITED::onInflate(dom, node); | 553 this->INHERITED::onInflate(dom, node); |
554 | 554 |
555 const char* src = dom.findAttr(node, "src"); | 555 const char* src = dom.findAttr(node, "src"); |
556 if (src) | 556 if (src) |
557 (void)this->loadBitmapFromFile(src); | 557 (void)this->loadBitmapFromFile(src); |
558 } | 558 } |
559 | 559 |
560 #endif | 560 #endif |
OLD | NEW |