|
lxgui
|
Namespaces | |
| namespace | impl |
| namespace | range |
| namespace | view |
Classes | |
| class | connection |
| Object representing the connection between a slot and a signal. More... | |
| struct | empty |
| Empty type, used in the implementation of utils::variant. More... | |
| class | exception |
| Exception class. More... | |
| class | periodic_timer |
| A repeating timer. More... | |
| class | scoped_connection |
| A connection that automatically disconnects when going out of scope. More... | |
| class | signal |
| Generic class for observing and triggering events. More... | |
| class | sorted_vector |
| Sorted std::vector wrapper. This class is a light alternative to std::set. Inspired from: [1] www.lafstern.org/matt/col1.pdf. More... | |
Typedefs | |
| using | string_vector = std::vector< std::string > |
| template<typename T > | |
| using | first_function_argument = typename impl::first_function_argument_< decltype(&std::decay_t< T >::operator())>::type |
| template<typename T > | |
| using | owner_ptr = oup::observable_sealed_ptr< T > |
| template<typename T > | |
| using | enable_observer_from_this = oup::enable_observer_from_this_sealed< T > |
| using | variant = std::variant< empty, bool, std::int64_t, std::int32_t, std::int16_t, std::int8_t, std::uint64_t, std::uint32_t, std::uint16_t, std::uint8_t, double, float, std::string > |
| Type-erased value for passing arguments to events. | |
Enumerations | |
| enum class | rounding_method { nearest , nearest_not_zero , up , down } |
| Rounding method for points to pixels conversions. More... | |
Functions | |
| bool | file_exists (const std::string &file) |
| string_vector | get_directory_list (const std::string &rel_path) |
| string_vector | get_file_list (const std::string &rel_path, bool with_path) |
| string_vector | get_file_list (const std::string &rel_path, bool with_path, const std::string &extensions) |
| bool | make_directory (const std::string &path) |
| std::string | get_file_extension (const std::string &file) |
| float | round (float value, float unit, rounding_method method) |
| Round a floating point value to a specific unit and using a specific rounding method. | |
| template<typename T , typename... Args> | |
| owner_ptr< T > | make_owned (Args &&... args) |
| template<typename C , typename T > | |
| auto | find (C &v, const T &s) |
| template<typename C , typename T > | |
| auto | find_if (C &v, T &&f) |
| template<typename T > | |
| T & | get (variant &value) |
| Retrieve the value stored in an utils::variant. | |
| template<typename T > | |
| const T & | get (const variant &value) |
| Retrieve the value stored in an utils::variant. | |
| using lxgui::utils::enable_observer_from_this = typedef oup::enable_observer_from_this_sealed<T> |
Definition at line 21 of file utils_observer.hpp.
| using lxgui::utils::first_function_argument = typedef typename impl::first_function_argument_<decltype(&std::decay_t<T>::operator())>::type |
Definition at line 31 of file utils_meta.hpp.
| using lxgui::utils::owner_ptr = typedef oup::observable_sealed_ptr<T> |
Definition at line 11 of file utils_observer.hpp.
| using lxgui::utils::string_vector = typedef std::vector<std::string> |
Definition at line 12 of file utils_file_system.hpp.
| using lxgui::utils::variant = typedef std::variant< empty, bool, std::int64_t, std::int32_t, std::int16_t, std::int8_t, std::uint64_t, std::uint32_t, std::uint16_t, std::uint8_t, double, float, std::string> |
Type-erased value for passing arguments to events.
This contains all the basic numerical types up to 64bit precision. Any other scalar types (such as charXX_t, or strongly typed enums) can be represented as one of these. Use utils::get() to enable automatic support for strongly typed enums. The utils::empty type is used to indicate an un-specified value. This is also the state of a default constructed utils::variant. When transferred to Lua, utils::empty is translated as nil.
Definition at line 26 of file utils_variant.hpp.
|
strong |
Rounding method for points to pixels conversions.
| Enumerator | |
|---|---|
| nearest | Equivalent to round() |
| nearest_not_zero | Equivalent to round() but only returns 0 if input is exactly 0. |
| up | Equivalent to ceil() |
| down | Equivalent to floor() |
Definition at line 10 of file utils_maths.hpp.
| bool lxgui::utils::file_exists | ( | const std::string & | file | ) |
Definition at line 10 of file utils_file_system.cpp.
| auto lxgui::utils::find | ( | C & | v, |
| const T & | s | ||
| ) |
Definition at line 14 of file utils_std.hpp.
| auto lxgui::utils::find_if | ( | C & | v, |
| T && | f | ||
| ) |
Definition at line 19 of file utils_std.hpp.
| const T & lxgui::utils::get | ( | const variant & | value | ) |
Retrieve the value stored in an utils::variant.
| value | The variant |
Definition at line 62 of file utils_variant.hpp.
| T & lxgui::utils::get | ( | variant & | value | ) |
Retrieve the value stored in an utils::variant.
| value | The variant |
Definition at line 48 of file utils_variant.hpp.
| string_vector lxgui::utils::get_directory_list | ( | const std::string & | rel_path | ) |
Definition at line 14 of file utils_file_system.cpp.
| std::string lxgui::utils::get_file_extension | ( | const std::string & | file | ) |
Definition at line 65 of file utils_file_system.cpp.
| string_vector lxgui::utils::get_file_list | ( | const std::string & | rel_path, |
| bool | with_path | ||
| ) |
Definition at line 24 of file utils_file_system.cpp.
| string_vector lxgui::utils::get_file_list | ( | const std::string & | rel_path, |
| bool | with_path, | ||
| const std::string & | extensions | ||
| ) |
Definition at line 39 of file utils_file_system.cpp.
| bool lxgui::utils::make_directory | ( | const std::string & | path | ) |
Definition at line 60 of file utils_file_system.cpp.
| owner_ptr< T > lxgui::utils::make_owned | ( | Args &&... | args | ) |
Definition at line 24 of file utils_observer.hpp.
| float lxgui::utils::round | ( | float | value, |
| float | unit, | ||
| rounding_method | method | ||
| ) |
Round a floating point value to a specific unit and using a specific rounding method.
| value | The value to round |
| unit | The rounding unit (e.g., if set to 2, the output must be a multiple of 2) |
| method | The rounding method |
Definition at line 8 of file utils_maths.cpp.