2012-01-06 04:12:57 +00:00
|
|
|
// ASEPRITE gui library
|
2012-01-06 03:52:11 +00:00
|
|
|
// Copyright (C) 2001-2012 David Capello
|
2010-09-27 22:18:17 +00:00
|
|
|
//
|
|
|
|
// This source file is ditributed under a BSD-like license, please
|
|
|
|
// read LICENSE.txt for more information.
|
2010-03-07 18:10:48 +00:00
|
|
|
|
2011-01-22 14:28:40 +00:00
|
|
|
#ifndef GUI_POPUP_FRAME_H_INCLUDED
|
|
|
|
#define GUI_POPUP_FRAME_H_INCLUDED
|
2010-03-07 18:10:48 +00:00
|
|
|
|
2011-03-27 23:42:16 +00:00
|
|
|
#include "base/compiler_specific.h"
|
2010-10-02 13:47:58 +00:00
|
|
|
#include "gui/frame.h"
|
2010-03-07 18:10:48 +00:00
|
|
|
|
2011-01-22 14:28:40 +00:00
|
|
|
class PopupFrame : public Frame
|
2010-03-07 18:10:48 +00:00
|
|
|
{
|
|
|
|
public:
|
2011-01-22 14:28:40 +00:00
|
|
|
PopupFrame(const char* text, bool close_on_buttonpressed);
|
|
|
|
~PopupFrame();
|
2010-03-07 18:10:48 +00:00
|
|
|
|
|
|
|
void setHotRegion(JRegion region);
|
|
|
|
|
2011-03-30 00:07:37 +00:00
|
|
|
void makeFloating();
|
|
|
|
void makeFixed();
|
|
|
|
|
2010-03-07 18:10:48 +00:00
|
|
|
protected:
|
2011-04-02 16:14:07 +00:00
|
|
|
bool onProcessMessage(Message* msg) OVERRIDE;
|
2011-03-27 23:42:16 +00:00
|
|
|
void onPreferredSize(PreferredSizeEvent& ev) OVERRIDE;
|
|
|
|
void onPaint(PaintEvent& ev) OVERRIDE;
|
2012-06-16 02:37:59 +00:00
|
|
|
void onInitTheme(InitThemeEvent& ev) OVERRIDE;
|
2011-01-22 14:28:40 +00:00
|
|
|
|
|
|
|
private:
|
2011-03-30 00:07:37 +00:00
|
|
|
void startFilteringMessages();
|
|
|
|
void stopFilteringMessages();
|
|
|
|
|
2011-01-22 14:28:40 +00:00
|
|
|
bool m_close_on_buttonpressed;
|
|
|
|
JRegion m_hot_region;
|
|
|
|
bool m_filtering;
|
2010-03-07 18:10:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|