Something went wrong. Try again.
Massive multiplayer game aiming to create a collaborative musical environment.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866/*********************************************************************** filename: CEGUIFrameWindow.cpp created: 13/4/2004 author: Paul D Turner purpose: Implementation of FrameWindow base class*************************************************************************//*************************************************************************** * Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. ***************************************************************************/#include "elements/CEGUIFrameWindow.h"#include "elements/CEGUITitlebar.h"#include "elements/CEGUIPushButton.h"#include "CEGUIMouseCursor.h"#include "CEGUIWindowManager.h"#include "CEGUIExceptions.h"#include "CEGUIImagesetManager.h"#include "CEGUIImageset.h"#include "CEGUICoordConverter.h"
// Start of CEGUI namespace sectionnamespace CEGUI{const String FrameWindow::EventNamespace("FrameWindow");const String FrameWindow::WidgetTypeName("CEGUI/FrameWindow");
/************************************************************************* Definitions for Properties*************************************************************************/FrameWindowProperties::SizingEnabled FrameWindow::d_sizingEnabledProperty;FrameWindowProperties::FrameEnabled FrameWindow::d_frameEnabledProperty;FrameWindowProperties::TitlebarEnabled FrameWindow::d_titlebarEnabledProperty;FrameWindowProperties::CloseButtonEnabled FrameWindow::d_closeButtonEnabledProperty;FrameWindowProperties::RollUpState FrameWindow::d_rollUpStateProperty;FrameWindowProperties::RollUpEnabled FrameWindow::d_rollUpEnabledProperty;FrameWindowProperties::DragMovingEnabled FrameWindow::d_dragMovingEnabledProperty;FrameWindowProperties::SizingBorderThickness FrameWindow::d_sizingBorderThicknessProperty;FrameWindowProperties::NSSizingCursorImage FrameWindow::d_nsSizingCursorProperty;FrameWindowProperties::EWSizingCursorImage FrameWindow::d_ewSizingCursorProperty;FrameWindowProperties::NWSESizingCursorImage FrameWindow::d_nwseSizingCursorProperty;FrameWindowProperties::NESWSizingCursorImage FrameWindow::d_neswSizingCursorProperty;
/************************************************************************* Constants*************************************************************************/// additional event names for this windowconst String FrameWindow::EventRollupToggled( "RollupToggled" );const String FrameWindow::EventCloseClicked( "CloseClicked" );
// other bitsconst float FrameWindow::DefaultSizingBorderSize = 8.0f;
/************************************************************************* Child Widget name suffix constants*************************************************************************/const String FrameWindow::TitlebarNameSuffix( "__auto_titlebar__" );const String FrameWindow::CloseButtonNameSuffix( "__auto_closebutton__" );
/************************************************************************* Constructor*************************************************************************/FrameWindow::FrameWindow(const String& type, const String& name) : Window(type, name){ d_frameEnabled = true; d_rollupEnabled = true; d_rolledup = false; d_sizingEnabled = true; d_beingSized = false; d_dragMovable = true;
d_borderSize = DefaultSizingBorderSize;
d_nsSizingCursor = d_ewSizingCursor = d_neswSizingCursor = d_nwseSizingCursor = 0;
addFrameWindowProperties();}
/************************************************************************* Destructor*************************************************************************/FrameWindow::~FrameWindow(void){}
/************************************************************************* Initialises the Window based object ready for use.*************************************************************************/void FrameWindow::initialiseComponents(void){ // get component windows Titlebar* titlebar = getTitlebar(); PushButton* closeButton = getCloseButton();
// configure titlebar titlebar->setDraggingEnabled(d_dragMovable); titlebar->setText(d_text);
// bind handler to close button 'Click' event closeButton->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&CEGUI::FrameWindow::closeClickHandler, this));
performChildWindowLayout();}
/************************************************************************* Return whether the title bar for this window is enabled.*************************************************************************/bool FrameWindow::isTitleBarEnabled(void) const{ return !getTitlebar()->isDisabled();}
/************************************************************************* Return whether this close button for this window is enabled.*************************************************************************/bool FrameWindow::isCloseButtonEnabled(void) const{ return !getCloseButton()->isDisabled();}
/************************************************************************* Enables or disables sizing for this window. *************************************************************************/void FrameWindow::setSizingEnabled(bool setting){ d_sizingEnabled = setting;}
/************************************************************************* Enables or disables the frame for this window. *************************************************************************/void FrameWindow::setFrameEnabled(bool setting){ d_frameEnabled = setting; requestRedraw();}
/************************************************************************* Enables or disables the title bar for the frame window. *************************************************************************/void FrameWindow::setTitleBarEnabled(bool setting){ Window* titlebar = getTitlebar(); titlebar->setEnabled(setting); titlebar->setVisible(setting);}
/************************************************************************* Enables or disables the close button for the frame window. *************************************************************************/void FrameWindow::setCloseButtonEnabled(bool setting){ Window* closebtn = getCloseButton(); closebtn->setEnabled(setting); closebtn->setVisible(setting);}
/************************************************************************* Enables or disables roll-up (shading) for this window. *************************************************************************/void FrameWindow::setRollupEnabled(bool setting){ if ((setting == false) && isRolledup()) { toggleRollup(); }
d_rollupEnabled = setting;}
/************************************************************************* Toggles the state of the window between rolled-up (shaded) and normal sizes. This requires roll-up to be enabled. *************************************************************************/void FrameWindow::toggleRollup(void){ if (isRollupEnabled()) { d_rolledup ^= true; // event notification. WindowEventArgs args(this); onRollupToggled(args);
System::getSingleton().updateWindowContainingMouse(); }
}
/************************************************************************* Move the window by the pixel offsets specified in 'offset'. *************************************************************************/void FrameWindow::offsetPixelPosition(const Vector2& offset){ UVector2 uOffset(cegui_absdim(PixelAligned(offset.d_x)), cegui_absdim(PixelAligned(offset.d_y)));
setPosition(d_area.getPosition() + uOffset);}
/************************************************************************* check local pixel co-ordinate point 'pt' and return one of the SizingLocation enumerated values depending where the point falls on the sizing border.*************************************************************************/FrameWindow::SizingLocation FrameWindow::getSizingBorderAtPoint(const Point& pt) const{ Rect frame(getSizingRect());
// we can only size if the frame is enabled and sizing is on if (isSizingEnabled() && isFrameEnabled()) { // point must be inside the outer edge if (frame.isPointInRect(pt)) { // adjust rect to get inner edge frame.d_left += d_borderSize; frame.d_top += d_borderSize; frame.d_right -= d_borderSize; frame.d_bottom -= d_borderSize;
// detect which edges we are on bool top = (pt.d_y < frame.d_top); bool bottom = (pt.d_y >= frame.d_bottom); bool left = (pt.d_x < frame.d_left); bool right = (pt.d_x >= frame.d_right);
// return appropriate 'SizingLocation' value if (top && left) { return SizingTopLeft; } else if (top && right) { return SizingTopRight; } else if (bottom && left) { return SizingBottomLeft; } else if (bottom && right) { return SizingBottomRight; } else if (top) { return SizingTop; } else if (bottom) { return SizingBottom; } else if (left) { return SizingLeft; } else if (right) { return SizingRight; }
}
}
// deafult: None. return SizingNone;}
/************************************************************************* move the window's left edge by 'delta'. The rest of the window does not move, thus this changes the size of the Window. *************************************************************************/void FrameWindow::moveLeftEdge(float delta){ float orgWidth = d_pixelSize.d_width; URect area(d_area);
// ensure that we only size to the set constraints. // // NB: We are required to do this here due to our virtually unique sizing nature; the // normal system for limiting the window size is unable to supply the information we // require for updating our internal state used to manage the dragging, etc. float maxWidth(d_maxSize.d_x.asAbsolute(System::getSingleton().getRenderer()->getWidth())); float minWidth(d_minSize.d_x.asAbsolute(System::getSingleton().getRenderer()->getWidth())); float newWidth = orgWidth - delta;
if (newWidth > maxWidth) delta = orgWidth - maxWidth; else if (newWidth < minWidth) delta = orgWidth - minWidth;
// ensure adjustment will be whole pixel float adjustment = PixelAligned(delta);
if (d_horzAlign == HA_RIGHT) { area.d_max.d_x.d_offset -= adjustment; } else if (d_horzAlign == HA_CENTRE) { area.d_max.d_x.d_offset -= adjustment * 0.5f; area.d_min.d_x.d_offset += adjustment * 0.5f; } else { area.d_min.d_x.d_offset += adjustment; }
setArea_impl(area.d_min, area.getSize(), d_horzAlign == HA_LEFT);}/************************************************************************* move the window's right edge by 'delta'. The rest of the window does not move, thus this changes the size of the Window.*************************************************************************/void FrameWindow::moveRightEdge(float delta){ // store this so we can work out how much size actually changed float orgWidth = d_pixelSize.d_width; URect area(d_area);
// ensure that we only size to the set constraints. // // NB: We are required to do this here due to our virtually unique sizing nature; the // normal system for limiting the window size is unable to supply the information we // require for updating our internal state used to manage the dragging, etc. float maxWidth(d_maxSize.d_x.asAbsolute(System::getSingleton().getRenderer()->getWidth())); float minWidth(d_minSize.d_x.asAbsolute(System::getSingleton().getRenderer()->getWidth())); float newWidth = orgWidth + delta;
if (newWidth > maxWidth) delta = maxWidth - orgWidth; else if (newWidth < minWidth) delta = minWidth - orgWidth;
// ensure adjustment will be whole pixel float adjustment = PixelAligned(delta);
area.d_max.d_x.d_offset += adjustment;
if (d_horzAlign == HA_RIGHT) { area.d_max.d_x.d_offset += adjustment; area.d_min.d_x.d_offset += adjustment; } else if (d_horzAlign == HA_CENTRE) { area.d_max.d_x.d_offset += adjustment * 0.5f; area.d_min.d_x.d_offset += adjustment * 0.5f; }
setArea_impl(area.d_min, area.getSize(), d_horzAlign == HA_RIGHT);
// move the dragging point so mouse remains 'attached' to edge of window d_dragPoint.d_x += d_pixelSize.d_width - orgWidth;}
/************************************************************************* move the window's top edge by 'delta'. The rest of the window does not move, thus this changes the size of the Window.*************************************************************************/void FrameWindow::moveTopEdge(float delta){ float orgHeight = d_pixelSize.d_height; URect area(d_area);
// ensure that we only size to the set constraints. // // NB: We are required to do this here due to our virtually unique sizing nature; the // normal system for limiting the window size is unable to supply the information we // require for updating our internal state used to manage the dragging, etc. float maxHeight(d_maxSize.d_y.asAbsolute(System::getSingleton().getRenderer()->getHeight())); float minHeight(d_minSize.d_y.asAbsolute(System::getSingleton().getRenderer()->getHeight())); float newHeight = orgHeight - delta;
if (newHeight > maxHeight) delta = orgHeight - maxHeight; else if (newHeight < minHeight) delta = orgHeight - minHeight;
// ensure adjustment will be whole pixel float adjustment = PixelAligned(delta);
if (d_vertAlign == VA_BOTTOM) { area.d_max.d_y.d_offset -= adjustment; } else if (d_vertAlign == VA_CENTRE) { area.d_max.d_y.d_offset -= adjustment * 0.5f; area.d_min.d_y.d_offset += adjustment * 0.5f; } else { area.d_min.d_y.d_offset += adjustment; }
setArea_impl(area.d_min, area.getSize(), d_vertAlign == VA_TOP);}
/************************************************************************* move the window's bottom edge by 'delta'. The rest of the window does not move, thus this changes the size of the Window. *************************************************************************/void FrameWindow::moveBottomEdge(float delta){ // store this so we can work out how much size actually changed float orgHeight = d_pixelSize.d_height; URect area(d_area);
// ensure that we only size to the set constraints. // // NB: We are required to do this here due to our virtually unique sizing nature; the // normal system for limiting the window size is unable to supply the information we // require for updating our internal state used to manage the dragging, etc. float maxHeight(d_maxSize.d_y.asAbsolute(System::getSingleton().getRenderer()->getHeight())); float minHeight(d_minSize.d_y.asAbsolute(System::getSingleton().getRenderer()->getHeight())); float newHeight = orgHeight + delta;
if (newHeight > maxHeight) delta = maxHeight - orgHeight; else if (newHeight < minHeight) delta = minHeight - orgHeight;
// ensure adjustment will be whole pixel float adjustment = PixelAligned(delta);
area.d_max.d_y.d_offset += adjustment;
if (d_vertAlign == VA_BOTTOM) { area.d_max.d_y.d_offset += adjustment; area.d_min.d_y.d_offset += adjustment; } else if (d_vertAlign == VA_CENTRE) { area.d_max.d_y.d_offset += adjustment * 0.5f; area.d_min.d_y.d_offset += adjustment * 0.5f; }
setArea_impl(area.d_min, area.getSize(), d_vertAlign == VA_BOTTOM);
// move the dragging point so mouse remains 'attached' to edge of window d_dragPoint.d_y += d_pixelSize.d_height - orgHeight;}
/************************************************************************* Handler to map close button clicks to FrameWindow 'CloseCliked' events*************************************************************************/bool FrameWindow::closeClickHandler(const EventArgs& e){ WindowEventArgs args(this); onCloseClicked(args);
return true;}
/************************************************************************* Set the appropriate mouse cursor for the given window-relative pixel point.*************************************************************************/void FrameWindow::setCursorForPoint(const Point& pt) const{ switch(getSizingBorderAtPoint(pt)) { case SizingTop: case SizingBottom: MouseCursor::getSingleton().setImage(d_nsSizingCursor); break;
case SizingLeft: case SizingRight: MouseCursor::getSingleton().setImage(d_ewSizingCursor); break;
case SizingTopLeft: case SizingBottomRight: MouseCursor::getSingleton().setImage(d_nwseSizingCursor); break;
case SizingTopRight: case SizingBottomLeft: MouseCursor::getSingleton().setImage(d_neswSizingCursor); break;
default: MouseCursor::getSingleton().setImage(getMouseCursor()); break; }
}
/************************************************************************* Event generated internally whenever the roll-up / shade state of the window changes.*************************************************************************/void FrameWindow::onRollupToggled(WindowEventArgs& e){ requestRedraw(); notifyClippingChanged();
fireEvent(EventRollupToggled, e, EventNamespace);}
/************************************************************************* Event generated internally whenever the close button is clicked. *************************************************************************/void FrameWindow::onCloseClicked(WindowEventArgs& e){ fireEvent(EventCloseClicked, e, EventNamespace);}
/************************************************************************* Handler for mouse move events*************************************************************************/void FrameWindow::onMouseMove(MouseEventArgs& e){ // default processing (this is now essential as it controls event firing). Window::onMouseMove(e);
// if we are not the window containing the mouse, do NOT change the cursor if (System::getSingleton().getWindowContainingMouse() != this) { return; }
if (isSizingEnabled()) { Point localMousePos(CoordConverter::screenToWindow(*this, e.position));
if (d_beingSized) { SizingLocation dragEdge = getSizingBorderAtPoint(d_dragPoint);
// calculate sizing deltas... float deltaX = localMousePos.d_x - d_dragPoint.d_x; float deltaY = localMousePos.d_y - d_dragPoint.d_y;
// size left or right edges if (isLeftSizingLocation(dragEdge)) { moveLeftEdge(deltaX); } else if (isRightSizingLocation(dragEdge)) { moveRightEdge(deltaX); }
// size top or bottom edges if (isTopSizingLocation(dragEdge)) { moveTopEdge(deltaY); } else if (isBottomSizingLocation(dragEdge)) { moveBottomEdge(deltaY); }
} else { setCursorForPoint(localMousePos); }
}
// mark event as handled e.handled = true;}
/************************************************************************* Handler for mouse button down events*************************************************************************/void FrameWindow::onMouseButtonDown(MouseEventArgs& e){ // default processing (this is now essential as it controls event firing). Window::onMouseButtonDown(e);
if (e.button == LeftButton) { if (isSizingEnabled()) { // get position of mouse as co-ordinates local to this window. Point localPos(CoordConverter::screenToWindow(*this, e.position));
// if the mouse is on the sizing border if (getSizingBorderAtPoint(localPos) != SizingNone) { // ensure all inputs come to us for now if (captureInput()) { // setup the 'dragging' state variables d_beingSized = true; d_dragPoint = localPos; e.handled = true; }
}
}
}
}
/************************************************************************* Handler for mouse button up events*************************************************************************/void FrameWindow::onMouseButtonUp(MouseEventArgs& e){ // default processing (this is now essential as it controls event firing). Window::onMouseButtonUp(e);
if (e.button == LeftButton && isCapturedByThis()) { // release our capture on the input data releaseInput(); e.handled = true; }
}
/************************************************************************* Handler for when mouse capture is lost*************************************************************************/void FrameWindow::onCaptureLost(WindowEventArgs& e){ // default processing (this is now essential as it controls event firing). Window::onCaptureLost(e);
// reset sizing state d_beingSized = false;
e.handled = true;}
/************************************************************************* Handler for when text changes*************************************************************************/void FrameWindow::onTextChanged(WindowEventArgs& e){ Window::onTextChanged(e); // pass this onto titlebar component. getTitlebar()->setText(d_text); // maybe the user is using a fontdim for titlebar dimensions ;) performChildWindowLayout();}
/************************************************************************* Handler for when this Window is activated*************************************************************************/void FrameWindow::onActivated(ActivationEventArgs& e){ Window::onActivated(e); getTitlebar()->requestRedraw();}
/************************************************************************* Handler for when this Window is deactivated*************************************************************************/void FrameWindow::onDeactivated(ActivationEventArgs& e){ Window::onDeactivated(e); getTitlebar()->requestRedraw();}
/************************************************************************* Set whether this FrameWindow can be moved by dragging the title bar. *************************************************************************/void FrameWindow::setDragMovingEnabled(bool setting){ if (d_dragMovable != setting) { d_dragMovable = setting;
getTitlebar()->setDraggingEnabled(setting); }
}
/************************************************************************* Add properties for this class*************************************************************************/void FrameWindow::addFrameWindowProperties(void){ addProperty(&d_sizingEnabledProperty); addProperty(&d_frameEnabledProperty); addProperty(&d_titlebarEnabledProperty); addProperty(&d_closeButtonEnabledProperty); addProperty(&d_rollUpEnabledProperty); addProperty(&d_rollUpStateProperty); addProperty(&d_dragMovingEnabledProperty); addProperty(&d_sizingBorderThicknessProperty); addProperty(&d_nsSizingCursorProperty); addProperty(&d_ewSizingCursorProperty); addProperty(&d_nwseSizingCursorProperty); addProperty(&d_neswSizingCursorProperty);}
/************************************************************************* return the image used for the north-south sizing cursor.*************************************************************************/const Image* FrameWindow::getNSSizingCursorImage() const{ return d_nsSizingCursor;}
/************************************************************************* return the image used for the east-west sizing cursor.*************************************************************************/const Image* FrameWindow::getEWSizingCursorImage() const{ return d_ewSizingCursor;}
/************************************************************************* return the image used for the northwest-southeast sizing cursor.*************************************************************************/const Image* FrameWindow::getNWSESizingCursorImage() const{ return d_nwseSizingCursor;}
/************************************************************************* return the image used for the northeast-southwest sizing cursor.*************************************************************************/const Image* FrameWindow::getNESWSizingCursorImage() const{ return d_neswSizingCursor;}
/************************************************************************* set the image used for the north-south sizing cursor.*************************************************************************/void FrameWindow::setNSSizingCursorImage(const Image* image){ d_nsSizingCursor = image;}
/************************************************************************* set the image used for the east-west sizing cursor.*************************************************************************/void FrameWindow::setEWSizingCursorImage(const Image* image){ d_ewSizingCursor = image;}
/************************************************************************* set the image used for the northwest-southeast sizing cursor.*************************************************************************/void FrameWindow::setNWSESizingCursorImage(const Image* image){ d_nwseSizingCursor = image;}
/************************************************************************* set the image used for the northeast-southwest sizing cursor.*************************************************************************/void FrameWindow::setNESWSizingCursorImage(const Image* image){ d_neswSizingCursor = image;}
/************************************************************************* set the image used for the north-south sizing cursor.*************************************************************************/void FrameWindow::setNSSizingCursorImage(const String& imageset, const String& image){ d_nsSizingCursor = &ImagesetManager::getSingleton().getImageset(imageset)->getImage(image);}
/************************************************************************* set the image used for the east-west sizing cursor.*************************************************************************/void FrameWindow::setEWSizingCursorImage(const String& imageset, const String& image){ d_ewSizingCursor = &ImagesetManager::getSingleton().getImageset(imageset)->getImage(image);}
/************************************************************************* set the image used for the northwest-southeast sizing cursor.*************************************************************************/void FrameWindow::setNWSESizingCursorImage(const String& imageset, const String& image){ d_nwseSizingCursor = &ImagesetManager::getSingleton().getImageset(imageset)->getImage(image);}
/************************************************************************* set the image used for the northeast-southwest sizing cursor.*************************************************************************/void FrameWindow::setNESWSizingCursorImage(const String& imageset, const String& image){ d_neswSizingCursor = &ImagesetManager::getSingleton().getImageset(imageset)->getImage(image);}
/************************************************************************* Return a pointer to the Titlebar component widget for this FrameWindow.*************************************************************************/Titlebar* FrameWindow::getTitlebar() const{ return static_cast<Titlebar*>(WindowManager::getSingleton().getWindow( getName() + TitlebarNameSuffix));}
/************************************************************************* Return a pointer to the close button component widget for this FrameWindow.*************************************************************************/PushButton* FrameWindow::getCloseButton() const{ return static_cast<PushButton*>(WindowManager::getSingleton().getWindow( getName() + CloseButtonNameSuffix));}
} // End of CEGUI namespace section