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;
491 Window* getChild(uint ID)
const;
514 Window* getChildRecursive(uint ID)
const;
543 Window* getActiveChild(
void);
544 const Window* getActiveChild(
void)
const;
559 bool isAncestor(
const String& name)
const;
574 bool isAncestor(uint ID)
const;
588 bool isAncestor(
const Window* window)
const;
603 Font* getFont(
bool useDefault =
true)
const;
652 float getEffectiveAlpha(
void)
const;
667 Rect getPixelRect(
void)
const;
682 virtual Rect getPixelRect_impl(
void)
const;
692 Rect getInnerRect(
void)
const;
704 Rect getUnclippedPixelRect(
void)
const;
717 Rect getUnclippedInnerRect(
void)
const;
730 virtual Rect getUnclippedInnerRect_impl(
void)
const;
761 bool isCapturedByAncestor(
void)
const
762 {
return isAncestor(getCaptureWindow());}
786 virtual bool isHit(
const Vector2& position)
const;
815 Window* getTargetChildAtPosition(
const Vector2& position)
const;
841 const Image* getMouseCursor(
bool useDefault =
true)
const;
891 bool isZOrderingEnabled(
void)
const;
903 bool wantsMultiClickEvents(
void)
const;
916 bool isMouseAutoRepeatEnabled(
void)
const;
926 float getAutoRepeatDelay(
void)
const;
937 float getAutoRepeatRate(
void)
const;
948 bool distributesCapturedInputs(
void)
const;
959 bool isUsingDefaultTooltip(
void)
const;
970 Tooltip* getTooltip(
void)
const;
980 String getTooltipType(
void)
const;
989 const String& getTooltipText(
void)
const;
1002 bool inheritsTooltipText(
void)
const;
1028 bool testClassName(
const String& class_name)
const
1029 {
return testClassName_impl(class_name);}
1072 const String& getLookNFeel()
const;
1081 bool getModalState(
void)
const
1110 bool isUserStringDefined(
const String& name)
const;
1127 Window* getActiveSibling();
1138 Size getParentPixelSize(
void)
const;
1149 float getParentPixelWidth(
void)
const;
1160 float getParentPixelHeight(
void)
const;
1244 bool isDragDropTarget()
const;
1259 void rename(
const String& new_name);
1287 void setDestroyedByParent(
bool setting);
1301 void setAlwaysOnTop(
bool setting);
1315 void setEnabled(
bool setting);
1346 void setVisible(
bool setting);
1355 void show(
void) {setVisible(
true);}
1364 void hide(
void) {setVisible(
false);}
1374 void activate(
void);
1385 void deactivate(
void);
1399 void setClippedByParent(
bool setting);
1412 void setID(uint ID);
1430 void setText(
const String& text);
1443 void setFont(
Font* font);
1459 void setFont(
const String& name);
1479 void addChildWindow(
const String& name);
1497 void addChildWindow(
Window* window);
1510 void removeChildWindow(
const String& name);
1523 void removeChildWindow(
Window* window);
1538 void removeChildWindow(uint ID);
1580 bool captureInput(
void);
1590 void releaseInput(
void);
1610 void setRestoreCapture(
bool setting);
1632 void setAlpha(
float alpha);
1645 void setInheritsAlpha(
bool setting);
1655 void requestRedraw(
void)
const;
1681 {d_mouseCursor = (
const Image*)image;}
1702 void setMouseCursor(
const String& imageset,
const String& image_name);
1733 void setZOrderingEnabled(
bool setting);
1748 void setWantsMultiClickEvents(
bool setting);
1762 void setMouseAutoRepeatEnabled(
bool setting);
1775 void setAutoRepeatDelay(
float delay);
1789 void setAutoRepeatRate(
float rate);
1800 void setDistributesCapturedInputs(
bool setting);
1836 virtual void destroy(
void);
1853 void setTooltip(
Tooltip* tooltip);
1873 void setTooltipType(
const String& tooltipType);
1886 void setTooltipText(
const String& tip);
1902 void setInheritsTooltipText(
bool setting);
1966 virtual void setLookNFeel(
const String& look);
1981 void setModalState(
bool state);
1993 virtual void performChildWindowLayout();
2008 void setUserString(
const String& name,
const String& value);
2036 void setArea(
const UDim& xpos,
const UDim& ypos,
const UDim& width,
const UDim& height);
2078 void setArea(
const URect& area);
2098 void setPosition(
const UVector2& pos);
2117 void setXPosition(
const UDim& x);
2136 void setYPosition(
const UDim& y);
2152 void setSize(
const UVector2& size);
2168 void setWidth(
const UDim& width);
2184 void setHeight(
const UDim& height);
2202 void setMaxSize(
const UVector2& size);
2220 void setMinSize(
const UVector2& size);
2239 const URect& getArea()
const;
2258 const UVector2& getPosition()
const;
2277 const UDim& getXPosition()
const;
2296 const UDim& getYPosition()
const;
2328 UDim getWidth()
const;
2344 UDim getHeight()
const;
2362 const UVector2& getMaxSize()
const;
2380 const UVector2& getMinSize()
const;
2410 void update(
float elapsed);
2422 virtual void writeXMLToStream(
XMLSerializer& xml_stream)
const;
2466 void setWindowRenderer(
const String& name);
2487 String getWindowRendererName(
void)
const;
2499 void notifyScreenAreaChanged(
void);
2512 void setFalagardType(
const String& type,
const String& rendererType =
"");
2523 void setDragDropTarget(
bool setting);
3034 virtual void updateSelf(
float elapsed);
3047 virtual void drawSelf(
float z);
3069 virtual bool testClassName_impl(
const String& class_name)
const
3071 if (class_name==
"Window")
return true;
3086 void setParent(
Window* parent);
3088 Size getSize_impl(
const Window* window)
const;
3104 virtual bool validateWindowRenderer(
const String& name)
const;
3110 void banPropertyFromXML(
const Property* property);
3116 bool isPropertyBannedFromXML(
const Property* property)
const;
3124 bool isPropertyAtDefault(
const Property* property)
const;
3131 void notifyClippingChanged(
void);
3137 typedef std::vector<Window*> ChildList;
3176 typedef std::map<String, String, String::FastLessCompare> UserStringMap;
3336 mutable bool d_screenUnclippedRectValid;
3339 mutable bool d_screenUnclippedInnerRectValid;
3342 mutable bool d_screenRectValid;
3345 mutable bool d_screenInnerRectValid;
3396 virtual void cleanupChildren(
void);
3402 virtual void addChild_impl(
Window* wnd);
3408 virtual void removeChild_impl(
Window* wnd);
3414 virtual void onZChange_impl(
void);
3420 void addStandardProperties(
void);
3430 virtual bool moveToFront_impl(
bool wasClicked);
3439 bool doRiseOnClick(
void);
3471 void setArea_impl(
const UVector2& pos,
const UVector2& size,
bool topLeftSizing =
false,
bool fireEvents =
true);
3492 void addWindowToDrawList(
Window& wnd,
bool at_back =
false);
3505 void removeWindowFromDrawList(
const Window& wnd);
3518 bool isTopOfZOrder()
const;
3520 virtual int writePropertiesXML(
XMLSerializer& xml_stream)
const;
3521 virtual int writeChildWindowsXML(
XMLSerializer& xml_stream)
const;
3522 virtual bool writeAutoChildWindowXML(
XMLSerializer& xml_stream)
const;
3555 #if defined(_MSC_VER)
3556 # pragma warning(pop)
3559 #endif // end of guard _CEGUIWindow_h_