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)
263 const String& getType(
void)
const;
308 bool isDisabled(
bool localOnly =
false)
const;
326 bool isVisible(
bool localOnly =
false)
const;
342 bool isActive(
void)
const;
362 uint
getID(
void)
const {
return d_ID;}
387 bool isChild(
const String& name)
const;
405 bool isChild(uint ID)
const;
427 bool isChildRecursive(uint ID)
const;
440 bool isChild(
const Window* window)
const;
486 Window* getChild(uint ID)
const;
534 Window* getChildRecursive(uint ID)
const;
563 Window* getActiveChild(
void);
564 const Window* getActiveChild(
void)
const;
579 bool isAncestor(
const String& name)
const;
594 bool isAncestor(uint ID)
const;
608 bool isAncestor(
const Window* window)
const;
623 Font* getFont(
bool useDefault =
true)
const;
635 const String& getTextVisual()
const;
675 float getEffectiveAlpha(
void)
const;
682 Rect getUnclippedOuterRect()
const;
689 Rect getUnclippedInnerRect()
const;
702 Rect getUnclippedRect(
const bool inner)
const;
716 Rect getOuterRectClipper()
const;
730 Rect getInnerRectClipper()
const;
750 Rect getClipRect(
const bool non_client =
false)
const;
762 Rect getHitTestRect()
const;
780 virtual Rect getUnclippedInnerRect_impl(
void)
const;
811 bool isCapturedByAncestor(
void)
const
812 {
return isAncestor(getCaptureWindow());}
840 virtual bool isHit(
const Vector2& position,
841 const bool allow_disabled =
false)
const;
875 const bool allow_disabled =
false)
const;
901 const Image* getMouseCursor(
bool useDefault =
true)
const;
960 bool isZOrderingEnabled(
void)
const;
972 bool wantsMultiClickEvents(
void)
const;
985 bool isMouseAutoRepeatEnabled(
void)
const;
995 float getAutoRepeatDelay(
void)
const;
1006 float getAutoRepeatRate(
void)
const;
1017 bool distributesCapturedInputs(
void)
const;
1028 bool isUsingDefaultTooltip(
void)
const;
1039 Tooltip* getTooltip(
void)
const;
1049 String getTooltipType(
void)
const;
1058 const String& getTooltipText(
void)
const;
1071 bool inheritsTooltipText(
void)
const;
1106 bool testClassName(
const String& class_name)
const
1107 {
return testClassName_impl(class_name);}
1150 const String& getLookNFeel()
const;
1159 bool getModalState(
void)
const
1188 bool isUserStringDefined(
const String& name)
const;
1205 Window* getActiveSibling();
1216 Size getParentPixelSize(
void)
const;
1227 float getParentPixelWidth(
void)
const;
1238 float getParentPixelHeight(
void)
const;
1322 bool isDragDropTarget()
const;
1359 bool isUsingAutoRenderingSurface()
const;
1371 const Window* getRootWindow()
const;
1375 const Vector3& getRotation()
const;
1391 bool isNonClientWindow()
const;
1403 void rename(
const String& new_name);
1431 void setDestroyedByParent(
bool setting);
1445 void setAlwaysOnTop(
bool setting);
1459 void setEnabled(
bool setting);
1496 void setVisible(
bool setting);
1510 void show(
void) {setVisible(
true);}
1522 void hide(
void) {setVisible(
false);}
1532 void activate(
void);
1543 void deactivate(
void);
1557 void setClippedByParent(
bool setting);
1570 void setID(uint ID);
1582 void setText(
const String& text);
1608 void appendText(
const String& text);
1621 void setFont(
Font* font);
1637 void setFont(
const String& name);
1657 void addChildWindow(
const String& name);
1675 void addChildWindow(
Window* window);
1688 void removeChildWindow(
const String& name);
1701 void removeChildWindow(
Window* window);
1716 void removeChildWindow(uint ID);
1758 bool captureInput(
void);
1768 void releaseInput(
void);
1788 void setRestoreCapture(
bool setting);
1810 void setAlpha(
float alpha);
1823 void setInheritsAlpha(
bool setting);
1836 void invalidate(
void);
1853 void invalidate(
const bool recursive);
1879 {d_mouseCursor = (
const Image*)image;}
1900 void setMouseCursor(
const String& imageset,
const String& image_name);
1940 void setZOrderingEnabled(
bool setting);
1955 void setWantsMultiClickEvents(
bool setting);
1969 void setMouseAutoRepeatEnabled(
bool setting);
1982 void setAutoRepeatDelay(
float delay);
1996 void setAutoRepeatRate(
float rate);
2007 void setDistributesCapturedInputs(
bool setting);
2043 virtual void destroy(
void);
2060 void setTooltip(
Tooltip* tooltip);
2080 void setTooltipType(
const String& tooltipType);
2093 void setTooltipText(
const String& tip);
2109 void setInheritsTooltipText(
bool setting);
2182 virtual void setLookNFeel(
const String& look);
2197 void setModalState(
bool state);
2209 virtual void performChildWindowLayout();
2224 void setUserString(
const String& name,
const String& value);
2252 void setArea(
const UDim& xpos,
const UDim& ypos,
const UDim& width,
const UDim& height);
2294 void setArea(
const URect& area);
2314 void setPosition(
const UVector2& pos);
2333 void setXPosition(
const UDim& x);
2352 void setYPosition(
const UDim& y);
2368 void setSize(
const UVector2& size);
2384 void setWidth(
const UDim& width);
2400 void setHeight(
const UDim& height);
2418 void setMaxSize(
const UVector2& size);
2436 void setMinSize(
const UVector2& size);
2455 const URect& getArea()
const;
2474 const UVector2& getPosition()
const;
2493 const UDim& getXPosition()
const;
2512 const UDim& getYPosition()
const;
2544 UDim getWidth()
const;
2560 UDim getHeight()
const;
2578 const UVector2& getMaxSize()
const;
2596 const UVector2& getMinSize()
const;
2626 void update(
float elapsed);
2638 virtual void writeXMLToStream(
XMLSerializer& xml_stream)
const;
2682 void setWindowRenderer(
const String& name);
2703 String getWindowRendererName(
void)
const;
2721 void notifyScreenAreaChanged(
bool recursive =
true);
2734 void setFalagardType(
const String& type,
const String& rendererType =
"");
2745 void setDragDropTarget(
bool setting);
2775 void invalidateRenderingSurface();
2818 void setUsingAutoRenderingSurface(
bool setting);
2821 void setRotation(
const Vector3& rotation);
2837 void setNonClientWindow(
const bool setting);
2848 bool isTextParsingEnabled()
const;
2850 void setTextParsingEnabled(
const bool setting);
2857 {
return d_bidiVisualMapping;}
3402 virtual void updateSelf(
float elapsed);
3460 virtual bool testClassName_impl(
const String& class_name)
const
3462 if (class_name ==
"Window")
return true;
3477 void setParent(
Window* parent);
3479 Size getSize_impl(
const Window* window)
const;
3495 virtual bool validateWindowRenderer(
const String& name)
const;
3501 void banPropertyFromXML(
const Property* property);
3507 bool isPropertyBannedFromXML(
const Property* property)
const;
3515 bool isPropertyAtDefault(
const Property* property)
const;
3522 void notifyClippingChanged(
void);
3525 void allocateRenderingWindow();
3528 void releaseRenderingWindow();
3537 virtual void cleanupChildren(
void);
3543 virtual void addChild_impl(
Window* wnd);
3549 virtual void removeChild_impl(
Window* wnd);
3555 virtual void onZChange_impl(
void);
3561 void addStandardProperties(
void);
3571 virtual bool moveToFront_impl(
bool wasClicked);
3604 bool topLeftSizing =
false,
bool fireEvents =
true);
3625 void addWindowToDrawList(
Window& wnd,
bool at_back =
false);
3638 void removeWindowFromDrawList(
const Window& wnd);
3651 bool isTopOfZOrder()
const;
3658 void updateGeometryRenderSettings();
3661 void transferChildSurfaces();
3664 Rect getParentElementClipIntersection(
const Rect& unclipped_area)
const;
3667 void invalidate_impl(
const bool recursive);
3670 bool isInnerRectSizeChanged()
const;
3673 virtual Rect getUnclippedOuterRect_impl()
const;
3675 virtual Rect getOuterRectClipper_impl()
const;
3677 virtual Rect getInnerRectClipper_impl()
const;
3679 virtual Rect getHitTestRect_impl()
const;
3681 virtual int writePropertiesXML(
XMLSerializer& xml_stream)
const;
3682 virtual int writeChildWindowsXML(
XMLSerializer& xml_stream)
const;
3683 virtual bool writeAutoChildWindowXML(
XMLSerializer& xml_stream)
const;
3902 mutable bool d_outerUnclippedRectValid;
3903 mutable bool d_innerUnclippedRectValid;
3904 mutable bool d_outerRectClipperValid;
3905 mutable bool d_innerRectClipperValid;
3906 mutable bool d_hitTestRectValid;
3919 #if defined(_MSC_VER)
3920 # pragma warning(pop)
3923 #endif // end of guard _CEGUIWindow_h_