2013-07-11 17:25:49 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* UIElement.h *
|
|
|
|
* *
|
|
|
|
* System::Windows::UIElement definition file *
|
|
|
|
* Copyright (c) XFX Team. All rights reserved *
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef _SYSTEM_WINDOWS_UIELEMENT_
|
|
|
|
#define _SYSTEM_WINDOWS_UIELEMENT_
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
#include <System/Windows/DependencyObject.h>
|
2013-07-11 17:25:49 +02:00
|
|
|
#include <System/Windows/DependencyProperty.h>
|
2013-05-05 18:18:41 +02:00
|
|
|
#include <System/Windows/Enums.h>
|
|
|
|
#include <System/Windows/Rect.h>
|
|
|
|
#include <System/Windows/Input/KeyEventArgs.h>
|
|
|
|
#include <System/Windows/Input/MouseEventArgs.h>
|
|
|
|
|
|
|
|
using namespace System::Windows::Input;
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
namespace Windows
|
|
|
|
{
|
|
|
|
struct Size;
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* System::Windows::UIElement is a base class for most of the objects that have visual appearance and can process basic input.
|
|
|
|
*/
|
|
|
|
class UIElement : public DependencyObject
|
2013-05-05 18:18:41 +02:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
UIElement();
|
|
|
|
|
|
|
|
public:
|
|
|
|
Size getRenderSize() const;
|
|
|
|
byte Opacity;
|
2013-07-11 17:25:49 +02:00
|
|
|
static const DependencyProperty<byte> OpacityProperty;
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Gets or sets the visibility of a System::Windows::UIElement. A System::Windows::UIElement that is not visible does not render and does not communicate its desired size to layout.
|
|
|
|
*/
|
2013-07-11 17:25:49 +02:00
|
|
|
Visibility_t getVisibility() const;
|
|
|
|
void setVisibility(const Visibility_t value);
|
|
|
|
static const DependencyProperty<Visibility_t> VisibilityProperty;
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
virtual ~UIElement();
|
|
|
|
|
|
|
|
void Arrange(const Rect finalRect);
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
void InvalidateArrange();
|
|
|
|
void InvalidateMeasure();
|
|
|
|
void Measure(const Size availableSize);
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Ensures that all positions of child objects of a System::Windows::UIElement are properly updated for layout.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
void UpdateLayout();
|
|
|
|
|
|
|
|
bool operator==(const UIElement& right) const;
|
|
|
|
bool operator!=(const UIElement& right) const;
|
|
|
|
|
|
|
|
RoutedEventHandler GotFocus;
|
2013-10-07 12:10:17 +02:00
|
|
|
KeyEventHandler KeyDown;
|
|
|
|
KeyEventHandler KeyUp;
|
2013-05-05 18:18:41 +02:00
|
|
|
RoutedEventHandler LostFocus;
|
|
|
|
MouseEventHandler MouseEnter;
|
|
|
|
MouseEventHandler MouseLeave;
|
2013-07-11 17:25:49 +02:00
|
|
|
EventHandler MouseLeftButtonDown;
|
|
|
|
EventHandler MouseLeftButtonUp;
|
2013-05-05 18:18:41 +02:00
|
|
|
MouseEventHandler MouseMove;
|
2013-07-11 17:25:49 +02:00
|
|
|
EventHandler MouseWheel;
|
2013-05-05 18:18:41 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2013-07-11 17:25:49 +02:00
|
|
|
|
|
|
|
#endif //_SYSTEM_WINDOWS_UIELEMENT_
|