diff options
author | reed <reed@google.com> | 2016-02-27 13:32:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-27 13:32:44 -0800 |
commit | 60d0259486a25e7ecd804cb66f191c8709b60b3e (patch) | |
tree | 7ecb95b6e4713fe5d837080bca0874e42f8182cc /src/views/animated/SkProgressBarView.cpp | |
parent | 6b2af12a3954ef3dbbdbe927811eb0d9bca1c89a (diff) |
remove unused view files
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1745813002
TBR=
Review URL: https://codereview.chromium.org/1745813002
Diffstat (limited to 'src/views/animated/SkProgressBarView.cpp')
-rw-r--r-- | src/views/animated/SkProgressBarView.cpp | 109 |
1 files changed, 0 insertions, 109 deletions
diff --git a/src/views/animated/SkProgressBarView.cpp b/src/views/animated/SkProgressBarView.cpp deleted file mode 100644 index 5ce944fb07..0000000000 --- a/src/views/animated/SkProgressBarView.cpp +++ /dev/null @@ -1,109 +0,0 @@ - -/* - * Copyright 2011 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#include "SkProgressBarView.h" -#include "SkAnimator.h" -#include "SkWidgetViews.h" -#include "SkTime.h" -#include "SkSystemEventTypes.h" - -SkProgressBarView::SkProgressBarView() -{ - init_skin_anim(kProgress_SkinEnum, &fAnim); - fAnim.setHostEventSink(this); - fProgress = 0; - fMax = 100; - -} - -void SkProgressBarView::changeProgress(int diff) -{ - int newProg = fProgress + diff; - if (newProg > 0 && newProg < fMax) - this->setProgress(newProg); - //otherwise i'll just leave it as it is - //this implies that if a new max and progress are set, max must be set first -} - -/*virtual*/ void SkProgressBarView::onDraw(SkCanvas* canvas) -{ - SkPaint paint; - SkAnimator::DifferenceType diff = fAnim.draw(canvas, &paint, SkTime::GetMSecs()); - - if (diff == SkAnimator::kDifferent) - this->inval(nullptr); - else if (diff == SkAnimator::kPartiallyDifferent) - { - SkRect bounds; - fAnim.getInvalBounds(&bounds); - this->inval(&bounds); - } -} - -/*virtual*/ bool SkProgressBarView::onEvent(const SkEvent& evt) -{ - if (evt.isType(SK_EventType_Inval)) - { - this->inval(nullptr); - return true; - } - if (evt.isType("recommendDim")) - { - SkScalar height; - - if (evt.findScalar("y", &height)) - this->setHeight(height); - return true; - } - return this->INHERITED::onEvent(evt); -} - -/*virtual*/ void SkProgressBarView::onInflate(const SkDOM& dom, const SkDOM::Node* node) -{ - this->INHERITED::onInflate(dom, node); - int32_t temp; - if (dom.findS32(node, "max", &temp)) - this->setMax(temp); - if (dom.findS32(node, "progress", &temp)) - this->setProgress(temp); -} - -/*virtual*/ void SkProgressBarView::onSizeChange() -{ - this->INHERITED::onSizeChange(); - SkEvent evt("user"); - evt.setString("id", "setDim"); - evt.setScalar("dimX", this->width()); - evt.setScalar("dimY", this->height()); - fAnim.doUserEvent(evt); -} - -void SkProgressBarView::reset() -{ - fProgress = 0; - SkEvent e("user"); - e.setString("id", "reset"); - fAnim.doUserEvent(e); -} - -void SkProgressBarView::setMax(int max) -{ - fMax = max; - SkEvent e("user"); - e.setString("id", "setMax"); - e.setS32("newMax", max); - fAnim.doUserEvent(e); -} - -void SkProgressBarView::setProgress(int progress) -{ - fProgress = progress; - SkEvent e("user"); - e.setString("id", "setProgress"); - e.setS32("newProgress", progress); - fAnim.doUserEvent(e); -} |