#include <window.h>
Public Member Functions | |
Window (s16 x, s16 y, u16 width, u16 height, const WoopsiString &title, u32 flags, GadgetStyle *style=NULL) | |
void | setTitle (const WoopsiString &title) |
const WoopsiString & | getTitle () |
Protected Member Functions | |
virtual void | drawBorder (GraphicsPort *port) |
virtual void | onDragStart () |
virtual void | onDrag (s16 x, s16 y, s16 vX, s16 vY) |
virtual void | onDragStop () |
virtual | ~Window () |
Window (const Window &window) | |
Protected Attributes | |
WoopsiString | _title |
Class representing a basic, empty window. Intended to be subclassed, but can be used as-is if necessary.
WoopsiUI::Window::Window | ( | s16 | x, | |
s16 | y, | |||
u16 | width, | |||
u16 | height, | |||
const WoopsiString & | title, | |||
u32 | flags, | |||
GadgetStyle * | style = NULL | |||
) |
Constructor.
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. | |
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::Window::~Window | ( | ) | [inline, protected, virtual] |
Destructor.
WoopsiUI::Window::Window | ( | const Window & | window | ) | [inline, protected] |
Copy constructor is protected to prevent usage.
virtual void WoopsiUI::Window::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.
port | The GraphicsPort to draw to. |
Reimplemented from WoopsiUI::Gadget.
Reimplemented in WoopsiUI::AmigaWindow.
const WoopsiString& WoopsiUI::Window::getTitle | ( | ) | [inline] |
Get the title of the window.
virtual void WoopsiUI::Window::onDrag | ( | s16 | x, | |
s16 | y, | |||
s16 | vX, | |||
s16 | vY | |||
) | [protected, virtual] |
Draws the dragging XOR rect at the new co-ordinates.
x | The x co-ordinate of the stylus. | |
y | The y co-ordinate of the stylus. | |
vX | The horizontal distance dragged. | |
vY | The vertical distance dragged. |
Reimplemented from WoopsiUI::Gadget.
virtual void WoopsiUI::Window::onDragStart | ( | ) | [protected, virtual] |
Draws a XOR rect around the window.
Reimplemented from WoopsiUI::Gadget.
virtual void WoopsiUI::Window::onDragStop | ( | ) | [protected, virtual] |
Erases the XOR rect and moves the window to the new co-ordinates.
Reimplemented from WoopsiUI::Gadget.
void WoopsiUI::Window::setTitle | ( | const WoopsiString & | title | ) |
Set the title of the window.
title | The new title. |
WoopsiString WoopsiUI::Window::_title [protected] |
Title of the window