HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Concepts | Typedefs | Enumerations | Functions | Variables
v1 Namespace Reference

DOXYGEN BUG. More...

Data Structures

class  animator
 A type that gets animated between two values. More...
 
class  atomic_unique_ptr
 
struct  await_resume_result
 Get the result type of an awaitable. More...
 
struct  awaitable_cast
 
struct  awaitable_cast< std::chrono::duration< Rep, Period > >
 
struct  awaitable_cast< std::chrono::time_point< std::chrono::utc_clock, Duration > >
 
struct  awaitable_cast< std::stop_token >
 
struct  awaitable_cast< T >
 
class  awaitable_stop_token
 
class  awaitable_timer
 
class  base_n
 
struct  bigint
 High performance big integer implementation. More...
 
class  byte_char_traits
 
struct  composed_t
 
class  const_void_span
 
struct  coverage_format1
 
struct  coverage_format2
 
struct  coverage_format2_range
 
class  decimal
 
class  delayed_format
 Delayed formatting. More...
 
class  dither
 An object that create dither values to add to samples before rounding. More...
 
class  enable_group_ptr
 Enable a class to be used in a group_ptr. More...
 
class  enable_group_ptr< T >
 
class  enable_group_ptr< T, void(Args...)>
 
class  font
 
class  font_book
 font_book keeps track of multiple fonts. More...
 
struct  font_metrics
 The metrics of a font. More...
 
class  font_variant
 A font variant is one of 16 different fonts that can be part of a family. More...
 
struct  forward_value
 Functor for forwarding an forwarding-reference to variable. More...
 
struct  forward_value< char const(&)[N]>
 
class  function
 
class  function< Result(Arguments...)>
 
class  function_fifo
 A fifo (First-in, Firts-out) for asynchronous calls. More...
 
class  function_timer
 A timer that calls functions. More...
 
class  generator
 A return value for a generator-function. More...
 
class  generator< T & >
 
class  gfx_device
 
class  gfx_pipeline
 
struct  gfx_queue_vulkan
 
class  gfx_surface
 
class  gfx_surface_delegate
 A delegate for drawing on a window below the HikoGUI user interface. More...
 
class  gfx_system
 Vulkan gfx_device controller. More...
 
class  glyph_atlas_info
 
struct  glyph_metrics
 
struct  grapheme
 A grapheme-cluster, what a user thinks a character is. More...
 
class  group_ptr
 A smart pointer which manages ownership as a group. More...
 
struct  GSUB_ligature
 
struct  GSUB_version_1_0
 Compatible with version 1.1, all offsets start at the beginning of this header. More...
 
class  gui_window
 
class  hitbox
 
class  icon
 A variant of icon. More...
 
struct  invoke_task_result
 
struct  is_forward_of< Context, group_ptr< Expected > >
 
struct  is_invocable_task
 type-trait to determining if the given invocable Func is a task. More...
 
struct  is_numeric_integral< bigint< T, N, S > >
 
struct  is_numeric_signed_integral< bigint< T, N, true > >
 
struct  is_numeric_unsigned_integral< bigint< T, N, false > >
 
struct  is_task
 type-trait to determine if the given type T is a task. More...
 
struct  is_task< hi::task< ResultType, DestroyFrame > >
 
class  iso_3166
 ISO-3166 country code. More...
 
class  iso_639
 ISO-639 language code. More...
 
class  keyboard_key
 A key in combination with modifiers. More...
 
class  label
 A label consisting of localizable text and an icon. More...
 
class  locked_memory_allocator
 
class  loop
 
struct  mouse_buttons
 
class  notifier
 A notifier which can be used to call a set of registered callbacks. More...
 
class  notifier< R(Args...)>
 
class  os_settings
 
class  packet
 A network message or stream buffer. More...
 
class  packet_buffer
 
class  placement_array
 
class  placement_ptr
 
class  point2
 A high-level geometric point Part of the high-level vec, point, mat and color types. More...
 
class  point3
 A high-level geometric point Part of the high-level vec, point, mat and color types. More...
 
class  polymorphic_optional
 Polymorphic optional. More...
 
class  preferences
 user preferences. More...
 
class  quad
 
struct  sdf_r8
 A pixel of a single channel signed distance field. More...
 
class  secure_memory_allocator
 Memory allocator which will securely clear the memory when deallocated. More...
 
struct  seed
 Randomly generate an object. More...
 
struct  selector< label >
 
class  semantic_version
 
class  sfloat_rg32
 2 x float32 pixel format. More...
 
class  sfloat_rgb32
 3 x float32 pixel format. More...
 
class  sfloat_rgba16
 4 x half pixel format. More...
 
class  sfloat_rgba32
 4 x float32 pixel format. More...
 
class  sfloat_rgba32x4
 4 x 4 x float32 pixel format. More...
 
class  shared_state
 Shared state of an application. More...
 
class  sint_abgr8_pack
 4 x int8_t packed pixel format. More...
 
class  sip_hash
 
struct  sip_hash24
 
struct  sip_hash24< char * >
 
struct  sip_hash24< std::basic_string< CharT, CharTrait > >
 
struct  sip_hash24< std::basic_string_view< CharT, CharTrait > >
 
struct  sip_hash24< std::span< T > >
 
struct  sip_hash24< wchar_t * >
 
struct  snorm_r8
 1 x int8_t pixel format. More...
 
class  socket_events
 
class  Socketstream
 
class  srgb_abgr8_pack
 4 x uint8_t pixel packed format with sRGB transfer function. More...
 
class  stable_set
 This is a set of object with stable indices. More...
 
class  stack
 A static sized stack. More...
 
struct  swapchain_image_info
 
class  tagged_id
 
class  task
 A task. More...
 
class  task< void, DestroyFrame >
 
struct  task_value_type
 
struct  task_value_type< hi::task< ResultType, DestroyFrame > >
 
class  text_cursor
 A cursor-position in text. More...
 
class  text_selection
 
class  text_shaper
 Text shaper. More...
 
class  text_shaper_char
 
class  text_shaper_line
 
class  text_style
 
struct  text_style_impl
 
struct  text_sub_style
 
class  theme
 
class  theme_book
 theme_book keeps track of multiple themes. More...
 
class  time_stamp_count
 Since Window's 10 QueryPerformanceCounter() counts at only 10MHz which is too low to measure performance in many cases. More...
 
struct  time_stamp_utc
 Timestamp. More...
 
class  trace
 
class  trace_base
 
class  true_type_font
 
class  uint_abgr8_pack
 4 x uint8_t pixel packed format. More...
 
class  undo_stack
 
struct  unicode_bidi_context
 
struct  unicode_normalize_config
 
struct  unorm_a2bgr10_pack
 1 x uint2_t, 3 x uint10_t pixel packed format. More...
 
class  vector_span
 
class  vector_span_iterator
 
class  void_span
 
class  wfree_fifo
 A wait-free multiple-producer/single-consumer fifo designed for absolute performance. More...
 
class  xorshift128p
 xorshift128+ More...
 

Concepts

concept  awaitable
 Check if type can be directly co_await on.
 
concept  awaitable_with_co_await_member
 
concept  awaitable_with_co_await_free_function
 
concept  convertible_to_awaitable
 Check if type can be casted with awaitable_cast to an awaitable.
 

Typedefs

using base2 = base_n<detail::base2_alphabet, 8, 1>
 
using base8 = base_n<detail::base8_alphabet, 8, 3>
 
using base16 = base_n<detail::base16_alphabet, 2, 1>
 
using base32 = base_n<detail::base32_rfc4648_alphabet, 8, 5>
 
using base32hex = base_n<detail::base32hex_rfc4648_alphabet, 8, 5>
 
using base64 = base_n<detail::base64_rfc4648_alphabet, 4, 3>
 
using base64url = base_n<detail::base64url_rfc4648_alphabet, 4, 3>
 
using base85 = base_n<detail::base85_rfc1924_alphabet, 5, 4>
 
using ascii85 = base_n<detail::base85_btoa_alphabet, 5, 4>
 
using byteptr = std::byte *
 
using cbyteptr = std::byte const *
 
using bstring = std::basic_string<std::byte, byte_char_traits>
 
using bstring_view = std::basic_string_view<std::byte, byte_char_traits>
 
template<awaitable T>
using await_resume_result_t = await_resume_result<T>::type
 Get the result type of an awaitable.
 
template<typename T = void>
using scoped_task = task<T, true>
 
template<typename T >
using task_value_type_t = task_value_type<T>::type
 
template<typename Func , typename... ArgTypes>
using invoke_task_result_t = invoke_task_result<Func, ArgTypes...>::type
 
using font_family_id = tagged_id<uint16_t, "font_family_id">
 
using font_metrics_em = font_metrics<EmSquares, float>
 
using font_metrics_pt = font_metrics<Points, float>
 
using font_metrics_px = font_metrics<Pixels, float>
 
using glyph_id = tagged_id<uint16_t, "glyph_id">
 
using ubig128 = bigint<uint64_t, 2, false>
 
using big128 = bigint<uint64_t, 2, true>
 
using uuid = bigint<uint64_t, 2, false>
 
using _sip_hash24 = sip_hash<2, 4>
 
using utc_nanoseconds = std::chrono::utc_time<std::chrono::nanoseconds>
 
using sys_nanoseconds = std::chrono::sys_time<std::chrono::nanoseconds>
 
using gstring = std::basic_string<grapheme>
 
using gstring_view = std::basic_string_view<grapheme>
 
using unicode_break_vector = std::vector<unicode_break_opportunity>
 
using unicode_break_iterator = unicode_break_vector::iterator
 
using unicode_break_const_iterator = unicode_break_vector::const_iterator
 
using int128_t = __int128
 Signed 128 bit integer.
 
using uint128_t = unsigned __int128
 Unsigned 128 bit integer.
 
using os_handle = void *
 
using thread_id = uint32_t
 
template<typename T >
using forward_value_t = typename forward_value<T>::type
 Get the storage type of the forward_value functor.
 

Enumerations

enum class  animator_state { uninitialized , idle , running , end }
 
enum class  callback_flags {
  synchronous = 0x00 , local = 0x01 , main = 0x02 , timer = 0x03 ,
  once = 0x1'00
}
 
enum class  socket_event : uint16_t {
  none = 0 , read = 0x0001 , write = 0x0002 , close = 0x0004 ,
  connect = 0x0008 , accept = 0x0010 , out_of_band = 0x0020 , qos = 0x0040 ,
  group_qos = 0x0080 , address_list_change = 0x0100 , routing_interface_changed = 0x0200
}
 
enum class  socket_error : uint8_t {
  success = 0 , af_not_supported , connection_refused , network_unreachable ,
  no_buffers , timeout , network_down , connection_reset ,
  connection_aborted
}
 
enum class  elusive_icon : char32_t {
  AddressBook = 0xf102 , AddressBookAlt = 0xf101 , Adjust = 0xf104 , AdjustAlt = 0xf103 ,
  Adult = 0xf105 , AlignCenter = 0xf106 , AlignJustify = 0xf107 , AlignLeft = 0xf108 ,
  AlignRight = 0xf109 , ArrowDown = 0xf10a , ArrowLeft = 0xf10b , ArrowRight = 0xf10c ,
  ArrowUp = 0xf10d , Asl = 0xf10e , Asterisk = 0xf10f , Backward = 0xf110 ,
  BanCircle = 0xf111 , Barcode = 0xf112 , Behance = 0xf113 , Bell = 0xf114 ,
  Blind = 0xf115 , Blogger = 0xf116 , Bold = 0xf117 , Book = 0xf118 ,
  Bookmark = 0xf11a , BookmarkEmpty = 0xf119 , Braille = 0xf11b , Briefcase = 0xf11c ,
  Broom = 0xf11d , Brush = 0xf11e , Bulb = 0xf11f , Bullhorn = 0xf120 ,
  Calendar = 0xf122 , CalendarSign = 0xf121 , Camera = 0xf123 , Car = 0xf124 ,
  CaretDown = 0xf125 , CaretLeft = 0xf126 , CaretRight = 0xf127 , CaretUp = 0xf128 ,
  Cc = 0xf129 , Certificate = 0xf12a , Check = 0xf12c , CheckEmpty = 0xf12b ,
  ChevronDown = 0xf12d , ChevronLeft = 0xf12e , ChevronRight = 0xf12f , ChevronUp = 0xf130 ,
  Child = 0xf131 , CircleArrowDown = 0xf132 , CircleArrowLeft = 0xf133 , CircleArrowRight = 0xf134 ,
  CircleArrowUp = 0xf135 , Cloud = 0xf137 , CloudAlt = 0xf136 , Cog = 0xf139 ,
  CogAlt = 0xf138 , Cogs = 0xf13a , Comment = 0xf13c , CommentAlt = 0xf13b ,
  Compass = 0xf13e , CompassAlt = 0xf13d , CreditCard = 0xf13f , Css = 0xf140 ,
  Dashboard = 0xf141 , Delicious = 0xf142 , Deviantart = 0xf143 , Digg = 0xf144 ,
  Download = 0xf146 , DownloadAlt = 0xf145 , Dribbble = 0xf147 , Edit = 0xf148 ,
  Eject = 0xf149 , Envelope = 0xf14b , EnvelopeAlt = 0xf14a , Error = 0xf14d ,
  ErrorAlt = 0xf14c , Eur = 0xf14e , ExclamationSign = 0xf14f , EyeClose = 0xf150 ,
  EyeOpen = 0xf151 , Facebook = 0xf152 , FacetimeVideo = 0xf153 , FastBackward = 0xf154 ,
  FastForward = 0xf155 , Female = 0xf156 , File = 0xf15c , FileAlt = 0xf157 ,
  FileEdit = 0xf159 , FileEditAlt = 0xf158 , FileNew = 0xf15b , FileNewAlt = 0xf15a ,
  Film = 0xf15d , Filter = 0xf15e , Fire = 0xf15f , Flag = 0xf161 ,
  FlagAlt = 0xf160 , Flickr = 0xf162 , Folder = 0xf166 , FolderClose = 0xf163 ,
  FolderOpen = 0xf164 , FolderSign = 0xf165 , font = 0xf167 , fontsize = 0xf168 ,
  Fork = 0xf169 , Forward = 0xf16b , ForwardAlt = 0xf16a , Foursquare = 0xf16c ,
  Friendfeed = 0xf16e , FriendfeedRect = 0xf16d , Fullscreen = 0xf16f , Gbp = 0xf170 ,
  Gift = 0xf171 , Github = 0xf173 , GithubText = 0xf172 , Glass = 0xf174 ,
  Glasses = 0xf175 , Globe = 0xf177 , GlobeAlt = 0xf176 , Googleplus = 0xf178 ,
  Graph = 0xf17a , GraphAlt = 0xf179 , Group = 0xf17c , GroupAlt = 0xf17b ,
  Guidedog = 0xf17d , HandDown = 0xf17e , HandLeft = 0xf17f , HandRight = 0xf180 ,
  HandUp = 0xf181 , Hdd = 0xf182 , Headphones = 0xf183 , HearingImpaired = 0xf184 ,
  Heart = 0xf187 , HeartAlt = 0xf185 , HeartEmpty = 0xf186 , Home = 0xf189 ,
  HomeAlt = 0xf188 , Hourglass = 0xf18a , Idea = 0xf18c , IdeaAlt = 0xf18b ,
  Inbox = 0xf18f , InboxAlt = 0xf18d , InboxBox = 0xf18e , IndentLeft = 0xf190 ,
  IndentRight = 0xf191 , InfoCircle = 0xf192 , Instagram = 0xf193 , IphoneHome = 0xf194 ,
  Italic = 0xf195 , Key = 0xf196 , Laptop = 0xf198 , LaptopAlt = 0xf197 ,
  Lastfm = 0xf199 , Leaf = 0xf19a , Lines = 0xf19b , Link = 0xf19c ,
  Linkedin = 0xf19d , List = 0xf19f , ListAlt = 0xf19e , Livejournal = 0xf1a0 ,
  Lock = 0xf1a2 , LockAlt = 0xf1a1 , Magic = 0xf1a3 , Magnet = 0xf1a4 ,
  Male = 0xf1a5 , MapMarker = 0xf1a7 , MapMarkerAlt = 0xf1a6 , Mic = 0xf1a9 ,
  MicAlt = 0xf1a8 , Minus = 0xf1ab , MinusSign = 0xf1aa , Move = 0xf1ac ,
  Music = 0xf1ad , Myspace = 0xf1ae , Network = 0xf1af , Off = 0xf1b0 ,
  Ok = 0xf1b3 , OkCircle = 0xf1b1 , OkSign = 0xf1b2 , Opensource = 0xf1b4 ,
  PaperClip = 0xf1b6 , PaperClipAlt = 0xf1b5 , Path = 0xf1b7 , Pause = 0xf1b9 ,
  PauseAlt = 0xf1b8 , Pencil = 0xf1bb , PencilAlt = 0xf1ba , Person = 0xf1bc ,
  Phone = 0xf1be , PhoneAlt = 0xf1bd , Photo = 0xf1c0 , PhotoAlt = 0xf1bf ,
  Picasa = 0xf1c1 , Picture = 0xf1c2 , Pinterest = 0xf1c3 , Plane = 0xf1c4 ,
  Play = 0xf1c7 , PlayAlt = 0xf1c5 , PlayCircle = 0xf1c6 , Plurk = 0xf1c9 ,
  PlurkAlt = 0xf1c8 , Plus = 0xf1cb , PlusSign = 0xf1ca , Podcast = 0xf1cc ,
  Print = 0xf1cd , Puzzle = 0xf1ce , Qrcode = 0xf1cf , Question = 0xf1d1 ,
  QuestionSign = 0xf1d0 , QuoteAlt = 0xf1d2 , QuoteRight = 0xf1d4 , QuoteRightAlt = 0xf1d3 ,
  Quotes = 0xf1d5 , Random = 0xf1d6 , Record = 0xf1d7 , Reddit = 0xf1d8 ,
  Redux = 0xf1d9 , Refresh = 0xf1da , Remove = 0xf1dd , RemoveCircle = 0xf1db ,
  RemoveSign = 0xf1dc , Repeat = 0xf1df , RepeatAlt = 0xf1de , ResizeFull = 0xf1e0 ,
  ResizeHorizontal = 0xf1e1 , ResizeSmall = 0xf1e2 , ResizeVertical = 0xf1e3 , ReturnKey = 0xf1e4 ,
  Retweet = 0xf1e5 , ReverseAlt = 0xf1e6 , Road = 0xf1e7 , Rss = 0xf1e8 ,
  Scissors = 0xf1e9 , Screen = 0xf1eb , ScreenAlt = 0xf1ea , Screenshot = 0xf1ec ,
  Search = 0xf1ee , SearchAlt = 0xf1ed , Share = 0xf1f0 , ShareAlt = 0xf1ef ,
  ShoppingCart = 0xf1f2 , ShoppingCartSign = 0xf1f1 , Signal = 0xf1f3 , Skype = 0xf1f4 ,
  Slideshare = 0xf1f5 , Smiley = 0xf1f7 , SmileyAlt = 0xf1f6 , Soundcloud = 0xf1f8 ,
  Speaker = 0xf1f9 , Spotify = 0xf1fa , Stackoverflow = 0xf1fb , Star = 0xf1fe ,
  StarAlt = 0xf1fc , StarEmpty = 0xf1fd , StepBackward = 0xf1ff , StepForward = 0xf200 ,
  Stop = 0xf202 , StopAlt = 0xf201 , Stumbleupon = 0xf203 , Tag = 0xf204 ,
  Tags = 0xf205 , Tasks = 0xf206 , TextHeight = 0xf207 , TextWidth = 0xf208 ,
  Th = 0xf20b , ThLarge = 0xf209 , ThList = 0xf20a , ThumbsDown = 0xf20c ,
  ThumbsUp = 0xf20d , Time = 0xf20f , TimeAlt = 0xf20e , Tint = 0xf210 ,
  Torso = 0xf211 , Trash = 0xf213 , TrashAlt = 0xf212 , Tumblr = 0xf214 ,
  Twitter = 0xf215 , UniversalAccess = 0xf216 , Unlock = 0xf218 , UnlockAlt = 0xf217 ,
  Upload = 0xf219 , Usd = 0xf21a , User = 0xf21b , Viadeo = 0xf21c ,
  Video = 0xf21f , VideoAlt = 0xf21d , VideoChat = 0xf21e , ViewMode = 0xf220 ,
  Vimeo = 0xf221 , Vkontakte = 0xf222 , VolumeDown = 0xf223 , VolumeOff = 0xf224 ,
  VolumeUp = 0xf225 , W3c = 0xf226 , WarningSign = 0xf227 , Website = 0xf229 ,
  WebsiteAlt = 0xf228 , Wheelchair = 0xf22a , Wordpress = 0xf22b , Wrench = 0xf22d ,
  WrenchAlt = 0xf22c , Youtube = 0xf22e , ZoomIn = 0xf22f , ZoomOut = 0xf230
}
 
enum class  font_weight {
  thin , extra_light , light , regular ,
  medium , semi_bold , bold , extra_bold ,
  black , extra_black
}
 
enum class  hikogui_icon : char32_t {
  MinimizeWindow = 0xf301 , MaximizeWindowMS = 0xf302 , RestoreWindowMS = 0xf303 , CloseWindow = 0xf304 ,
  RestoreWindowMacOS = 0xf305 , MaximizeWindowMacOS = 0xf306 , none_0_0 = 0xf3c0 , mono_1_0 = 0xf3c1 ,
  mono_1_1 = 0xf3c2 , stereo_2_0 = 0xf3c3 , stereo_2_1 = 0xf3c4 , stereo_3_0 = 0xf3c5 ,
  stereo_3_1 = 0xf3c6 , surround_3_0 = 0xf3c7 , surround_3_1 = 0xf3c8 , surround_4_0 = 0xf3c9 ,
  surround_4_1 = 0xf3ca , surround_5_0 = 0xf3cb , surround_5_1 = 0xf3cc , surround_7_0 = 0xf3cd ,
  surround_7_1 = 0xf3ce , surround_9_0 = 0xf3cf , surround_9_1 = 0xf3d0 , surround_11_0 = 0xf3d1 ,
  surround_11_1 = 0xf3d2 , surround_side_5_0 = 0xf3d3 , surround_side_5_1 = 0xf3d4 , surround_side_6_0 = 0xf3d5 ,
  surround_side_6_1 = 0xf3d6 , surround_side_7_0 = 0xf3d7 , surround_side_7_1 = 0xf3d8 , surround_wide_6_0 = 0xf3d9 ,
  surround_wide_6_1 = 0xf3da , surround_wide_7_0 = 0xf3db , surround_wide_7_1 = 0xf3dc , quad_4_0 = 0xf3dd ,
  quad_4_1 = 0xf3de , quad_side_4_0 = 0xf3df , quad_side_4_1 = 0xf3e0 , hexagonal_6_0 = 0xf3e1 ,
  hexagonal_6_1 = 0xf3e2 , octagonal_8_0 = 0xf3e3 , octagonal_8_1 = 0xf3e4 , surround_atmos_5_1_4 = 0xf3e5 ,
  surround_atmos_7_1_4 = 0xf3e6
}
 
enum class  gfx_surface_state { no_window , has_window , has_device , has_swapchain }
 
enum class  gfx_surface_loss { none , swapchain_lost , device_lost , window_lost }
 
enum class  gui_window_size { normal , minimized , maximized , fullscreen }
 
enum class  hitbox_type : uint8_t {
  outside , _default , button , scroll_bar ,
  text_edit , move_area , bottom_resize_border , top_resize_border ,
  left_resize_border , right_resize_border , bottom_left_resize_corner , bottom_right_resize_corner ,
  top_left_resize_corner , top_right_resize_corner , application_icon
}
 
enum class  keyboard_focus_direction { here , backward , forward }
 The keyboard focus group used for finding a widget that will accept a particular focus. More...
 
enum class  keyboard_focus_group {
  normal = 1 , menu = 2 , toolbar = 4 , mouse = 8 ,
  all = normal | menu | toolbar | mouse
}
 The keyboard focus group used for finding a widget that will accept a particular focus. More...
 
enum class  keyboard_modifiers : uint8_t {
  none = 0x00 , shift = 0x01 , control = 0x02 , alt = 0x04 ,
  super = 0x08
}
 Key modification keys pressed at the same time as another key. More...
 
enum class  keyboard_state : uint8_t { idle = 0x00 , caps_lock = 0x01 , scroll_lock = 0x02 , num_lock = 0x04 }
 
enum class  keyboard_virtual_key : uint8_t {
  nul = 0 , A = 'a' , B = 'b' , C = 'c' ,
  D = 'd' , E = 'e' , F = 'f' , G = 'g' ,
  H = 'h' , I = 'i' , J = 'j' , K = 'k' ,
  L = 'l' , M = 'm' , N = 'n' , O = 'o' ,
  P = 'p' , Q = 'q' , R = 'r' , S = 's' ,
  T = 't' , U = 'u' , V = 'v' , W = 'w' ,
  X = 'x' , Y = 'y' , Z = 'z' , _0 = '0' ,
  _1 = '1' , _2 = '2' , _3 = '3' , _4 = '4' ,
  _5 = '5' , _6 = '6' , _7 = '7' , _8 = '8' ,
  _9 = '9' , plus = '+' , minus = '-' , star = '*' ,
  slash = '/' , percent = '' , tilde = '~' , ampersant = '&' ,
  pipe = '|' , caret = '^' , less = '<' , equal = '=' ,
  greater = '>' , open_parentheses = '(' , close_parentheses = ')' , open_bracket = '[' ,
  close_bracket = ']' , open_brace = '{' , close_brace = '}' , period = '.' ,
  comma = ',' , colon = ':' , semi_colon = ';' , bang = '!' ,
  question = '?' , space = ' ' , tab = '\t' , enter = '\n' ,
  backtick = '`' , quote = '\'' , double_quote = '"' , at = '@' ,
  hash = '#' , dollar = '$' , underscore = '_' , backslash = '\\' ,
  F1 = 'A' , F2 = 'B' , F3 = 'C' , F4 = 'D' ,
  F5 = 'E' , F6 = 'F' , F7 = 'G' , F8 = 'H' ,
  F9 = 'I' , F10 = 'J' , F11 = 'K' , F12 = 'L' ,
  F13 = 'M' , F14 = 'N' , F15 = 'O' , F16 = 'P' ,
  F17 = 'Q' , F18 = 'R' , F19 = 'S' , F20 = 'T' ,
  F21 = 'U' , F22 = 'V' , F23 = 'W' , F24 = 'X' ,
  home = 0x02 , end = 0x03 , backspace = 0x08 , clear = 0x0c ,
  insert = 0x1a , escape = 0x1b , _delete = 0x7f , left = 0x80 ,
  right , up , down , page_up ,
  page_down , menu , print_screen , pause_break ,
  sysmenu , media_next_track , media_prev_track , media_stop ,
  media_play_pause , volume_mute , volume_up , volume_down ,
  browser_back , browser_forward , browser_home , browser_refresh ,
  browser_stop , browser_search , browser_favorites
}
 
enum class  mouse_cursor { None , Default , TextEdit , Button }
 
enum class  graphic_character_t {
  none = 0x00 , exclamation_mark = 0x01 , double_quote = 0x02 , hash = 0x03 ,
  dollar = 0x04 , percent = 0x05 , ampersand = 0x06 , single_quote = 0x07 ,
  open_paren = 0x08 , close_paren = 0x09 , star = 0x0a , plus = 0x0b ,
  comma = 0x0c , minus = 0x0d , dot = 0x0e , slash = 0x0f ,
  colon = 0x10 , semi_colon = 0x11 , less_than = 0x12 , equal = 0x13 ,
  greater_than = 0x14 , question_mark = 0x15 , open_bracket = 0x16 , back_slash = 0x17 ,
  close_bracket = 0x18 , carret = 0x19 , underscore = 0x1a , back_quote = 0x1b ,
  open_brace = 0x1c , pipe = 0x1d , close_brace = 0x1e , tilde = 0x1f
}
 
enum class  subpixel_orientation {
  unknown , horizontal_rgb , horizontal_bgr , vertical_rgb ,
  vertical_bgr
}
 The orientation of the RGB sub-pixels of and LCD/LED panel. More...
 
enum class  theme_mode { light , dark }
 
enum class  semantic_text_style : unsigned char {
  label , small_label , warning , error ,
  help , placeholder , link
}
 
enum class  text_decoration { None , Underline , WavyUnderline , StrikeThrough }
 Describes how a grapheme should be underlined when rendering the text. More...
 
enum class  phrasing : uint8_t {
  phrasing::regular = 0 , phrasing::emphesis = 1 , phrasing::strong = 2 , phrasing::code = 3 ,
  phrasing::abbreviation = 4 , phrasing::quote = 5 , phrasing::keyboard = 6 , phrasing::highlight = 7 ,
  phrasing::math = 8 , phrasing::example = 9 , phrasing::unarticulated = 10 , phrasing::title = 11 ,
  phrasing::success = 12 , phrasing::warning = 13 , phrasing::error = 14
}
 Phrasing. More...
 
enum class  phrasing_mask : uint16_t {
  regular = 1 << std::to_underlying(phrasing::regular) , emphesis = 1 << std::to_underlying(phrasing::emphesis) , strong = 1 << std::to_underlying(phrasing::strong) , code = 1 << std::to_underlying(phrasing::code) ,
  abbreviation = 1 << std::to_underlying(phrasing::abbreviation) , quote = 1 << std::to_underlying(phrasing::quote) , keyboard = 1 << std::to_underlying(phrasing::keyboard) , highlight = 1 << std::to_underlying(phrasing::highlight) ,
  math = 1 << std::to_underlying(phrasing::math) , example = 1 << std::to_underlying(phrasing::example) , unarticulated = 1 << std::to_underlying(phrasing::unarticulated) , title = 1 << std::to_underlying(phrasing::title) ,
  success = 1 << std::to_underlying(phrasing::success) , warning = 1 << std::to_underlying(phrasing::warning) , error = 1 << std::to_underlying(phrasing::error) , all
}
 
enum class  unicode_break_opportunity : uint8_t { no , yes , mandatory , unassigned }
 

Functions

template<typename T , typename U , typename F >
transform (const U &input, F operation)
 Transform an input container to the output container.
 
template<typename T , std::size_t N, typename F >
constexpr std::array< T, N > generate_array (F operation)
 Generate data in an array.
 
template<typename It >
constexpr It unordered_remove (It first, It last, It element)
 Remove element from a container.
 
template<typename It , typename UnaryPredicate >
constexpr It rfind_if (It const first, It const last, UnaryPredicate predicate)
 
template<typename It , typename UnaryPredicate >
constexpr It rfind_if_not (It const first, It const last, UnaryPredicate predicate)
 
template<typename It , typename T >
constexpr It rfind (It const first, It const last, T const &value)
 
template<typename It , typename ItAny >
constexpr It find_any (It data_first, It data_last, ItAny value_first, ItAny value_last) noexcept
 Find the first occurrence of an value in a data.
 
template<typename ConstIt , typename It , typename UnaryPredicate >
constexpr It find_cluster (ConstIt last, It start, UnaryPredicate predicate)
 Find the start of the current cluster.
 
template<typename ConstIt , typename It , typename UnaryPredicate >
constexpr It rfind_cluster (ConstIt first, It start, UnaryPredicate predicate)
 Find the start of the current cluster.
 
template<typename ConstIt , typename It , typename UnaryPredicate >
constexpr std::pair< It, It > bifind_cluster (ConstIt first, ConstIt last, It start, UnaryPredicate predicate)
 Find the begin and end of the current cluster.
 
template<typename It , typename S , typename F >
void for_each_cluster (It first, It last, S IsClusterSeperator, F Function)
 
template<typename InputIt1 , typename InputIt2 , typename BinaryPredicate >
std::pair< InputIt1, InputIt2 > rmismatch (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2, BinaryPredicate predicate) noexcept
 
template<typename InputIt1 , typename InputIt2 >
std::pair< InputIt1, InputIt2 > rmismatch (InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2) noexcept
 
template<typename T >
smoothstep (T x) noexcept
 
template<typename T >
inverse_smoothstep (T x)
 
auto shuffle_by_index (auto first, auto last, auto indices_first, auto indices_last, auto index_op) noexcept
 Shuffle a container based on a list of indices.
 
auto shuffle_by_index (auto first, auto last, auto indices_first, auto indices_last) noexcept
 Shuffle a container based on a list of indices.
 
template<typename DataIt , typename ValueIt >
DataIt front_strip (DataIt data_first, DataIt data_last, ValueIt value_first, ValueIt value_last) noexcept
 Strip data from the front side.
 
template<typename DataIt , typename ValueIt >
DataIt back_strip (DataIt data_first, DataIt data_last, ValueIt value_first, ValueIt value_last) noexcept
 Strip data from the back side.
 
template<std::endian Endian = std::endian::native, typename T , std::unsigned_integral Key>
constexpr T * fast_lower_bound (std::span< T > table, Key const &key) noexcept
 The fast lower bound algorithm.
 
template<std::endian Endian = std::endian::native, typename T , std::unsigned_integral Key>
constexpr T * fast_binary_search_eq (std::span< T > table, Key const &key) noexcept
 Search for the item that is equal to the key.
 
template<typename Value , typename Range >
constexpr Value get_first (Range &&range)
 
template<typename Range >
constexpr Range::value_type get_first (Range &&range)
 
template<typename Value , typename Range >
constexpr std::vector< Value > make_vector (Range &&range)
 Make a vector from a view.
 
template<typename Range >
constexpr std::vector< typename Range::value_type > make_vector (Range &&range)
 
constexpr bool is_upper (char c) noexcept
 
constexpr bool is_lower (char c) noexcept
 
constexpr bool is_alpha (char c) noexcept
 
constexpr bool is_digit (char c) noexcept
 
constexpr bool is_alpha_num (char c) noexcept
 
constexpr bool is_line_feed (char c) noexcept
 
constexpr bool is_white_space (char c) noexcept
 
constexpr bool is_number_first (char c) noexcept
 
constexpr bool is_name_first (char c) noexcept
 
constexpr bool is_name_next (char c) noexcept
 
constexpr bool is_quote (char c) noexcept
 
constexpr bool is_open_bracket (char c) noexcept
 
constexpr bool is_close_bracket (char c) noexcept
 
constexpr bool is_operator (char c) noexcept
 
constexpr bool is_digit (std::string_view str) noexcept
 
constexpr bool is_alpha (std::string_view str) noexcept
 
constexpr char to_lower (char c) noexcept
 
constexpr char to_upper (char c) noexcept
 
std::string to_lower (std::string_view str) noexcept
 
std::string to_upper (std::string_view str) noexcept
 
constexpr std::string to_title (std::string_view rhs) noexcept
 Convert the current string to using title case.
 
template<size_t N>
constexpr fixed_string< N > to_title (fixed_string< N > const &rhs) noexcept
 Convert the current string to using title case.
 
std::string normalize_lf (std::string_view str) noexcept
 Normalize string to use only line-feeds.
 
std::string make_identifier (std::string_view str) noexcept
 Encode a string to be usable as an id.
 
constexpr std::string make_slug (std::string_view str) noexcept
 Create a slug from a string.
 
constexpr bool is_slug (std::string_view str) noexcept
 
std::string make_title (std::string_view str) noexcept
 Create a title from a string.
 
template<typename T , size_t N>
requires (sizeof(T) == 1 and (N == 4 or N == 5))
constexpr uint32_t fourcc (T const (&txt)[N]) noexcept
 
constexpr uint32_t fourcc_from_cstr (char const *txt) noexcept
 
std::string fourcc_to_string (uint32_t x) noexcept
 
constexpr std::size_t string_size (sizeable auto str) noexcept
 
constexpr std::size_t string_size (auto str) noexcept
 
template<typename FirstNeedle , typename... Needles>
std::pair< std::size_t, std::size_tstring_find_any (std::string_view haystack, std::size_t pos, FirstNeedle const &first_needle, Needles const &...needles) noexcept
 
template<typename StringType , typename... Needles>
std::vector< StringType > _split (std::string_view haystack, Needles const &...needles) noexcept
 
template<typename... Needles>
std::vector< std::stringsplit (std::string_view haystack, Needles const &...needles) noexcept
 
std::vector< std::stringsplit (std::string_view haystack) noexcept
 
template<typename... Needles>
std::vector< std::string_view > split_view (std::string_view haystack, Needles const &...needles) noexcept
 
std::vector< std::string_view > split_view (std::string_view haystack) noexcept
 
template<typename CharT >
std::basic_string< CharT > join (std::vector< std::basic_string< CharT > > const &list, std::basic_string_view< CharT > const joiner={}) noexcept
 
template<typename CharT >
std::basic_string< CharT > join (std::vector< std::basic_string< CharT > > const &list, std::basic_string< CharT > const &joiner) noexcept
 
template<typename CharT >
std::basic_string< CharT > join (std::vector< std::basic_string< CharT > > const &list, CharT const *joiner) noexcept
 
std::string join (std::vector< std::string_view > const &list, std::string_view const joiner={}) noexcept
 
template<typename It >
std::pair< int, int > count_line_and_columns (It begin, It const end)
 
template<typename T , std::size_t N>
constexpr auto to_array_without_last (T(&rhs)[N]) noexcept
 Create an std::array from a one dimensional array, without the last element.
 
template<typename T , std::size_t N>
constexpr auto to_array_without_last (T(&&rhs)[N]) noexcept
 Create an std::array from a one dimensional array, without the last element.
 
std::string lstrip (std::string_view haystack, std::string needle=" \t\r\n\f") noexcept
 
std::string rstrip (std::string_view haystack, std::string needle=" \t\r\n\f") noexcept
 
std::string strip (std::string_view haystack, std::string needle=" \t\r\n\f") noexcept
 
hi_export datum decode_BON8 (std::span< const std::byte > buffer)
 Decode BON8 message from buffer.
 
hi_export datum decode_BON8 (bstring const &buffer)
 Decode BON8 message from buffer.
 
hi_export datum decode_BON8 (bstring_view buffer)
 Decode BON8 message from buffer.
 
hi_export bstring encode_BON8 (datum const &value)
 Encode a value to a BON8 message.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
hi_export constexpr datum parse_JSON (It it, ItEnd last, std::string_view path=std::string_view{"<none>"})
 
hi_export constexpr datum parse_JSON (std::string_view text, std::string_view path=std::string_view{"<none>"})
 Parse a JSON string.
 
hi_export constexpr datum parse_JSON (std::string const &text, std::string_view path=std::string_view{"<none>"})
 Parse a JSON string.
 
hi_export constexpr datum parse_JSON (char const *text, std::string_view path=std::string_view{"<none>"})
 Parse a JSON string.
 
hi_export datum parse_JSON (std::filesystem::path const &path)
 Parse a JSON string.
 
hi_export constexpr void format_JSON_impl (datum const &value, std::string &result, hi::indent indent={})
 
hi_export constexpr std::string format_JSON (datum const &root)
 Dump an datum object into a JSON string.
 
template<typename T >
fetch_max (std::atomic< T > &lhs, T rhs, std::memory_order order) noexcept
 Lock-free fetch-then-max operation on an atomic.
 
template<typename T >
fetch_min (std::atomic< T > &lhs, T rhs, std::memory_order order) noexcept
 Lock-free fetch-then-min operation on an atomic.
 
constexpr callback_flags operator| (callback_flags const &lhs, callback_flags const &rhs) noexcept
 
constexpr bool is_once (callback_flags const &rhs) noexcept
 
constexpr bool is_synchronous (callback_flags const &rhs) noexcept
 
constexpr bool is_local (callback_flags const &rhs) noexcept
 
constexpr bool is_main (callback_flags const &rhs) noexcept
 
constexpr bool is_timer (callback_flags const &rhs) noexcept
 
thread_id current_thread_id () noexcept
 
void set_thread_name (std::string_view name) noexcept
 
std::vector< bool > mask_int_to_vec (DWORD_PTR rhs) noexcept
 
DWORD_PTR mask_vec_to_int (std::vector< bool > const &rhs) noexcept
 
std::vector< bool > process_affinity_mask ()
 
std::vector< bool > set_thread_affinity_mask (std::vector< bool > const &mask)
 
std::size_t current_cpu_id () noexcept
 
bstring to_bstring (std::string_view src) noexcept
 
bstring to_bstring (std::integral auto... args) noexcept
 
template<typename Proto , typename Func >
auto make_function (Func &&func)
 
template<typename Proto , typename Func >
auto make_async_function (Func &&func)
 
std::pair< int, char ** > crt_start (int argc, char **argv, void *instance, int show_cmd)
 Start the hikogui system.
 
std::pair< int, char ** > crt_start (void *instance, int show_cmd)
 Start the hikogui system.
 
std::pair< int, char ** > crt_start (int argc, char **argv)
 Start the hikogui system.
 
int crt_finish (int argc, char **argv, int exit_code)
 Finish the hikogui system.
 
constexpr socket_event operator| (socket_event const &lhs, socket_event const &rhs) noexcept
 
constexpr socket_event operator& (socket_event const &lhs, socket_event const &rhs) noexcept
 
constexpr socket_event & operator|= (socket_event &lhs, socket_event const &rhs) noexcept
 
constexpr bool to_bool (socket_event const &rhs) noexcept
 
constexpr size_t bit (socket_event const &rhs) noexcept
 Get the bit index of the single bit of the socket_event mask.
 
constexpr socket_event socket_event_from_win32 (long rhs) noexcept
 
constexpr socket_error socket_error_from_win32 (int rhs) noexcept
 
constexpr socket_events socket_events_from_win32 (WSANETWORKEVENTS const &rhs) noexcept
 
template<convertible_to_awaitable... Args>
auto when_any (Args const &...args)
 await on a set of objects which can be converted to an awaitable.
 
hi_export fontregister_font_file (std::filesystem::path const &path)
 Register a font.
 
hi_export void register_font_directory (std::filesystem::path const &path)
 
template<typename Range >
hi_export void register_font_directories (Range &&range) noexcept
 
hi_export font_family_id find_font_family (std::string const &family_name) noexcept
 Find font family id.
 
hi_export font const & find_font (font_family_id family_id, font_variant variant=font_variant{}) noexcept
 Find a font closest to the variant.
 
hi_export font const * find_font (std::string const &family_name, font_variant variant=font_variant{}) noexcept
 Find a font closest to the variant.
 
hi_export auto find_glyph (font const &font, grapheme grapheme) noexcept
 Find a glyph using the given code-point.
 
hi_export auto find_glyph (font const &font, char32_t code_point) noexcept
 Find a glyph using the given code-point.
 
hi_export auto find_glyph (elusive_icon rhs) noexcept
 
hi_export auto find_glyph (hikogui_icon rhs) noexcept
 
constexpr font_weightoperator++ (font_weight &rhs) noexcept
 
constexpr font_weightoperator-- (font_weight &rhs) noexcept
 
constexpr font_weight font_weight_from_int (numeric_integral auto rhs)
 Convert a font weight value between 50 and 1000 to a font weight.
 
constexpr font_weight font_weight_from_string (std::string_view rhs)
 
constexpr std::string_view to_string_view (font_weight const &x) noexcept
 
constexpr std::string to_string (font_weight const &x) noexcept
 
constexpr char to_char (font_weight const &x) noexcept
 
constexpr int to_int (font_weight const &x) noexcept
 
std::ostreamoperator<< (std::ostream &lhs, font_weight const &rhs)
 
constexpr bool almost_equal (font_weight const &lhs, font_weight const &rhs) noexcept
 
generator< font_weightalternatives (font_weight start) noexcept
 Generate alternatives for the font_weight.
 
constexpr point3 operator+ (point2 const &lhs, vector3 const &rhs) noexcept
 
constexpr point3 operator+ (vector3 const &lhs, point2 const &rhs) noexcept
 
constexpr point3 operator- (point2 const &lhs, vector3 const &rhs) noexcept
 
std::unique_ptr< gfx_surfacemake_unique_gfx_surface (os_handle instance, void *os_window)
 
gfx_devicefind_best_device (gfx_surface const &surface)
 Find the best device for a surface.
 
vk::Instance vulkan_instance () noexcept
 
vk::DispatchLoaderDynamic vulkan_loader () noexcept
 
gfx_devicefind_best_device (vk::SurfaceKHR surface)
 Find the best device for a Vulkan surface.
 
constexpr keyboard_focus_group operator& (keyboard_focus_group const &lhs, keyboard_focus_group const &rhs) noexcept
 
constexpr keyboard_focus_group operator| (keyboard_focus_group const &lhs, keyboard_focus_group const &rhs) noexcept
 
constexpr bool to_bool (keyboard_focus_group group) noexcept
 
constexpr keyboard_modifiers operator| (keyboard_modifiers const &lhs, keyboard_modifiers const &rhs) noexcept
 
constexpr keyboard_modifiers operator& (keyboard_modifiers const &lhs, keyboard_modifiers const &rhs) noexcept
 
constexpr keyboard_modifiersoperator|= (keyboard_modifiers &lhs, keyboard_modifiers const &rhs) noexcept
 
constexpr bool to_bool (keyboard_modifiers const &rhs) noexcept
 
bool operator>= (keyboard_modifiers const &lhs, keyboard_modifiers const &rhs)=delete
 
keyboard_modifiers to_keyboard_modifiers (std::string_view s)
 Parse a key-binding modifier name.
 
std::string to_string (keyboard_modifiers modifiers)
 
std::ostreamoperator<< (std::ostream &lhs, keyboard_modifiers const &rhs)
 
constexpr keyboard_state operator| (keyboard_state const &lhs, keyboard_state const &rhs) noexcept
 
constexpr keyboard_state operator& (keyboard_state const &lhs, keyboard_state const &rhs) noexcept
 
constexpr keyboard_state & operator|= (keyboard_state &lhs, keyboard_state const &rhs) noexcept
 
bool operator>= (keyboard_state const &lhs, keyboard_state const &rhs)=delete
 
constexpr bool to_bool (keyboard_state const &rhs) noexcept
 
constexpr keyboard_virtual_key to_keyboard_virtual_key (std::string_view s)
 
constexpr keyboard_virtual_key to_keyboard_virtual_key (int key_code, bool extended, keyboard_modifiers modifiers) noexcept
 
constexpr std::string_view to_string_view (keyboard_virtual_key key) noexcept
 
std::string to_string (keyboard_virtual_key key) noexcept
 
std::ostreamoperator<< (std::ostream &lhs, keyboard_virtual_key const &rhs)
 
void register_theme_directory (std::filesystem::path const &path) noexcept
 
void reload_themes () noexcept
 
template<std::ranges::range R>
void register_theme_directories (R &&r) noexcept
 
theme const & find_theme (std::string_view name, theme_mode mode) noexcept
 
std::vector< std::stringtheme_names () noexcept
 
theme const & get_selected_theme () noexcept
 
constexpr void fill (pixmap_span< sfloat_rgba16 > image, f32x4 color) noexcept
 
constexpr int8_t make_snorm_r8_value (float rhs) noexcept
 
std::tuple< bool, std::size_t, bool, std::size_t_parse_spreadsheet_address (std::string_view &address)
 
std::pair< std::size_t, std::size_tparse_spreadsheet_address (std::string_view address, std::size_t start_column_nr=0, std::size_t start_row_nr=0)
 Parse a spreadsheet address.
 
std::tuple< std::size_t, std::size_t, std::size_t, std::size_tparse_spreadsheet_range (std::string_view address, std::size_t start_column_nr=0, std::size_t start_row_nr=0)
 Parse a spreadsheet range.
 
std::byte * locked_memory_allocator_allocate (std::size_t n) noexcept
 
void locked_memory_allocator_deallocate (std::byte *p, std::size_t n) noexcept
 
template<typename T >
hi_force_inline constexpr lean_vector< T > solvePolynomial (T const &a, T const &b) noexcept
 
template<typename T >
hi_force_inline constexpr lean_vector< T > solvePolynomial (T const &a, T const &b, T const &c) noexcept
 
template<typename T >
hi_force_inline lean_vector< T > solveDepressedCubicTrig (T const &p, T const &q) noexcept
 
template<typename T >
hi_force_inline lean_vector< T > solveDepressedCubicCardano (T const &p, T const &q, T const &D) noexcept
 
template<typename T >
hi_force_inline lean_vector< T > solveDepressedCubic (T const &p, T const &q) noexcept
 
template<typename T >
hi_force_inline constexpr lean_vector< T > solvePolynomial (T const &a, T const &b, T const &c, T const &d) noexcept
 
constexpr graphic_character_t char_to_graphic_character (char x) noexcept
 
constexpr uint64_t operator_to_int (std::string_view str) noexcept
 
constexpr std::pair< uint8_t, bool > binary_operator_precedence (std::string_view str) noexcept
 Binary Operator Precedence according to C++.
 
constexpr std::pair< uint8_t, bool > operator_precedence (std::string_view str, bool binary) noexcept
 Operator Precedence according to C++.
 
template<typename T >
bool check_alignment (void const *ptr) noexcept
 
template<typename T , typename Byte >
auto make_placement_ptr (std::span< Byte > bytes, std::size_t &offset)
 
template<typename T , typename Byte >
auto make_placement_ptr (std::span< Byte > bytes, std::size_t &&offset=0)
 
template<typename T , byte_like Byte>
auto make_placement_array (std::span< Byte > bytes, std::size_t &offset, std::size_t n)
 
template<typename T , byte_like Byte>
auto make_placement_array (std::span< Byte > bytes, std::size_t &&offset, std::size_t n)
 
template<typename T , byte_like Byte>
auto make_placement_array (std::span< Byte > bytes, std::size_t &offset)
 
template<typename T , byte_like Byte>
auto make_placement_array (std::span< Byte > bytes, std::size_t &&offset=0)
 
void generate_seed (void *ptr, size_t size)
 Load a random seed.
 
void secure_clear (void *ptr, size_t size) noexcept
 Securely clear memory.
 
void secure_clear (trivially_copyable auto &object) noexcept
 Securely clear an object.
 
template<typename It >
void secure_clear (It first, It last) noexcept
 Securely clear a set of objects.
 
void secure_destroy_at (auto *p)
 
template<typename It >
void secure_destroy (It first, It last)
 Securely destroy objects.
 
template<typename It , typename OutIt >
void secure_uninitialized_move (It first, It last, OutIt d_first)
 Securely move objects.
 
constexpr extent2 sub_pixel_size (subpixel_orientation orientation) noexcept
 Get the size of a sub-pixel based on the sub-pixel orientation.
 
std::string_view to_string (theme_mode rhs) noexcept
 
std::ostreamoperator<< (std::ostream &lhs, theme_mode rhs)
 
detail::counterget_global_counter_if (std::string const &name)
 
constexpr int format_count (std::string_view fmt) noexcept
 Count arguments of a std::format format string.
 
std::string_view to_string (text_decoration const &rhs) noexcept
 
std::ostreamoperator<< (std::ostream &lhs, text_decoration const &rhs)
 
constexpr std::string format_engineering (std::chrono::nanoseconds duration)
 
constexpr bool operator== (gstring_view const &lhs, std::string_view const &rhs) noexcept
 
template<std::input_or_output_iterator It, std::sentinel_for< It > ItEnd>
constexpr void set_language (It first, ItEnd last, language_tag language) noexcept
 Set the language for the string.
 
constexpr gstring set_language (gstring str, language_tag language) noexcept
 
template<std::input_or_output_iterator It, std::sentinel_for< It > ItEnd>
requires (std::is_same_v<std::iter_value_t<It>, grapheme>)
constexpr void fix_language (It first, ItEnd last, language_tag default_language_tag) noexcept
 Fix the language for the string.
 
constexpr gstring fix_language (gstring str, language_tag default_language_tag) noexcept
 
constexpr gstring to_gstring (std::u32string_view rhs, unicode_normalize_config config=unicode_normalize_config::NFC()) noexcept
 Convert a UTF-32 string-view to a grapheme-string.
 
constexpr gstring to_gstring (std::string_view rhs, unicode_normalize_config config=unicode_normalize_config::NFC()) noexcept
 Convert a UTF-8 string to a grapheme-string.
 
constexpr std::string to_string (gstring_view rhs) noexcept
 Convert a grapheme string to UTF-8.
 
constexpr std::wstring to_wstring (gstring_view rhs) noexcept
 Convert a grapheme string to UTF-8.
 
constexpr std::u32string to_u32string (gstring_view rhs) noexcept
 Convert a grapheme string to UTF-8.
 
constexpr std::string to_string (gstring const &rhs) noexcept
 Convert a grapheme string to UTF-8.
 
constexpr std::optional< phrasingto_phrasing (char c)
 
constexpr phrasing_mask operator& (phrasing_mask const &lhs, phrasing_mask const &rhs) noexcept
 
constexpr phrasing_mask operator| (phrasing_mask const &lhs, phrasing_mask const &rhs) noexcept
 
constexpr phrasing_mask to_phrasing_mask (phrasing const &rhs) noexcept
 
constexpr phrasing_mask to_phrasing_mask (std::string const &str)
 
constexpr bool all (phrasing_mask const &rhs) noexcept
 
constexpr bool to_bool (phrasing_mask const &rhs) noexcept
 
constexpr bool matches (phrasing_mask const &lhs, phrasing const &rhs) noexcept
 Check if the text-phrasing is included in the text-phrasing-mask.
 
template<typename It , typename GetCodePoint , typename SetCodePoint , typename SetTextDirection >
constexpr std::pair< It, std::vector< unicode_bidi_class > > unicode_bidi (It first, It last, GetCodePoint get_code_point, SetCodePoint set_code_point, SetTextDirection set_text_direction, unicode_bidi_context const &context={})
 Reorder a given range of characters based on the unicode_bidi algorithm.
 
template<typename It , typename GetCodePoint >
constexpr unicode_bidi_class unicode_bidi_direction (It first, It last, GetCodePoint get_code_point, unicode_bidi_context const &context={})
 Get the unicode bidi direction for the first paragraph and context.
 
template<typename It , typename EndIt , typename CodePointFunc >
constexpr It unicode_bidi_control_filter (It first, EndIt last, CodePointFunc const &code_point_func)
 Removes control characters which will not survive the bidi-algorithm.
 
std::ostreamoperator<< (std::ostream &lhs, unicode_break_opportunity const &rhs)
 
template<typename It , typename ItEnd , typename CodePointFunc >
unicode_break_vector unicode_line_break (It first, ItEnd last, CodePointFunc const &code_point_func) noexcept
 The unicode line break algorithm UAX #14.
 
constexpr std::vector< size_t > unicode_line_break (unicode_break_vector const &opportunities, std::vector< float > const &widths, float maximum_line_width)
 Unicode break lines.
 
constexpr std::u32string unicode_decompose (std::u32string_view text, unicode_normalize_config config=unicode_normalize_config::NFD()) noexcept
 Convert text to a Unicode decomposed normal form.
 
constexpr std::u32string unicode_normalize (std::u32string_view text, unicode_normalize_config config=unicode_normalize_config::NFC()) noexcept
 Convert text to a Unicode composed normal form.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
constexpr bool unicode_is_NFC_grapheme (It it, ItEnd last) noexcept
 Check if the string of code-points is a single grapheme in NFC normal form.
 
template<typename It , typename ItEnd , typename CodePointFunc >
unicode_break_vector unicode_sentence_break (It first, ItEnd last, CodePointFunc const &code_point_func) noexcept
 The unicode word break algorithm UAX#29.
 
template<typename It , typename ItEnd , typename CodePointFunc >
unicode_break_vector unicode_word_break (It first, ItEnd last, CodePointFunc const &code_point_func) noexcept
 The unicode word break algorithm UAX#29.
 
void wrap_lines (auto first, auto last, float max_width, auto get_width, auto get_code_point, auto set_code_point) noexcept
 Wrap lines in text that are too wide.
 
constexpr std::size_t hash_mix_two (std::size_t hash1, std::size_t hash2) noexcept
 
template<typename First , typename Second , typename... Args>
constexpr std::size_t hash_mix (First &&first, Second &&second, Args &&...args) noexcept
 
template<typename Iterator >
auto mean (Iterator first, Iterator last)
 
template<typename Iterator , typename T >
auto stddev (Iterator first, Iterator last, T mean)
 
template<typename T >
constexpr bool inplace_max (T &a, T const &b) noexcept
 
template<typename T >
constexpr bool inplace_min (T &a, T const &b) noexcept
 
template<typename T >
constexpr void inplace_clamp (T &a, T const &lo, T const &hi) noexcept
 
template<typename T >
constexpr T abs (T a) noexcept
 
template<std::floating_point T>
constexpr bool almost_equal (T a, T b) noexcept
 
template<std::floating_point T>
constexpr T to_radian (T degree) noexcept
 Convert degree to radian.
 
template<std::unsigned_integral T>
constexpr T floor (T value, T alignment) noexcept
 The greatest multiple of alignment less than or equal to value.
 
template<std::unsigned_integral T>
constexpr T ceil (T value, T alignment) noexcept
 The smallest multiple of alignment greater than or equal to value.
 
template<std::floating_point T>
constexpr bool isnan (T value) noexcept
 
constexpr uint64_t pow10 (unsigned int x) noexcept
 
template<std::unsigned_integral T>
constexpr unsigned int decimal_width (T x)
 
template<template< typename... > typename T, typename... Args>
auto make_unique_ctad (Args &&...args)
 make_unique with CTAD (Class Template Argument Deduction)
 
template<template< typename... > typename T, typename... Args>
auto make_shared_ctad (Args &&...args)
 make_shared with CTAD (Class Template Argument Deduction)
 
bool equal_ptr (auto *p1, auto *p2) noexcept
 
template<typename T , typename U >
void memswap (T &dst, U &src)
 
template<typename InputIt , typename T >
T * placement_copy (InputIt src, T *dst)
 Copy an object to another memory locations.
 
template<typename InputIt , typename T >
void placement_copy (InputIt src_first, InputIt src_last, T *dst_first)
 Copy objects into a memory location.
 
template<typename T >
T * placement_move (T *src, T *dst)
 Move an object between two memory locations.
 
template<typename T >
void placement_move_within_array (T *src_first, T *src_last, T *dst_first)
 Move an objects between two memory locations.
 
template<typename T >
void placement_move (T *src, T *src_last, T *dst)
 Move an objects between two memory locations.
 
template<typename It , typename... Args>
void construct (It first, It last, Args const &...args)
 Construct a set of objects.
 
template<typename T >
constexpr bool is_aligned (T *p)
 Check if a pointer is properly aligned for the object it is pointing at.
 
template<typename T >
constexpr T * ceil (T *ptr, std::size_t alignment) noexcept
 
template<typename T >
constexpr T * floor (T *ptr, std::size_t alignment) noexcept
 
void * advance_bytes (void *ptr, std::ptrdiff_t distance) noexcept
 Advance a pointer by a number of bytes.
 
void const * advance_bytes (void const *ptr, std::ptrdiff_t distance) noexcept
 Advance a pointer by a number of bytes.
 
template<typename T >
void cleanupWeakPointers (std::vector< std::weak_ptr< T > > &v) noexcept
 
template<typename K , typename T >
void cleanupWeakPointers (std::unordered_map< K, std::weak_ptr< T > > &v) noexcept
 
template<typename K , typename T >
void cleanupWeakPointers (std::unordered_map< K, std::vector< std::weak_ptr< T > > > &v) noexcept
 
template<typename Value , typename Map , typename Key , typename... Args>
std::shared_ptr< Value > try_make_shared (Map &map, Key key, Args... args)
 
template<numeric T, byte_like B>
constexpr T unaligned_load (B const *src) noexcept
 Make an unaligned load of an unsigned integer.
 
template<numeric T>
unaligned_load (void const *src) noexcept
 
template<numeric T, byte_like B>
constexpr void unaligned_store (T src, B *dst) noexcept
 
template<numeric T>
void unaligned_store (T src, void *dst) noexcept
 
template<std::integral T>
hi_force_inline constexpr void store_or (T src, uint8_t *dst) noexcept
 
template<std::floating_point T>
constexpr T points_to_dp (T x) noexcept
 Convert points to device independent pixels.
 

Variables

os_handle crt_application_instance
 The application instance identified by the operating system.
 
constexpr size_t socket_event_max = 10
 
template<typename T >
constexpr bool is_task_v = is_task<T>::value
 type-trait to determine if the given type T is a task.
 
template<typename Func , typename... ArgTypes>
constexpr bool is_invocable_task_v = is_invocable_task<Func, ArgTypes...>::value
 type-trait to determining if the given invocable Func is a task.
 
constexpr auto font_weight_metadata
 
unfair_recursive_mutex gfx_system_mutex
 Global mutex for GUI elements, like gfx_system, gfx_device, Windows and Widgets.
 
constexpr auto keyboard_virtual_key_metadata
 
constexpr auto subpixel_orientation_metadata
 
constexpr auto theme_mode_metadata = enum_metadata{theme_mode::light, "light", theme_mode::dark, "dark"}
 
template<fixed_string Tag>
detail::tagged_counter< Tag > global_counter
 
constexpr auto semantic_text_style_metadata
 
constexpr auto text_decoration_metadata
 
constexpr auto phrasing_metadata
 
constexpr char32_t unicode_replacement_character = U'\ufffd'
 
constexpr char32_t unicode_LF = U'\n'
 
constexpr char32_t unicode_VT = U'\v'
 
constexpr char32_t unicode_FF = U'\f'
 
constexpr char32_t unicode_CR = U'\r'
 
constexpr char32_t unicode_NEL = U'\u0085'
 
constexpr char32_t unicode_LS = U'\u2028'
 
constexpr char32_t unicode_PS = U'\u2029'
 
constexpr std::size_t maximum_num_cpus = 64
 
constexpr unsigned long long pow10_table [20]
 
template<typename T >
constexpr auto large_number_v = T{16777215}
 A large number.
 
template<std::floating_point T>
constexpr auto points_per_inch_v = T{72.0}
 The number of points (typography) per inch.
 
template<std::floating_point T>
constexpr auto dp_per_inch_v = T{80.0}
 The number of device independent pixels per inch.
 
template<std::floating_point T>
constexpr auto points_to_dp_scale_v = dp_per_inch_v<T> / points_per_inch_v<T>
 
constexpr double points_per_inch = points_per_inch_v<double>
 
constexpr double dp_per_inch = dp_per_inch_v<double>
 

Detailed Description

DOXYGEN BUG.

Doxygen can't handle namespace hi::inline v1 {} syntax. All files should be changed to use old-style inline namespace syntax.

Typedef Documentation

◆ await_resume_result_t

template<awaitable T>
using v1::await_resume_result_t = await_resume_result<T>::type

Get the result type of an awaitable.

This is type return type of the await_resume() member function.

◆ forward_value_t

template<typename T >
using v1::forward_value_t = typename forward_value<T>::type

Get the storage type of the forward_value functor.

Use this type for the variables that are assigned with the return value of the forward_value functor.

◆ int128_t

using v1::int128_t = __int128

Signed 128 bit integer.

◆ uint128_t

using v1::uint128_t = unsigned __int128

Unsigned 128 bit integer.

Enumeration Type Documentation

◆ callback_flags

enum class v1::callback_flags
strong
Enumerator
synchronous 

Call the function synchronously.

local 

Call the function asynchronously from the current thread's loop.

main 

Call the function asynchronously from the main thread's loop.

timer 

Call the function asynchronously from the timer thread's loop.

once 

Call the function once, then automatically unsubscribe.

◆ font_weight

enum class v1::font_weight
strong
Enumerator
thin 

100: Thin / Hairline

extra_light 

200: Ultra-light / Extra-light

light 

300: Light

regular 

400: Normal / Regular

medium 

500: Medium

semi_bold 

600: Semi-bold / Demi-bold

bold 

700: Bold

extra_bold 

800: Extra-bold / Ultra-bold

black 

900: Heavy / Black

extra_black 

950: Extra-black / Ultra-black

◆ gfx_surface_loss

enum class v1::gfx_surface_loss
strong
Enumerator
none 

Everything is running normally.

swapchain_lost 

The window was resized, the swapchain needs to be rebuild and can not be rendered on.

device_lost 

The device was lost, but the window could move to a new device, or the device can be recreated.

window_lost 

The surface or window was destroyed, need to cleanup.

◆ gfx_surface_state

enum class v1::gfx_surface_state
strong
Enumerator
no_window 

The window was destroyed, the device will drop the window on the next render cycle.

has_window 

The initial state: The surface is associated with a window.

has_device 

The surface has been associated with a device to use for rendering.

has_swapchain 

Images to render on to display on the surface are created.

◆ keyboard_focus_direction

enum class v1::keyboard_focus_direction
strong

The keyboard focus group used for finding a widget that will accept a particular focus.

Enumerator
here 

Neither go forward, nor backward in the keyboard focus chain.

backward 

Search backward in the keyboard focus chain.

forward 

Search forward in the keyboard focus chain.

◆ keyboard_focus_group

enum class v1::keyboard_focus_group
strong

The keyboard focus group used for finding a widget that will accept a particular focus.

Enumerator
normal 

A normal widget.

Normal widgets accept keyboard focus using tab/shift-tab keys.

menu 

A menu item in a popup overlay Menu item widget accepts keyboard focus from the up/down cursor keys.

toolbar 

A menu item in the toolbar of the window.

Menu item widget in the toolbar accepts keyboard focus from the left/right cursor keys and from the main-menu-select key.

mouse 

A widget that only accepts keyboard focus from mouse clicks.

all 

Used for selecting any widget that can accept keyboard focus.

This is used for selecting a widget of group normal, menu or toolbar using the mouse.

◆ keyboard_modifiers

enum class v1::keyboard_modifiers : uint8_t
strong

Key modification keys pressed at the same time as another key.

The Fn key is not always available on larger keyboards and is often under full control of the keyboard, therefor it is not in the list of keyboard modifiers here.

Enumerator
shift 

The shift key is being held.

control 

The control key is being held.

alt 

The alt-key, option-key or meta-key is being held.

super 

The windows-key, key-key or super-key is being held.

◆ subpixel_orientation

enum class v1::subpixel_orientation
strong

The orientation of the RGB sub-pixels of and LCD/LED panel.

◆ text_decoration

enum class v1::text_decoration
strong

Describes how a grapheme should be underlined when rendering the text.

It is carried with the grapheme and glyphs, so that the text render engine can draw the decoration after the text is shaped and in rendering-order (left to right) and, this makes it easier to correctly render the decoration of multiple glyphs in a single stroke.

Function Documentation

◆ advance_bytes() [1/2]

void * v1::advance_bytes ( void * ptr,
std::ptrdiff_t distance )
inlinenoexcept

Advance a pointer by a number of bytes.

Note
It is undefined behavior for ptr to be nullptr
Parameters
ptrThe pointer to advance.
distanceThe number of bytes to advance the pointer, may be negative.

◆ advance_bytes() [2/2]

void const * v1::advance_bytes ( void const * ptr,
std::ptrdiff_t distance )
inlinenoexcept

Advance a pointer by a number of bytes.

Note
It is undefined behavior for ptr to be nullptr
Parameters
ptrThe pointer to advance.
distanceThe number of bytes to advance the pointer, may be negative.

◆ alternatives()

generator< font_weight > v1::alternatives ( font_weight start)
inlinenoexcept

Generate alternatives for the font_weight.

Parameters
startThe starting font-weight.
Returns
Generated font weights, starting at start, then zig-zag toward thin and extra-black.

◆ back_strip()

template<typename DataIt , typename ValueIt >
DataIt v1::back_strip ( DataIt data_first,
DataIt data_last,
ValueIt value_first,
ValueIt value_last )
noexcept

Strip data from the back side.

Parameters
data_firstThe iterator pointing to the first element of data.
data_lastThe iterator pointing one beyond the last element of data.
value_firstThe iterator pointing to the first value to be removed from data.
value_lastThe iterator pointing one beyond the last value to be removed from data.
Returns
An iterator pointing one beyond the first data element not belonging to the values to be stripped. or data_first when all data elements have been stripped.

◆ bifind_cluster()

template<typename ConstIt , typename It , typename UnaryPredicate >
constexpr std::pair< It, It > v1::bifind_cluster ( ConstIt first,
ConstIt last,
It start,
UnaryPredicate predicate )
constexpr

Find the begin and end of the current cluster.

Parameters
firstThe first iterator, where this function will stop iterating.
lastThe last iterator, where this function will stop iterating.
startWhere to start the search
predicateA function returning the identifier of the cluster.
Returns
The first and one beyond last iterator where the cluster is the same as start.

◆ binary_operator_precedence()

constexpr std::pair< uint8_t, bool > v1::binary_operator_precedence ( std::string_view str)
constexprnoexcept

Binary Operator Precedence according to C++.

Returns
Precedence, left-to-right-associativity

◆ bit()

constexpr size_t v1::bit ( socket_event const & rhs)
constexprnoexcept

Get the bit index of the single bit of the socket_event mask.

◆ ceil()

template<std::unsigned_integral T>
constexpr T v1::ceil ( T value,
T alignment )
constexprnoexcept

The smallest multiple of alignment greater than or equal to value.

Parameters
valueThe unsigned value to round.
alignmentThe alignment.
Returns
The smallest multiple of alignment greater than or equal to value.

◆ construct()

template<typename It , typename... Args>
void v1::construct ( It first,
It last,
Args const &... args )

Construct a set of objects.

◆ count_line_and_columns()

template<typename It >
std::pair< int, int > v1::count_line_and_columns ( It begin,
It const end )
inline

Return line and column count at the end iterator.

◆ crt_finish()

int v1::crt_finish ( int argc,
char ** argv,
int exit_code )

Finish the hikogui system.

This function will cleanly shutdown the hikogui system.

Parameters
argcThe normalized number of arguments received from crt_start().
argvThe normalized arguments received from crt_start().
exit_codeThe exit code of the application
Returns
The exit code of the application to return from main().

◆ crt_start() [1/3]

std::pair< int, char ** > v1::crt_start ( int argc,
char ** argv )
inline

Start the hikogui system.

This function will do a minimum amount of setup for the hikogui system.

Parameters
argcNumber of arguments received from main().
argvThe argument received from main().
Returns
argc, argv Normalized command line arguments in UTF-8 format. These need to be passed to crt_finish() to free the memory.

◆ crt_start() [2/3]

std::pair< int, char ** > v1::crt_start ( int argc,
char ** argv,
void * instance,
int show_cmd )

Start the hikogui system.

This function will do a minimum amount of setup for the hikogui system.

Parameters
argcNumber of arguments received from main().
argvThe argument received from main().
instanceA handle to the GUI instance of the operating system
show_cmdInformation on how to open the first window.
Returns
argc, argv Normalized command line arguments in UTF-8 format. These need to be passed to crt_finish() to free the memory.

◆ crt_start() [3/3]

std::pair< int, char ** > v1::crt_start ( void * instance,
int show_cmd )
inline

Start the hikogui system.

This function will do a minimum amount of setup for the hikogui system.

Parameters
instanceA handle to the GUI instance of the operating system
show_cmdInformation on how to open the first window.
Returns
argc, argv Normalized command line arguments in UTF-8 format. These need to be passed to crt_finish() to free the memory.

◆ decode_BON8() [1/3]

hi_export datum v1::decode_BON8 ( bstring const & buffer)
inline

Decode BON8 message from buffer.

Parameters
bufferA buffer to a BON8 encoded message.
Returns
The decoded message.

◆ decode_BON8() [2/3]

hi_export datum v1::decode_BON8 ( bstring_view buffer)
inline

Decode BON8 message from buffer.

Parameters
bufferA buffer to a BON8 encoded message.
Returns
The decoded message.

◆ decode_BON8() [3/3]

hi_export datum v1::decode_BON8 ( std::span< const std::byte > buffer)
inline

Decode BON8 message from buffer.

Parameters
bufferA buffer to a BON8 encoded message.
Returns
The decoded message.

◆ encode_BON8()

hi_export bstring v1::encode_BON8 ( datum const & value)
inline

Encode a value to a BON8 message.

Parameters
valueThe data to encode
Returns
The encoded message as a byte_string.

◆ fast_binary_search_eq()

template<std::endian Endian = std::endian::native, typename T , std::unsigned_integral Key>
constexpr T * v1::fast_binary_search_eq ( std::span< T > table,
Key const & key )
constexprnoexcept

Search for the item that is equal to the key.

◆ fast_lower_bound()

template<std::endian Endian = std::endian::native, typename T , std::unsigned_integral Key>
constexpr T * v1::fast_lower_bound ( std::span< T > table,
Key const & key )
constexprnoexcept

The fast lower bound algorithm.

Template Parameters
TThe type of the table element.
KeyThe type of the key
EndianThe endianess of the key in the table.
Parameters
tableA span of elements to search, the key is in the first bytes of each element.
keyA unsigned integral to search in the elements.
Returns
A pointer to the entry found,or nullptr if not found.

◆ fetch_max()

template<typename T >
T v1::fetch_max ( std::atomic< T > & lhs,
T rhs,
std::memory_order order )
noexcept

Lock-free fetch-then-max operation on an atomic.

◆ fetch_min()

template<typename T >
T v1::fetch_min ( std::atomic< T > & lhs,
T rhs,
std::memory_order order )
noexcept

Lock-free fetch-then-min operation on an atomic.

◆ find_any()

template<typename It , typename ItAny >
constexpr It v1::find_any ( It data_first,
It data_last,
ItAny value_first,
ItAny value_last )
constexprnoexcept

Find the first occurrence of an value in a data.

Parameters
data_firstAn iterator pointing to the first item of data.
data_lastAn iterator pointing one beyond the last item of data.
value_firstAn iterator pointing to a value to find in data.
value_lastAn iterator pointing on beyond the last value to find in data.
Returns
An iterator within data for the first matching value, or data_last if not found.

◆ find_best_device() [1/2]

gfx_device * v1::find_best_device ( gfx_surface const & surface)
inline

Find the best device for a surface.

Parameters
surfaceThe surface to find the best device for.
Returns
A pointer to a fdx device.
Return values
nullptrCould not find a Vulkan device for this surface.

◆ find_best_device() [2/2]

gfx_device * v1::find_best_device ( vk::SurfaceKHR surface)
inline

Find the best device for a Vulkan surface.

Parameters
surfaceThe surface to find the best device for.
Returns
A pointer to a gfx device.
Return values
nullptrCould not find a Vulkan device for this surface.

◆ find_cluster()

template<typename ConstIt , typename It , typename UnaryPredicate >
constexpr It v1::find_cluster ( ConstIt last,
It start,
UnaryPredicate predicate )
constexpr

Find the start of the current cluster.

Parameters
lastThe last iterator, where this function will stop iterating.
startWhere to start the search
predicateA function returning the identifier of the cluster.
Returns
One beyond the last iterator where the cluster is the same as start.

◆ find_font() [1/2]

hi_export font const & v1::find_font ( font_family_id family_id,
font_variant variant = font_variant{} )
inlinenoexcept

Find a font closest to the variant.

This function will always return a valid font_id.

Parameters
family_ida valid family id.
variantThe variant of the font to select.
Returns
a valid font id.

◆ find_font() [2/2]

hi_export font const * v1::find_font ( std::string const & family_name,
font_variant variant = font_variant{} )
inlinenoexcept

Find a font closest to the variant.

This function will always return a valid font_id.

Parameters
family_namea font family name.
variantThe variant of the font to select.
Returns
A pointer to the loaded font.

◆ find_font_family()

hi_export font_family_id v1::find_font_family ( std::string const & family_name)
inlinenoexcept

Find font family id.

This function will always return a valid font_family_id by walking the fallback-chain.

◆ find_glyph() [1/2]

hi_export auto v1::find_glyph ( font const & font,
char32_t code_point )
inlinenoexcept

Find a glyph using the given code-point.

This function will find a glyph matching the grapheme in the selected font, or find the glyph in the fallback font.

Parameters
fontThe font to use to find the grapheme in.
graphemeThe Unicode grapheme to find in the font.
Returns
A list of glyphs which matched the grapheme.

◆ find_glyph() [2/2]

hi_export auto v1::find_glyph ( font const & font,
grapheme grapheme )
inlinenoexcept

Find a glyph using the given code-point.

This function will find a glyph matching the grapheme in the selected font, or find the glyph in the fallback font.

Parameters
fontThe font to use to find the grapheme in.
graphemeThe Unicode grapheme to find in the font.
Returns
A list of glyphs which matched the grapheme.

◆ fix_language()

template<std::input_or_output_iterator It, std::sentinel_for< It > ItEnd>
requires (std::is_same_v<std::iter_value_t<It>, grapheme>)
constexpr void v1::fix_language ( It first,
ItEnd last,
language_tag default_language_tag )
constexprnoexcept

Fix the language for the string.

Make sure that every grapheme will have a language assigned. The following rules will be used to assign languages

  • If a grapheme has no language assigned, it will use the language of the previous grapheme.
  • If there is no previous grapheme with an assigned language, the first language found in the text is used.
  • If the text does not have any language assigned then the argument default_language_tag is used.
  • If the script of a language contradicts the Unicode Database for the grapheme then the Unicode Database's script is used instead.
Parameters
firstAn iterator pointing to the first grapheme.
lastAn iterator pointing beyond the last grapheme.
default_language_tagThe language to set each grapheme to.

◆ floor()

template<std::unsigned_integral T>
constexpr T v1::floor ( T value,
T alignment )
constexprnoexcept

The greatest multiple of alignment less than or equal to value.

Parameters
valueThe unsigned value to round.
alignmentThe alignment.
Returns
The greatest multiple of alignment less than or equal to value.

◆ font_weight_from_int()

constexpr font_weight v1::font_weight_from_int ( numeric_integral auto rhs)
constexpr

Convert a font weight value between 50 and 1000 to a font weight.

◆ for_each_cluster()

template<typename It , typename S , typename F >
void v1::for_each_cluster ( It first,
It last,
S IsClusterSeperator,
F Function )
inline

For each cluster. func() is executed for each cluster that is found between first-last. A cluster is found between two separators, a separator is detected with IsClusterSeperator(). A cluster does not include the separator itself.

◆ format_count()

constexpr int v1::format_count ( std::string_view fmt)
constexprnoexcept

Count arguments of a std::format format string.

Parameters
fmtThe format string.
Returns
The number of arguments required for formatting.
Return values
-1Invalid open-brace inside format argument.
-2Invalid close-brace outside format argument.
-3Missing close-brace at end-of-string.

◆ format_JSON()

hi_export constexpr std::string v1::format_JSON ( datum const & root)
constexpr

Dump an datum object into a JSON string.

Parameters
rootdatum-object to serialize
Returns
The JSON serialized object as a string

◆ front_strip()

template<typename DataIt , typename ValueIt >
DataIt v1::front_strip ( DataIt data_first,
DataIt data_last,
ValueIt value_first,
ValueIt value_last )
noexcept

Strip data from the front side.

Parameters
data_firstThe iterator pointing to the first element of data.
data_lastThe iterator pointing one beyond the last element of data.
value_firstThe iterator pointing to the first value to be removed from data.
value_lastThe iterator pointing one beyond the last value to be removed from data.
Returns
An iterator pointing to the first data element not belonging to the values to be stripped. or data_last when all data elements have been stripped.

◆ generate_array()

template<typename T , std::size_t N, typename F >
constexpr std::array< T, N > v1::generate_array ( F operation)
constexpr

Generate data in an array.

Parameters
operationA function to execute for each element in the array. The function accepts a single index argument.
Returns
An array filled with elements generated by operation.

◆ generate_seed()

void v1::generate_seed ( void * ptr,
size_t size )
inline

Load a random seed.

Parameters
[out]ptrThe pointer to the buffer bytes where to generate the seed.
sizeThe number of bytes to generate.
Exceptions
os_erroron failure.

◆ get_first()

template<typename Range >
constexpr Range::value_type v1::get_first ( Range && range)
constexpr
See also
make_vector

◆ is_aligned()

template<typename T >
constexpr bool v1::is_aligned ( T * p)
constexpr

Check if a pointer is properly aligned for the object it is pointing at.

◆ make_identifier()

std::string v1::make_identifier ( std::string_view str)
inlinenoexcept

Encode a string to be usable as an id.

An id has the following format: [_a-zA-Z][_a-zA-Z0-9]*

◆ make_shared_ctad()

template<template< typename... > typename T, typename... Args>
auto v1::make_shared_ctad ( Args &&... args)

make_shared with CTAD (Class Template Argument Deduction)

Template Parameters
TA class template type.
Parameters
argsThe arguments forwarded to the constructor.
Returns
A std::shared_ptr<ctad_t<T>> to an object.

◆ make_slug()

constexpr std::string v1::make_slug ( std::string_view str)
constexprnoexcept

Create a slug from a string.

A slug contains only lower case letters, digits and dashes. Duplicated dashes are eliminated.

◆ make_title()

std::string v1::make_title ( std::string_view str)
inlinenoexcept

Create a title from a string.

A title contains words separated by a single space, where each word starts with a capital letter followed by lower case letters. Digits may be part of a word or form a separate word, digits are not counted as the start of a word for capitalization.

◆ make_unique_ctad()

template<template< typename... > typename T, typename... Args>
auto v1::make_unique_ctad ( Args &&... args)

make_unique with CTAD (Class Template Argument Deduction)

Template Parameters
TA class template type.
Parameters
argsThe arguments forwarded to the constructor.
Returns
A std::unique_ptr<ctad_t<T>> to an object.

◆ make_vector() [1/2]

template<typename Value , typename Range >
constexpr std::vector< Value > v1::make_vector ( Range && range)
constexpr

Make a vector from a view.

This function will make a vector with a copy of the elements of a view.

◆ make_vector() [2/2]

template<typename Range >
constexpr std::vector< typename Range::value_type > v1::make_vector ( Range && range)
constexpr
See also
make_vector

◆ matches()

constexpr bool v1::matches ( phrasing_mask const & lhs,
phrasing const & rhs )
constexprnoexcept

Check if the text-phrasing is included in the text-phrasing-mask.

Parameters
lhsThe text-phrasing-mask, i.e. the pattern.
rhsThe text-phrasing.
Returns
True when the text-phrasing is part of the text-phrasing-mask.

◆ normalize_lf()

std::string v1::normalize_lf ( std::string_view str)
inlinenoexcept

Normalize string to use only line-feeds.

◆ operator_precedence()

constexpr std::pair< uint8_t, bool > v1::operator_precedence ( std::string_view str,
bool binary )
constexprnoexcept

Operator Precedence according to C++.

Returns
Precedence, left-to-right-associativity

◆ parse_JSON() [1/4]

hi_export constexpr datum v1::parse_JSON ( char const * text,
std::string_view path = std::string_view{"<none>"} )
constexpr

Parse a JSON string.

Parameters
textThe text to parse.
Returns
A datum representing the parsed object.

◆ parse_JSON() [2/4]

hi_export datum v1::parse_JSON ( std::filesystem::path const & path)
inline

Parse a JSON string.

Parameters
pathA path pointing to the file to parse.
Returns
A datum representing the parsed object.

◆ parse_JSON() [3/4]

hi_export constexpr datum v1::parse_JSON ( std::string const & text,
std::string_view path = std::string_view{"<none>"} )
constexpr

Parse a JSON string.

Parameters
textThe text to parse.
Returns
A datum representing the parsed object.

◆ parse_JSON() [4/4]

hi_export constexpr datum v1::parse_JSON ( std::string_view text,
std::string_view path = std::string_view{"<none>"} )
constexpr

Parse a JSON string.

Parameters
textThe text to parse.
Returns
A datum representing the parsed object.

◆ placement_copy() [1/2]

template<typename InputIt , typename T >
T * v1::placement_copy ( InputIt src,
T * dst )

Copy an object to another memory locations.

This function will copy an object located in one memory location to another through the use of placement-new.

If you want to access the object in dst, you should use the return value.

Parameters
srcAn interator to an object.
dstA pointer to allocated memory.
Returns
The dst pointer with the new object who's lifetime was started.

◆ placement_copy() [2/2]

template<typename InputIt , typename T >
void v1::placement_copy ( InputIt src_first,
InputIt src_last,
T * dst_first )

Copy objects into a memory location.

This function will placement_copy an array of objects to a memory location.

◆ placement_move() [1/2]

template<typename T >
T * v1::placement_move ( T * src,
T * dst )

Move an object between two memory locations.

This function will move an object from one memory location to another through the use of placement-new. The object in the source memory location is destroyed.

If you want to access the object in dst, you should use the return value. It is undefined behavior when src and dst point to the same object. It is undefined behavior if either or both src and dst are nullptr.

Parameters
srcA pointer to an object.
dstA pointer to allocated memory.
Returns
The dst pointer with the new object who's lifetime was started.

◆ placement_move() [2/2]

template<typename T >
void v1::placement_move ( T * src,
T * src_last,
T * dst )

Move an objects between two memory locations.

This function will placement_move an array of objects between two memory locations.

WARNING: if moving objects within an array use placement_move_within_array to handle overlapping regions.

◆ placement_move_within_array()

template<typename T >
void v1::placement_move_within_array ( T * src_first,
T * src_last,
T * dst_first )

Move an objects between two memory locations.

This function will placement_move an array of objects between two memory locations.

It is undefined behavior when src_first and dst_first are not part of the same array.

The objects may overlap: copying takes place as if the objects were copied to a temporary object array and then the objects were copied from the array to dst.

◆ points_to_dp()

template<std::floating_point T>
constexpr T v1::points_to_dp ( T x)
constexprnoexcept

Convert points to device independent pixels.

◆ register_font_file()

hi_export font & v1::register_font_file ( std::filesystem::path const & path)
inline

Register a font.

Duplicate registrations will be ignored.

When a font file is registered the file will be temporarily opened to read and cache a set of properties:

  • The English font Family from the 'name' table.
  • The weight, width, slant & design-size from the 'fdsc' table.
  • The character map 'cmap' table.
Parameters
pathLocation of font.

◆ rfind_cluster()

template<typename ConstIt , typename It , typename UnaryPredicate >
constexpr It v1::rfind_cluster ( ConstIt first,
It start,
UnaryPredicate predicate )
constexpr

Find the start of the current cluster.

Parameters
firstThe first iterator, where this function will stop iterating.
startWhere to start the search
predicateA function returning the identifier of the cluster.
Returns
The first iterator where the cluster is the same as start.

◆ secure_clear() [1/3]

template<typename It >
void v1::secure_clear ( It first,
It last )
noexcept

Securely clear a set of objects.

This function uses an operating system service for erasing memory securely.

Parameters
firstAn iterator pointing to the first object to clear.
lastAn iterator pointing to one beyond to clear.

◆ secure_clear() [2/3]

void v1::secure_clear ( trivially_copyable auto & object)
inlinenoexcept

Securely clear an object.

This function uses an operating system service for erasing memory securely.

Parameters
objectThe object to securely clear to zeroes.

◆ secure_clear() [3/3]

void v1::secure_clear ( void * ptr,
size_t size )
inlinenoexcept

Securely clear memory.

This function uses an operating system service for erasing memory securely.

Parameters
ptrThe pointer to the memory to clear.
sizeThe number of bytes to clear.

◆ secure_destroy()

template<typename It >
void v1::secure_destroy ( It first,
It last )

Securely destroy objects.

Destroy objects and overwrite its memory with all '1' followed by all '0'.

Note
Internal allocations of objects will not be securily destroyed.
Parameters
firstAn iterator to the first object.
lastAn iterator to beyond the last object.

◆ secure_uninitialized_move()

template<typename It , typename OutIt >
void v1::secure_uninitialized_move ( It first,
It last,
OutIt d_first )

Securely move objects.

First calls std::uinitialized_move() then overwrites memory with all '1' followed by all '0'.

Parameters
firstAn iterator to the first object to move
lastAn iterator to beyond the last object to move
d_firstAn destination iterator to uninitialized memory.

◆ set_language()

template<std::input_or_output_iterator It, std::sentinel_for< It > ItEnd>
constexpr void v1::set_language ( It first,
ItEnd last,
language_tag language )
constexprnoexcept

Set the language for the string.

Parameters
firstAn iterator pointing to the first grapheme.
lastAn iterator pointing beyond the last grapheme.
languageThe language to set each grapheme to. This language will be expanded. The script of the grapheme will never contradict the unicode database.

◆ shuffle_by_index() [1/2]

auto v1::shuffle_by_index ( auto first,
auto last,
auto indices_first,
auto indices_last )
noexcept

Shuffle a container based on a list of indices.

It is undefined behavior for an index to point beyond last. It is undefined behavior for an index to repeat.

Complexity is O(n) swaps, where n is the number of indices.

Parameters
firstAn iterator pointing to the first item in a container to be shuffled (index = 0)
lastAn iterator pointing beyond the last item in a container to be shuffled.
indices_firstAn iterator pointing to the first index.
indices_lastAn iterator pointing beyond the last index.
Returns
An iterator pointing beyond the last element that was added by the indices. first + std::distance(indices_first, indices_last)

◆ shuffle_by_index() [2/2]

auto v1::shuffle_by_index ( auto first,
auto last,
auto indices_first,
auto indices_last,
auto index_op )
noexcept

Shuffle a container based on a list of indices.

It is undefined behavior for an index to point beyond last. It is undefined behavior for an index to repeat.

Complexity is O(n) swaps, where n is the number of indices.

Parameters
firstAn iterator pointing to the first item in a container to be shuffled (index = 0)
lastAn iterator pointing beyond the last item in a container to be shuffled.
indices_firstAn iterator pointing to the first index.
indices_lastAn iterator pointing beyond the last index.
index_opA function returning the size index from indices. The default returns the index item it self.
Returns
An iterator pointing beyond the last element that was added by the indices. first + std::distance(indices_first, indices_last)

◆ solveDepressedCubic()

template<typename T >
hi_force_inline lean_vector< T > v1::solveDepressedCubic ( T const & p,
T const & q )
noexcept

Solve cubic function in the form.

\[t^{3}+pt+q=0\]

\[D=\frac{1}{4}q^{2}+\frac{1}{27}p^{3}\]

\[U=\frac{1}{3}\arccos(\frac{3q}{2p})\sqrt{-\frac{3}{p}}\]

\[V=2\sqrt{-\frac{1}{3}p}\]

\[
 x=
  \begin{cases}
   0 & \text{if } p=0 \text{ and }q=0\\
   \frac{3q}{p}, -\frac{3q}{2p} & \text{if } D=0\\
   \sqrt[3]{-\frac{1}{2}+\sqrt{D}} + \sqrt[3]{-\frac{1}{2}-\sqrt{D}} & \text{if } D>0\\
   V\cdot \cos(U), V\cdot\cos(U-\frac{2}{3}\pi),V\cdot\cos(U-\frac{4}{3}\pi) & \text{if } D<0
  \end{cases}
\]

◆ solveDepressedCubicTrig()

template<typename T >
hi_force_inline lean_vector< T > v1::solveDepressedCubicTrig ( T const & p,
T const & q )
noexcept

Trigonometric solution for three real roots

◆ solvePolynomial() [1/3]

template<typename T >
hi_force_inline constexpr lean_vector< T > v1::solvePolynomial ( T const & a,
T const & b )
constexprnoexcept

Solve line function. ax+b=0

\[
 x=
 \begin{cases}
  \frac{-b}{a}, & \text{if } a\ne0\\
  \in\mathbb{R}, & \text{if } a=0,b=0\\
  \o & \text{if } a=0,b\ne0
 \end{cases}
\]

◆ solvePolynomial() [2/3]

template<typename T >
hi_force_inline constexpr lean_vector< T > v1::solvePolynomial ( T const & a,
T const & b,
T const & c )
constexprnoexcept

Solve quadratic function.

\[ax^{2}+bx+c=0\]

\[D=b^{2}-4ac\]

\[
 x=
  \begin{cases}
   \frac{-b}{2a}, & \text{if } D=0\\
   \frac{-b -\sqrt{D}}{2a}, \frac{-b +\sqrt{D}}{2a} & \text{if } D>0\\
   \o & \text{if } D<0
  \end{cases}
\]

◆ solvePolynomial() [3/3]

template<typename T >
hi_force_inline constexpr lean_vector< T > v1::solvePolynomial ( T const & a,
T const & b,
T const & c,
T const & d )
constexprnoexcept

Solve cubic function.

\[ax^{3}+bx^{2}+cx+d=0\]

\[p=\frac{3ac-b^{2}}{3a^{2}}\]

,

\[q=\frac{2b^{3}-9abc+27a^{2}d}{27a^{3}}\]

\[x=\text{solveDepressedCube}(p,q)-\frac{b}{3a}\]

◆ sub_pixel_size()

constexpr extent2 v1::sub_pixel_size ( subpixel_orientation orientation)
constexprnoexcept

Get the size of a sub-pixel based on the sub-pixel orientation.

◆ to_array_without_last() [1/2]

template<typename T , std::size_t N>
constexpr auto v1::to_array_without_last ( T(&&) rhs[N])
constexprnoexcept

Create an std::array from a one dimensional array, without the last element.

Useful for copying a string literal without the nul-termination

◆ to_array_without_last() [2/2]

template<typename T , std::size_t N>
constexpr auto v1::to_array_without_last ( T(&) rhs[N])
constexprnoexcept

Create an std::array from a one dimensional array, without the last element.

Useful for copying a string literal without the nul-termination

◆ to_gstring() [1/2]

constexpr gstring v1::to_gstring ( std::string_view rhs,
unicode_normalize_config config = unicode_normalize_config::NFC() )
constexprnoexcept

Convert a UTF-8 string to a grapheme-string.

Before conversion to gstring a string is first normalized using the Unicode normalization algorithm. By default it is normalized using NFC.

Parameters
rhsThe UTF-8 string to convert.
configThe attributes used for normalizing the input string.
Returns
A grapheme-string.

◆ to_gstring() [2/2]

constexpr gstring v1::to_gstring ( std::u32string_view rhs,
unicode_normalize_config config = unicode_normalize_config::NFC() )
constexprnoexcept

Convert a UTF-32 string-view to a grapheme-string.

Before conversion to gstring a string is first normalized using the Unicode normalization algorithm. By default it is normalized using NFC.

Parameters
rhsThe UTF-32 string to convert.
configThe attributes used for normalizing the input string.
Returns
A grapheme-string.

◆ to_keyboard_modifiers()

keyboard_modifiers v1::to_keyboard_modifiers ( std::string_view s)
inline

Parse a key-binding modifier name.

Parameters
sThe modifier name, with or without the canonical trailing '+'

◆ to_radian()

template<std::floating_point T>
constexpr T v1::to_radian ( T degree)
constexprnoexcept

Convert degree to radian.

Parameters
degreeThe number of degrees.
Returns
The number of radians.

◆ to_string() [1/2]

constexpr std::string v1::to_string ( gstring const & rhs)
constexprnoexcept

Convert a grapheme string to UTF-8.

Parameters
rhsThe grapheme string to convert to UTF-8
Returns
The resulting UTF-32 string, in NFC normalization.

◆ to_string() [2/2]

constexpr std::string v1::to_string ( gstring_view rhs)
constexprnoexcept

Convert a grapheme string to UTF-8.

Parameters
rhsThe grapheme string view to convert to UTF-8
Returns
The resulting UTF-8 string, in NFC normalization.

◆ to_title() [1/2]

template<size_t N>
constexpr fixed_string< N > v1::to_title ( fixed_string< N > const & rhs)
constexprnoexcept

Convert the current string to using title case.

This function does not do full unicode case conversion; only ASCII letters [a-zA-Z] will be modified.

◆ to_title() [2/2]

constexpr std::string v1::to_title ( std::string_view rhs)
constexprnoexcept

Convert the current string to using title case.

This function does not do full unicode case conversion; only ASCII letters [a-zA-Z] will be modified.

◆ to_u32string()

constexpr std::u32string v1::to_u32string ( gstring_view rhs)
constexprnoexcept

Convert a grapheme string to UTF-8.

Parameters
rhsThe grapheme string view to convert to UTF-8
Returns
The resulting UTF-32 string, in NFC normalization.

◆ to_wstring()

constexpr std::wstring v1::to_wstring ( gstring_view rhs)
constexprnoexcept

Convert a grapheme string to UTF-8.

Parameters
rhsThe grapheme string view to convert to UTF-8
Returns
The resulting wide-string, in NFC normalization.

◆ transform()

template<typename T , typename U , typename F >
T v1::transform ( const U & input,
F operation )
inline

Transform an input container to the output container.

Parameters
inputInput container.
operationA function to execute on each element in the input
Returns
Output container containing the transformed elements.

◆ unaligned_load()

template<numeric T, byte_like B>
constexpr T v1::unaligned_load ( B const * src)
constexprnoexcept

Make an unaligned load of an unsigned integer.

◆ unicode_bidi()

template<typename It , typename GetCodePoint , typename SetCodePoint , typename SetTextDirection >
constexpr std::pair< It, std::vector< unicode_bidi_class > > v1::unicode_bidi ( It first,
It last,
GetCodePoint get_code_point,
SetCodePoint set_code_point,
SetTextDirection set_text_direction,
unicode_bidi_context const & context = {} )
constexpr

Reorder a given range of characters based on the unicode_bidi algorithm.

This algorithm will:

  • Reorder the list of items
  • Change code points to a mirrored version.
  • Remove code points which controls the bidirectional algorithm

It is likely that an application has the characters grouped as graphemes and is accompanied with the original index and possible other information. The get_char function returns the first code-point of a grapheme. The set_char function is used when the code-point needs to be replaced with a mirrored version.

The bidirectional algorithm will work correctly with either a list of code points or a list of first-code-point-of-graphemes.

Parameters
firstThe first iterator
lastThe last iterator
get_code_pointA function to get the character of an item.
set_code_pointA function to set the character in an item.
set_text_directionA function to set the text direction in an item.
contextThe context/configuration to use for the bidi-algorithm.
Returns
Iterator pointing one beyond the last element, the writing direction for each paragraph.

◆ unicode_bidi_control_filter()

template<typename It , typename EndIt , typename CodePointFunc >
constexpr It v1::unicode_bidi_control_filter ( It first,
EndIt last,
CodePointFunc const & code_point_func )
constexpr

Removes control characters which will not survive the bidi-algorithm.

All RLE, LRE, RLO, LRO, PDF, and BN characters are removed.

Postcondition
Control characters between the first and last iterators are moved to the end.
Parameters
firstThe first character.
lastOne beyond the last character.
code_point_funcA function returning the code-point of the character.
Returns
The iterator one beyond the last character that is valid.

◆ unicode_bidi_direction()

template<typename It , typename GetCodePoint >
constexpr unicode_bidi_class v1::unicode_bidi_direction ( It first,
It last,
GetCodePoint get_code_point,
unicode_bidi_context const & context = {} )
constexpr

Get the unicode bidi direction for the first paragraph and context.

Parameters
firstThe first iterator
lastThe last iterator
get_code_pointA function to get the code-point of an item.
contextThe context/configuration to use for the bidi-algorithm.
Returns
Iterator pointing one beyond the last element, the writing direction for each paragraph.

◆ unicode_decompose()

constexpr std::u32string v1::unicode_decompose ( std::u32string_view text,
unicode_normalize_config config = unicode_normalize_config::NFD() )
constexprnoexcept

Convert text to a Unicode decomposed normal form.

Parameters
textto normalize, in-place.
normalization_maskExtra features for normalization.

◆ unicode_is_NFC_grapheme()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
constexpr bool v1::unicode_is_NFC_grapheme ( It it,
ItEnd last )
constexprnoexcept

Check if the string of code-points is a single grapheme in NFC normal form.

Parameters
itAn iterator pointing to the first code-point.
lastAn iterator pointing beyond the last code-point.

◆ unicode_line_break() [1/2]

template<typename It , typename ItEnd , typename CodePointFunc >
unicode_break_vector v1::unicode_line_break ( It first,
ItEnd last,
CodePointFunc const & code_point_func )
inlinenoexcept

The unicode line break algorithm UAX #14.

Parameters
firstAn iterator to the first character.
lastAn iterator to the last character.
code_point_funcA function to get the code-point of a character.
Returns
A list of unicode_break_opportunity.

◆ unicode_line_break() [2/2]

constexpr std::vector< size_t > v1::unicode_line_break ( unicode_break_vector const & opportunities,
std::vector< float > const & widths,
float maximum_line_width )
constexpr

Unicode break lines.

Parameters
opportunitiesThe list of break opportunities.
widthsThe list of character widths
maximum_line_widthThe maximum line width.
Returns
A list of line lengths.

◆ unicode_normalize()

constexpr std::u32string v1::unicode_normalize ( std::u32string_view text,
unicode_normalize_config config = unicode_normalize_config::NFC() )
constexprnoexcept

Convert text to a Unicode composed normal form.

Parameters
textto normalize, in-place.
normalization_maskExtra features for normalization.

◆ unicode_sentence_break()

template<typename It , typename ItEnd , typename CodePointFunc >
unicode_break_vector v1::unicode_sentence_break ( It first,
ItEnd last,
CodePointFunc const & code_point_func )
inlinenoexcept

The unicode word break algorithm UAX#29.

Parameters
firstAn iterator to the first character.
lastAn iterator to the last character.
code_point_funcA function to get a code-point from an dereferenced iterator.
Returns
A list of unicode_break_opportunity before each character.

◆ unicode_word_break()

template<typename It , typename ItEnd , typename CodePointFunc >
unicode_break_vector v1::unicode_word_break ( It first,
ItEnd last,
CodePointFunc const & code_point_func )
inlinenoexcept

The unicode word break algorithm UAX#29.

Parameters
firstAn iterator to the first character.
lastAn iterator to the last character.
code_point_funcA function to code-point from a character.
Returns
A list of unicode_break_opportunity.

◆ unordered_remove()

template<typename It >
constexpr It v1::unordered_remove ( It first,
It last,
It element )
constexpr

Remove element from a container.

Note
The elements before element remain in order.
The elements after element are not in the original order.
Parameters
firstThe iterator pointing to the first element of the container
lastThe iterator pointing one beyond the last element of the container.
elementThe iterator that points to the element to be removed.
Returns
The iterator one past the last element.

◆ when_any()

template<convertible_to_awaitable... Args>
auto v1::when_any ( Args const &... args)

await on a set of objects which can be converted to an awaitable.

The arguments may be of the following types:

  • An object which can be directly used as an awaitable. Having the member functions: await_ready(), await_suspend() and await_resume().
  • An object that has a operator co_await() member function.
  • An object that has a operator co_await() free function.
Parameters
argsThe object to await on.
Returns
a new awaitable object that wait for any of the arguments to finish.

◆ wrap_lines()

void v1::wrap_lines ( auto first,
auto last,
float max_width,
auto get_width,
auto get_code_point,
auto set_code_point )
noexcept

Wrap lines in text that are too wide.

This algorithm may modify white-space in text and change them into line separators. Lines are separated using the U+2028 code-point, and paragraphs are separated by the U+2029 code-point.

Parameters
firstThe first iterator of a text to wrap
lastThe one beyond the last iterator of a text to wrap
max_widthThe maximum width of a line.
get_widthA function returning the width of an item pointed by the iterator. float get_width(auto const &item)
get_code_pointA function returning the code-point of an item pointed by the iterator. char32_t get_code_point(auto const &item)
set_code_pointA function changing the code-point of an item pointed by the iterator. void set_code_point(auto &item, char32_t code_point)

Variable Documentation

◆ crt_application_instance

os_handle v1::crt_application_instance
inline

The application instance identified by the operating system.

A handle to the application instance of the operating system:

  • on windows this is the hInstance of WinMain(), and is used to create windows that are owned by the current application.

◆ dp_per_inch

constexpr double v1::dp_per_inch = dp_per_inch_v<double>
constexpr
See also
dp_per_inch_v

◆ dp_per_inch_v

template<std::floating_point T>
constexpr auto v1::dp_per_inch_v = T{80.0}
constexpr

The number of device independent pixels per inch.

device independent pixels per platform:

  • win32: 96 dp/inch
  • MacOS: 72 dp/inch
  • Android: 160 dp/inch (80 double dp/inch)

The Android dp size is almost halfway between win32 and MacOS, which we will use for hikogui.

◆ font_weight_metadata

constexpr auto v1::font_weight_metadata
constexpr
Initial value:
= enum_metadata{
font_weight::thin, "thin",
font_weight::extra_light, "extra-light",
font_weight::light, "light",
font_weight::regular, "regular",
font_weight::medium, "medium",
font_weight::semi_bold, "semi-bold",
font_weight::bold, "bold",
font_weight::extra_bold, "extra-bold",
font_weight::black, "black",
font_weight::extra_black, "extra-black",
}

◆ gfx_system_mutex

unfair_recursive_mutex v1::gfx_system_mutex
inline

Global mutex for GUI elements, like gfx_system, gfx_device, Windows and Widgets.

◆ is_invocable_task_v

template<typename Func , typename... ArgTypes>
constexpr bool v1::is_invocable_task_v = is_invocable_task<Func, ArgTypes...>::value
constexpr

type-trait to determining if the given invocable Func is a task.

◆ is_task_v

template<typename T >
constexpr bool v1::is_task_v = is_task<T>::value
constexpr

type-trait to determine if the given type T is a task.

◆ large_number_v

template<typename T >
constexpr auto v1::large_number_v = T{16777215}
constexpr

A large number.

This number 16777215 (2^24 - 1). Integers beyond this number may not be accurately represented by a float.

◆ phrasing_metadata

constexpr auto v1::phrasing_metadata
constexpr
Initial value:
= enum_metadata{
phrasing::regular, "regular",
phrasing::emphesis, "emphesis",
phrasing::strong, "strong",
phrasing::code, "code",
phrasing::abbreviation, "abbreviation",
phrasing::quote, "quote",
phrasing::keyboard, "keyboard",
phrasing::highlight, "highlight",
phrasing::math, "math",
phrasing::example, "example",
phrasing::unarticulated, "unarticulated",
phrasing::title, "title",
phrasing::success, "success",
phrasing::warning, "warning",
phrasing::error, "error",
}

◆ points_per_inch

constexpr double v1::points_per_inch = points_per_inch_v<double>
constexpr

◆ points_per_inch_v

template<std::floating_point T>
constexpr auto v1::points_per_inch_v = T{72.0}
constexpr

The number of points (typography) per inch.

◆ pow10_table

constexpr unsigned long long v1::pow10_table[20]
constexpr
Initial value:
= {
1ULL,
10ULL,
100ULL,
1'000ULL,
10'000ULL,
100'000ULL,
1'000'000ULL,
10'000'000ULL,
100'000'000ULL,
1'000'000'000ULL,
10'000'000'000ULL,
100'000'000'000ULL,
1'000'000'000'000ULL,
10'000'000'000'000ULL,
100'000'000'000'000ULL,
1'000'000'000'000'000ULL,
10'000'000'000'000'000ULL,
100'000'000'000'000'000ULL,
1'000'000'000'000'000'000ULL,
}

◆ semantic_text_style_metadata

constexpr auto v1::semantic_text_style_metadata
constexpr
Initial value:
= enum_metadata{
semantic_text_style::label, "label",
semantic_text_style::small_label, "small-label",
semantic_text_style::warning, "warning",
semantic_text_style::error, "error",
semantic_text_style::help, "help",
semantic_text_style::placeholder, "placeholder",
semantic_text_style::link, "link",
}

◆ subpixel_orientation_metadata

constexpr auto v1::subpixel_orientation_metadata
constexpr
Initial value:
= enum_metadata{
subpixel_orientation::unknown, "unknown",
subpixel_orientation::horizontal_rgb, "horizontal RGB",
subpixel_orientation::horizontal_bgr, "horizontal BGR",
subpixel_orientation::vertical_rgb, "vertical RGB",
subpixel_orientation::vertical_bgr, "vertical BGR",
}

◆ text_decoration_metadata

constexpr auto v1::text_decoration_metadata
constexpr
Initial value:
= enum_metadata{
text_decoration::None, "none",
text_decoration::Underline, "underline",
text_decoration::WavyUnderline, "wavy-underline",
text_decoration::StrikeThrough, "strike-through"
}