| 1 | // Aseprite UI Library |
| 2 | // Copyright (C) 2001-2013 David Capello |
| 3 | // |
| 4 | // This file is released under the terms of the MIT license. |
| 5 | // Read LICENSE.txt for more information. |
| 6 | |
| 7 | #ifndef UI_TEXTBOX_H_INCLUDED |
| 8 | #define UI_TEXTBOX_H_INCLUDED |
| 9 | #pragma once |
| 10 | |
| 11 | #include "ui/widget.h" |
| 12 | |
| 13 | namespace ui { |
| 14 | |
| 15 | class TextBox : public Widget { |
| 16 | public: |
| 17 | TextBox(const std::string& text, int align); |
| 18 | |
| 19 | protected: |
| 20 | bool onProcessMessage(Message* msg) override; |
| 21 | void onPaint(PaintEvent& ev) override; |
| 22 | void onSizeHint(SizeHintEvent& ev) override; |
| 23 | void onSetText() override; |
| 24 | |
| 25 | private: |
| 26 | gfx::Point m_oldPos; |
| 27 | }; |
| 28 | |
| 29 | } // namespace ui |
| 30 | |
| 31 | #endif |
| 32 | |