Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CEGUIFrameWindow.cpp

Go to the documentation of this file.
00001 /************************************************************************
00002         filename:       CEGUIFrameWindow.cpp
00003         created:        13/4/2004
00004         author:         Paul D Turner
00005         
00006         purpose:        Implementation of FrameWindow base class
00007 *************************************************************************/
00008 /*************************************************************************
00009     Crazy Eddie's GUI System (http://www.cegui.org.uk)
00010     Copyright (C)2004 - 2005 Paul D Turner (paul@cegui.org.uk)
00011 
00012     This library is free software; you can redistribute it and/or
00013     modify it under the terms of the GNU Lesser General Public
00014     License as published by the Free Software Foundation; either
00015     version 2.1 of the License, or (at your option) any later version.
00016 
00017     This library is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020     Lesser General Public License for more details.
00021 
00022     You should have received a copy of the GNU Lesser General Public
00023     License along with this library; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 *************************************************************************/
00026 #include "elements/CEGUIFrameWindow.h"
00027 #include "elements/CEGUITitlebar.h"
00028 #include "elements/CEGUIPushButton.h"
00029 #include "CEGUIMouseCursor.h"
00030 
00031 
00032 // Start of CEGUI namespace section
00033 namespace CEGUI
00034 {
00035 const String FrameWindow::EventNamespace("FrameWindow");
00036 
00037 /*************************************************************************
00038         Definitions for Properties
00039 *************************************************************************/
00040 FrameWindowProperties::SizingEnabled                    FrameWindow::d_sizingEnabledProperty;
00041 FrameWindowProperties::FrameEnabled                             FrameWindow::d_frameEnabledProperty;
00042 FrameWindowProperties::TitlebarEnabled                  FrameWindow::d_titlebarEnabledProperty;
00043 FrameWindowProperties::CloseButtonEnabled               FrameWindow::d_closeButtonEnabledProperty;
00044 FrameWindowProperties::RollUpState                              FrameWindow::d_rollUpStateProperty;
00045 FrameWindowProperties::RollUpEnabled                    FrameWindow::d_rollUpEnabledProperty;
00046 FrameWindowProperties::DragMovingEnabled                FrameWindow::d_dragMovingEnabledProperty;
00047 FrameWindowProperties::SizingBorderThickness    FrameWindow::d_sizingBorderThicknessProperty;
00048 FrameWindowProperties::TitlebarFont                             FrameWindow::d_titlebarFontProperty;
00049 FrameWindowProperties::CaptionColour                    FrameWindow::d_captionColourProperty;
00050 
00051 
00052 /*************************************************************************
00053         Constants
00054 *************************************************************************/
00055 // additional event names for this window
00056 const String FrameWindow::EventRollupToggled( (utf8*)"RollupToggled" );
00057 const String FrameWindow::EventCloseClicked( (utf8*)"CloseClicked" );
00058 
00059 // other bits
00060 const float FrameWindow::DefaultSizingBorderSize        = 8.0f;
00061 
00062 
00063 /*************************************************************************
00064         Constructor
00065 *************************************************************************/
00066 FrameWindow::FrameWindow(const String& type, const String& name) :
00067         Window(type, name)
00068 {
00069         d_frameEnabled          = true;
00070         d_rollupEnabled         = true;
00071         d_rolledup                      = false;
00072         d_sizingEnabled         = true;
00073         d_beingSized            = false;
00074         d_dragMovable           = true;
00075 
00076         d_borderSize            = DefaultSizingBorderSize;
00077 
00078         d_nsSizingCursor = d_ewSizingCursor = d_neswSizingCursor = d_nwseSizingCursor = NULL;
00079 
00080         addFrameWindowEvents();
00081         addFrameWindowProperties();
00082 }
00083 
00084 
00085 /*************************************************************************
00086         Destructor
00087 *************************************************************************/
00088 FrameWindow::~FrameWindow(void)
00089 {
00090 }
00091 
00092 
00093 /*************************************************************************
00094         Initialises the Window based object ready for use.
00095 *************************************************************************/
00096 void FrameWindow::initialise(void)
00097 {
00098         // create child windows
00099         d_titlebar              = createTitlebar();
00100         d_closeButton   = createCloseButton();
00101 
00102         // add child controls
00103         if (d_titlebar != NULL)
00104         {
00105                 d_titlebar->setDraggingEnabled(d_dragMovable);
00106                 addChildWindow(d_titlebar);
00107         }
00108 
00109         if (d_closeButton != NULL)
00110         {
00111                 addChildWindow(d_closeButton);
00112 
00113                 // bind handler to close button 'Click' event
00114                 d_closeButton->subscribeEvent(PushButton::EventClicked, Event::Subscriber(&CEGUI::FrameWindow::closeClickHandler, this));
00115         }
00116 
00117         layoutComponentWidgets();
00118 }
00119 
00120 
00121 /*************************************************************************
00122         Enables or disables sizing for this window.     
00123 *************************************************************************/
00124 void FrameWindow::setSizingEnabled(bool setting)
00125 {
00126         d_sizingEnabled = setting;
00127 }
00128 
00129 
00130 /*************************************************************************
00131         Enables or disables the frame for this window.  
00132 *************************************************************************/
00133 void FrameWindow::setFrameEnabled(bool setting)
00134 {
00135         d_frameEnabled = setting;
00136         requestRedraw();
00137 }
00138 
00139 
00140 /*************************************************************************
00141         Enables or disables the title bar for the frame window. 
00142 *************************************************************************/
00143 void FrameWindow::setTitleBarEnabled(bool setting)
00144 {
00145         if (d_titlebar != NULL)
00146         {
00147                 d_titlebar->setEnabled(setting);
00148         }
00149 
00150 }
00151 
00152 
00153 /*************************************************************************
00154         Enables or disables the close button for the frame window.      
00155 *************************************************************************/
00156 void FrameWindow::setCloseButtonEnabled(bool setting)
00157 {
00158         if (d_closeButton != NULL)
00159         {
00160                 d_closeButton->setEnabled(setting);
00161         }
00162 
00163 }
00164 
00165 
00166 /*************************************************************************
00167         Enables or disables roll-up (shading) for this window.  
00168 *************************************************************************/
00169 void FrameWindow::setRollupEnabled(bool setting)
00170 {
00171         if ((setting == false) && isRolledup())
00172         {
00173                 toggleRollup();
00174         }
00175 
00176         d_rollupEnabled = setting;
00177 }
00178 
00179 
00180 /*************************************************************************
00181         Toggles the state of the window between rolled-up (shaded) and normal
00182         sizes.  This requires roll-up to be enabled.    
00183 *************************************************************************/
00184 void FrameWindow::toggleRollup(void)
00185 {
00186         if (isRollupEnabled())
00187         {
00188                 if (isRolledup())
00189                 {
00190                         d_rolledup = false;
00191                         setSize((getMetricsMode()== Relative) ? d_rel_openSize : d_abs_openSize);
00192                 }
00193                 else
00194                 {
00195                         // store original sizes for window
00196                         d_abs_openSize = d_abs_area.getSize();
00197                         d_rel_openSize = d_rel_area.getSize();
00198 
00199                         // get the current size of the title bar (if any)
00200                         Size titleSize;
00201                         if (d_titlebar != NULL)
00202                         {
00203                                 titleSize = d_titlebar->getSize();
00204                         }
00205 
00206                         // work-around minimum size setting
00207                         Size orgmin(d_minSize);
00208                         d_minSize.d_width = d_minSize.d_height = 0;
00209 
00210                         // set size of this window to 0x0, since the title/close controls are not clipped by us, they will still be visible
00211                         setSize(Size(0.0f, 0.0f));
00212 
00213                         // restore original min size;
00214                         d_minSize = orgmin;
00215 
00216                         // re-set the size of the title bar
00217                         if (d_titlebar != NULL)
00218                         {
00219                                 d_titlebar->setSize(titleSize);
00220                         }
00221 
00222                         // this must be done last so onSize does not store 0x0 as our original size
00223                         d_rolledup = true;
00224                         layoutComponentWidgets();
00225                 }
00226 
00227                 // event notification.
00228         WindowEventArgs args(this);
00229                 onRollupToggled(args);
00230         }
00231 
00232 }
00233 
00234 
00235 /*************************************************************************
00236         Set the font to use for the title bar text      
00237 *************************************************************************/
00238 void FrameWindow::setTitlebarFont(const String& name)
00239 {
00240         if (d_titlebar != NULL)
00241         {
00242                 d_titlebar->setFont(name);
00243         }
00244 
00245 }
00246 
00247 
00248 /*************************************************************************
00249         Set the font to use for the title bar text      
00250 *************************************************************************/
00251 void FrameWindow::setTitlebarFont(Font* font)
00252 {
00253         if (d_titlebar != NULL)
00254         {
00255                 d_titlebar->setFont(font);
00256         }
00257 
00258 }
00259 
00260 
00261 /*************************************************************************
00262         Move the window by the pixel offsets specified in 'offset'.     
00263 *************************************************************************/
00264 void FrameWindow::offsetPixelPosition(const Vector2& offset)
00265 {
00266         // update window state
00267         Point pos = d_abs_area.getPosition();
00268 
00269         pos.d_x += PixelAligned(offset.d_x);
00270         pos.d_y += PixelAligned(offset.d_y);
00271 
00272         d_abs_area.setPosition(pos);
00273 
00274         d_rel_area = absoluteToRelative_impl(getParent(), d_abs_area);
00275 
00276     WindowEventArgs args(this);
00277         onMoved(args);
00278 }
00279 
00280 
00281 /*************************************************************************      
00282         check local pixel co-ordinate point 'pt' and return one of the
00283         SizingLocation enumerated values depending where the point falls on
00284         the sizing border.
00285 *************************************************************************/
00286 FrameWindow::SizingLocation FrameWindow::getSizingBorderAtPoint(const Point& pt) const
00287 {
00288         Rect    frame(getSizingRect());
00289 
00290         // we can only size if the frame is enabled and sizing is on
00291         if (isSizingEnabled() && isFrameEnabled())
00292         {
00293                 // point must be inside the outer edge
00294                 if (frame.isPointInRect(pt))
00295                 {
00296                         // adjust rect to get inner edge
00297                         frame.d_left    += d_borderSize;
00298                         frame.d_top             += d_borderSize;
00299                         frame.d_right   -= d_borderSize;
00300                         frame.d_bottom  -= d_borderSize;
00301 
00302                         // detect which edges we are on
00303                         bool top        = (pt.d_y < frame.d_top);
00304                         bool bottom = (pt.d_y >= frame.d_bottom);
00305                         bool left       = (pt.d_x < frame.d_left);
00306                         bool right      = (pt.d_x >= frame.d_right);
00307 
00308                         // return appropriate 'SizingLocation' value
00309                         if (top && left)
00310                         {
00311                                 return SizingTopLeft;
00312                         }
00313                         else if (top && right)
00314                         {
00315                                 return SizingTopRight;
00316                         }
00317                         else if (bottom && left)
00318                         {
00319                                 return SizingBottomLeft;
00320                         }
00321                         else if (bottom && right)
00322                         {
00323                                 return SizingBottomRight;
00324                         }
00325                         else if (top)
00326                         {
00327                                 return SizingTop;
00328                         }
00329                         else if (bottom)
00330                         {
00331                                 return SizingBottom;
00332                         }
00333                         else if (left)
00334                         {
00335                                 return SizingLeft;
00336                         }
00337                         else if (right)
00338                         {
00339                                 return SizingRight;
00340                         }
00341 
00342                 }
00343 
00344         }
00345 
00346         // deafult: None.
00347         return SizingNone;
00348 }
00349 
00350 
00351 /*************************************************************************
00352         move the window's left edge by 'delta'.  The rest of the window
00353         does not move, thus this changes the size of the Window.        
00354 *************************************************************************/
00355 void FrameWindow::moveLeftEdge(float delta)
00356 {
00357         delta = PixelAligned(delta);
00358 
00359         float width = d_abs_area.getWidth();
00360 
00361         // limit size to within max/min values
00362         if ((width - delta) < d_minSize.d_width) {
00363                 delta = width - d_minSize.d_width;
00364         }
00365         else if ((width - delta) > d_maxSize.d_width) {
00366                 delta = width - d_maxSize.d_width;
00367         }
00368 
00369         // update window state
00370         d_abs_area.d_left += delta;
00371 
00372         d_rel_area = absoluteToRelative_impl(getParent(), d_abs_area);
00373 
00374     WindowEventArgs args(this);
00375         onMoved(args);
00376         onSized(args);
00377 }
00378 
00379 
00380 /*************************************************************************
00381         move the window's right edge by 'delta'.  The rest of the window
00382         does not move, thus this changes the size of the Window.
00383 *************************************************************************/
00384 void FrameWindow::moveRightEdge(float delta)
00385 {
00386         delta = PixelAligned(delta);
00387 
00388         float width = d_abs_area.getWidth();
00389 
00390         // limit size to within max/min values
00391         if ((width + delta) < d_minSize.d_width) {
00392                 delta = d_minSize.d_width - width;
00393         }
00394         else if ((width + delta) > d_maxSize.d_width) {
00395                 delta = d_maxSize.d_width - width;
00396         }
00397 
00398         // update window state
00399         d_abs_area.d_right += delta;
00400         d_dragPoint.d_x += delta;
00401 
00402         d_rel_area = absoluteToRelative_impl(getParent(), d_abs_area);
00403 
00404     WindowEventArgs args(this);
00405         onSized(args);
00406 }
00407 
00408 
00409 /*************************************************************************
00410         move the window's top edge by 'delta'.  The rest of the window
00411         does not move, thus this changes the size of the Window.
00412 *************************************************************************/
00413 void FrameWindow::moveTopEdge(float delta)
00414 {
00415         delta = PixelAligned(delta);
00416 
00417         float height = d_abs_area.getHeight();
00418 
00419         // limit size to within max/min values
00420         if ((height - delta) < d_minSize.d_height) {
00421                 delta = height - d_minSize.d_height;
00422         }
00423         else if ((height - delta) > d_maxSize.d_height) {
00424                 delta = height - d_maxSize.d_height;
00425         }
00426 
00427         // update window state
00428         d_abs_area.d_top += delta;
00429 
00430         d_rel_area = absoluteToRelative_impl(getParent(), d_abs_area);
00431 
00432     WindowEventArgs args(this);
00433         onMoved(args);
00434         onSized(args);
00435 }
00436 
00437 
00438 /*************************************************************************
00439         move the window's bottom edge by 'delta'.  The rest of the window
00440         does not move, thus this changes the size of the Window.        
00441 *************************************************************************/
00442 void FrameWindow::moveBottomEdge(float delta)
00443 {
00444         delta = PixelAligned(delta);
00445 
00446         float height = d_abs_area.getHeight();
00447 
00448         // limit size to within max/min values
00449         if ((height + delta) < d_minSize.d_height) {
00450                 delta = d_minSize.d_height - height;
00451         }
00452         else if ((height + delta) > d_maxSize.d_height) {
00453                 delta = d_maxSize.d_height - height;
00454         }
00455 
00456         // update window state
00457         d_abs_area.d_bottom += delta;
00458         d_dragPoint.d_y += delta;
00459 
00460         d_rel_area = absoluteToRelative_impl(getParent(), d_abs_area);
00461 
00462     WindowEventArgs args(this);
00463         onSized(args);
00464 }
00465 
00466 
00467 /*************************************************************************
00468         Add frame window specific events        
00469 *************************************************************************/
00470 void FrameWindow::addFrameWindowEvents(void)
00471 {
00472         addEvent(EventRollupToggled);
00473         addEvent(EventCloseClicked);
00474 }
00475 
00476 
00477 /*************************************************************************
00478         Handler to map close button clicks to FrameWindow 'CloseCliked' events
00479 *************************************************************************/
00480 bool FrameWindow::closeClickHandler(const EventArgs& e)
00481 {
00482     WindowEventArgs args(this);
00483         onCloseClicked(args);
00484 
00485         return true;
00486 }
00487 
00488 
00489 /*************************************************************************
00490         Set the appropriate mouse cursor for the given window-relative pixel
00491         point.
00492 *************************************************************************/
00493 void FrameWindow::setCursorForPoint(const Point& pt) const
00494 {
00495         switch(getSizingBorderAtPoint(pt))
00496         {
00497         case SizingTop:
00498         case SizingBottom:
00499                 MouseCursor::getSingleton().setImage(d_nsSizingCursor);
00500                 break;
00501 
00502         case SizingLeft:
00503         case SizingRight:
00504                 MouseCursor::getSingleton().setImage(d_ewSizingCursor);
00505                 break;
00506 
00507         case SizingTopLeft:
00508         case SizingBottomRight:
00509                 MouseCursor::getSingleton().setImage(d_nwseSizingCursor);
00510                 break;
00511 
00512         case SizingTopRight:
00513         case SizingBottomLeft:
00514                 MouseCursor::getSingleton().setImage(d_neswSizingCursor);
00515                 break;
00516 
00517         default:
00518                 MouseCursor::getSingleton().setImage(getMouseCursor());
00519                 break;
00520         }
00521 
00522 }
00523 
00524 
00525 /*************************************************************************
00526         Event generated internally whenever the roll-up / shade state of the
00527         window changes.
00528 *************************************************************************/
00529 void FrameWindow::onRollupToggled(WindowEventArgs& e)
00530 {
00531         fireEvent(EventRollupToggled, e, EventNamespace);
00532 }
00533 
00534 
00535 /*************************************************************************
00536         Event generated internally whenever the close button is clicked.        
00537 *************************************************************************/
00538 void FrameWindow::onCloseClicked(WindowEventArgs& e)
00539 {
00540         fireEvent(EventCloseClicked, e, EventNamespace);
00541 }
00542 
00543 
00544 /*************************************************************************
00545         Handler for mouse move events
00546 *************************************************************************/
00547 void FrameWindow::onMouseMove(MouseEventArgs& e)
00548 {
00549         // default processing (this is now essential as it controls event firing).
00550         Window::onMouseMove(e);
00551 
00552         // if we are not the window containing the mouse, do NOT change the cursor
00553         if (System::getSingleton().getWindowContainingMouse() != this)
00554         {
00555                 return;
00556         }
00557 
00558         if (isSizingEnabled())
00559         {
00560                 Point localMousePos(screenToWindow(e.position));
00561 
00562                 if (getMetricsMode() == Relative)
00563                 {
00564                         localMousePos = relativeToAbsolute(localMousePos);
00565                 }
00566 
00567                 if (d_beingSized)
00568                 {
00569                         SizingLocation dragEdge = getSizingBorderAtPoint(d_dragPoint);
00570 
00571                         // calculate sizing deltas...
00572                         float   deltaX = localMousePos.d_x - d_dragPoint.d_x;
00573                         float   deltaY = localMousePos.d_y - d_dragPoint.d_y;
00574 
00575                         // size left or right edges
00576                         if (isLeftSizingLocation(dragEdge))
00577                         {
00578                                 moveLeftEdge(deltaX);
00579                         }
00580                         else if (isRightSizingLocation(dragEdge))
00581                         {
00582                                 moveRightEdge(deltaX);
00583                         }
00584 
00585                         // size top or bottom edges
00586                         if (isTopSizingLocation(dragEdge))
00587                         {
00588                                 moveTopEdge(deltaY);
00589                         }
00590                         else if (isBottomSizingLocation(dragEdge))
00591                         {
00592                                 moveBottomEdge(deltaY);
00593                         }
00594 
00595                 }
00596                 else
00597                 {
00598                         setCursorForPoint(localMousePos);
00599                 }
00600 
00601         }
00602 
00603         // mark event as handled
00604         e.handled = true;
00605 }
00606 
00607 
00608 /*************************************************************************
00609         Handler for mouse button down events
00610 *************************************************************************/
00611 void FrameWindow::onMouseButtonDown(MouseEventArgs& e)
00612 {
00613         // default processing (this is now essential as it controls event firing).
00614         Window::onMouseButtonDown(e);
00615 
00616         if (e.button == LeftButton)
00617         {
00618                 if (isSizingEnabled())
00619                 {
00620                         // get position of mouse as co-ordinates local to this window.
00621                         Point localPos(screenToWindow(e.position));
00622 
00623                         if (getMetricsMode() == Relative)
00624                         {
00625                                 localPos = relativeToAbsolute(localPos);
00626                         }
00627 
00628                         // if the mouse is on the sizing border
00629                         if (getSizingBorderAtPoint(localPos) != SizingNone)
00630                         {
00631                                 // ensure all inputs come to us for now
00632                                 if (captureInput())
00633                                 {
00634                                         // setup the 'dragging' state variables
00635                                         d_beingSized = true;
00636                                         d_dragPoint = localPos;
00637                                 }
00638 
00639                         }
00640 
00641                 }
00642 
00643                 e.handled = true;
00644         }
00645 
00646 }
00647 
00648 
00649 /*************************************************************************
00650         Handler for mouse button up events
00651 *************************************************************************/
00652 void FrameWindow::onMouseButtonUp(MouseEventArgs& e)
00653 {
00654         // default processing (this is now essential as it controls event firing).
00655         Window::onMouseButtonUp(e);
00656 
00657         if (e.button == LeftButton)
00658         {
00659                 // release our capture on the input data
00660                 releaseInput();
00661                 e.handled = true;
00662         }
00663 
00664 }
00665 
00666 
00667 /*************************************************************************
00668         Handler for when mouse capture is lost
00669 *************************************************************************/
00670 void FrameWindow::onCaptureLost(WindowEventArgs& e)
00671 {
00672         // default processing (this is now essential as it controls event firing).
00673         Window::onCaptureLost(e);
00674 
00675         // reset sizing state
00676         d_beingSized = false;
00677 
00678         e.handled = true;
00679 }
00680 
00681 
00682 /*************************************************************************
00683         Handler for when frame window is re-sized
00684 *************************************************************************/
00685 void FrameWindow::onSized(WindowEventArgs& e)
00686 {
00687         if (isRolledup())
00688         {
00689                 // capture changed size(s)
00690                 d_rel_openSize = d_rel_area.getSize();
00691                 d_abs_openSize = d_abs_area.getSize();
00692 
00693                 // re-set window size to 0x0
00694                 Size nullsz(0,0);
00695                 d_abs_area.setSize(nullsz);
00696                 d_rel_area.setSize(nullsz);
00697         }
00698 
00699         layoutComponentWidgets();
00700 
00701         // MUST call base class handler no matter what.  This is now required 100%
00702         Window::onSized(e);
00703 }
00704 
00705 
00706 /*************************************************************************
00707         Handler for when a frame windows parent is sized.
00708 *************************************************************************/
00709 void FrameWindow::onParentSized(WindowEventArgs& e)
00710 {
00711         // if we are rolled up we temporarily need to restore the original sizes so
00712         // that the required calculations can occur when our parent is sized.
00713         if (isRolledup() && (getMetricsMode() == Relative))
00714         {
00715                 d_rel_area.setSize(d_rel_openSize);
00716                 d_abs_area.setSize(d_abs_openSize);
00717         }
00718 
00719         Window::onParentSized(e);
00720 }
00721 
00722 
00723 /*************************************************************************
00724         Set whether this FrameWindow can be moved by dragging the title bar.    
00725 *************************************************************************/
00726 void FrameWindow::setDragMovingEnabled(bool setting)
00727 {
00728         if (d_dragMovable != setting)
00729         {
00730                 d_dragMovable = setting;
00731 
00732                 if (d_titlebar != NULL)
00733                 {
00734                         d_titlebar->setDraggingEnabled(setting);
00735                 }
00736 
00737         }
00738 
00739 }
00740 
00741 
00742 /*************************************************************************
00743         Return the font being used for the title bar text
00744 *************************************************************************/
00745 const Font* FrameWindow::getTitlebarFont(void) const
00746 {
00747         return (d_titlebar != NULL) ? d_titlebar->getFont() : NULL;
00748 }
00749 
00750 
00751 /*************************************************************************
00752         Add properties for this class
00753 *************************************************************************/
00754 void FrameWindow::addFrameWindowProperties(void)
00755 {
00756         addProperty(&d_sizingEnabledProperty);
00757         addProperty(&d_frameEnabledProperty);
00758         addProperty(&d_titlebarEnabledProperty);
00759         addProperty(&d_closeButtonEnabledProperty);
00760         addProperty(&d_rollUpEnabledProperty);
00761         addProperty(&d_rollUpStateProperty);
00762         addProperty(&d_dragMovingEnabledProperty);
00763         addProperty(&d_sizingBorderThicknessProperty);
00764         addProperty(&d_titlebarFontProperty);
00765         addProperty(&d_captionColourProperty);
00766 }
00767 
00768 
00769 /*************************************************************************
00770         Return the current colour used for rendering the caption text
00771 *************************************************************************/
00772 colour FrameWindow::getCaptionColour(void) const
00773 {
00774         return d_titlebar->getCaptionColour();
00775 }
00776 
00777 
00778 /*************************************************************************
00779         Sets the colour to be used for rendering the caption text.
00780 *************************************************************************/
00781 void FrameWindow::setCaptionColour(colour col)
00782 {
00783         d_titlebar->setCaptionColour(col);
00784 }
00785 
00786 
00787 } // End of  CEGUI namespace section

Generated on Wed Feb 16 12:41:06 2005 for Crazy Eddies GUI System by  doxygen 1.3.9.1