Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

# WoopsiUI::AmigaScreen Class Reference

`#include <amigascreen.h>`

Inheritance diagram for WoopsiUI::AmigaScreen:

List of all members.

## Classes
struct | AmigaScreenFlags
## Public Types
enum | AmigaScreenFlagType { AMIGA_SCREEN_SHOW_FLIP = 0x0001, AMIGA_SCREEN_SHOW_DEPTH = 0x0002 }
## Public Member Functions
| AmigaScreen (const WoopsiString &title, u32 flags, u32 screenFlags, GadgetStyle *style=NULL)
virtual void | setBorderless (bool isBorderless)
virtual void | handleReleaseEvent (const GadgetEventArgs &e)
virtual void | showFlipButton ()
virtual void | showDepthButton ()
virtual void | hideFlipButton ()
virtual void | hideDepthButton ()
virtual const bool | hasFlipButton () const
virtual const bool | hasDepthButton () const
## Protected Member Functions
virtual void | drawBorder (GraphicsPort *port)
virtual void | onClick (s16 x, s16 y)
virtual | ~AmigaScreen ()
| AmigaScreen (const AmigaScreen &amigaScreen)
## Protected Attributes
DecorationGlyphButton * | _depthButton
DecorationGlyphButton * | _flipButton
AmigaScreenFlags | _screenFlags

## Detailed Description

Class providing a screen with an Amiga-style title bar. Unlike the AmigaWindow class, the title bar in this class can be overlapped by child gadgets. Clicking and dragging the title bar causes the screen to drop down the DS' display, revealing any screens below it. The screen has depth swap and display flip buttons.

All gadgets should be a child/grandchild/etc of a screen except for other screens and the Woopsi instance.

## Member Enumeration Documentation

enum WoopsiUI::AmigaScreen::AmigaScreenFlagType

Enum listing flags that can be set in the constructor's "screenFlags" parameter.

Enumerator:

  AMIGA_SCREEN_SHOW_FLIP | Screen shows flip button
  AMIGA_SCREEN_SHOW_DEPTH | Screen shows depth button

## Constructor & Destructor Documentation

WoopsiUI::AmigaScreen::AmigaScreen | ( | const WoopsiString & | title,
|  | u32 | flags,
|  | u32 | screenFlags,
|  | GadgetStyle * | style = `NULL`
| ) |  |

Constructor.

Parameters:

  title | The screen's title.
  flags | Bitmask specifying some setup values for the object.
  screenFlags | Screen-specific setup bitmask.
  style | The style that the gadget should use. If this is not specified, the gadget will use the values stored in the global defaultGadgetStyle object. The gadget will copy the properties of the style into its own internal style object.

virtual WoopsiUI::AmigaScreen::~AmigaScreen | ( |  | ) | `[inline, protected, virtual]`

Destructor.

WoopsiUI::AmigaScreen::AmigaScreen | ( | const AmigaScreen & | amigaScreen | ) | `[inline, protected]`

Copy constructor is protected to prevent usage.

## Member Function Documentation

virtual void WoopsiUI::AmigaScreen::drawBorder | ( | GraphicsPort * | port | ) | `[protected, virtual]`

Draw the area of this gadget that falls within the clipping region. Called by the redraw() function to draw all visible regions.

Parameters:

  port | The GraphicsPort to draw to.

See also:
  redraw()

Reimplemented from WoopsiUI::Screen.

virtual void WoopsiUI::AmigaScreen::handleReleaseEvent | ( | const GadgetEventArgs & | e | ) | `[virtual]`

Handle events fired by decoration gadgets.

Parameters:

  e | Event arguments to process.

Reimplemented from WoopsiUI::GadgetEventHandler.

Reimplemented in WoopsiUI::WoopsiKeyboardScreen.

virtual const bool WoopsiUI::AmigaScreen::hasDepthButton | ( |  | ) | const`[inline, virtual]`

Does the screen have a depth button?

Returns:
  True if the screen has a depth button.

virtual const bool WoopsiUI::AmigaScreen::hasFlipButton | ( |  | ) | const`[inline, virtual]`

Does the screen have a flip button?

Returns:
  True if the screen has a flip button.

virtual void WoopsiUI::AmigaScreen::hideDepthButton | ( |  | ) | `[virtual]`

Hides the depth button if it is hidden. Has no effect if the screen is borderless.

virtual void WoopsiUI::AmigaScreen::hideFlipButton | ( |  | ) | `[virtual]`

Hides the flip button if it is visible. Has no effect if the screen is borderless.

virtual void WoopsiUI::AmigaScreen::onClick | ( | s16 | x,
|  | s16 | y
| ) |  | `[protected, virtual]`

Starts the dragging system.

Parameters:

  x | The x co-ordinate of the click.
  y | The y co-ordinate of the click.

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::AmigaScreen::setBorderless | ( | bool | isBorderless | ) | `[virtual]`

Sets this gadget's border state. Setting to false hides the title bar.

Parameters:

  isBorderless | The border state.

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::AmigaScreen::showDepthButton | ( |  | ) | `[virtual]`

Shows the depth button if it is hidden. Has no effect if the screen is borderless.

virtual void WoopsiUI::AmigaScreen::showFlipButton | ( |  | ) | `[virtual]`

Shows the flip button if it is hidden. Has no effect if the screen is borderless.

## Member Data Documentation

DecorationGlyphButton* WoopsiUI::AmigaScreen::_depthButton`[protected]`

Pointer to the screen's depth button

DecorationGlyphButton* WoopsiUI::AmigaScreen::_flipButton`[protected]`

Pointer to the screen's flip button

AmigaScreenFlags WoopsiUI::AmigaScreen::_screenFlags`[protected]`

AmigaScreen-specific flags

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

- amigascreen.h