ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A confirmation dialog with two buttons. More...

#include <dialogbox.h>

Inheritance diagram for Stark::DialogBox:
Collaboration diagram for Stark::DialogBox:

List of all members.

Public Member Functions

 DialogBox (Gfx::Driver *gfx, Cursor *cursor)
 ~DialogBox () override
void open (const Common::String &message, ConfirmCallback *confirmCallback, const Common::String &confirmLabel, const Common::String &cancelLabel)
 Make the dialog visible with the specified message.
void close ()
 Hide the dialog performing no action.
void onScreenChanged ()
 Called when the screen resolution changes.
void onKeyPress (const Common::KeyState &keyState)
 Called when a keyboard key is pressed and the dialog is active.

Protected Member Functions

void onRender () override
void onClick (const Common::Point &pos) override

Private Member Functions

void freeForeground ()
void recomputeLayout ()

Static Private Member Functions

static Graphics::SurfaceloadBackground ()
static void drawBevel (Graphics::Surface *surface, const Common::Rect &rect)
static Common::Rect centerRect (const Common::Rect &container, const Common::Rect &size)

Private Attributes

Gfx::SurfaceRenderer_surfaceRenderer
Gfx::Texture_backgroundTexture
Gfx::Texture_foregroundTexture
VisualText_messageVisual
VisualText_confirmLabelVisual
VisualText_cancelLabelVisual
Common::Rect _confirmButtonRect
Common::Rect _cancelButtonRect
Common::Rect _messageRect
ConfirmCallback_confirmCallback

Detailed Description

A confirmation dialog with two buttons.

The cancel button closes the dialog without action. The confirm button executes a callback.

Definition at line 48 of file dialogbox.h.


Constructor & Destructor Documentation

Stark::DialogBox::DialogBox ( Gfx::Driver gfx,
Cursor cursor 
)

Definition at line 49 of file dialogbox.cpp.

Stark::DialogBox::~DialogBox (  )  [override]

Definition at line 85 of file dialogbox.cpp.


Member Function Documentation

Common::Rect Stark::DialogBox::centerRect ( const Common::Rect container,
const Common::Rect size 
) [static, private]

Definition at line 297 of file dialogbox.cpp.

void Stark::DialogBox::close (  ) 

Hide the dialog performing no action.

Definition at line 115 of file dialogbox.cpp.

void Stark::DialogBox::drawBevel ( Graphics::Surface surface,
const Common::Rect rect 
) [static, private]

Definition at line 274 of file dialogbox.cpp.

void Stark::DialogBox::freeForeground (  )  [private]

Definition at line 181 of file dialogbox.cpp.

Graphics::Surface * Stark::DialogBox::loadBackground (  )  [static, private]

Definition at line 219 of file dialogbox.cpp.

void Stark::DialogBox::onClick ( const Common::Point pos  )  [override, protected, virtual]

Reimplemented from Stark::Window.

Definition at line 202 of file dialogbox.cpp.

void Stark::DialogBox::onKeyPress ( const Common::KeyState keyState  ) 

Called when a keyboard key is pressed and the dialog is active.

Definition at line 213 of file dialogbox.cpp.

void Stark::DialogBox::onRender (  )  [override, protected, virtual]

Implements Stark::Window.

Definition at line 257 of file dialogbox.cpp.

void Stark::DialogBox::onScreenChanged (  ) 

Called when the screen resolution changes.

Definition at line 198 of file dialogbox.cpp.

void Stark::DialogBox::open ( const Common::String message,
ConfirmCallback confirmCallback,
const Common::String confirmLabel,
const Common::String cancelLabel 
)

Make the dialog visible with the specified message.

Definition at line 97 of file dialogbox.cpp.

void Stark::DialogBox::recomputeLayout (  )  [private]

Definition at line 124 of file dialogbox.cpp.


Member Data Documentation

Definition at line 79 of file dialogbox.h.

Definition at line 87 of file dialogbox.h.

Definition at line 84 of file dialogbox.h.

Definition at line 86 of file dialogbox.h.

Definition at line 90 of file dialogbox.h.

Definition at line 83 of file dialogbox.h.

Definition at line 80 of file dialogbox.h.

Definition at line 88 of file dialogbox.h.

Definition at line 82 of file dialogbox.h.


The documentation for this class was generated from the following files:


Generated on Sat Mar 16 2019 05:06:55 for ResidualVM by doxygen 1.7.1
curved edge   curved edge