#include <emoticon.h>
Represent a emoticon with name and codepoints.
- Namespace
- xtd::forms
- Library
- xtd.forms
- Examples
- The following code example demonstrates the use of emoticon class.
#include <xtd/xtd>
using namespace std;
int main() {
auto main_form = control::create<form>("Emoticons example");
main_form->client_size({500, 400}).
padding(10);
auto emoticon_label = control::create<label>(*main_form);
auto emoticons_list_box = control::create<list_box>(*main_form);
emoticons_list_box->selected_value_changed += [&] {
emoticon_label->text(any_cast<emoticon>(emoticons_list_box->selected_item().tag()).
to_string());
};
emoticons_list_box->selected_index(0);
}
- Examples:
- countries.cpp, and emoticons.cpp.
|
| object ()=default |
| Create a new instance of the ultimate base class object. More...
|
|
virtual bool | equals (const object &obj) const noexcept |
| Determines whether the specified object is equal to the current object. More...
|
|
virtual size_t | get_hash_code () const noexcept |
| Serves as a hash function for a particular type. More...
|
|
template<typename object_t > |
std::unique_ptr< object_t > | memberwise_clone () const |
| Gets the type of the current instance. More...
|
|
static bool | equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are considered equal. More...
|
|
static bool | reference_equals (const object &object_a, const object &object_b) noexcept |
| Determines whether the specified object instances are the same instance. More...
|
|
◆ emoticon() [1/6]
xtd::forms::emoticon::emoticon |
( |
const xtd::ustring & |
name, |
|
|
std::initializer_list< char32_t > |
codepoints |
|
) |
| |
|
inline |
Initialize a new instance of emoticon class with specified name and codepoints.
- Parameters
-
name | A string that represent the name of emoticon |
codepoints | An initializer list of char32_t that represent the emoticon. |
◆ emoticon() [2/6]
xtd::forms::emoticon::emoticon |
( |
const xtd::ustring & |
name, |
|
|
const std::vector< char32_t > & |
codepoints |
|
) |
| |
|
inline |
Initialize a new instance of emoticon class with specified name and codepoints.
- Parameters
-
name | A string that represent the name of emoticon |
codepoints | An array of char32_t that represent the emoticon. |
◆ emoticon() [3/6]
xtd::forms::emoticon::emoticon |
( |
const xtd::ustring & |
name, |
|
|
char32_t |
codepoint |
|
) |
| |
|
inline |
Initialize a new instance of emoticon class with specified name and codepoint.
- Parameters
-
name | A string that represent the name of emoticon |
codepoint | A char32_t that represent the emoticon. |
◆ emoticon() [4/6]
xtd::forms::emoticon::emoticon |
( |
std::initializer_list< char32_t > |
codepoints | ) |
|
|
inlineexplicit |
Initialize a new instance of emoticon class with specified codepoints.
- Parameters
-
codepoints | An initializer list of char32_t that represent the emoticon. |
◆ emoticon() [5/6]
xtd::forms::emoticon::emoticon |
( |
const std::vector< char32_t > & |
codepoints | ) |
|
|
inlineexplicit |
Initialize a new instance of emoticon class with specified codepoints.
- Parameters
-
codepoints | An array of char32_t that represent the emoticon. |
◆ emoticon() [6/6]
xtd::forms::emoticon::emoticon |
( |
char32_t |
codepoint | ) |
|
|
inlineexplicit |
Initialize a new instance of emoticon class with specified codepoint.
- Parameters
-
codepoints | A char32_t that represent the emoticon. |
◆ codepoints()
const std::vector<char32_t>& xtd::forms::emoticon::codepoints |
( |
| ) |
const |
|
inline |
Gets codepoints of emoticon.
- Returns
- An array of char32_t that represent the emoticon.
◆ empty()
static const emoticon xtd::forms::emoticon::empty |
( |
| ) |
|
|
static |
Represents an empty emoticon.
◆ name()
Gets name of emoticon.
- Returns
- A string that represent the name of emoticon.
- Examples:
- emoticons.cpp.
◆ to_string()
|
inlineoverridevirtualnoexcept |
Returns a string containing the codepoints of the emoticons.
- Returns
- A string containing the codepoints of the emoticon. Empty string ("") for none codepoints.
Reimplemented from xtd::object.
The documentation for this class was generated from the following file: