2013-08-09 00:01:20 +00:00
|
|
|
// Aseprite UI Library
|
2013-01-27 15:13:13 +00:00
|
|
|
// Copyright (C) 2001-2013 David Capello
|
2010-09-27 22:18:17 +00:00
|
|
|
//
|
2013-08-09 00:01:20 +00:00
|
|
|
// This source file is distributed under MIT license,
|
|
|
|
// please read LICENSE.txt for more information.
|
2010-03-07 18:10:48 +00:00
|
|
|
|
2012-07-09 02:24:42 +00:00
|
|
|
#ifndef UI_POPUP_WINDOW_H_INCLUDED
|
|
|
|
#define UI_POPUP_WINDOW_H_INCLUDED
|
2010-03-07 18:10:48 +00:00
|
|
|
|
2011-03-27 23:42:16 +00:00
|
|
|
#include "base/compiler_specific.h"
|
2012-07-09 02:24:42 +00:00
|
|
|
#include "ui/window.h"
|
2010-03-07 18:10:48 +00:00
|
|
|
|
2012-06-18 01:02:54 +00:00
|
|
|
namespace ui {
|
|
|
|
|
2012-07-09 02:24:42 +00:00
|
|
|
class PopupWindow : public Window
|
2012-06-18 01:02:54 +00:00
|
|
|
{
|
|
|
|
public:
|
2013-10-14 22:58:11 +00:00
|
|
|
PopupWindow(const base::string& text, bool close_on_buttonpressed);
|
2012-07-09 02:24:42 +00:00
|
|
|
~PopupWindow();
|
2012-06-18 01:02:54 +00:00
|
|
|
|
2013-01-14 01:39:44 +00:00
|
|
|
void setHotRegion(const gfx::Region& region);
|
2012-06-18 01:02:54 +00:00
|
|
|
|
|
|
|
void makeFloating();
|
|
|
|
void makeFixed();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
bool onProcessMessage(Message* msg) OVERRIDE;
|
|
|
|
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;
|
|
|
|
void onPaint(PaintEvent& ev) OVERRIDE;
|
|
|
|
void onInitTheme(InitThemeEvent& ev) OVERRIDE;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void startFilteringMessages();
|
|
|
|
void stopFilteringMessages();
|
|
|
|
|
|
|
|
bool m_close_on_buttonpressed;
|
2013-01-14 01:39:44 +00:00
|
|
|
gfx::Region m_hotRegion;
|
2012-06-18 01:02:54 +00:00
|
|
|
bool m_filtering;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace ui
|
2010-03-07 18:10:48 +00:00
|
|
|
|
|
|
|
#endif
|