2013-07-12 21:30:13 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* ButtonBase.h *
|
|
|
|
* *
|
|
|
|
* System::Windows::Controls::Primitives::ButtonBase definition file *
|
|
|
|
* Copyright (c) XFX Team. All rights reserved *
|
|
|
|
*****************************************************************************/
|
|
|
|
#ifndef _SYSTEM_WINDOWS_CONTROLS_PRIMITIVES_BUTTONBASE_
|
|
|
|
#define _SYSTEM_WINDOWS_CONTROLS_PRIMITIVES_BUTTONBASE_
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
#include <System/Windows/Controls/ContentControl.h>
|
|
|
|
#include <System/Windows/Input/KeyEventArgs.h>
|
|
|
|
#include <System/Windows/Input/MouseEventArgs.h>
|
|
|
|
|
|
|
|
using namespace System::Windows::Input;
|
|
|
|
|
|
|
|
namespace System
|
|
|
|
{
|
|
|
|
namespace Windows
|
|
|
|
{
|
|
|
|
namespace Controls
|
|
|
|
{
|
|
|
|
namespace Primitives
|
|
|
|
{
|
2013-07-12 21:30:13 +02:00
|
|
|
/**
|
|
|
|
* Represents the base class for all button controls, such as System::Windows::Controls::Button, System::Windows::Controls::Primitives::RepeatButton, and System::Windows::Controls::HyperlinkButton.
|
|
|
|
*/
|
2013-05-05 18:18:41 +02:00
|
|
|
class ButtonBase : public ContentControl
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
bool isFocused;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
ButtonBase();
|
|
|
|
|
|
|
|
virtual void OnClick();
|
2013-07-12 21:30:13 +02:00
|
|
|
void OnGotFocus(RoutedEventArgs * const e);
|
|
|
|
void OnKeyDown(KeyEventArgs * const e);
|
|
|
|
void OnKeyUp(KeyEventArgs * const e);
|
|
|
|
void OnMouseEnter(MouseEventArgs * const e);
|
|
|
|
void OnMouseLeave(MouseEventArgs * const e);
|
|
|
|
void OnMouseMove(MouseEventArgs * const e);
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
void UpdateVisualState(bool useTransitions);
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool IsFocused() const;
|
|
|
|
|
|
|
|
virtual ~ButtonBase();
|
|
|
|
|
2013-07-12 21:30:13 +02:00
|
|
|
static const Type& GetType();
|
2013-05-05 18:18:41 +02:00
|
|
|
|
|
|
|
RoutedEventHandler Click;
|
|
|
|
|
|
|
|
bool operator ==(const ButtonBase& right) const;
|
|
|
|
bool operator !=(const ButtonBase& right) const;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-07-12 21:30:13 +02:00
|
|
|
|
|
|
|
#endif //_SYSTEM_WINDOWS_CONTROLS_PRIMITIVES_BUTTONBASE_
|