Woopsi 1.3
Nintendo DS Gui Framework
Public Member Functions | Protected Member Functions | Protected Attributes
WoopsiUI::Screen Class Reference

#include <libwoopsi/include/screen.h>

Inheritance diagram for WoopsiUI::Screen:
WoopsiUI::Gadget WoopsiUI::AmigaScreen WoopsiUI::WoopsiKeyboardScreen

List of all members.

Public Member Functions

 Screen (const WoopsiString &title, GadgetStyle *style=NULL)
virtual const WoopsiStringgetTitle () const
virtual void flipToTopScreen ()
virtual void flipToBottomScreen ()
virtual bool flipScreens ()
void setTitle (const WoopsiString &title)
virtual const u8 getPhysicalScreenNumber () const

Protected Member Functions

virtual void drawBorder (GraphicsPort *port)
virtual void onDrag (s16 x, s16 y, s16 vX, s16 vY)
virtual void onFocus ()
virtual ~Screen ()
 Screen (const Screen &screen)

Protected Attributes

u8 _titleHeight
WoopsiString _title

Detailed Description

Class representing a basic, empty screen. All gadgets, except for the Woopsi object itself, must ultimately have a screen at the top of their hierarchies (below Woopsi). Screen gadgets can only be children of the Woopsi object.

Constructor & Destructor Documentation

WoopsiUI::Screen::Screen ( const WoopsiString title,
GadgetStyle style = NULL 


titleThe title of the screen; not displayed by default.
styleThe 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::Screen::~Screen ( ) [inline, protected, virtual]


WoopsiUI::Screen::Screen ( const Screen screen) [inline, protected]

Copy constructor is protected to prevent usage.

Member Function Documentation

virtual void WoopsiUI::Screen::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.

portThe GraphicsPort to draw to.
See also:

Reimplemented from WoopsiUI::Gadget.

Reimplemented in WoopsiUI::AmigaScreen.

virtual bool WoopsiUI::Screen::flipScreens ( ) [virtual]

Flip the screen from the current physical display to the other.

virtual void WoopsiUI::Screen::flipToBottomScreen ( ) [virtual]

Flip the screen from the top physical display to the bottom display.

virtual void WoopsiUI::Screen::flipToTopScreen ( ) [virtual]

Flip the screen from the bottom physical display to the top display.

virtual const u8 WoopsiUI::Screen::getPhysicalScreenNumber ( ) const [inline, virtual]

Get the number of the screen that this gadget is currently displayed on.

0 for the touch screen, 1 for the top screen.

Reimplemented from WoopsiUI::Gadget.

virtual const WoopsiString& WoopsiUI::Screen::getTitle ( ) const [inline, virtual]

Get the screen's title.

The screen's title.
virtual void WoopsiUI::Screen::onDrag ( s16  x,
s16  y,
s16  vX,
s16  vY 
) [protected, virtual]

Moves the screen vertically to follow the stylus.

xThe x co-ordinate of the stylus.
yThe y co-ordinate of the stylus.
vXThe horizontal distance of the drag.
vYThe vertical distance of the drag.

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::Screen::onFocus ( ) [protected, virtual]

Raises the screen to the top of the screen stack.

Reimplemented from WoopsiUI::Gadget.

void WoopsiUI::Screen::setTitle ( const WoopsiString title)

Set the title of the screen.

titleThe new title.

Member Data Documentation

Title of the screen

Height of the title bar

The documentation for this class was generated from the following file:
 All Classes Functions Variables Enumerations Enumerator