CEGUIWindow.h

00001 /***********************************************************************
00002     filename:   CEGUIWindow.h
00003     created:    21/2/2004
00004     author:     Paul D Turner
00005 
00006     purpose:    Defines abstract base class for Window objects
00007 *************************************************************************/
00008 /***************************************************************************
00009  *   Copyright (C) 2004 - 2006 Paul D Turner & The CEGUI Development Team
00010  *
00011  *   Permission is hereby granted, free of charge, to any person obtaining
00012  *   a copy of this software and associated documentation files (the
00013  *   "Software"), to deal in the Software without restriction, including
00014  *   without limitation the rights to use, copy, modify, merge, publish,
00015  *   distribute, sublicense, and/or sell copies of the Software, and to
00016  *   permit persons to whom the Software is furnished to do so, subject to
00017  *   the following conditions:
00018  *
00019  *   The above copyright notice and this permission notice shall be
00020  *   included in all copies or substantial portions of the Software.
00021  *
00022  *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00023  *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00024  *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
00025  *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00026  *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00027  *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00028  *   OTHER DEALINGS IN THE SOFTWARE.
00029  ***************************************************************************/
00030 #ifndef _CEGUIWindow_h_
00031 #define _CEGUIWindow_h_
00032 
00033 #include "CEGUIBase.h"
00034 #include "CEGUIString.h"
00035 #include "CEGUIVector.h"
00036 #include "CEGUIRect.h"
00037 #include "CEGUISize.h"
00038 #include "CEGUIEventSet.h"
00039 #include "CEGUIPropertySet.h"
00040 #include "CEGUISystem.h"
00041 #include "CEGUIInputEvent.h"
00042 #include "CEGUIWindowProperties.h"
00043 #include "CEGUIUDim.h"
00044 #include "CEGUIRenderCache.h"
00045 #include "CEGUIWindowRenderer.h"
00046 #include <vector>
00047 #include <set>
00048 
00049 
00050 #if defined(_MSC_VER)
00051 #   pragma warning(push)
00052 #   pragma warning(disable : 4251)
00053 #endif
00054 
00055 
00056 // Start of CEGUI namespace section
00057 namespace CEGUI
00058 {
00063 enum VerticalAlignment
00064 {
00069     VA_TOP,
00074     VA_CENTRE,
00079     VA_BOTTOM
00080 };
00081 
00086 enum HorizontalAlignment
00087 {
00092     HA_LEFT,
00097     HA_CENTRE,
00102     HA_RIGHT
00103 };
00104 
00118 class CEGUIEXPORT Window : public PropertySet, public EventSet
00119 {
00120 public:
00121     /*************************************************************************
00122         Event name constants
00123     *************************************************************************/
00125     static const String EventNamespace;
00126 
00127     // generated internally by Window
00128         static const String EventWindowUpdated; 
00129 
00130     static const String EventParentSized;
00132     static const String EventSized;
00134     static const String EventMoved;
00136     static const String EventTextChanged;
00138     static const String EventFontChanged;
00140     static const String EventAlphaChanged;
00142     static const String EventIDChanged;
00144     static const String EventActivated;
00146     static const String EventDeactivated;
00148     static const String EventShown;
00150     static const String EventHidden;
00152     static const String EventEnabled;
00154     static const String EventDisabled;
00156     static const String EventClippedByParentChanged;
00158     static const String EventDestroyedByParentChanged;
00160     static const String EventInheritsAlphaChanged;
00162     static const String EventAlwaysOnTopChanged;
00164     static const String EventInputCaptureGained;
00166     static const String EventInputCaptureLost;
00168     static const String EventRenderingStarted;
00170     static const String EventRenderingEnded;
00172     static const String EventChildAdded;
00174     static const String EventChildRemoved;
00176     static const String EventDestructionStarted;
00178     static const String EventZOrderChanged;
00180     static const String EventDragDropItemEnters;
00182     static const String EventDragDropItemLeaves;
00184     static const String EventDragDropItemDropped;
00186     static const String EventVerticalAlignmentChanged;
00188     static const String EventHorizontalAlignmentChanged;
00190     static const String EventWindowRendererAttached;
00192     static const String EventWindowRendererDetached;
00193 
00194     // generated externally (inputs)
00196     static const String EventMouseEnters;
00198     static const String EventMouseLeaves;
00200     static const String EventMouseMove;
00202     static const String EventMouseWheel;
00204     static const String EventMouseButtonDown;
00206     static const String EventMouseButtonUp;
00208     static const String EventMouseClick;
00210     static const String EventMouseDoubleClick;
00212     static const String EventMouseTripleClick;
00214     static const String EventKeyDown;
00216     static const String EventKeyUp;
00218     static const String EventCharacterKey;
00219 
00220     /*************************************************************************
00221         Child Widget name suffix constants
00222     *************************************************************************/
00224     static const String TooltipNameSuffix;
00226     static const String AutoWidgetNameSuffix;
00227 
00228 
00229     /*************************************************************************
00230         Construction and Destruction
00231     *************************************************************************/
00242     Window(const String& type, const String& name);
00243 
00248     virtual ~Window(void);
00249 
00250     /*************************************************************************
00251         Accessor functions
00252     *************************************************************************/
00260     const String& getType(void) const;
00261 
00269     const String& getName(void) const  {return d_name;}
00270 
00275         const String& getPrefix(void) const {return d_windowPrefix;}
00276 
00286     bool    isDestroyedByParent(void) const    {return d_destroyedByParent;}
00287 
00297     bool isAlwaysOnTop(void) const  {return d_alwaysOnTop;}
00298 
00311     bool isDisabled(bool localOnly = false) const;
00312 
00329     bool isVisible(bool localOnly = false) const;
00330 
00345     bool isActive(void) const;
00346 
00356     bool isClippedByParent(void) const {return d_clippedByParent;}
00357 
00365     uint getID(void) const {return d_ID;}
00366 
00376     size_t getChildCount(void) const  {return d_children.size();}
00377 
00390     bool isChild(const String& name) const;
00391 
00408     bool isChild(uint ID) const;
00409 
00430     bool isChildRecursive(uint ID) const;
00431 
00443     bool isChild(const Window* window) const;
00444 
00466     Window* getChild(const String& name) const;
00467 
00468         Window* recursiveChildSearch(const String& name) const;
00469 
00491     Window* getChild(uint ID) const;
00492 
00514     Window* getChildRecursive(uint ID) const;
00515 
00529     Window* getChildAtIdx(size_t idx) const {return d_children[idx];}
00530 
00543     Window* getActiveChild(void);
00544     const Window* getActiveChild(void) const;
00545 
00559     bool isAncestor(const String& name) const;
00560 
00574     bool isAncestor(uint ID) const;
00575 
00588     bool isAncestor(const Window* window) const;
00589 
00603     Font* getFont(bool useDefault = true) const;
00604 
00612     const String& getText(void) const   {return d_text;}
00613 
00622     bool inheritsAlpha(void) const  {return d_inheritsAlpha;}
00623 
00641     float getAlpha(void) const  {return d_alpha;}
00642 
00652     float getEffectiveAlpha(void) const;
00653 
00667     Rect getPixelRect(void) const;
00668 
00682     virtual Rect getPixelRect_impl(void) const;
00683 
00692     Rect getInnerRect(void) const;
00693 
00704     Rect getUnclippedPixelRect(void) const;
00705 
00717     Rect getUnclippedInnerRect(void) const;
00718 
00730     virtual Rect getUnclippedInnerRect_impl(void) const;
00731 
00740     static Window* getCaptureWindow(void)   {return d_captureWindow;}
00741 
00750     bool isCapturedByThis(void) const   {return getCaptureWindow() == this;}
00751 
00761     bool isCapturedByAncestor(void) const
00762          {return isAncestor(getCaptureWindow());}
00763 
00772     bool isCapturedByChild(void) const  {return isChild(getCaptureWindow());}
00773 
00786     virtual bool isHit(const Vector2& position) const;
00787 
00800     Window* getChildAtPosition(const Vector2& position) const;
00801 
00815     Window* getTargetChildAtPosition(const Vector2& position) const;
00816 
00825     Window* getParent(void) const   {return d_parent;}
00826 
00841     const Image* getMouseCursor(bool useDefault = true) const;
00842 
00850     Size getPixelSize(void) const    { return d_pixelSize; }
00851 
00863     void* getUserData(void) const   {return d_userData;}
00864 
00879     bool restoresOldCapture(void) const     {return d_restoreOldCapture;}
00880 
00891     bool isZOrderingEnabled(void) const;
00892 
00903     bool wantsMultiClickEvents(void) const;
00904 
00916     bool isMouseAutoRepeatEnabled(void) const;
00917 
00926     float getAutoRepeatDelay(void) const;
00927 
00937     float getAutoRepeatRate(void) const;
00938 
00948     bool distributesCapturedInputs(void) const;
00949 
00959     bool isUsingDefaultTooltip(void) const;
00960 
00970     Tooltip* getTooltip(void) const;
00971 
00980     String getTooltipType(void) const;
00981 
00989     const String& getTooltipText(void) const;
00990 
01002     bool inheritsTooltipText(void) const;
01003 
01015     bool isRiseOnClickEnabled(void) const   { return d_riseOnClick; }
01016 
01028     bool testClassName(const String& class_name) const
01029          {return testClassName_impl(class_name);}
01030 
01041     VerticalAlignment getVerticalAlignment() const  {return d_vertAlign;}
01042 
01053     HorizontalAlignment getHorizontalAlignment() const  {return d_horzAlign;}
01054 
01062     RenderCache& getRenderCache()   { return d_renderCache; }
01063 
01072     const String& getLookNFeel() const;
01073 
01081     bool getModalState(void) const
01082          {return (System::getSingleton().getModalTarget() == this);}
01083 
01097     const String& getUserString(const String& name) const;
01098 
01110     bool isUserStringDefined(const String& name) const;
01111 
01127     Window* getActiveSibling();
01128 
01138     Size getParentPixelSize(void) const;
01139 
01149     float getParentPixelWidth(void) const;
01150 
01160     float getParentPixelHeight(void) const;
01161 
01172     bool isMousePassThroughEnabled(void) const  {return d_mousePassThroughEnabled;}
01173 
01179     bool isAutoWindow(void) const   {return d_autoWindow;}
01180 
01185     bool isWritingXMLAllowed(void) const    {return d_allowWriteXML;}
01186 
01211     EventSet::Iterator getEventIterator() const;
01212 
01233     PropertySet::Iterator getPropertyIterator() const;
01234 
01244     bool isDragDropTarget() const;
01245 
01246     /*************************************************************************
01247         Manipulator functions
01248     *************************************************************************/
01259     void rename(const String& new_name);
01260 
01272     virtual void initialiseComponents(void) {}
01273 
01287     void setDestroyedByParent(bool setting);
01288 
01301     void setAlwaysOnTop(bool setting);
01302 
01315     void setEnabled(bool setting);
01316 
01324     void enable(void)   {setEnabled(true);}
01325 
01333     void disable(void)  {setEnabled(false);}
01334 
01346     void setVisible(bool setting);
01347 
01355     void show(void)     {setVisible(true);}
01356 
01364     void hide(void)     {setVisible(false);}
01365 
01374     void activate(void);
01375 
01385     void deactivate(void);
01386 
01399     void setClippedByParent(bool setting);
01400 
01412     void setID(uint ID);
01413 
01418         void setPrefix(String prefix) { d_windowPrefix = prefix;}
01419 
01430     void setText(const String& text);
01431 
01443     void setFont(Font* font);
01444 
01459     void setFont(const String& name);
01460 
01479     void addChildWindow(const String& name);
01480 
01497     void addChildWindow(Window* window);
01498 
01510     void removeChildWindow(const String& name);
01511 
01523     void removeChildWindow(Window* window);
01524 
01538     void removeChildWindow(uint ID);
01539 
01553     void moveToFront();
01554 
01569     void moveToBack();
01570 
01580     bool captureInput(void);
01581 
01590     void releaseInput(void);
01591 
01610     void setRestoreCapture(bool setting);
01611 
01632     void setAlpha(float alpha);
01633 
01645     void setInheritsAlpha(bool setting);
01646 
01655     void requestRedraw(void) const;
01656 
01668     void setMouseCursor(const Image* image)     {d_mouseCursor = image;}
01669 
01680     void setMouseCursor(MouseCursorImage image)
01681          {d_mouseCursor = (const Image*)image;}
01682 
01702     void setMouseCursor(const String& imageset, const String& image_name);
01703 
01718     void setUserData(void* user_data)   {d_userData = user_data;}
01719 
01733     void    setZOrderingEnabled(bool setting);
01734 
01748     void setWantsMultiClickEvents(bool setting);
01749 
01762     void setMouseAutoRepeatEnabled(bool setting);
01763 
01775     void setAutoRepeatDelay(float delay);
01776 
01789     void setAutoRepeatRate(float rate);
01790 
01800     void setDistributesCapturedInputs(bool setting);
01801 
01807     void notifyDragDropItemEnters(DragContainer* item);
01808 
01814     void notifyDragDropItemLeaves(DragContainer* item);
01815 
01821     void notifyDragDropItemDropped(DragContainer* item);
01822 
01836     virtual void destroy(void);
01837 
01853     void setTooltip(Tooltip* tooltip);
01854 
01873     void setTooltipType(const String& tooltipType);
01874 
01886     void setTooltipText(const String& tip);
01887 
01902     void setInheritsTooltipText(bool setting);
01903 
01918     void setRiseOnClickEnabled(bool setting)    { d_riseOnClick = setting; }
01919 
01933     void setVerticalAlignment(const VerticalAlignment alignment);
01934 
01948     void setHorizontalAlignment(const HorizontalAlignment alignment);
01949 
01966     virtual void setLookNFeel(const String& look);
01967 
01981     void setModalState(bool state);
01982 
01993     virtual void performChildWindowLayout();
01994 
02008     void setUserString(const String& name, const String& value);
02009 
02036     void setArea(const UDim& xpos, const UDim& ypos, const UDim& width, const UDim& height);
02037 
02059     void setArea(const UVector2& pos, const UVector2& size);
02060 
02078     void setArea(const URect& area);
02079 
02098     void setPosition(const UVector2& pos);
02099 
02117     void setXPosition(const UDim& x);
02118 
02136     void setYPosition(const UDim& y);
02137 
02152     void setSize(const UVector2& size);
02153 
02168     void setWidth(const UDim& width);
02169 
02184     void setHeight(const UDim& height);
02185 
02202     void setMaxSize(const UVector2& size);
02203 
02220     void setMinSize(const UVector2& size);
02221 
02239     const URect& getArea() const;
02240 
02258     const UVector2& getPosition() const;
02259 
02277     const UDim& getXPosition() const;
02278 
02296     const UDim& getYPosition() const;
02297 
02312     UVector2 getSize() const;
02313 
02328     UDim getWidth() const;
02329 
02344     UDim getHeight() const;
02345 
02362     const UVector2& getMaxSize() const;
02363 
02380     const UVector2& getMinSize() const;
02381 
02390     void render(void);
02391 
02410     void update(float elapsed);
02411 
02422     virtual void writeXMLToStream(XMLSerializer& xml_stream) const;
02423 
02432     virtual void beginInitialisation(void)     {d_initialising=true;}
02433 
02441     virtual void endInitialisation(void)       {d_initialising=false;}
02442 
02453     void setMousePassThroughEnabled(bool setting)   {d_mousePassThroughEnabled = setting;}
02454 
02466     void setWindowRenderer(const String& name);
02467 
02476     WindowRenderer* getWindowRenderer(void) const;
02477 
02487     String getWindowRendererName(void) const;
02488 
02493     void setWritingXMLAllowed(bool allow)   {d_allowWriteXML = allow;}
02494 
02499     void notifyScreenAreaChanged(void);
02500 
02512     void setFalagardType(const String& type, const String& rendererType = "");
02513 
02523     void setDragDropTarget(bool setting);
02524 
02525 protected:
02526     /*************************************************************************
02527         System object can trigger events directly
02528     *************************************************************************/
02529     friend class System;
02530 
02531     /*************************************************************************
02532         Event trigger methods
02533     *************************************************************************/
02543     virtual void onSized(WindowEventArgs& e);
02544 
02554     virtual void onMoved(WindowEventArgs& e);
02555 
02565     virtual void onTextChanged(WindowEventArgs& e);
02566 
02576     virtual void onFontChanged(WindowEventArgs& e);
02577 
02587     virtual void onAlphaChanged(WindowEventArgs& e);
02588 
02598     virtual void onIDChanged(WindowEventArgs& e);
02599 
02609     virtual void onShown(WindowEventArgs& e);
02610 
02620     virtual void onHidden(WindowEventArgs& e);
02621 
02631     virtual void onEnabled(WindowEventArgs& e);
02632 
02642     virtual void onDisabled(WindowEventArgs& e);
02643 
02654     virtual void onClippingChanged(WindowEventArgs& e);
02655 
02666     virtual void onParentDestroyChanged(WindowEventArgs& e);
02667 
02678     virtual void onInheritsAlphaChanged(WindowEventArgs& e);
02679 
02689     virtual void onAlwaysOnTopChanged(WindowEventArgs& e);
02690 
02700     virtual void onCaptureGained(WindowEventArgs& e);
02701 
02711     virtual void onCaptureLost(WindowEventArgs& e);
02712 
02722     virtual void onRenderingStarted(WindowEventArgs& e);
02723 
02733     virtual void onRenderingEnded(WindowEventArgs& e);
02734 
02744     virtual void onZChanged(WindowEventArgs& e);
02745 
02755     virtual void onDestructionStarted(WindowEventArgs& e);
02756 
02765     virtual void onActivated(ActivationEventArgs& e);
02766 
02776     virtual void onDeactivated(ActivationEventArgs& e);
02777 
02789     virtual void onParentSized(WindowEventArgs& e);
02790 
02799     virtual void onChildAdded(WindowEventArgs& e);
02800 
02809     virtual void onChildRemoved(WindowEventArgs& e);
02810 
02818     virtual void onMouseEnters(MouseEventArgs& e);
02819 
02827     virtual void onMouseLeaves(MouseEventArgs& e);
02828 
02837     virtual void onMouseMove(MouseEventArgs& e);
02838 
02847     virtual void onMouseWheel(MouseEventArgs& e);
02848 
02857     virtual void onMouseButtonDown(MouseEventArgs& e);
02858 
02867     virtual void onMouseButtonUp(MouseEventArgs& e);
02868 
02877     virtual void onMouseClicked(MouseEventArgs& e);
02878 
02887     virtual void onMouseDoubleClicked(MouseEventArgs& e);
02888 
02897     virtual void onMouseTripleClicked(MouseEventArgs& e);
02898 
02910     virtual void onKeyDown(KeyEventArgs& e);
02911 
02923     virtual void onKeyUp(KeyEventArgs& e);
02924 
02936     virtual void onCharacter(KeyEventArgs& e);
02937 
02948     virtual void onDragDropItemEnters(DragDropEventArgs& e);
02949 
02960     virtual void onDragDropItemLeaves(DragDropEventArgs& e);
02961 
02972     virtual void onDragDropItemDropped(DragDropEventArgs& e);
02973 
02984     virtual void onVerticalAlignmentChanged(WindowEventArgs& e);
02985 
02996     virtual void onHorizontalAlignmentChanged(WindowEventArgs& e);
02997 
03007     virtual void onWindowRendererAttached(WindowEventArgs& e);
03008 
03018     virtual void onWindowRendererDetached(WindowEventArgs& e);
03019 
03020     /*************************************************************************
03021         Implementation Functions
03022     *************************************************************************/
03034     virtual void updateSelf(float elapsed);
03035 
03047     virtual void drawSelf(float z);
03048 
03056     virtual void populateRenderCache()  {}
03057 
03069     virtual bool testClassName_impl(const String& class_name) const
03070     {
03071         if (class_name=="Window")   return true;
03072         return false;
03073     }
03074 
03086     void setParent(Window* parent);
03087 
03088     Size getSize_impl(const Window* window) const;
03089 
03094     void generateAutoRepeatEvent(MouseButton button);
03095 
03104     virtual bool validateWindowRenderer(const String& name) const;
03105 
03110     void banPropertyFromXML(const Property* property);
03111 
03116     bool isPropertyBannedFromXML(const Property* property) const;
03117 
03124     bool isPropertyAtDefault(const Property* property) const;
03125 
03131     void notifyClippingChanged(void);
03132 
03133     /*************************************************************************
03134         Implementation Data
03135     *************************************************************************/
03136     // child stuff
03137     typedef std::vector<Window*> ChildList;
03139     ChildList d_children;
03140 
03142     ChildList d_drawList;
03143 
03144     // general data
03146     static Window* d_captureWindow;
03147 
03149     Window* d_oldCapture;
03150 
03152     Window* d_parent;
03153 
03155     Font* d_font;
03156 
03158     String d_text;
03159 
03161     uint d_ID;
03162 
03164     float d_alpha;
03165 
03167     URect d_area;
03168 
03170     Size d_pixelSize;
03171 
03173     const Image* d_mouseCursor;
03174 
03175     // user data
03176     typedef std::map<String, String, String::FastLessCompare>   UserStringMap;
03177 
03179     UserStringMap d_userStrings;
03180 
03182     void* d_userData;
03183 
03184     // positional alignments
03186     HorizontalAlignment d_horzAlign;
03187 
03189     VerticalAlignment d_vertAlign;
03190 
03191     // maximum and minimum sizes
03193     UVector2 d_minSize;
03194 
03196     UVector2 d_maxSize;
03197 
03198     // settings
03200     bool d_enabled;
03201 
03207     bool d_visible;
03208 
03210     bool d_active;
03211 
03213     bool d_clippedByParent;
03214 
03216     bool d_destroyedByParent;
03217 
03219     bool d_alwaysOnTop;
03220 
03222     bool d_inheritsAlpha;
03223 
03229     bool d_restoreOldCapture;
03230 
03232     bool d_zOrderingEnabled;
03233 
03235     bool d_wantsMultiClicks;
03236 
03242     bool d_distCapturedInputs;
03243 
03249     bool d_riseOnClick;
03250 
03251     // mouse button autorepeat data
03257     bool d_autoRepeat;
03258 
03260     float d_repeatDelay;
03261 
03263     float d_repeatRate;
03264 
03266     bool d_repeating;
03267 
03269     float d_repeatElapsed;
03270 
03276     MouseButton d_repeatButton;
03277 
03279     bool d_dragDropTarget;
03280 
03281     // Tooltip stuff
03283     String d_tooltipText;
03285     Tooltip* d_customTip;
03287     bool d_weOwnTip;
03293     bool d_inheritsTipText;
03294 
03295     // rendering
03297     RenderCache d_renderCache;
03299     mutable bool d_needsRedraw;
03300 
03301     // Look'N'Feel stuff
03303     String d_lookName;
03305     WindowRenderer* d_windowRenderer;
03306 
03308     bool d_initialising;
03310     bool d_destructionStarted;
03311 
03312     // Event pass through
03318     bool d_mousePassThroughEnabled;
03319 
03321     bool d_autoWindow;
03322 
03328     typedef std::set<String, String::FastLessCompare> BannedXMLPropertySet;
03329     BannedXMLPropertySet d_bannedXMLProperties;
03330 
03332     bool d_allowWriteXML;
03333 
03335     mutable Rect d_screenUnclippedRect;
03336     mutable bool d_screenUnclippedRectValid;
03338     mutable Rect d_screenUnclippedInnerRect;
03339     mutable bool d_screenUnclippedInnerRectValid;
03341     mutable Rect d_screenRect;
03342     mutable bool d_screenRectValid;
03344     mutable Rect d_screenInnerRect;
03345     mutable bool d_screenInnerRectValid;
03346 
03347 protected:
03348     /*************************************************************************
03349         Properties for Window base class
03350     *************************************************************************/
03351     static  WindowProperties::Alpha             d_alphaProperty;
03352     static  WindowProperties::AlwaysOnTop       d_alwaysOnTopProperty;
03353     static  WindowProperties::ClippedByParent   d_clippedByParentProperty;
03354     static  WindowProperties::DestroyedByParent d_destroyedByParentProperty;
03355     static  WindowProperties::Disabled          d_disabledProperty;
03356     static  WindowProperties::Font              d_fontProperty;
03357     static  WindowProperties::ID                d_IDProperty;
03358     static  WindowProperties::InheritsAlpha     d_inheritsAlphaProperty;
03359     static  WindowProperties::MouseCursorImage  d_mouseCursorProperty;
03360     static  WindowProperties::RestoreOldCapture d_restoreOldCaptureProperty;
03361     static  WindowProperties::Text              d_textProperty;
03362     static  WindowProperties::Visible           d_visibleProperty;
03363     static  WindowProperties::ZOrderChangeEnabled   d_zOrderChangeProperty;
03364     static  WindowProperties::WantsMultiClickEvents d_wantsMultiClicksProperty;
03365     static  WindowProperties::MouseButtonDownAutoRepeat d_autoRepeatProperty;
03366     static  WindowProperties::AutoRepeatDelay   d_autoRepeatDelayProperty;
03367     static  WindowProperties::AutoRepeatRate    d_autoRepeatRateProperty;
03368     static  WindowProperties::DistributeCapturedInputs d_distInputsProperty;
03369     static  WindowProperties::CustomTooltipType d_tooltipTypeProperty;
03370     static  WindowProperties::Tooltip           d_tooltipProperty;
03371     static  WindowProperties::InheritsTooltipText d_inheritsTooltipProperty;
03372     static  WindowProperties::RiseOnClick       d_riseOnClickProperty;
03373     static  WindowProperties::VerticalAlignment   d_vertAlignProperty;
03374     static  WindowProperties::HorizontalAlignment d_horzAlignProperty;
03375     static  WindowProperties::UnifiedAreaRect   d_unifiedAreaRectProperty;
03376     static  WindowProperties::UnifiedPosition   d_unifiedPositionProperty;
03377     static  WindowProperties::UnifiedXPosition  d_unifiedXPositionProperty;
03378     static  WindowProperties::UnifiedYPosition  d_unifiedYPositionProperty;
03379     static  WindowProperties::UnifiedSize       d_unifiedSizeProperty;
03380     static  WindowProperties::UnifiedWidth      d_unifiedWidthProperty;
03381     static  WindowProperties::UnifiedHeight     d_unifiedHeightProperty;
03382     static  WindowProperties::UnifiedMinSize    d_unifiedMinSizeProperty;
03383     static  WindowProperties::UnifiedMaxSize    d_unifiedMaxSizeProperty;
03384     static  WindowProperties::MousePassThroughEnabled   d_mousePassThroughEnabledProperty;
03385     static  WindowProperties::WindowRenderer    d_windowRendererProperty;
03386     static  WindowProperties::LookNFeel         d_lookNFeelProperty;
03387     static  WindowProperties::DragDropTarget    d_dragDropTargetProperty;
03388 
03389     /*************************************************************************
03390         implementation functions
03391     *************************************************************************/
03396     virtual void cleanupChildren(void);
03397 
03402     virtual void addChild_impl(Window* wnd);
03403 
03408     virtual void removeChild_impl(Window* wnd);
03409 
03414     virtual void onZChange_impl(void);
03415 
03420     void    addStandardProperties(void);
03421 
03430     virtual bool moveToFront_impl(bool wasClicked);
03431 
03439     bool doRiseOnClick(void);
03440 
03471     void setArea_impl(const UVector2& pos, const UVector2& size, bool topLeftSizing = false, bool fireEvents = true);
03472 
03492     void addWindowToDrawList(Window& wnd, bool at_back = false);
03493 
03505     void removeWindowFromDrawList(const Window& wnd);
03506 
03518     bool isTopOfZOrder() const;
03519 
03520     virtual int writePropertiesXML(XMLSerializer& xml_stream) const;
03521     virtual int writeChildWindowsXML(XMLSerializer& xml_stream) const;
03522     virtual bool writeAutoChildWindowXML(XMLSerializer& xml_stream) const;
03523 
03524     /*************************************************************************
03525         May not copy or assign Window objects
03526     *************************************************************************/
03527     Window(const Window& wnd) : PropertySet(), EventSet() {}
03528     Window& operator=(const Window& wnd) {return *this;}
03529 
03530     /*************************************************************************
03531         Private implementation Data
03532     *************************************************************************/
03538     const String    d_type;
03539 
03541     String    d_name;
03542 
03544     String    d_falagardType;
03545 
03547         String    d_windowPrefix;
03548 
03549     friend class WindowManager;
03550 };
03551 
03552 } // End of  CEGUI namespace section
03553 
03554 
03555 #if defined(_MSC_VER)
03556 #   pragma warning(pop)
03557 #endif
03558 
03559 #endif  // end of guard _CEGUIWindow_h_

Generated on Sun Mar 16 14:44:32 2008 for Crazy Eddies GUI System by  doxygen 1.5.4