Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
raygui.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200include Functions module Default = struct type t = [ `Text_size | `Text_spacing | `Line_color | `Background_color ] end module Toggle = struct type t = [ `Padding_toggle ] end module Slider = struct type t = [ `Width_slider | `Padding_slider ] end module ProgressBar = struct type t = [ `Padding_progressbar ] end module CheckBox = struct type t = [ `Padding_checkbox ] end module ComboBox = struct type t = [ `Width_combobox | `Padding_combobox ] end module DropdownBox = struct type t = [ `Arrow_padding | `Dropdown_items_padding ] end module TextBox = struct type t = [ `Text_inner_padding | `Text_lines_padding | `Color_selected_fg | `Color_selected_bg ] end module Spinner = struct type t = [ `Width_spinner | `Padding_spinner ] end module ScrollBar = struct type t = [ `Arrows_size | `Arrows_visible | `Scroll_slider_padding | `Scroll_slider_size | `Scroll_padding | `Scroll_speed ] end (* TODO check how scrollbarside works *) module ListView = struct type t = [ `List_items_height | `List_items_padding | `Scrollbar_width | `Scrollbar_side ] end module ColorPicker = struct type t = [ `Color_selector_size | `Huebar_width | `Huebar_padding | `Huebar_selector_height | `Huebar_selector_overflow ] end module Control = struct type prop = [ `Border_color_normal | `Base_color_normal | `Text_color_normal | `Border_color_focused | `Base_color_focused | `Text_color_focused | `Border_color_pressed | `Base_color_pressed | `Text_color_pressed | `Border_color_disabled | `Base_color_disabled | `Text_color_disabled | `Border_width | `Text_padding | `Text_alignment ] type t = | Default of [ prop | Default.t ] | Label of prop | Button of prop | Toggle of [ prop | Toggle.t ] | Slider of [ prop | Slider.t ] | ProgressBar of [ prop | ProgressBar.t ] | CheckBox of [ prop | CheckBox.t ] | ComboBox of [ prop | ComboBox.t ] | DropdownBox of [ prop | DropdownBox.t ] | TextBox of [ prop | TextBox.t ] | Valuebox of prop | Spinner of [ prop | Spinner.t ] | ListView of [ prop | ListView.t ] | ColorPicker of [ prop | ColorPicker.t ] | ScrollBar of [ prop | ScrollBar.t ] | StatusBar of prop end let prop_to_int = function | `Border_color_normal -> ControlProperty.(to_int Border_color_normal) | `Base_color_normal -> ControlProperty.(to_int Base_color_normal) | `Text_color_normal -> ControlProperty.(to_int Text_color_normal) | `Border_color_focused -> ControlProperty.(to_int Border_color_focused) | `Base_color_focused -> ControlProperty.(to_int Base_color_focused) | `Text_color_focused -> ControlProperty.(to_int Text_color_focused) | `Border_color_pressed -> ControlProperty.(to_int Border_color_pressed) | `Base_color_pressed -> ControlProperty.(to_int Base_color_pressed) | `Text_color_pressed -> ControlProperty.(to_int Text_color_pressed) | `Border_color_disabled -> ControlProperty.(to_int Border_color_disabled) | `Base_color_disabled -> ControlProperty.(to_int Base_color_disabled) | `Text_color_disabled -> ControlProperty.(to_int Text_color_disabled) | `Border_width -> ControlProperty.(to_int Border_width) | `Text_padding -> ControlProperty.(to_int Text_padding) | `Text_alignment -> ControlProperty.(to_int Text_alignment) | `Text_size -> DefaultProperty.(to_int Text_size) | `Text_spacing -> DefaultProperty.(to_int Text_spacing) | `Line_color -> DefaultProperty.(to_int Line_color) | `Background_color -> DefaultProperty.(to_int Background_color) | `Padding_toggle -> ToggleProperty.(to_int Padding) | `Width_slider -> SliderProperty.(to_int Width) | `Padding_slider -> SliderProperty.(to_int Padding) | `Padding_progressbar -> ProgressBarProperty.(to_int Padding) | `Padding_checkbox -> CheckBoxProperty.(to_int Padding) | `Width_combobox -> ComboBoxProperty.(to_int Width) | `Padding_combobox -> ComboBoxProperty.(to_int Padding) | `Arrow_padding -> DropdownBoxProperty.(to_int Arrow_padding) | `Dropdown_items_padding -> DropdownBoxProperty.(to_int Dropdown_items_padding) | `Text_inner_padding -> TextBoxProperty.(to_int Text_inner_padding) | `Text_lines_padding -> TextBoxProperty.(to_int Text_lines_padding) | `Color_selected_fg -> TextBoxProperty.(to_int Color_selected_fg) | `Color_selected_bg -> TextBoxProperty.(to_int Color_selected_bg) | `Width_spinner -> SpinnerProperty.(to_int Width) | `Padding_spinner -> SpinnerProperty.(to_int Padding) | `Arrows_size -> ScrollBarProperty.(to_int Arrows_size) | `Arrows_visible -> ScrollBarProperty.(to_int Arrows_visible) | `Scroll_slider_padding -> ScrollBarProperty.(to_int Scroll_slider_padding) | `Scroll_slider_size -> ScrollBarProperty.(to_int Scroll_slider_size) | `Scroll_padding -> ScrollBarProperty.(to_int Scroll_padding) | `Scroll_speed -> ScrollBarProperty.(to_int Scroll_speed) | `List_items_height -> ListViewProperty.(to_int List_items_height) | `List_items_padding -> ListViewProperty.(to_int List_items_padding) | `Scrollbar_width -> ListViewProperty.(to_int Scrollbar_width) | `Scrollbar_side -> ListViewProperty.(to_int Scrollbar_side) | `Color_selector_size -> ColorPickerProperty.(to_int Color_selector_size) | `Huebar_width -> ColorPickerProperty.(to_int Huebar_width) | `Huebar_padding -> ColorPickerProperty.(to_int Huebar_padding) | `Huebar_selector_height -> ColorPickerProperty.(to_int Huebar_selector_height) | `Huebar_selector_overflow -> ColorPickerProperty.(to_int Huebar_selector_overflow) let get_style = function | Control.Default prop -> _get_style Wrapped_Control.Default (prop_to_int prop) | Label prop -> _get_style Label (prop_to_int prop) | Button prop -> _get_style Button (prop_to_int prop) | Toggle prop -> _get_style Toggle (prop_to_int prop) | Slider prop -> _get_style Slider (prop_to_int prop) | ProgressBar prop -> _get_style Progressbar (prop_to_int prop) | CheckBox prop -> _get_style Checkbox (prop_to_int prop) | ComboBox prop -> _get_style Combobox (prop_to_int prop) | DropdownBox prop -> _get_style Dropdownbox (prop_to_int prop) | TextBox prop -> _get_style Textbox (prop_to_int prop) | Valuebox prop -> _get_style Valuebox (prop_to_int prop) | Spinner prop -> _get_style Spinner (prop_to_int prop) | ScrollBar prop -> _get_style Scrollbar (prop_to_int prop) | ListView prop -> _get_style Listview (prop_to_int prop) | ColorPicker prop -> _get_style Colorpicker (prop_to_int prop) | StatusBar prop -> _get_style Statusbar (prop_to_int prop) let set_style ctl value = match ctl with | Control.Default prop -> _set_style Wrapped_Control.Default (prop_to_int prop) value | Label prop -> _set_style Label (prop_to_int prop) value | Button prop -> _set_style Button (prop_to_int prop) value | Toggle prop -> _set_style Toggle (prop_to_int prop) value | Slider prop -> _set_style Slider (prop_to_int prop) value | ProgressBar prop -> _set_style Progressbar (prop_to_int prop) value | CheckBox prop -> _set_style Checkbox (prop_to_int prop) value | ComboBox prop -> _set_style Combobox (prop_to_int prop) value | DropdownBox prop -> _set_style Dropdownbox (prop_to_int prop) value | TextBox prop -> _set_style Textbox (prop_to_int prop) value | Valuebox prop -> _set_style Valuebox (prop_to_int prop) value | Spinner prop -> _set_style Spinner (prop_to_int prop) value | ScrollBar prop -> _set_style Scrollbar (prop_to_int prop) value | ListView prop -> _set_style Listview (prop_to_int prop) value | ColorPicker prop -> _set_style Colorpicker (prop_to_int prop) value | StatusBar prop -> _set_style Statusbar (prop_to_int prop) value