xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.forms
include
xtd
forms
animation_update_event_args.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include <xtd/event_args>
6
#include <xtd/time_span>
7
9
namespace
xtd
{
11
namespace
forms
{
22
class
animation_updated_event_args :
public
xtd::event_args
{
23
public
:
25
27
animation_updated_event_args(
xtd::uint32
frame_counter
,
xtd::int64
elapsed_nanoseconds
) : frame_counter_ {
frame_counter
}, elapsed_nanoseconds_{
elapsed_nanoseconds
} {}
29
31
35
[[nodiscard]]
auto
elapsed
() const ->
xtd
::
time_span
{
return
xtd::time_span
{std::chrono::duration_cast<xtd::ticks>(std::chrono::nanoseconds {elapsed_nanoseconds_}).count()};}
36
39
[[nodiscard]]
auto
elapsed_milliseconds
() const ->
xtd
::
int64
{
return
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::nanoseconds {elapsed_nanoseconds_}).count();}
40
43
[[nodiscard]]
auto
elapsed_nanoseconds
() const ->
xtd
::
int64
{
return
elapsed_nanoseconds_;}
44
47
[[nodiscard]]
auto
frame_counter
() const ->
xtd
::
uint32
{
return
frame_counter_;}
49
50
private
:
51
xtd::uint32
frame_counter_ = 0;
52
xtd::int64
elapsed_nanoseconds_ {0};
53
};
54
}
55
}
xtd::event_args
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition
event_args.hpp:18
xtd::forms::animation_updated_event_args::elapsed_milliseconds
auto elapsed_milliseconds() const -> xtd::int64
Gets elepased time in milliseconds.
Definition
animation_update_event_args.hpp:39
xtd::forms::animation_updated_event_args::frame_counter
auto frame_counter() const -> xtd::uint32
Gets frame counter.
Definition
animation_update_event_args.hpp:47
xtd::forms::animation_updated_event_args::elapsed_nanoseconds
auto elapsed_nanoseconds() const -> xtd::int64
Gets elepased time in nanoseconds.
Definition
animation_update_event_args.hpp:43
xtd::forms::animation_updated_event_args::elapsed
auto elapsed() const -> xtd::time_span
Gets elepased time in nanoseconds.
Definition
animation_update_event_args.hpp:35
xtd::time_span
Represents a time interval.
Definition
time_span.hpp:29
xtd::int64
std::int64_t int64
Represents a 64-bit signed integer.
Definition
int64.hpp:23
xtd::uint32
std::uint32_t uint32
Represents a 32-bit unsigned integer.
Definition
uint32.hpp:23
xtd::forms
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition
texts.hpp:219
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
Generated on
for xtd by
Gammasoft
. All rights reserved.