| * Copyright 2011 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| #ifndef GMSampleView_DEFINED |
| #define GMSampleView_DEFINED |
| class GMSampleView : public SampleView { |
| virtual ~GMSampleView() { |
| virtual bool onQuery(SkEvent* evt) { |
| if (SampleCode::TitleQ(*evt)) { |
| name.append(fGM->shortName()); |
| SampleCode::TitleR(evt, name.c_str()); |
| return this->INHERITED::onQuery(evt); |
| virtual void onDrawContent(SkCanvas* canvas) { |
| fGM->drawContent(canvas); |
| virtual void onDrawBackground(SkCanvas* canvas) { |
| fGM->drawBackground(canvas); |
| typedef SampleView INHERITED; |