30 #ifndef _CEGUIWindow_h_
31 #define _CEGUIWindow_h_
33 #include "CEGUIBase.h"
34 #include "CEGUIString.h"
35 #include "CEGUIVector.h"
36 #include "CEGUIRect.h"
37 #include "CEGUISize.h"
38 #include "CEGUIEventSet.h"
39 #include "CEGUIPropertySet.h"
40 #include "CEGUISystem.h"
41 #include "CEGUIInputEvent.h"
42 #include "CEGUIWindowProperties.h"
43 #include "CEGUIUDim.h"
44 #include "CEGUIWindowRenderer.h"
45 #include "CEGUITextUtils.h"
46 #include "CEGUIBasicRenderedStringParser.h"
47 #include "CEGUIDefaultRenderedStringParser.h"
53 # pragma warning(push)
54 # pragma warning(disable : 4251)
504 const String& getType(
void)
const;
549 bool isDisabled(
bool localOnly =
false)
const;
567 bool isVisible(
bool localOnly =
false)
const;
583 bool isActive(
void)
const;
603 uint
getID(
void)
const {
return d_ID;}
628 bool isChild(
const String& name)
const;
646 bool isChild(uint ID)
const;
668 bool isChildRecursive(uint ID)
const;
681 bool isChild(
const Window* window)
const;
727 Window* getChild(uint ID)
const;
775 Window* getChildRecursive(uint ID)
const;
804 Window* getActiveChild(
void);
805 const Window* getActiveChild(
void)
const;
820 bool isAncestor(
const String& name)
const;
835 bool isAncestor(uint ID)
const;
849 bool isAncestor(
const Window* window)
const;
864 Font* getFont(
bool useDefault =
true)
const;
876 const String& getTextVisual()
const;
916 float getEffectiveAlpha(
void)
const;
923 Rect getUnclippedOuterRect()
const;
930 Rect getUnclippedInnerRect()
const;
943 Rect getUnclippedRect(
const bool inner)
const;
957 Rect getOuterRectClipper()
const;
971 Rect getInnerRectClipper()
const;
991 Rect getClipRect(
const bool non_client =
false)
const;
1003 Rect getHitTestRect()
const;
1024 Rect getChildWindowContentArea(
const bool non_client =
false)
const;
1042 virtual Rect getUnclippedInnerRect_impl(
void)
const;
1073 bool isCapturedByAncestor(
void)
const
1074 {
return isAncestor(getCaptureWindow());}
1102 virtual bool isHit(
const Vector2& position,
1103 const bool allow_disabled =
false)
const;
1137 const bool allow_disabled =
false)
const;
1163 const Image* getMouseCursor(
bool useDefault =
true)
const;
1222 bool isZOrderingEnabled(
void)
const;
1234 bool wantsMultiClickEvents(
void)
const;
1247 bool isMouseAutoRepeatEnabled(
void)
const;
1257 float getAutoRepeatDelay(
void)
const;
1268 float getAutoRepeatRate(
void)
const;
1279 bool distributesCapturedInputs(
void)
const;
1290 bool isUsingDefaultTooltip(
void)
const;
1301 Tooltip* getTooltip(
void)
const;
1311 String getTooltipType(
void)
const;
1320 const String& getTooltipText(
void)
const;
1333 bool inheritsTooltipText(
void)
const;
1368 bool testClassName(
const String& class_name)
const
1369 {
return testClassName_impl(class_name);}
1412 const String& getLookNFeel()
const;
1421 bool getModalState(
void)
const
1450 bool isUserStringDefined(
const String& name)
const;
1467 Window* getActiveSibling();
1478 Size getParentPixelSize(
void)
const;
1489 float getParentPixelWidth(
void)
const;
1500 float getParentPixelHeight(
void)
const;
1584 bool isDragDropTarget()
const;
1621 bool isUsingAutoRenderingSurface()
const;
1633 const Window* getRootWindow()
const;
1637 const Vector3& getRotation()
const;
1653 bool isNonClientWindow()
const;
1665 void rename(
const String& new_name);
1693 void setDestroyedByParent(
bool setting);
1707 void setAlwaysOnTop(
bool setting);
1721 void setEnabled(
bool setting);
1758 void setVisible(
bool setting);
1772 void show(
void) {setVisible(
true);}
1784 void hide(
void) {setVisible(
false);}
1794 void activate(
void);
1805 void deactivate(
void);
1819 void setClippedByParent(
bool setting);
1832 void setID(uint ID);
1844 void setText(
const String& text);
1870 void appendText(
const String& text);
1883 void setFont(
Font* font);
1899 void setFont(
const String& name);
1919 void addChildWindow(
const String& name);
1937 void addChildWindow(
Window* window);
1950 void removeChildWindow(
const String& name);
1963 void removeChildWindow(
Window* window);
1978 void removeChildWindow(uint ID);
2024 void moveInFront(
const Window*
const window);
2040 void moveBehind(
const Window*
const window);
2051 bool captureInput(
void);
2061 void releaseInput(
void);
2081 void setRestoreCapture(
bool setting);
2103 void setAlpha(
float alpha);
2116 void setInheritsAlpha(
bool setting);
2129 void invalidate(
void);
2146 void invalidate(
const bool recursive);
2172 {d_mouseCursor = (
const Image*)image;}
2193 void setMouseCursor(
const String& imageset,
const String& image_name);
2233 void setZOrderingEnabled(
bool setting);
2248 void setWantsMultiClickEvents(
bool setting);
2262 void setMouseAutoRepeatEnabled(
bool setting);
2275 void setAutoRepeatDelay(
float delay);
2289 void setAutoRepeatRate(
float rate);
2300 void setDistributesCapturedInputs(
bool setting);
2336 virtual void destroy(
void);
2353 void setTooltip(
Tooltip* tooltip);
2373 void setTooltipType(
const String& tooltipType);
2386 void setTooltipText(
const String& tip);
2402 void setInheritsTooltipText(
bool setting);
2475 virtual void setLookNFeel(
const String& look);
2490 void setModalState(
bool state);
2502 virtual void performChildWindowLayout();
2517 void setUserString(
const String& name,
const String& value);
2545 void setArea(
const UDim& xpos,
const UDim& ypos,
const UDim& width,
const UDim& height);
2587 void setArea(
const URect& area);
2607 void setPosition(
const UVector2& pos);
2626 void setXPosition(
const UDim& x);
2645 void setYPosition(
const UDim& y);
2661 void setSize(
const UVector2& size);
2677 void setWidth(
const UDim& width);
2693 void setHeight(
const UDim& height);
2711 void setMaxSize(
const UVector2& size);
2729 void setMinSize(
const UVector2& size);
2748 const URect& getArea()
const;
2767 const UVector2& getPosition()
const;
2786 const UDim& getXPosition()
const;
2805 const UDim& getYPosition()
const;
2837 UDim getWidth()
const;
2853 UDim getHeight()
const;
2871 const UVector2& getMaxSize()
const;
2889 const UVector2& getMinSize()
const;
2919 virtual void update(
float elapsed);
2931 virtual void writeXMLToStream(
XMLSerializer& xml_stream)
const;
2975 void setWindowRenderer(
const String& name);
2996 String getWindowRendererName(
void)
const;
3014 void notifyScreenAreaChanged(
bool recursive =
true);
3027 void setFalagardType(
const String& type,
const String& rendererType =
"");
3038 void setDragDropTarget(
bool setting);
3068 void invalidateRenderingSurface();
3111 void setUsingAutoRenderingSurface(
bool setting);
3114 void setRotation(
const Vector3& rotation);
3130 void setNonClientWindow(
const bool setting);
3141 bool isTextParsingEnabled()
const;
3143 void setTextParsingEnabled(
const bool setting);
3146 virtual void setMargin(
const UBox& margin);
3148 const UBox& getMargin()
const;
3155 {
return d_bidiVisualMapping;}
3158 void banPropertyFromXML(
const String& property_name);
3161 void unbanPropertyFromXML(
const String& property_name);
3164 bool isPropertyBannedFromXML(
const String& property_name)
const;
3167 void banPropertyFromXML(
const Property* property);
3170 void unbanPropertyFromXML(
const Property* property);
3173 bool isPropertyBannedFromXML(
const Property* property)
const;
3223 void setMouseInputPropagationEnabled(
const bool enabled);
3235 bool isMouseInputPropagationEnabled()
const;
3251 Window* clone(
const String& newName,
const bool deepCopy =
true)
const;
3254 virtual void clonePropertiesTo(
Window& target)
const;
3256 virtual void cloneChildWidgetsTo(
Window& target)
const;
3835 virtual void updateSelf(
float elapsed);
3893 virtual bool testClassName_impl(
const String& class_name)
const
3895 if (class_name ==
"Window")
return true;
3910 void setParent(
Window* parent);
3912 Size getSize_impl(
const Window* window)
const;
3928 virtual bool validateWindowRenderer(
const String& name)
const;
3936 bool isPropertyAtDefault(
const Property* property)
const;
3943 void notifyClippingChanged(
void);
3946 void allocateRenderingWindow();
3949 void releaseRenderingWindow();
3958 virtual void cleanupChildren(
void);
3964 virtual void addChild_impl(
Window* wnd);
3970 virtual void removeChild_impl(
Window* wnd);
3976 virtual void onZChange_impl(
void);
3982 void addStandardProperties(
void);
3992 virtual bool moveToFront_impl(
bool wasClicked);
4025 bool topLeftSizing =
false,
bool fireEvents =
true);
4046 void addWindowToDrawList(
Window& wnd,
bool at_back =
false);
4059 void removeWindowFromDrawList(
const Window& wnd);
4072 bool isTopOfZOrder()
const;
4079 void updateGeometryRenderSettings();
4082 void transferChildSurfaces();
4085 Rect getParentElementClipIntersection(
const Rect& unclipped_area)
const;
4088 void invalidate_impl(
const bool recursive);
4091 bool isInnerRectSizeChanged()
const;
4094 virtual Rect getUnclippedOuterRect_impl()
const;
4096 virtual Rect getOuterRectClipper_impl()
const;
4098 virtual Rect getInnerRectClipper_impl()
const;
4100 virtual Rect getHitTestRect_impl()
const;
4102 virtual Rect getNonClientChildWindowContentArea_impl()
const;
4104 virtual Rect getClientChildWindowContentArea_impl()
const;
4106 virtual int writePropertiesXML(
XMLSerializer& xml_stream)
const;
4107 virtual int writeChildWindowsXML(
XMLSerializer& xml_stream)
const;
4108 virtual bool writeAutoChildWindowXML(
XMLSerializer& xml_stream)
const;
4111 bool constrainUVector2ToMinSize(
const Size& base_sz,
UVector2& sz);
4113 bool constrainUVector2ToMaxSize(
const Size& base_sz,
UVector2& sz);
4338 mutable bool d_outerUnclippedRectValid;
4339 mutable bool d_innerUnclippedRectValid;
4340 mutable bool d_outerRectClipperValid;
4341 mutable bool d_innerRectClipperValid;
4342 mutable bool d_hitTestRectValid;
4361 #if defined(_MSC_VER)
4362 # pragma warning(pop)
4365 #endif // end of guard _CEGUIWindow_h_