• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List

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 "CEGUIWindowRenderer.h"
00045 #include "CEGUITextUtils.h"
00046 #include "CEGUIBasicRenderedStringParser.h"
00047 #include "CEGUIDefaultRenderedStringParser.h"
00048 #include <vector>
00049 #include <set>
00050 
00051 
00052 #if defined(_MSC_VER)
00053 #   pragma warning(push)
00054 #   pragma warning(disable : 4251)
00055 #endif
00056 
00057 
00058 // Start of CEGUI namespace section
00059 namespace CEGUI
00060 {
00065 enum VerticalAlignment
00066 {
00071     VA_TOP,
00076     VA_CENTRE,
00081     VA_BOTTOM
00082 };
00083 
00088 enum HorizontalAlignment
00089 {
00094     HA_LEFT,
00099     HA_CENTRE,
00104     HA_RIGHT
00105 };
00106 
00115 enum WindowUpdateMode
00116 {
00118     WUM_ALWAYS,
00120     WUM_NEVER,
00122     WUM_VISIBLE
00123 };
00124 
00138 class CEGUIEXPORT Window : public PropertySet, public EventSet
00139 {
00140 public:
00141     /*************************************************************************
00142         Event name constants
00143     *************************************************************************/
00145     static const String EventNamespace;
00146 
00147     // generated internally by Window
00151     static const String EventWindowUpdated;
00157     static const String EventParentSized;
00162     static const String EventSized;
00167     static const String EventMoved;
00172     static const String EventTextChanged;
00177     static const String EventFontChanged;
00182     static const String EventAlphaChanged;
00187     static const String EventIDChanged;
00194     static const String EventActivated;
00201     static const String EventDeactivated;
00206     static const String EventShown;
00211     static const String EventHidden;
00216     static const String EventEnabled;
00222     static const String EventDisabled;
00228     static const String EventClippedByParentChanged;
00234     static const String EventDestroyedByParentChanged;
00240     static const String EventInheritsAlphaChanged;
00246     static const String EventAlwaysOnTopChanged;
00251     static const String EventInputCaptureGained;
00260     static const String EventInputCaptureLost;
00268     static const String EventRenderingStarted;
00276     static const String EventRenderingEnded;
00281     static const String EventChildAdded;
00286     static const String EventChildRemoved;
00291     static const String EventDestructionStarted;
00297     static const String EventZOrderChanged;
00305     static const String EventDragDropItemEnters;
00313     static const String EventDragDropItemLeaves;
00320     static const String EventDragDropItemDropped;
00326     static const String EventVerticalAlignmentChanged;
00332     static const String EventHorizontalAlignmentChanged;
00338     static const String EventWindowRendererAttached;
00344     static const String EventWindowRendererDetached;
00349     static const String EventRotated;
00355     static const String EventNonClientChanged;
00362     static const String EventTextParsingChanged;
00368     static const String EventMarginChanged;
00369 
00370     // generated externally (inputs)
00375     static const String EventMouseEntersArea;
00380     static const String EventMouseLeavesArea;
00391     static const String EventMouseEnters;
00402     static const String EventMouseLeaves;
00407     static const String EventMouseMove;
00413     static const String EventMouseWheel;
00418     static const String EventMouseButtonDown;
00423     static const String EventMouseButtonUp;
00430     static const String EventMouseClick;
00436     static const String EventMouseDoubleClick;
00442     static const String EventMouseTripleClick;
00451     static const String EventKeyDown;
00460     static const String EventKeyUp;
00468     static const String EventCharacterKey;
00469 
00470     /*************************************************************************
00471         Child Widget name suffix constants
00472     *************************************************************************/
00474     static const String TooltipNameSuffix;
00476     static const String AutoWidgetNameSuffix;
00477 
00478 
00489     Window(const String& type, const String& name);
00490 
00495     virtual ~Window(void);
00496 
00504     const String& getType(void) const;
00505 
00513     const String& getName(void) const  {return d_name;}
00514 
00524     bool    isDestroyedByParent(void) const    {return d_destroyedByParent;}
00525 
00535     bool isAlwaysOnTop(void) const  {return d_alwaysOnTop;}
00536 
00549     bool isDisabled(bool localOnly = false) const;
00550 
00567     bool isVisible(bool localOnly = false) const;
00568 
00583     bool isActive(void) const;
00584 
00594     bool isClippedByParent(void) const {return d_clippedByParent;}
00595 
00603     uint getID(void) const {return d_ID;}
00604 
00614     size_t getChildCount(void) const  {return d_children.size();}
00615 
00628     bool isChild(const String& name) const;
00629 
00646     bool isChild(uint ID) const;
00647 
00668     bool isChildRecursive(uint ID) const;
00669 
00681     bool isChild(const Window* window) const;
00682 
00704     Window* getChild(const String& name) const;
00705 
00727     Window* getChild(uint ID) const;
00728 
00752     Window* getChildRecursive(const String& name) const;
00753 
00775     Window* getChildRecursive(uint ID) const;
00776 
00790     Window* getChildAtIdx(size_t idx) const {return d_children[idx];}
00791 
00804     Window* getActiveChild(void);
00805     const Window* getActiveChild(void) const;
00806 
00820     bool isAncestor(const String& name) const;
00821 
00835     bool isAncestor(uint ID) const;
00836 
00849     bool isAncestor(const Window* window) const;
00850 
00864     Font* getFont(bool useDefault = true) const;
00865 
00873     const String& getText(void) const {return d_textLogical;}
00874 
00876     const String& getTextVisual() const;
00877 
00886     bool inheritsAlpha(void) const  {return d_inheritsAlpha;}
00887 
00905     float getAlpha(void) const  {return d_alpha;}
00906 
00916     float getEffectiveAlpha(void) const;
00917 
00923     Rect getUnclippedOuterRect() const;
00924 
00930     Rect getUnclippedInnerRect() const;
00931 
00943     Rect getUnclippedRect(const bool inner) const;
00944 
00957     Rect getOuterRectClipper() const;
00958 
00971     Rect getInnerRectClipper() const;
00972 
00991     Rect getClipRect(const bool non_client = false) const;
00992 
01003     Rect getHitTestRect() const;
01004 
01024     Rect getChildWindowContentArea(const bool non_client = false) const;
01025 
01042     virtual Rect getUnclippedInnerRect_impl(void) const;
01043 
01052     static Window* getCaptureWindow(void)   {return d_captureWindow;}
01053 
01062     bool isCapturedByThis(void) const   {return getCaptureWindow() == this;}
01063 
01073     bool isCapturedByAncestor(void) const
01074     {return isAncestor(getCaptureWindow());}
01075 
01084     bool isCapturedByChild(void) const  {return isChild(getCaptureWindow());}
01085 
01102     virtual bool isHit(const Vector2& position,
01103                        const bool allow_disabled = false) const;
01104 
01117     Window* getChildAtPosition(const Vector2& position) const;
01118 
01136     Window* getTargetChildAtPosition(const Vector2& position, 
01137                                      const bool allow_disabled = false) const;
01138 
01147     Window* getParent(void) const   {return d_parent;}
01148 
01163     const Image* getMouseCursor(bool useDefault = true) const;
01164 
01172     Size getPixelSize(void) const    { return d_pixelSize; }
01173 
01185     void* getUserData(void) const   {return d_userData;}
01186 
01201     bool restoresOldCapture(void) const     {return d_restoreOldCapture;}
01202 
01222     bool isZOrderingEnabled(void) const;
01223 
01234     bool wantsMultiClickEvents(void) const;
01235 
01247     bool isMouseAutoRepeatEnabled(void) const;
01248 
01257     float getAutoRepeatDelay(void) const;
01258 
01268     float getAutoRepeatRate(void) const;
01269 
01279     bool distributesCapturedInputs(void) const;
01280 
01290     bool isUsingDefaultTooltip(void) const;
01291 
01301     Tooltip* getTooltip(void) const;
01302 
01311     String getTooltipType(void) const;
01312 
01320     const String& getTooltipText(void) const;
01321 
01333     bool inheritsTooltipText(void) const;
01334 
01355     bool isRiseOnClickEnabled(void) const   { return d_riseOnClick; }
01356 
01368     bool testClassName(const String& class_name) const
01369     {return testClassName_impl(class_name);}
01370 
01381     VerticalAlignment getVerticalAlignment() const  {return d_vertAlign;}
01382 
01393     HorizontalAlignment getHorizontalAlignment() const  {return d_horzAlign;}
01394 
01402     GeometryBuffer& getGeometryBuffer();
01403 
01412     const String& getLookNFeel() const;
01413 
01421     bool getModalState(void) const
01422     {return(System::getSingleton().getModalTarget() == this);}
01423 
01437     const String& getUserString(const String& name) const;
01438 
01450     bool isUserStringDefined(const String& name) const;
01451 
01467     Window* getActiveSibling();
01468 
01478     Size getParentPixelSize(void) const;
01479 
01489     float getParentPixelWidth(void) const;
01490 
01500     float getParentPixelHeight(void) const;
01501 
01512     bool isMousePassThroughEnabled(void) const  {return d_mousePassThroughEnabled;}
01513 
01519     bool isAutoWindow(void) const   {return d_autoWindow;}
01520 
01525     bool isWritingXMLAllowed(void) const    {return d_allowWriteXML;}
01526 
01551     EventSet::Iterator getEventIterator() const;
01552 
01573     PropertySet::Iterator getPropertyIterator() const;
01574 
01584     bool isDragDropTarget() const;
01585 
01591     void getRenderingContext(RenderingContext& ctx) const;
01592 
01594     virtual void getRenderingContext_impl(RenderingContext& ctx) const;
01595 
01601     RenderingSurface* getRenderingSurface() const;
01602 
01608     RenderingSurface& getTargetRenderingSurface() const;
01609 
01621     bool isUsingAutoRenderingSurface() const;
01622 
01633     const Window* getRootWindow() const;
01634     Window* getRootWindow();
01635 
01637     const Vector3& getRotation() const;
01638 
01653     bool isNonClientWindow() const;
01654 
01665     void rename(const String& new_name);
01666 
01678     virtual void initialiseComponents(void) {}
01679 
01693     void setDestroyedByParent(bool setting);
01694 
01707     void setAlwaysOnTop(bool setting);
01708 
01721     void setEnabled(bool setting);
01722 
01730     void enable(void)   {setEnabled(true);}
01731 
01739     void disable(void)  {setEnabled(false);}
01740 
01758     void setVisible(bool setting);
01759 
01772     void show(void)     {setVisible(true);}
01773 
01784     void hide(void)     {setVisible(false);}
01785 
01794     void activate(void);
01795 
01805     void deactivate(void);
01806 
01819     void setClippedByParent(bool setting);
01820 
01832     void setID(uint ID);
01833 
01844     void setText(const String& text);
01845 
01859     void insertText(const String& text, const String::size_type position);
01860 
01870     void appendText(const String& text);
01871 
01883     void setFont(Font* font);
01884 
01899     void setFont(const String& name);
01900 
01919     void addChildWindow(const String& name);
01920 
01937     void addChildWindow(Window* window);
01938 
01950     void removeChildWindow(const String& name);
01951 
01963     void removeChildWindow(Window* window);
01964 
01978     void removeChildWindow(uint ID);
01979 
01993     void moveToFront();
01994 
02009     void moveToBack();
02010 
02024     void moveInFront(const Window* const window);
02025 
02040     void moveBehind(const Window* const window);
02041 
02051     bool captureInput(void);
02052 
02061     void releaseInput(void);
02062 
02081     void setRestoreCapture(bool setting);
02082 
02103     void setAlpha(float alpha);
02104 
02116     void setInheritsAlpha(bool setting);
02117 
02129     void invalidate(void);
02130 
02146     void invalidate(const bool recursive);
02147 
02159     void setMouseCursor(const Image* image)     {d_mouseCursor = image;}
02160 
02171     void setMouseCursor(MouseCursorImage image)
02172     {d_mouseCursor = (const Image*)image;}
02173 
02193     void setMouseCursor(const String& imageset, const String& image_name);
02194 
02209     void setUserData(void* user_data)   {d_userData = user_data;}
02210 
02233     void    setZOrderingEnabled(bool setting);
02234 
02248     void setWantsMultiClickEvents(bool setting);
02249 
02262     void setMouseAutoRepeatEnabled(bool setting);
02263 
02275     void setAutoRepeatDelay(float delay);
02276 
02289     void setAutoRepeatRate(float rate);
02290 
02300     void setDistributesCapturedInputs(bool setting);
02301 
02307     void notifyDragDropItemEnters(DragContainer* item);
02308 
02314     void notifyDragDropItemLeaves(DragContainer* item);
02315 
02321     void notifyDragDropItemDropped(DragContainer* item);
02322 
02336     virtual void destroy(void);
02337 
02353     void setTooltip(Tooltip* tooltip);
02354 
02373     void setTooltipType(const String& tooltipType);
02374 
02386     void setTooltipText(const String& tip);
02387 
02402     void setInheritsTooltipText(bool setting);
02403 
02427     void setRiseOnClickEnabled(bool setting)    { d_riseOnClick = setting; }
02428 
02442     void setVerticalAlignment(const VerticalAlignment alignment);
02443 
02457     void setHorizontalAlignment(const HorizontalAlignment alignment);
02458 
02475     virtual void setLookNFeel(const String& look);
02476 
02490     void setModalState(bool state);
02491 
02502     virtual void performChildWindowLayout();
02503 
02517     void setUserString(const String& name, const String& value);
02518 
02545     void setArea(const UDim& xpos, const UDim& ypos, const UDim& width, const UDim& height);
02546 
02568     void setArea(const UVector2& pos, const UVector2& size);
02569 
02587     void setArea(const URect& area);
02588 
02607     void setPosition(const UVector2& pos);
02608 
02626     void setXPosition(const UDim& x);
02627 
02645     void setYPosition(const UDim& y);
02646 
02661     void setSize(const UVector2& size);
02662 
02677     void setWidth(const UDim& width);
02678 
02693     void setHeight(const UDim& height);
02694 
02711     void setMaxSize(const UVector2& size);
02712 
02729     void setMinSize(const UVector2& size);
02730 
02748     const URect& getArea() const;
02749 
02767     const UVector2& getPosition() const;
02768 
02786     const UDim& getXPosition() const;
02787 
02805     const UDim& getYPosition() const;
02806 
02821     UVector2 getSize() const;
02822 
02837     UDim getWidth() const;
02838 
02853     UDim getHeight() const;
02854 
02871     const UVector2& getMaxSize() const;
02872 
02889     const UVector2& getMinSize() const;
02890 
02899     void render();
02900 
02919     void update(float elapsed);
02920 
02931     virtual void writeXMLToStream(XMLSerializer& xml_stream) const;
02932 
02941     virtual void beginInitialisation(void)     {d_initialising = true;}
02942 
02950     virtual void endInitialisation(void)       {d_initialising = false;}
02951 
02962     void setMousePassThroughEnabled(bool setting)   {d_mousePassThroughEnabled = setting;}
02963 
02975     void setWindowRenderer(const String& name);
02976 
02985     WindowRenderer* getWindowRenderer(void) const;
02986 
02996     String getWindowRendererName(void) const;
02997 
03002     void setWritingXMLAllowed(bool allow)   {d_allowWriteXML = allow;}
03003 
03014     void notifyScreenAreaChanged(bool recursive = true);
03015 
03027     void setFalagardType(const String& type, const String& rendererType = "");
03028 
03038     void setDragDropTarget(bool setting);
03039 
03060     void setRenderingSurface(RenderingSurface* surface);
03061 
03068     void invalidateRenderingSurface();
03069 
03111     void setUsingAutoRenderingSurface(bool setting);
03112 
03114     void setRotation(const Vector3& rotation);
03115 
03130     void setNonClientWindow(const bool setting);
03131 
03133     const RenderedString& getRenderedString() const;
03135     RenderedStringParser* getCustomRenderedStringParser() const;
03137     void setCustomRenderedStringParser(RenderedStringParser* parser);
03139     virtual RenderedStringParser& getRenderedStringParser() const;
03141     bool isTextParsingEnabled() const;
03143     void setTextParsingEnabled(const bool setting);
03144 
03146     virtual void setMargin(const UBox& margin);
03148     const UBox& getMargin() const;
03149 
03151     Vector2 getUnprojectedPosition(const Vector2& pos) const;
03152 
03154     const BiDiVisualMapping* getBiDiVisualMapping() const
03155         {return d_bidiVisualMapping;}
03156 
03158     void banPropertyFromXML(const String& property_name);
03159 
03161     void unbanPropertyFromXML(const String& property_name);
03162 
03164     bool isPropertyBannedFromXML(const String& property_name) const;
03165 
03167     void banPropertyFromXML(const Property* property);
03168 
03170     void unbanPropertyFromXML(const Property* property);
03171 
03173     bool isPropertyBannedFromXML(const Property* property) const;
03174 
03192     void setUpdateMode(const WindowUpdateMode mode);
03193 
03211     WindowUpdateMode getUpdateMode() const;
03212 
03223     void setMouseInputPropagationEnabled(const bool enabled);
03224 
03235     bool isMouseInputPropagationEnabled() const;
03236 
03237 protected:
03238     // friend classes for construction / initialisation purposes (for now)
03239     friend class System;
03240     friend class WindowManager;
03241 
03242     /*************************************************************************
03243         Event trigger methods
03244     *************************************************************************/
03254     virtual void onSized(WindowEventArgs& e);
03255 
03265     virtual void onMoved(WindowEventArgs& e);
03266 
03276     virtual void onTextChanged(WindowEventArgs& e);
03277 
03287     virtual void onFontChanged(WindowEventArgs& e);
03288 
03298     virtual void onAlphaChanged(WindowEventArgs& e);
03299 
03309     virtual void onIDChanged(WindowEventArgs& e);
03310 
03320     virtual void onShown(WindowEventArgs& e);
03321 
03331     virtual void onHidden(WindowEventArgs& e);
03332 
03342     virtual void onEnabled(WindowEventArgs& e);
03343 
03353     virtual void onDisabled(WindowEventArgs& e);
03354 
03365     virtual void onClippingChanged(WindowEventArgs& e);
03366 
03377     virtual void onParentDestroyChanged(WindowEventArgs& e);
03378 
03389     virtual void onInheritsAlphaChanged(WindowEventArgs& e);
03390 
03400     virtual void onAlwaysOnTopChanged(WindowEventArgs& e);
03401 
03411     virtual void onCaptureGained(WindowEventArgs& e);
03412 
03422     virtual void onCaptureLost(WindowEventArgs& e);
03423 
03433     virtual void onRenderingStarted(WindowEventArgs& e);
03434 
03444     virtual void onRenderingEnded(WindowEventArgs& e);
03445 
03455     virtual void onZChanged(WindowEventArgs& e);
03456 
03466     virtual void onDestructionStarted(WindowEventArgs& e);
03467 
03476     virtual void onActivated(ActivationEventArgs& e);
03477 
03487     virtual void onDeactivated(ActivationEventArgs& e);
03488 
03500     virtual void onParentSized(WindowEventArgs& e);
03501 
03510     virtual void onChildAdded(WindowEventArgs& e);
03511 
03520     virtual void onChildRemoved(WindowEventArgs& e);
03521 
03529     virtual void onMouseEntersArea(MouseEventArgs& e);
03530 
03538     virtual void onMouseLeavesArea(MouseEventArgs& e);
03539 
03554     virtual void onMouseEnters(MouseEventArgs& e);
03555 
03570     virtual void onMouseLeaves(MouseEventArgs& e);
03571 
03580     virtual void onMouseMove(MouseEventArgs& e);
03581 
03590     virtual void onMouseWheel(MouseEventArgs& e);
03591 
03600     virtual void onMouseButtonDown(MouseEventArgs& e);
03601 
03610     virtual void onMouseButtonUp(MouseEventArgs& e);
03611 
03620     virtual void onMouseClicked(MouseEventArgs& e);
03621 
03630     virtual void onMouseDoubleClicked(MouseEventArgs& e);
03631 
03640     virtual void onMouseTripleClicked(MouseEventArgs& e);
03641 
03653     virtual void onKeyDown(KeyEventArgs& e);
03654 
03666     virtual void onKeyUp(KeyEventArgs& e);
03667 
03679     virtual void onCharacter(KeyEventArgs& e);
03680 
03691     virtual void onDragDropItemEnters(DragDropEventArgs& e);
03692 
03703     virtual void onDragDropItemLeaves(DragDropEventArgs& e);
03704 
03715     virtual void onDragDropItemDropped(DragDropEventArgs& e);
03716 
03727     virtual void onVerticalAlignmentChanged(WindowEventArgs& e);
03728 
03739     virtual void onHorizontalAlignmentChanged(WindowEventArgs& e);
03740 
03750     virtual void onWindowRendererAttached(WindowEventArgs& e);
03751 
03761     virtual void onWindowRendererDetached(WindowEventArgs& e);
03762 
03772     virtual void onRotated(WindowEventArgs& e);
03773 
03784     virtual void onNonClientChanged(WindowEventArgs& e);
03785 
03796     virtual void onTextParsingChanged(WindowEventArgs& e);
03797 
03798     virtual void onMarginChanged(WindowEventArgs& e);
03799 
03800     /*************************************************************************
03801         Implementation Functions
03802     *************************************************************************/
03814     virtual void updateSelf(float elapsed);
03815 
03827     virtual void drawSelf(const RenderingContext& ctx);
03828 
03839     void bufferGeometry(const RenderingContext& ctx);
03840 
03851     void queueGeometry(const RenderingContext& ctx);
03852 
03859     virtual void populateGeometryBuffer()  {}
03860 
03872     virtual bool testClassName_impl(const String& class_name) const
03873     {
03874         if (class_name == "Window")   return true;
03875         return false;
03876     }
03877 
03889     void setParent(Window* parent);
03890 
03891     Size getSize_impl(const Window* window) const;
03892 
03897     void generateAutoRepeatEvent(MouseButton button);
03898 
03907     virtual bool validateWindowRenderer(const String& name) const;
03908 
03915     bool isPropertyAtDefault(const Property* property) const;
03916 
03922     void notifyClippingChanged(void);
03923 
03925     void allocateRenderingWindow();
03926 
03928     void releaseRenderingWindow();
03929 
03931     void initialiseClippers(const RenderingContext& ctx);
03932 
03937     virtual void cleanupChildren(void);
03938 
03943     virtual void addChild_impl(Window* wnd);
03944 
03949     virtual void removeChild_impl(Window* wnd);
03950 
03955     virtual void onZChange_impl(void);
03956 
03961     void    addStandardProperties(void);
03962 
03971     virtual bool moveToFront_impl(bool wasClicked);
03972 
04003     void setArea_impl(const UVector2& pos, const UVector2& size,
04004                       bool topLeftSizing = false, bool fireEvents = true);
04005 
04025     void addWindowToDrawList(Window& wnd, bool at_back = false);
04026 
04038     void removeWindowFromDrawList(const Window& wnd);
04039 
04051     bool isTopOfZOrder() const;
04052 
04058     void updateGeometryRenderSettings();
04059 
04061     void transferChildSurfaces();
04062 
04064     Rect getParentElementClipIntersection(const Rect& unclipped_area) const;
04065 
04067     void invalidate_impl(const bool recursive);
04068 
04070     bool isInnerRectSizeChanged() const;
04071 
04073     virtual Rect getUnclippedOuterRect_impl() const;
04075     virtual Rect getOuterRectClipper_impl() const;
04077     virtual Rect getInnerRectClipper_impl() const;
04079     virtual Rect getHitTestRect_impl() const;
04081     virtual Rect getNonClientChildWindowContentArea_impl() const;
04083     virtual Rect getClientChildWindowContentArea_impl() const;
04084 
04085     virtual int writePropertiesXML(XMLSerializer& xml_stream) const;
04086     virtual int writeChildWindowsXML(XMLSerializer& xml_stream) const;
04087     virtual bool writeAutoChildWindowXML(XMLSerializer& xml_stream) const;
04088 
04089     // constrain given UVector2 to window's min size, return if size changed.
04090     bool constrainUVector2ToMinSize(const Size& base_sz, UVector2& sz);
04091     // constrain given UVector2 to window's max size, return if size changed.
04092     bool constrainUVector2ToMaxSize(const Size& base_sz, UVector2& sz);
04093 
04094     /*************************************************************************
04095         Properties for Window base class
04096     *************************************************************************/
04097     static  WindowProperties::Alpha             d_alphaProperty;
04098     static  WindowProperties::AlwaysOnTop       d_alwaysOnTopProperty;
04099     static  WindowProperties::ClippedByParent   d_clippedByParentProperty;
04100     static  WindowProperties::DestroyedByParent d_destroyedByParentProperty;
04101     static  WindowProperties::Disabled          d_disabledProperty;
04102     static  WindowProperties::Font              d_fontProperty;
04103     static  WindowProperties::ID                d_IDProperty;
04104     static  WindowProperties::InheritsAlpha     d_inheritsAlphaProperty;
04105     static  WindowProperties::MouseCursorImage  d_mouseCursorProperty;
04106     static  WindowProperties::RestoreOldCapture d_restoreOldCaptureProperty;
04107     static  WindowProperties::Text              d_textProperty;
04108     static  WindowProperties::Visible           d_visibleProperty;
04109     static  WindowProperties::ZOrderChangeEnabled   d_zOrderChangeProperty;
04110     static  WindowProperties::WantsMultiClickEvents d_wantsMultiClicksProperty;
04111     static  WindowProperties::MouseButtonDownAutoRepeat d_autoRepeatProperty;
04112     static  WindowProperties::AutoRepeatDelay   d_autoRepeatDelayProperty;
04113     static  WindowProperties::AutoRepeatRate    d_autoRepeatRateProperty;
04114     static  WindowProperties::DistributeCapturedInputs d_distInputsProperty;
04115     static  WindowProperties::CustomTooltipType d_tooltipTypeProperty;
04116     static  WindowProperties::Tooltip           d_tooltipProperty;
04117     static  WindowProperties::InheritsTooltipText d_inheritsTooltipProperty;
04118     static  WindowProperties::RiseOnClick       d_riseOnClickProperty;
04119     static  WindowProperties::VerticalAlignment   d_vertAlignProperty;
04120     static  WindowProperties::HorizontalAlignment d_horzAlignProperty;
04121     static  WindowProperties::UnifiedAreaRect   d_unifiedAreaRectProperty;
04122     static  WindowProperties::UnifiedPosition   d_unifiedPositionProperty;
04123     static  WindowProperties::UnifiedXPosition  d_unifiedXPositionProperty;
04124     static  WindowProperties::UnifiedYPosition  d_unifiedYPositionProperty;
04125     static  WindowProperties::UnifiedSize       d_unifiedSizeProperty;
04126     static  WindowProperties::UnifiedWidth      d_unifiedWidthProperty;
04127     static  WindowProperties::UnifiedHeight     d_unifiedHeightProperty;
04128     static  WindowProperties::UnifiedMinSize    d_unifiedMinSizeProperty;
04129     static  WindowProperties::UnifiedMaxSize    d_unifiedMaxSizeProperty;
04130     static  WindowProperties::MousePassThroughEnabled   d_mousePassThroughEnabledProperty;
04131     static  WindowProperties::WindowRenderer    d_windowRendererProperty;
04132     static  WindowProperties::LookNFeel         d_lookNFeelProperty;
04133     static  WindowProperties::DragDropTarget    d_dragDropTargetProperty;
04134     static  WindowProperties::AutoRenderingSurface d_autoRenderingSurfaceProperty;
04135     static  WindowProperties::Rotation d_rotationProperty;
04136     static  WindowProperties::XRotation d_xRotationProperty;
04137     static  WindowProperties::YRotation d_yRotationProperty;
04138     static  WindowProperties::ZRotation d_zRotationProperty;
04139     static  WindowProperties::NonClient d_nonClientProperty;
04140     static  WindowProperties::TextParsingEnabled d_textParsingEnabledProperty;
04141     static  WindowProperties::Margin d_marginProperty;
04142     static  WindowProperties::UpdateMode d_updateModeProperty;
04143     static  WindowProperties::MouseInputPropagationEnabled d_mouseInputPropagationProperty;
04144 
04145     /*************************************************************************
04146         Implementation Data
04147     *************************************************************************/
04149     typedef std::vector<Window*> ChildList;
04151     typedef std::map<String, String, String::FastLessCompare> UserStringMap;
04153     typedef std::set<String, String::FastLessCompare> BannedXMLPropertySet;
04154 
04156     const String d_type;
04158     String d_name;
04160     String d_falagardType;
04162     bool d_autoWindow;
04163 
04165     bool d_initialising;
04167     bool d_destructionStarted;
04169     bool d_enabled;
04171     bool d_visible;
04173     bool d_active;
04174 
04176     ChildList d_children;
04178     ChildList d_drawList;
04180     Window* d_parent;
04182     bool d_destroyedByParent;
04183 
04185     bool d_clippedByParent;
04187     bool d_nonClientContent;
04188 
04190     String d_lookName;
04192     WindowRenderer* d_windowRenderer;
04194     GeometryBuffer* d_geometry;
04196     RenderingSurface* d_surface;
04198     mutable bool d_needsRedraw;
04200     bool d_autoRenderingWindow;
04201 
04203     const Image* d_mouseCursor;
04204 
04206     float d_alpha;
04208     bool d_inheritsAlpha;
04209 
04211     static Window* d_captureWindow;
04213     Window* d_oldCapture;
04215     bool d_restoreOldCapture;
04217     bool d_distCapturedInputs;
04218 
04220     Font* d_font;
04222     String d_textLogical;
04224     BiDiVisualMapping* d_bidiVisualMapping;
04226     mutable bool d_bidiDataValid;
04228     mutable RenderedString d_renderedString;
04230     mutable bool d_renderedStringValid;
04232     static BasicRenderedStringParser d_basicStringParser;
04234     static DefaultRenderedStringParser d_defaultStringParser;
04236     RenderedStringParser* d_customStringParser;
04238     bool d_textParsingEnabled;
04239 
04241     UBox d_margin;
04242 
04244     uint d_ID;
04246     void* d_userData;
04248     UserStringMap d_userStrings;
04249 
04251     bool d_alwaysOnTop;
04253     bool d_riseOnClick;
04255     bool d_zOrderingEnabled;
04256 
04258     bool d_wantsMultiClicks;
04260     bool d_mousePassThroughEnabled;
04262     bool d_autoRepeat;
04264     float d_repeatDelay;
04266     float d_repeatRate;
04268     MouseButton d_repeatButton;
04270     bool d_repeating;
04272     float d_repeatElapsed;
04273 
04275     bool d_dragDropTarget;
04276 
04278     String d_tooltipText;
04280     Tooltip* d_customTip;
04282     bool d_weOwnTip;
04284     bool d_inheritsTipText;
04285 
04287     bool d_allowWriteXML;
04289     BannedXMLPropertySet d_bannedXMLProperties;
04290 
04292     URect d_area;
04294     Size d_pixelSize;
04296     UVector2 d_minSize;
04298     UVector2 d_maxSize;
04300     HorizontalAlignment d_horzAlign;
04302     VerticalAlignment d_vertAlign;
04304     Vector3 d_rotation;
04305 
04307     mutable Rect d_outerUnclippedRect;
04309     mutable Rect d_innerUnclippedRect;
04311     mutable Rect d_outerRectClipper;
04313     mutable Rect d_innerRectClipper;
04315     mutable Rect d_hitTestRect;
04316 
04317     mutable bool d_outerUnclippedRectValid;
04318     mutable bool d_innerUnclippedRectValid;
04319     mutable bool d_outerRectClipperValid;
04320     mutable bool d_innerRectClipperValid;
04321     mutable bool d_hitTestRectValid;
04322 
04324     WindowUpdateMode d_updateMode;
04326     bool d_propagateMouseInputs;
04327 
04328 
04329 private:
04330     /*************************************************************************
04331         May not copy or assign Window objects
04332     *************************************************************************/
04333     Window(const Window&) : PropertySet(), EventSet() {}
04334     Window& operator=(const Window&) {return *this;}
04335 };
04336 
04337 } // End of  CEGUI namespace section
04338 
04339 
04340 #if defined(_MSC_VER)
04341 #   pragma warning(pop)
04342 #endif
04343 
04344 #endif  // end of guard _CEGUIWindow_h_
04345 

Generated on Sat Sep 25 2010 02:10:34 for Crazy Eddies GUI System by  doxygen 1.7.1