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 "CEGUIRenderCache.h"
45 #include "CEGUIWindowRenderer.h"
51 # pragma warning(push)
52 # pragma warning(disable : 4251)
260 const String& getType(
void)
const;
311 bool isDisabled(
bool localOnly =
false)
const;
329 bool isVisible(
bool localOnly =
false)
const;
345 bool isActive(
void)
const;
365 uint
getID(
void)
const {
return d_ID;}
390 bool isChild(
const String& name)
const;
408 bool isChild(uint ID)
const;
430 bool isChildRecursive(uint ID)
const;
443 bool isChild(
const Window* window)
const;
499 Window* getChild(uint ID)
const;
547 Window* getChildRecursive(uint ID)
const;
576 Window* getActiveChild(
void);
577 const Window* getActiveChild(
void)
const;
592 bool isAncestor(
const String& name)
const;
607 bool isAncestor(uint ID)
const;
621 bool isAncestor(
const Window* window)
const;
636 Font* getFont(
bool useDefault =
true)
const;
685 float getEffectiveAlpha(
void)
const;
700 Rect getPixelRect(
void)
const;
715 virtual Rect getPixelRect_impl(
void)
const;
725 Rect getInnerRect(
void)
const;
737 Rect getUnclippedPixelRect(
void)
const;
750 Rect getUnclippedInnerRect(
void)
const;
763 virtual Rect getUnclippedInnerRect_impl(
void)
const;
794 bool isCapturedByAncestor(
void)
const
795 {
return isAncestor(getCaptureWindow());}
819 virtual bool isHit(
const Vector2& position)
const;
848 Window* getTargetChildAtPosition(
const Vector2& position)
const;
874 const Image* getMouseCursor(
bool useDefault =
true)
const;
933 bool isZOrderingEnabled(
void)
const;
945 bool wantsMultiClickEvents(
void)
const;
958 bool isMouseAutoRepeatEnabled(
void)
const;
968 float getAutoRepeatDelay(
void)
const;
979 float getAutoRepeatRate(
void)
const;
990 bool distributesCapturedInputs(
void)
const;
1001 bool isUsingDefaultTooltip(
void)
const;
1012 Tooltip* getTooltip(
void)
const;
1022 String getTooltipType(
void)
const;
1031 const String& getTooltipText(
void)
const;
1044 bool inheritsTooltipText(
void)
const;
1079 bool testClassName(
const String& class_name)
const
1080 {
return testClassName_impl(class_name);}
1123 const String& getLookNFeel()
const;
1132 bool getModalState(
void)
const
1161 bool isUserStringDefined(
const String& name)
const;
1178 Window* getActiveSibling();
1189 Size getParentPixelSize(
void)
const;
1200 float getParentPixelWidth(
void)
const;
1211 float getParentPixelHeight(
void)
const;
1295 bool isDragDropTarget()
const;
1310 void rename(
const String& new_name);
1338 void setDestroyedByParent(
bool setting);
1352 void setAlwaysOnTop(
bool setting);
1366 void setEnabled(
bool setting);
1403 void setVisible(
bool setting);
1417 void show(
void) {setVisible(
true);}
1429 void hide(
void) {setVisible(
false);}
1439 void activate(
void);
1450 void deactivate(
void);
1464 void setClippedByParent(
bool setting);
1477 void setID(uint ID);
1495 void setText(
const String& text);
1521 void appendText(
const String& text);
1534 void setFont(
Font* font);
1550 void setFont(
const String& name);
1570 void addChildWindow(
const String& name);
1588 void addChildWindow(
Window* window);
1601 void removeChildWindow(
const String& name);
1614 void removeChildWindow(
Window* window);
1629 void removeChildWindow(uint ID);
1671 bool captureInput(
void);
1681 void releaseInput(
void);
1701 void setRestoreCapture(
bool setting);
1723 void setAlpha(
float alpha);
1736 void setInheritsAlpha(
bool setting);
1746 void requestRedraw(
void)
const;
1772 {d_mouseCursor = (
const Image*)image;}
1793 void setMouseCursor(
const String& imageset,
const String& image_name);
1833 void setZOrderingEnabled(
bool setting);
1848 void setWantsMultiClickEvents(
bool setting);
1862 void setMouseAutoRepeatEnabled(
bool setting);
1875 void setAutoRepeatDelay(
float delay);
1889 void setAutoRepeatRate(
float rate);
1900 void setDistributesCapturedInputs(
bool setting);
1936 virtual void destroy(
void);
1953 void setTooltip(
Tooltip* tooltip);
1973 void setTooltipType(
const String& tooltipType);
1986 void setTooltipText(
const String& tip);
2002 void setInheritsTooltipText(
bool setting);
2075 virtual void setLookNFeel(
const String& look);
2090 void setModalState(
bool state);
2102 virtual void performChildWindowLayout();
2117 void setUserString(
const String& name,
const String& value);
2145 void setArea(
const UDim& xpos,
const UDim& ypos,
const UDim& width,
const UDim& height);
2187 void setArea(
const URect& area);
2207 void setPosition(
const UVector2& pos);
2226 void setXPosition(
const UDim& x);
2245 void setYPosition(
const UDim& y);
2261 void setSize(
const UVector2& size);
2277 void setWidth(
const UDim& width);
2293 void setHeight(
const UDim& height);
2311 void setMaxSize(
const UVector2& size);
2329 void setMinSize(
const UVector2& size);
2348 const URect& getArea()
const;
2367 const UVector2& getPosition()
const;
2386 const UDim& getXPosition()
const;
2405 const UDim& getYPosition()
const;
2437 UDim getWidth()
const;
2453 UDim getHeight()
const;
2471 const UVector2& getMaxSize()
const;
2489 const UVector2& getMinSize()
const;
2519 void update(
float elapsed);
2531 virtual void writeXMLToStream(
XMLSerializer& xml_stream)
const;
2575 void setWindowRenderer(
const String& name);
2596 String getWindowRendererName(
void)
const;
2608 void notifyScreenAreaChanged(
void);
2621 void setFalagardType(
const String& type,
const String& rendererType =
"");
2632 void setDragDropTarget(
bool setting);
3143 virtual void updateSelf(
float elapsed);
3156 virtual void drawSelf(
float z);
3178 virtual bool testClassName_impl(
const String& class_name)
const
3180 if (class_name==
"Window")
return true;
3195 void setParent(
Window* parent);
3197 Size getSize_impl(
const Window* window)
const;
3213 virtual bool validateWindowRenderer(
const String& name)
const;
3219 void banPropertyFromXML(
const Property* property);
3225 bool isPropertyBannedFromXML(
const Property* property)
const;
3233 bool isPropertyAtDefault(
const Property* property)
const;
3240 void notifyClippingChanged(
void);
3246 typedef std::vector<Window*> ChildList;
3285 typedef std::map<String, String, String::FastLessCompare> UserStringMap;
3445 mutable bool d_screenUnclippedRectValid;
3448 mutable bool d_screenUnclippedInnerRectValid;
3451 mutable bool d_screenRectValid;
3454 mutable bool d_screenInnerRectValid;
3505 virtual void cleanupChildren(
void);
3511 virtual void addChild_impl(
Window* wnd);
3517 virtual void removeChild_impl(
Window* wnd);
3523 virtual void onZChange_impl(
void);
3529 void addStandardProperties(
void);
3539 virtual bool moveToFront_impl(
bool wasClicked);
3553 bool doRiseOnClick(
void);
3585 void setArea_impl(
const UVector2& pos,
const UVector2& size,
bool topLeftSizing =
false,
bool fireEvents =
true);
3606 void addWindowToDrawList(
Window& wnd,
bool at_back =
false);
3619 void removeWindowFromDrawList(
const Window& wnd);
3632 bool isTopOfZOrder()
const;
3634 virtual int writePropertiesXML(
XMLSerializer& xml_stream)
const;
3635 virtual int writeChildWindowsXML(
XMLSerializer& xml_stream)
const;
3636 virtual bool writeAutoChildWindowXML(
XMLSerializer& xml_stream)
const;
3669 #if defined(_MSC_VER)
3670 # pragma warning(pop)
3673 #endif // end of guard _CEGUIWindow_h_