Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F631303
popup-box.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
popup-box.h
View Options
#ifndef _paintown_gui_popup_box_h
#define _paintown_gui_popup_box_h
#include
<string>
#include
<vector>
#include
"widget.h"
#include
"box.h"
#include
"../gradient.h"
namespace
Gui
{
class
PopupBox
:
public
Widget
{
public
:
PopupBox
();
PopupBox
(
const
PopupBox
&
);
virtual
~
PopupBox
();
//! copy
PopupBox
&
operator
=
(
const
PopupBox
&
);
//! Logic
virtual
void
act
(
const
Font
&
);
//! Render
using
Widget
::
render
;
virtual
void
render
(
const
Graphics
::
Bitmap
&
);
//! Open box
virtual
void
open
();
//! Close box
virtual
void
close
();
//! Is active?
virtual
inline
bool
isActive
(){
return
(
this
->
fadeState
!=
Closed
);
}
virtual
inline
bool
isOpen
(){
return
this
->
fadeState
==
Open
||
this
->
fadeState
==
FadeIn
;
}
//!set fadespeed
virtual
inline
void
setFadeSpeed
(
int
speed
){
this
->
fadeSpeed
=
speed
;
}
//! Get current box coordinates
virtual
inline
const
Coordinate
&
getArea
(){
return
this
->
board
.
location
;
}
//! Get current box transformations
virtual
inline
const
Gui
::
Transformations
&
getTransforms
(){
return
this
->
board
.
transforms
;
}
private
:
void
doFade
();
enum
FadeState
{
Closed
,
FadeIn
,
Open
,
FadeOut
,
};
//! Current fade state
FadeState
fadeState
;
//! Fade speed
int
fadeSpeed
;
//! Board
Box
board
;
};
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Nov 15, 11:38 AM (14 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152302
Default Alt Text
popup-box.h (1 KB)
Attached To
Mode
R75 R-Tech1
Attached
Detach File
Event Timeline