# WoopsiUI::Window Class Reference

`#include <window.h>`

Inheritance diagram for WoopsiUI::Window:

List of all members.

## Public Member Functions
| Window (s16 x, s16 y, u16 width, u16 height, const char *title, u32 flags, FontBase *font=NULL)
virtual void | draw (Rect clipRect)
virtual bool | release (s16 x, s16 y)
virtual bool | drag (s16 x, s16 y, s16 vX, s16 vY)
void | setTitle (const char *title)
const char * | getTitle ()
virtual void | setDragging (u16 x, u16 y)
## Protected Member Functions
virtual | ~Window ()
| Window (const Window &window)
## Protected Attributes
char * | _title

## Detailed Description

Class representing a basic, empty window. Intended to be subclassed, but can be used as-is if necessary.

## Constructor & Destructor Documentation

WoopsiUI::Window::Window | ( | s16 | x,
|  | s16 | y,
|  | u16 | width,
|  | u16 | height,
|  | const char * | title,
|  | u32 | flags,
|  | FontBase * | font = `NULL` |
| ) |  |  |

Constructor.

Parameters:

  | x | The x co-ordinate of the window.
  | y | The y co-ordinate of the window.
  | width | The width of the window.
  | height | The height of the window.
  | title | The title of the window.
  | flags | Standard gadget flags bitmask.
  | font | Font to use with this window.

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

Destructor.

WoopsiUI::Window::Window | ( | const Window & | window | ) | `[inline, protected]`

Copy constructor is protected to prevent usage.

## Member Function Documentation

virtual bool WoopsiUI::Window::drag | ( | s16 | x,
|  | s16 | y,
|  | s16 | vX,
|  | s16 | vY |
| ) |  |  | `[virtual]`

Drag the gadget to the supplied co-ordinates.

Parameters:

  | x | The x co-ordinate of the stylus.
  | y | The y co-ordinate of the stylus.
  | vX | The horizontal distance that the stylus was dragged.
  | vY | The vertical distance that the stylus was dragged.

Returns:
  True if the drag was successful.

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::Window::draw | ( | Rect | clipRect | ) | `[virtual]`

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

Parameters:

  | clipRect | The clipping region to draw.

See also:
  draw()

Reimplemented from WoopsiUI::Gadget.

const char* WoopsiUI::Window::getTitle | ( |  | ) | `[inline]`

Get the title of the window.

Returns:
  The title of the window.

virtual bool WoopsiUI::Window::release | ( | s16 | x,
|  | s16 | y |
| ) |  |  | `[virtual]`

Release this gadget at the supplied co-ordinates

Parameters:

  | x | X co-ordinate of the release.
  | y | Y co-ordinate of the release.

Returns:
  True if the release was successful.

Reimplemented from WoopsiUI::Gadget.

virtual void WoopsiUI::Window::setDragging | ( | u16 | x,
|  | u16 | y |
| ) |  |  | `[virtual]`

Notify this gadget that it is being dragged, and set its drag point.

Parameters:

  | x | The x co-ordinate of the drag position relative to this gadget.
  | y | The y co-ordinate of the drag position relative to this gadget.

Reimplemented from WoopsiUI::Gadget.

void WoopsiUI::Window::setTitle | ( | const char * | title | ) |

Set the title of the window.

Parameters:

  | title | The new title.

## Member Data Documentation

char* WoopsiUI::Window::_title`[protected]`

Title of the window

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

- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.40/Woopsi/libwoopsi/include/window.h