| 1 | // Aseprite | 
|---|
| 2 | // Copyright (C) 2001-2017  David Capello | 
|---|
| 3 | // | 
|---|
| 4 | // This program is distributed under the terms of | 
|---|
| 5 | // the End-User License Agreement for Aseprite. | 
|---|
| 6 |  | 
|---|
| 7 | #ifndef APP_UI_ICON_BUTTON_H_INCLUDED | 
|---|
| 8 | #define APP_UI_ICON_BUTTON_H_INCLUDED | 
|---|
| 9 | #pragma once | 
|---|
| 10 |  | 
|---|
| 11 | #include "app/ui/skin/skin_part.h" | 
|---|
| 12 | #include "ui/button.h" | 
|---|
| 13 |  | 
|---|
| 14 | namespace app { | 
|---|
| 15 |  | 
|---|
| 16 | class IconButton : public ui::Button { | 
|---|
| 17 | public: | 
|---|
| 18 | IconButton(const skin::SkinPartPtr& part); | 
|---|
| 19 |  | 
|---|
| 20 | protected: | 
|---|
| 21 | void onInitTheme(ui::InitThemeEvent& ev) override; | 
|---|
| 22 | void onSizeHint(ui::SizeHintEvent& ev) override; | 
|---|
| 23 | void onPaint(ui::PaintEvent& ev) override; | 
|---|
| 24 |  | 
|---|
| 25 | private: | 
|---|
| 26 | skin::SkinPartPtr m_part; | 
|---|
| 27 | }; | 
|---|
| 28 |  | 
|---|
| 29 | } // namespace app | 
|---|
| 30 |  | 
|---|
| 31 | #endif | 
|---|
| 32 |  | 
|---|