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"
52 # pragma warning(push)
53 # pragma warning(disable : 4251)
260 const String& getType(
void)
const;
305 bool isDisabled(
bool localOnly =
false)
const;
323 bool isVisible(
bool localOnly =
false)
const;
339 bool isActive(
void)
const;
359 uint
getID(
void)
const {
return d_ID;}
384 bool isChild(
const String& name)
const;
402 bool isChild(uint ID)
const;
424 bool isChildRecursive(uint ID)
const;
437 bool isChild(
const Window* window)
const;
483 Window* getChild(uint ID)
const;
531 Window* getChildRecursive(uint ID)
const;
560 Window* getActiveChild(
void);
561 const Window* getActiveChild(
void)
const;
576 bool isAncestor(
const String& name)
const;
591 bool isAncestor(uint ID)
const;
605 bool isAncestor(
const Window* window)
const;
620 Font* getFont(
bool useDefault =
true)
const;
632 const String& getTextVisual()
const;
672 float getEffectiveAlpha(
void)
const;
679 Rect getUnclippedOuterRect()
const;
686 Rect getUnclippedInnerRect()
const;
699 Rect getUnclippedRect(
const bool inner)
const;
713 Rect getOuterRectClipper()
const;
727 Rect getInnerRectClipper()
const;
747 Rect getClipRect(
const bool non_client =
false)
const;
759 Rect getHitTestRect()
const;
772 virtual Rect getUnclippedInnerRect_impl(
void)
const;
803 bool isCapturedByAncestor(
void)
const
804 {
return isAncestor(getCaptureWindow());}
832 virtual bool isHit(
const Vector2& position,
833 const bool allow_disabled =
false)
const;
867 const bool allow_disabled =
false)
const;
893 const Image* getMouseCursor(
bool useDefault =
true)
const;
952 bool isZOrderingEnabled(
void)
const;
964 bool wantsMultiClickEvents(
void)
const;
977 bool isMouseAutoRepeatEnabled(
void)
const;
987 float getAutoRepeatDelay(
void)
const;
998 float getAutoRepeatRate(
void)
const;
1009 bool distributesCapturedInputs(
void)
const;
1020 bool isUsingDefaultTooltip(
void)
const;
1031 Tooltip* getTooltip(
void)
const;
1041 String getTooltipType(
void)
const;
1050 const String& getTooltipText(
void)
const;
1063 bool inheritsTooltipText(
void)
const;
1098 bool testClassName(
const String& class_name)
const
1099 {
return testClassName_impl(class_name);}
1142 const String& getLookNFeel()
const;
1151 bool getModalState(
void)
const
1180 bool isUserStringDefined(
const String& name)
const;
1197 Window* getActiveSibling();
1208 Size getParentPixelSize(
void)
const;
1219 float getParentPixelWidth(
void)
const;
1230 float getParentPixelHeight(
void)
const;
1314 bool isDragDropTarget()
const;
1351 bool isUsingAutoRenderingSurface()
const;
1363 const Window* getRootWindow()
const;
1367 const Vector3& getRotation()
const;
1383 bool isNonClientWindow()
const;
1395 void rename(
const String& new_name);
1423 void setDestroyedByParent(
bool setting);
1437 void setAlwaysOnTop(
bool setting);
1451 void setEnabled(
bool setting);
1488 void setVisible(
bool setting);
1502 void show(
void) {setVisible(
true);}
1514 void hide(
void) {setVisible(
false);}
1524 void activate(
void);
1535 void deactivate(
void);
1549 void setClippedByParent(
bool setting);
1562 void setID(uint ID);
1574 void setText(
const String& text);
1600 void appendText(
const String& text);
1613 void setFont(
Font* font);
1629 void setFont(
const String& name);
1649 void addChildWindow(
const String& name);
1667 void addChildWindow(
Window* window);
1680 void removeChildWindow(
const String& name);
1693 void removeChildWindow(
Window* window);
1708 void removeChildWindow(uint ID);
1750 bool captureInput(
void);
1760 void releaseInput(
void);
1780 void setRestoreCapture(
bool setting);
1802 void setAlpha(
float alpha);
1815 void setInheritsAlpha(
bool setting);
1825 void invalidate(
void);
1851 {d_mouseCursor = (
const Image*)image;}
1872 void setMouseCursor(
const String& imageset,
const String& image_name);
1912 void setZOrderingEnabled(
bool setting);
1927 void setWantsMultiClickEvents(
bool setting);
1941 void setMouseAutoRepeatEnabled(
bool setting);
1954 void setAutoRepeatDelay(
float delay);
1968 void setAutoRepeatRate(
float rate);
1979 void setDistributesCapturedInputs(
bool setting);
2015 virtual void destroy(
void);
2032 void setTooltip(
Tooltip* tooltip);
2052 void setTooltipType(
const String& tooltipType);
2065 void setTooltipText(
const String& tip);
2081 void setInheritsTooltipText(
bool setting);
2154 virtual void setLookNFeel(
const String& look);
2169 void setModalState(
bool state);
2181 virtual void performChildWindowLayout();
2196 void setUserString(
const String& name,
const String& value);
2224 void setArea(
const UDim& xpos,
const UDim& ypos,
const UDim& width,
const UDim& height);
2266 void setArea(
const URect& area);
2286 void setPosition(
const UVector2& pos);
2305 void setXPosition(
const UDim& x);
2324 void setYPosition(
const UDim& y);
2340 void setSize(
const UVector2& size);
2356 void setWidth(
const UDim& width);
2372 void setHeight(
const UDim& height);
2390 void setMaxSize(
const UVector2& size);
2408 void setMinSize(
const UVector2& size);
2427 const URect& getArea()
const;
2446 const UVector2& getPosition()
const;
2465 const UDim& getXPosition()
const;
2484 const UDim& getYPosition()
const;
2516 UDim getWidth()
const;
2532 UDim getHeight()
const;
2550 const UVector2& getMaxSize()
const;
2568 const UVector2& getMinSize()
const;
2598 void update(
float elapsed);
2610 virtual void writeXMLToStream(
XMLSerializer& xml_stream)
const;
2654 void setWindowRenderer(
const String& name);
2675 String getWindowRendererName(
void)
const;
2693 void notifyScreenAreaChanged(
bool recursive =
true);
2706 void setFalagardType(
const String& type,
const String& rendererType =
"");
2717 void setDragDropTarget(
bool setting);
2747 void invalidateRenderingSurface();
2790 void setUsingAutoRenderingSurface(
bool setting);
2793 void setRotation(
const Vector3& rotation);
2809 void setNonClientWindow(
const bool setting);
2825 {
return d_bidiVisualMapping;}
3358 virtual void updateSelf(
float elapsed);
3416 virtual bool testClassName_impl(
const String& class_name)
const
3418 if (class_name ==
"Window")
return true;
3433 void setParent(
Window* parent);
3435 Size getSize_impl(
const Window* window)
const;
3451 virtual bool validateWindowRenderer(
const String& name)
const;
3457 void banPropertyFromXML(
const Property* property);
3463 bool isPropertyBannedFromXML(
const Property* property)
const;
3471 bool isPropertyAtDefault(
const Property* property)
const;
3478 void notifyClippingChanged(
void);
3481 void allocateRenderingWindow();
3484 void releaseRenderingWindow();
3493 virtual void cleanupChildren(
void);
3499 virtual void addChild_impl(
Window* wnd);
3505 virtual void removeChild_impl(
Window* wnd);
3511 virtual void onZChange_impl(
void);
3517 void addStandardProperties(
void);
3527 virtual bool moveToFront_impl(
bool wasClicked);
3560 bool topLeftSizing =
false,
bool fireEvents =
true);
3581 void addWindowToDrawList(
Window& wnd,
bool at_back =
false);
3594 void removeWindowFromDrawList(
const Window& wnd);
3607 bool isTopOfZOrder()
const;
3614 void updateGeometryRenderSettings();
3617 void transferChildSurfaces();
3620 Rect getParentElementClipIntersection(
const Rect& unclipped_area)
const;
3622 virtual int writePropertiesXML(
XMLSerializer& xml_stream)
const;
3623 virtual int writeChildWindowsXML(
XMLSerializer& xml_stream)
const;
3624 virtual bool writeAutoChildWindowXML(
XMLSerializer& xml_stream)
const;
3838 mutable bool d_outerUnclippedRectValid;
3839 mutable bool d_innerUnclippedRectValid;
3840 mutable bool d_outerRectClipperValid;
3841 mutable bool d_innerRectClipperValid;
3842 mutable bool d_hitTestRectValid;
3855 #if defined(_MSC_VER)
3856 # pragma warning(pop)
3859 #endif // end of guard _CEGUIWindow_h_