# Microsoft.Samples.DirectX.UtilityToolkit.Button Class Reference

Button control. More...

Inherits Microsoft::Samples::DirectX::UtilityToolkit::StaticText, Microsoft::Samples::DirectX::UtilityToolkit::StaticText, and Microsoft::Samples::DirectX::UtilityToolkit::StaticText.

Inherited by Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Collaboration diagram for Microsoft.Samples.DirectX.UtilityToolkit.Button:

[legend]

List of all members.

## Public Member Functions
| Button (Dialog parent)
| Create new button instance.
override void | OnHotKey ()
| The hotkey for this button was pressed.
override bool | HandleKeyboard (NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
| Will handle the keyboard strokes.
override bool | HandleMouse (NativeMethods.WindowMessage msg, System.Drawing.Point pt, IntPtr wParam, IntPtr lParam)
| Handle mouse messages from the buttons.
override void | Render (Device device, float elapsedTime)
| Render the button.
| Button (Dialog parent)
| Create new button instance.
override void | OnHotKey ()
| The hotkey for this button was pressed.
override bool | HandleKeyboard (NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
| Will handle the keyboard strokes.
override bool | HandleMouse (NativeMethods.WindowMessage msg, System.Drawing.Point pt, IntPtr wParam, IntPtr lParam)
| Handle mouse messages from the buttons.
override void | Render (Device device, float elapsedTime)
| Render the button.
| Button (Dialog parent)
| Create new button instance.
override void | OnHotKey ()
| The hotkey for this button was pressed.
override bool | HandleKeyboard (NativeMethods.WindowMessage msg, IntPtr wParam, IntPtr lParam)
| Will handle the keyboard strokes.
override bool | HandleMouse (NativeMethods.WindowMessage msg, System.Drawing.Point pt, IntPtr wParam, IntPtr lParam)
| Handle mouse messages from the buttons.
override void | Render (Device device, float elapsedTime)
| Render the button.
## Public Attributes
const int | ButtonLayer = 0
const int | FillLayer = 1
## Protected Member Functions
void | RaiseClickEvent (Button sender, bool wasTriggeredByUser)
| Create new button instance.
void | RaiseClickEvent (Button sender, bool wasTriggeredByUser)
| Create new button instance.
void | RaiseClickEvent (Button sender, bool wasTriggeredByUser)
| Create new button instance.
## Protected Attributes
bool | isPressed
## Properties
override bool | CanHaveFocus`[get]`
| Can the button have focus.
## Events
EventHandler | Click

## Detailed Description

Button control.

Definition at line 2019 of file dxmutgui.cs.

## Constructor & Destructor Documentation

Microsoft.Samples.DirectX.UtilityToolkit.Button.Button | ( | Dialog | parent | ) |

Create new button instance.

Definition at line 2040 of file dxmutgui.cs.

Here is the caller graph for this function:

Microsoft.Samples.DirectX.UtilityToolkit.Button.Button | ( | Dialog | parent | ) |

Create new button instance.

Definition at line 2040 of file dxmutgui.cs.

Microsoft.Samples.DirectX.UtilityToolkit.Button.Button | ( | Dialog | parent | ) |

Create new button instance.

Definition at line 2041 of file wdxmutgui.cs.

## Member Function Documentation

override bool Microsoft.Samples.DirectX.UtilityToolkit.Button.HandleKeyboard | ( | NativeMethods.WindowMessage | msg,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

Will handle the keyboard strokes.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2061 of file wdxmutgui.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.Button.HandleKeyboard | ( | NativeMethods.WindowMessage | msg,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

Will handle the keyboard strokes.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2059 of file dxmutgui.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.Button.HandleKeyboard | ( | NativeMethods.WindowMessage | msg,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

Will handle the keyboard strokes.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2059 of file dxmutgui.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.Button.HandleMouse | ( | NativeMethods.WindowMessage | msg,
|  | System.Drawing.Point | pt,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

Handle mouse messages from the buttons.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2091 of file wdxmutgui.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.Button.HandleMouse | ( | NativeMethods.WindowMessage | msg,
|  | System.Drawing.Point | pt,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

Handle mouse messages from the buttons.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2089 of file dxmutgui.cs.

override bool Microsoft.Samples.DirectX.UtilityToolkit.Button.HandleMouse | ( | NativeMethods.WindowMessage | msg,
|  | System.Drawing.Point | pt,
|  | IntPtr | wParam,
|  | IntPtr | lParam |
| ) |  |  | `[virtual]`

Handle mouse messages from the buttons.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2089 of file dxmutgui.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.Button.OnHotKey | ( |  | ) | `[virtual]`

The hotkey for this button was pressed.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2053 of file wdxmutgui.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.Button.OnHotKey | ( |  | ) | `[virtual]`

The hotkey for this button was pressed.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2051 of file dxmutgui.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.Button.OnHotKey | ( |  | ) | `[virtual]`

The hotkey for this button was pressed.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.RadioButton, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2051 of file dxmutgui.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.Button.RaiseClickEvent | ( | Button | sender,
|  | bool | wasTriggeredByUser |
| ) |  |  | `[protected]`

Create new button instance.

Definition at line 2028 of file wdxmutgui.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.Button.RaiseClickEvent | ( | Button | sender,
|  | bool | wasTriggeredByUser |
| ) |  |  | `[protected]`

Create new button instance.

Definition at line 2027 of file dxmutgui.cs.

void Microsoft.Samples.DirectX.UtilityToolkit.Button.RaiseClickEvent | ( | Button | sender,
|  | bool | wasTriggeredByUser |
| ) |  |  | `[protected]`

Create new button instance.

Definition at line 2027 of file dxmutgui.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.Button.Render | ( | Device | device,
|  | float | elapsedTime |
| ) |  |  | `[virtual]`

Render the button.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.StaticText.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2134 of file wdxmutgui.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.Button.Render | ( | Device | device,
|  | float | elapsedTime |
| ) |  |  | `[virtual]`

Render the button.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.StaticText.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2132 of file dxmutgui.cs.

override void Microsoft.Samples.DirectX.UtilityToolkit.Button.Render | ( | Device | device,
|  | float | elapsedTime |
| ) |  |  | `[virtual]`

Render the button.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.StaticText.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, Microsoft.Samples.DirectX.UtilityToolkit.ComboBox, Microsoft.Samples.DirectX.UtilityToolkit.Checkbox, and Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2132 of file dxmutgui.cs.

Here is the call graph for this function:

## Member Data Documentation

const int Microsoft::Samples::DirectX::UtilityToolkit.Button::ButtonLayer = 0

Definition at line 2021 of file dxmutgui.cs.

const int Microsoft::Samples::DirectX::UtilityToolkit.Button::FillLayer = 1

Definition at line 2022 of file dxmutgui.cs.

bool Microsoft::Samples::DirectX::UtilityToolkit.Button::isPressed`[protected]`

Definition at line 2023 of file dxmutgui.cs.

## Property Documentation

override bool Microsoft::Samples::DirectX::UtilityToolkit.Button::CanHaveFocus`[get]`

Can the button have focus.

Reimplemented from Microsoft.Samples.DirectX.UtilityToolkit.Control.

Reimplemented in Microsoft.Samples.DirectX.UtilityToolkit.ComboBox.

Definition at line 2049 of file dxmutgui.cs.

## Event Documentation

EventHandler Microsoft::Samples::DirectX::UtilityToolkit.Button::Click

Definition at line 2025 of file dxmutgui.cs.

The documentation for this class was generated from the following files:

- D:/guillaume/guillara/3D/DXGfx/Backup/DXCommon/dxmutgui.cs
- D:/guillaume/guillara/3D/DXGfx/DXCommon/dxmutgui.cs
- D:/guillaume/guillara/3D/DXGfx/DXCommon/wdxmutgui.cs