ROVLib2
RISCOSC++applicationdevelopmentlibrary
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
rov2::CWindow Class Reference

#include <window.h>

Inheritance diagram for rov2::CWindow:
Inheritance graph
[legend]
Collaboration diagram for rov2::CWindow:
Collaboration graph
[legend]

Public Member Functions

 CWindow (const std::string &rksTitle)
 
 ~CWindow ()
 
void Create (const tLocation &rklSize)
 
const tWindowHandle Handle () const
 
const std::string Title () const
 
virtual void SetTitle (const std::string &rksNewTitle)
 
virtual void RedrawArea (const tLocation &rklMinimum, const tLocation &rklMaximum)
 
virtual void Open (const tWindowOpenBlock &rkwobOpenBlock)
 
virtual void Close ()
 
virtual bool Clicked (const tMouseClickBlock &rkmcbClickBlock)
 
void RegisterIcon (const CIcon *kpiIcon)
 
void DeregisterIcon (const CIcon *kpiIcon)
 
const CIconFindIcon (const tIconHandle kihIcon)
 
- Public Member Functions inherited from rov2::CCoordinateConverter
virtual tLocation FromScreen (const tLocation &rklScreen)
 
virtual tLocation ToScreen (const tLocation &rklObject)
 
- Public Member Functions inherited from rov2::CUnassignable
 CUnassignable (const CUnassignable &)=delete
 
CUnassignableoperator= (const CUnassignable &)=delete
 
 CUnassignable ()
 

Protected Member Functions

virtual void Adorn (tWindowCreateBlock &rwcbBlock)
 
virtual void Created (void)
 

Protected Attributes

char m_caWindowTitle [256]
 
tWindowHandle m_whHandle
 
std::list< const CIcon * > m_lkpwIcons
 

Detailed Description

Defines a class for a basic window

Definition at line 16 of file window.h.

Constructor & Destructor Documentation

rov2::CWindow::CWindow ( const std::string &  rksTitle)

Constructs a window with the given title

Parameters
rksTitleThe window title (which is copied internally)

Definition at line 15 of file window.cpp.

rov2::CWindow::~CWindow ( )

Destroys a window

Definition at line 96 of file window.cpp.

Member Function Documentation

virtual void rov2::CWindow::Adorn ( tWindowCreateBlock rwcbBlock)
inlineprotectedvirtual

Called to change any of the window flags

Parameters
rwcbBlockThe window creation block

Reimplemented in rov2::CAboutBox.

Definition at line 88 of file window.h.

bool rov2::CWindow::Clicked ( const tMouseClickBlock rkmcbClickBlock)
virtual

Called when something is clicked on the window

Parameters
rkmcbClickBlockThe mouse click block request
Returns
True if the click was handled; otherwise control passes to the next item

Reimplemented from rov2::CClickable.

Definition at line 138 of file window.cpp.

virtual void rov2::CWindow::Close ( )
inlinevirtual

Closes the window

Definition at line 59 of file window.h.

void rov2::CWindow::Create ( const tLocation rklSize)

Creates the window

Parameters
rklSizeThe window size (one coordinate is [0, 0] - the other is calculated from this)

Definition at line 21 of file window.cpp.

virtual void rov2::CWindow::Created ( void  )
inlineprotectedvirtual

Called after the window is created

Reimplemented in rov2::CAboutBox.

Definition at line 91 of file window.h.

void rov2::CWindow::DeregisterIcon ( const CIcon kpiIcon)

Removes an icon from the list

Parameters
kpiIconThe icon to remove

Definition at line 118 of file window.cpp.

const CIcon * rov2::CWindow::FindIcon ( const tIconHandle  kihIcon)

Finds the icon based on the icon handle

Parameters
kihIconThe icon handle to search for
Returns
The icon the handle refers to, or NULL if not found

Definition at line 124 of file window.cpp.

const tWindowHandle rov2::CWindow::Handle ( ) const
inline

Gets the window handle

Returns
The window handle

Definition at line 35 of file window.h.

void rov2::CWindow::Open ( const tWindowOpenBlock rkwobOpenBlock)
virtual

Opens the window

Parameters
rkwobOpenBlockThe window open block request

Definition at line 153 of file window.cpp.

virtual void rov2::CWindow::RedrawArea ( const tLocation rklMinimum,
const tLocation rklMaximum 
)
inlinevirtual

Redraws an area of the window

Parameters
rklMinimumThe lower-left coordinate of the window to redraw
rklMaximumThe top-right coordinate of the window to redraw

Definition at line 51 of file window.h.

void rov2::CWindow::RegisterIcon ( const CIcon kpiIcon)

Registers an icon

Parameters
kpiIconThe icon to register

Definition at line 112 of file window.cpp.

void rov2::CWindow::SetTitle ( const std::string &  rksNewTitle)
virtual

Sets the new window title

Parameters
rksNewTitleThe new window title

Definition at line 106 of file window.cpp.

const std::string rov2::CWindow::Title ( ) const
inline

Gets the window title

Returns
the window title

Definition at line 40 of file window.h.

Member Data Documentation

char rov2::CWindow::m_caWindowTitle[256]
protected

The copy of the window title

Definition at line 91 of file window.h.

std::list<const CIcon*> rov2::CWindow::m_lkpwIcons
protected

The list of icons on this window

Definition at line 100 of file window.h.

tWindowHandle rov2::CWindow::m_whHandle
protected

The window handle

Definition at line 97 of file window.h.


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