Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.7 KiB

  1. /*
  2. * RefPointElement
  3. */
  4. #ifndef DUI_CONTROL_REFPOINTELEMENT_H_INCLUDED
  5. #define DUI_CONTROL_REFPOINTELEMENT_H_INCLUDED
  6. #pragma once
  7. namespace DirectUI
  8. {
  9. ////////////////////////////////////////////////////////
  10. // RefPointElement
  11. // Class definition
  12. class RefPointElement : public Element
  13. {
  14. public:
  15. static HRESULT Create(OUT Element** ppElement) { return Create(AE_Inactive, ppElement); }
  16. static HRESULT Create(UINT nActive, OUT Element** ppElement);
  17. // System Events
  18. //virtual void OnGroupChanged(int fGroups, bool bLowPri);
  19. virtual void OnPropertyChanged(PropertyInfo* ppi, int iIndex, Value* pvOld, Value* pvNew);
  20. // Global helpers
  21. static Element* FindRefPoint(Element* pe, POINT* ppt);
  22. static RefPointElement* Locate(Element* pe);
  23. // Property definitions
  24. static PropertyInfo* ReferencePointProp;
  25. static PropertyInfo* ActualReferencePointProp;
  26. // Quick property accessors
  27. const POINT* GetReferencePoint(Value** ppv) { *ppv = GetValue(ReferencePointProp, PI_Local); return (*ppv != Value::pvUnset) ? (*ppv)->GetPoint() : NULL; }
  28. const POINT* GetActualReferencePoint(Value** ppv) DUIQuickGetterInd(GetPoint(), ActualReferencePoint, Specified)
  29. HRESULT SetReferencePoint(int x, int y) DUIQuickSetter(CreatePoint(x, y), ReferencePoint)
  30. // ClassInfo accessors (static and virtual instance-based)
  31. static IClassInfo* Class;
  32. virtual IClassInfo* GetClassInfo() { return Class; }
  33. static HRESULT Register();
  34. RefPointElement() { }
  35. HRESULT Initialize(UINT nActive);
  36. virtual ~RefPointElement() { }
  37. };
  38. } // namespace DirectUI
  39. #endif // DUI_CONTROL_REFPOINTELEMENT_H_INCLUDED