Tabs for identation and spaces for aligment

This commit is contained in:
Guilherme Fernandes
2023-08-08 13:22:26 +01:00
parent 535d290293
commit 6879c9d8df
+422 -423
View File
@@ -36,67 +36,67 @@ RAYGUI_VERSION :: "4.0"
// Style property // Style property
GuiStyleProp :: struct { GuiStyleProp :: struct {
controlId: u16, controlId: u16,
propertyId: u16, propertyId: u16,
propertyValue: c.int, propertyValue: c.int,
} }
// Gui control state // Gui control state
GuiState :: enum c.int { GuiState :: enum c.int {
STATE_NORMAL = 0, STATE_NORMAL = 0,
STATE_FOCUSED, STATE_FOCUSED,
STATE_PRESSED, STATE_PRESSED,
STATE_DISABLED, STATE_DISABLED,
} }
// Gui control text alignment // Gui control text alignment
GuiTextAlignment :: enum c.int { GuiTextAlignment :: enum c.int {
TEXT_ALIGN_LEFT = 0, TEXT_ALIGN_LEFT = 0,
TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER,
TEXT_ALIGN_RIGHT, TEXT_ALIGN_RIGHT,
} }
// Gui controls // Gui controls
GuiControl :: enum c.int { GuiControl :: enum c.int {
// Default -> populates to all controls when set // Default -> populates to all controls when set
DEFAULT = 0, DEFAULT = 0,
// Basic controls // Basic controls
LABEL, // Used also for: LABELBUTTON LABEL, // Used also for: LABELBUTTON
BUTTON, BUTTON,
TOGGLE, // Used also for: TOGGLEGROUP TOGGLE, // Used also for: TOGGLEGROUP
SLIDER, // Used also for: SLIDERBAR SLIDER, // Used also for: SLIDERBAR
PROGRESSBAR, PROGRESSBAR,
CHECKBOX, CHECKBOX,
COMBOBOX, COMBOBOX,
DROPDOWNBOX, DROPDOWNBOX,
TEXTBOX, // Used also for: TEXTBOXMULTI TEXTBOX, // Used also for: TEXTBOXMULTI
VALUEBOX, VALUEBOX,
SPINNER, // Uses: BUTTON, VALUEBOX SPINNER, // Uses: BUTTON, VALUEBOX
LISTVIEW, LISTVIEW,
COLORPICKER, COLORPICKER,
SCROLLBAR, SCROLLBAR,
STATUSBAR, STATUSBAR,
} }
// Gui base properties for every control // Gui base properties for every control
// NOTE: RAYGUI_MAX_PROPS_BASE properties (by default 16 properties) // NOTE: RAYGUI_MAX_PROPS_BASE properties (by default 16 properties)
GuiControlProperty :: enum c.int { GuiControlProperty :: enum c.int {
BORDER_COLOR_NORMAL = 0, BORDER_COLOR_NORMAL = 0,
BASE_COLOR_NORMAL, BASE_COLOR_NORMAL,
TEXT_COLOR_NORMAL, TEXT_COLOR_NORMAL,
BORDER_COLOR_FOCUSED, BORDER_COLOR_FOCUSED,
BASE_COLOR_FOCUSED, BASE_COLOR_FOCUSED,
TEXT_COLOR_FOCUSED, TEXT_COLOR_FOCUSED,
BORDER_COLOR_PRESSED, BORDER_COLOR_PRESSED,
BASE_COLOR_PRESSED, BASE_COLOR_PRESSED,
TEXT_COLOR_PRESSED, TEXT_COLOR_PRESSED,
BORDER_COLOR_DISABLED, BORDER_COLOR_DISABLED,
BASE_COLOR_DISABLED, BASE_COLOR_DISABLED,
TEXT_COLOR_DISABLED, TEXT_COLOR_DISABLED,
BORDER_WIDTH, BORDER_WIDTH,
TEXT_PADDING, TEXT_PADDING,
TEXT_ALIGNMENT, TEXT_ALIGNMENT,
RESERVED, RESERVED,
} }
// Gui extended properties depend on control // Gui extended properties depend on control
@@ -106,11 +106,11 @@ GuiControlProperty :: enum c.int {
// DEFAULT extended properties // DEFAULT extended properties
// NOTE: Those properties are common to all controls or global // NOTE: Those properties are common to all controls or global
GuiDefaultProperty :: enum c.int { GuiDefaultProperty :: enum c.int {
TEXT_SIZE = 16, // Text size (glyphs max height) TEXT_SIZE = 16, // Text size (glyphs max height)
TEXT_SPACING, // Text spacing between glyphs TEXT_SPACING, // Text spacing between glyphs
LINE_COLOR, // Line control color LINE_COLOR, // Line control color
BACKGROUND_COLOR, // Background color BACKGROUND_COLOR, // Background color
TEXT_LINE_SPACING, // Text spacing between lines TEXT_LINE_SPACING, // Text spacing between lines
} }
// Label // Label
@@ -121,77 +121,77 @@ GuiDefaultProperty :: enum c.int {
// Toggle/ToggleGroup // Toggle/ToggleGroup
GuiToggleProperty :: enum c.int { GuiToggleProperty :: enum c.int {
GROUP_PADDING = 16, // ToggleGroup separation between toggles GROUP_PADDING = 16, // ToggleGroup separation between toggles
} }
// Slider/SliderBar // Slider/SliderBar
GuiSliderProperty :: enum c.int { GuiSliderProperty :: enum c.int {
SLIDER_WIDTH = 16, // Slider size of internal bar SLIDER_WIDTH = 16, // Slider size of internal bar
SLIDER_PADDING, // Slider/SliderBar internal bar padding SLIDER_PADDING, // Slider/SliderBar internal bar padding
} }
// ProgressBar // ProgressBar
GuiProgressBarProperty :: enum c.int { GuiProgressBarProperty :: enum c.int {
PROGRESS_PADDING = 16, // ProgressBar internal padding PROGRESS_PADDING = 16, // ProgressBar internal padding
} }
// ScrollBar // ScrollBar
GuiScrollBarProperty :: enum c.int { GuiScrollBarProperty :: enum c.int {
ARROWS_SIZE = 16, ARROWS_SIZE = 16,
ARROWS_VISIBLE, ARROWS_VISIBLE,
SCROLL_SLIDER_PADDING, // (SLIDERBAR, SLIDER_PADDING) SCROLL_SLIDER_PADDING, // (SLIDERBAR, SLIDER_PADDING)
SCROLL_SLIDER_SIZE, SCROLL_SLIDER_SIZE,
SCROLL_PADDING, SCROLL_PADDING,
SCROLL_SPEED, SCROLL_SPEED,
} }
// CheckBox // CheckBox
GuiCheckBoxProperty :: enum c.int { GuiCheckBoxProperty :: enum c.int {
CHECK_PADDING = 16, // CheckBox internal check padding CHECK_PADDING = 16, // CheckBox internal check padding
} }
// ComboBox // ComboBox
GuiComboBoxProperty :: enum c.int { GuiComboBoxProperty :: enum c.int {
COMBO_BUTTON_WIDTH = 16, // ComboBox right button width COMBO_BUTTON_WIDTH = 16, // ComboBox right button width
COMBO_BUTTON_SPACING, // ComboBox button separation COMBO_BUTTON_SPACING, // ComboBox button separation
} }
// DropdownBox // DropdownBox
GuiDropdownBoxProperty :: enum c.int { GuiDropdownBoxProperty :: enum c.int {
ARROW_PADDING = 16, // DropdownBox arrow separation from border and items ARROW_PADDING = 16, // DropdownBox arrow separation from border and items
DROPDOWN_ITEMS_SPACING, // DropdownBox items separation DROPDOWN_ITEMS_SPACING, // DropdownBox items separation
} }
// TextBox/TextBoxMulti/ValueBox/Spinner // TextBox/TextBoxMulti/ValueBox/Spinner
GuiTextBoxProperty :: enum c.int { GuiTextBoxProperty :: enum c.int {
TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding TEXT_INNER_PADDING = 16, // TextBox/TextBoxMulti/ValueBox/Spinner inner text padding
TEXT_LINES_SPACING, // TextBoxMulti lines separation TEXT_LINES_SPACING, // TextBoxMulti lines separation
TEXT_ALIGNMENT_VERTICAL, // TextBoxMulti vertical alignment: 0-CENTERED, 1-UP, 2-DOWN TEXT_ALIGNMENT_VERTICAL, // TextBoxMulti vertical alignment: 0-CENTERED, 1-UP, 2-DOWN
TEXT_MULTILINE, // TextBox supports multiple lines TEXT_MULTILINE, // TextBox supports multiple lines
TEXT_WRAP_MODE, // TextBox wrap mode for multiline: 0-NO_WRAP, 1-CHAR_WRAP, 2-WORD_WRAP TEXT_WRAP_MODE, // TextBox wrap mode for multiline: 0-NO_WRAP, 1-CHAR_WRAP, 2-WORD_WRAP
} }
// Spinner // Spinner
GuiSpinnerProperty :: enum c.int { GuiSpinnerProperty :: enum c.int {
SPIN_BUTTON_WIDTH = 16, // Spinner left/right buttons width SPIN_BUTTON_WIDTH = 16, // Spinner left/right buttons width
SPIN_BUTTON_SPACING, // Spinner buttons separation SPIN_BUTTON_SPACING, // Spinner buttons separation
} }
// ListView // ListView
GuiListViewProperty :: enum c.int { GuiListViewProperty :: enum c.int {
LIST_ITEMS_HEIGHT = 16, // ListView items height LIST_ITEMS_HEIGHT = 16, // ListView items height
LIST_ITEMS_SPACING, // ListView items separation LIST_ITEMS_SPACING, // ListView items separation
SCROLLBAR_WIDTH, // ListView scrollbar size (usually width) SCROLLBAR_WIDTH, // ListView scrollbar size (usually width)
SCROLLBAR_SIDE, // ListView scrollbar side (0-left, 1-right) SCROLLBAR_SIDE, // ListView scrollbar side (0-left, 1-right)
} }
// ColorPicker // ColorPicker
GuiColorPickerProperty :: enum c.int { GuiColorPickerProperty :: enum c.int {
COLOR_SELECTOR_SIZE = 16, COLOR_SELECTOR_SIZE = 16,
HUEBAR_WIDTH, // ColorPicker right hue bar width HUEBAR_WIDTH, // ColorPicker right hue bar width
HUEBAR_PADDING, // ColorPicker right hue bar separation from panel HUEBAR_PADDING, // ColorPicker right hue bar separation from panel
HUEBAR_SELECTOR_HEIGHT, // ColorPicker right hue bar selector height HUEBAR_SELECTOR_HEIGHT, // ColorPicker right hue bar selector height
HUEBAR_SELECTOR_OVERFLOW, // ColorPicker right hue bar selector overflow HUEBAR_SELECTOR_OVERFLOW, // ColorPicker right hue bar selector overflow
} }
SCROLLBAR_LEFT_SIDE :: 0 SCROLLBAR_LEFT_SIDE :: 0
@@ -208,353 +208,352 @@ SCROLLBAR_RIGHT_SIDE :: 1
@(default_calling_convention="c") @(default_calling_convention="c")
foreign lib { foreign lib {
// Global gui state control functions // Global gui state control functions
GuiEnable :: proc() --- // Enable gui controls (global state) GuiEnable :: proc() --- // Enable gui controls (global state)
GuiLock :: proc() --- // Lock gui controls (global state) GuiLock :: proc() --- // Lock gui controls (global state)
GuiDisable :: proc() --- // Disable gui controls (global state) GuiDisable :: proc() --- // Disable gui controls (global state)
GuiUnlock :: proc() --- // Unlock gui controls (global state) GuiUnlock :: proc() --- // Unlock gui controls (global state)
GuiIsLocked :: proc() -> bool --- // Check if gui is locked (global state) GuiIsLocked :: proc() -> bool --- // Check if gui is locked (global state)
GuiFade :: proc(alpha: f32) --- // Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f GuiFade :: proc(alpha: f32) --- // Set gui controls alpha (global state), alpha goes from 0.0f to 1.0f
GuiSetState :: proc(state: c.int) --- // Set gui state (global state) GuiSetState :: proc(state: c.int) --- // Set gui state (global state)
GuiGetState :: proc() -> c.int --- // Get gui state (global state) GuiGetState :: proc() -> c.int --- // Get gui state (global state)
// Font set/get functions // Font set/get functions
GuiSetFont :: proc(font: Font) --- // Set gui custom font (global state) GuiSetFont :: proc(font: Font) --- // Set gui custom font (global state)
GuiGetFont :: proc() -> Font --- // Get gui custom font (global state) GuiGetFont :: proc() -> Font --- // Get gui custom font (global state)
// Style set/get functions // Style set/get functions
GuiSetStyle :: proc(control: c.int, property: c.int, value: c.int) --- // Set one style property GuiSetStyle :: proc(control: c.int, property: c.int, value: c.int) --- // Set one style property
GuiGetStyle :: proc(control: c.int, property: c.int) -> c.int --- // Get one style property GuiGetStyle :: proc(control: c.int, property: c.int) -> c.int --- // Get one style property
// Styles loading functions // Styles loading functions
GuiLoadStyle :: proc(fileName: cstring) --- // Load style file over global style variable (.rgs) GuiLoadStyle :: proc(fileName: cstring) --- // Load style file over global style variable (.rgs)
GuiLoadStyleDefault :: proc() --- // Load style default over global style GuiLoadStyleDefault :: proc() --- // Load style default over global style
// Tooltips management functions // Tooltips management functions
GuiEnableTooltip :: proc() --- // Enable gui tooltips (global state) GuiEnableTooltip :: proc() --- // Enable gui tooltips (global state)
GuiDisableTooltip :: proc() --- // Disable gui tooltips (global state) GuiDisableTooltip :: proc() --- // Disable gui tooltips (global state)
GuiSetTooltip :: proc(tooltip: cstring) --- // Set tooltip string GuiSetTooltip :: proc(tooltip: cstring) --- // Set tooltip string
// Icons functionality // Icons functionality
GuiIconText :: proc(iconId: c.int, text: cstring) -> cstring --- // Get text with icon id prepended (if supported) GuiIconText :: proc(iconId: c.int, text: cstring) -> cstring --- // Get text with icon id prepended (if supported)
GuiSetIconScale :: proc(scale: c.int) --- // Set default icon drawing size GuiSetIconScale :: proc(scale: c.int) --- // Set default icon drawing size
GuiGetIcons :: proc() -> [^]u32 --- // Get raygui icons data pointer GuiGetIcons :: proc() -> [^]u32 --- // Get raygui icons data pointer
GuiLoadIcons :: proc(fileName: cstring, loadIconsName: bool) -> [^]cstring --- // Load raygui icons file (.rgi) into internal icons data GuiLoadIcons :: proc(fileName: cstring, loadIconsName: bool) -> [^]cstring --- // Load raygui icons file (.rgi) into internal icons data
GuiDrawIcon :: proc(iconId: c.int, posX: c.int, posY: c.int, pixelSize: c.int, color: Color) --- // Draw icon using pixel size at specified position GuiDrawIcon :: proc(iconId: c.int, posX: c.int, posY: c.int, pixelSize: c.int, color: Color) --- // Draw icon using pixel size at specified position
// Controls // Controls
//---------------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------------
// Container/separator controls, useful for controls organization // Container/separator controls, useful for controls organization
GuiWindowBox :: proc(bounds: Rectangle, title: cstring) -> c.int --- // Window Box control, shows a window that can be closed GuiWindowBox :: proc(bounds: Rectangle, title: cstring) -> c.int --- // Window Box control, shows a window that can be closed
GuiGroupBox :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Group Box control with text name GuiGroupBox :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Group Box control with text name
GuiLine :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Line separator control, could contain text GuiLine :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Line separator control, could contain text
GuiPanel :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Panel control, useful to group controls GuiPanel :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Panel control, useful to group controls
GuiTabBar :: proc(bounds: Rectangle, text: [^]cstring, count: c.int, active: ^c.int) -> c.int --- // Tab Bar control, returns TAB to be closed or -1 GuiTabBar :: proc(bounds: Rectangle, text: [^]cstring, count: c.int, active: ^c.int) -> c.int --- // Tab Bar control, returns TAB to be closed or -1
GuiScrollPanel :: proc(bounds: Rectangle, text: cstring, content: Rectangle, scroll: ^Vector2, view: ^Rectangle) -> c.int --- // Scroll Panel control GuiScrollPanel :: proc(bounds: Rectangle, text: cstring, content: Rectangle, scroll: ^Vector2, view: ^Rectangle) -> c.int --- // Scroll Panel control
// Basic controls set // Basic controls set
GuiLabel :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Label control, shows text GuiLabel :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Label control, shows text
GuiButton :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Button control, returns true when clicked GuiButton :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Button control, returns true when clicked
GuiLabelButton :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Label button control, show true when clicked GuiLabelButton :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Label button control, show true when clicked
GuiToggle :: proc(bounds: Rectangle, text: cstring, active: ^bool) -> c.int --- // Toggle Button control, returns true when active GuiToggle :: proc(bounds: Rectangle, text: cstring, active: ^bool) -> c.int --- // Toggle Button control, returns true when active
GuiToggleGroup :: proc(bounds: Rectangle, text: cstring, active: ^c.int) -> c.int --- // Toggle Group control, returns active toggle index GuiToggleGroup :: proc(bounds: Rectangle, text: cstring, active: ^c.int) -> c.int --- // Toggle Group control, returns active toggle index
GuiCheckBox :: proc(bounds: Rectangle, text: cstring, checked: ^bool) -> c.int --- // Check Box control, returns true when active GuiCheckBox :: proc(bounds: Rectangle, text: cstring, checked: ^bool) -> c.int --- // Check Box control, returns true when active
GuiComboBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int) -> c.int --- // Combo Box control, returns selected item index GuiComboBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int) -> c.int --- // Combo Box control, returns selected item index
GuiDropdownBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int, editMode: bool) -> c.int --- // Dropdown Box control, returns selected item GuiDropdownBox :: proc(bounds: Rectangle, text: cstring, active: ^c.int, editMode: bool) -> c.int --- // Dropdown Box control, returns selected item
GuiSpinner :: proc(bounds: Rectangle, text: cstring, value: ^c.int, minValue, maxValue: c.int, editMode: bool) -> c.int --- // Spinner control, returns selected value GuiSpinner :: proc(bounds: Rectangle, text: cstring, value: ^c.int, minValue, maxValue: c.int, editMode: bool) -> c.int --- // Spinner control, returns selected value
GuiValueBox :: proc(bounds: Rectangle, text: cstring, value: ^c.int, minValue, maxValue: c.int, editMode: bool) -> c.int --- // Value Box control, updates input text with numbers GuiValueBox :: proc(bounds: Rectangle, text: cstring, value: ^c.int, minValue, maxValue: c.int, editMode: bool) -> c.int --- // Value Box control, updates input text with numbers
GuiTextBox :: proc(bounds: Rectangle, text: cstring, textSize: c.int, editMode: bool) -> c.int --- // Text Box control, updates input text GuiTextBox :: proc(bounds: Rectangle, text: cstring, textSize: c.int, editMode: bool) -> c.int --- // Text Box control, updates input text
GuiSlider :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Slider control, returns selected value GuiSlider :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Slider control, returns selected value
GuiSliderBar :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Slider Bar control, returns selected value GuiSliderBar :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Slider Bar control, returns selected value
GuiProgressBar :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Progress Bar control, shows current progress value GuiProgressBar :: proc(bounds: Rectangle, textLeft: cstring, textRight: cstring, value: ^f32, minValue: f32, maxValue: f32) -> c.int --- // Progress Bar control, shows current progress value
GuiStatusBar :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Status Bar control, shows info text GuiStatusBar :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Status Bar control, shows info text
GuiDummyRec :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Dummy control for placeholders GuiDummyRec :: proc(bounds: Rectangle, text: cstring) -> c.int --- // Dummy control for placeholders
GuiGrid :: proc(bounds: Rectangle, text: cstring, spacing: f32, subdivs: c.int, mouseCell: ^Vector2) -> c.int --- // Grid control, returns mouse cell position GuiGrid :: proc(bounds: Rectangle, text: cstring, spacing: f32, subdivs: c.int, mouseCell: ^Vector2) -> c.int --- // Grid control, returns mouse cell position
// Advance controls set // Advance controls set
GuiListView :: proc(bounds: Rectangle, text: cstring, scrollIndex: ^c.int, active: ^c.int) -> c.int --- // List View control, returns selected list item index
GuiListView :: proc(bounds: Rectangle, text: cstring, scrollIndex: ^c.int, active: ^c.int) -> c.int --- // List View control, returns selected list item index GuiListViewEx :: proc(bounds: Rectangle, text:[^]cstring, count: c.int, scrollIndex: ^c.int, active: ^c.int, focus: ^c.int) -> c.int --- // List View with extended parameters
GuiListViewEx :: proc(bounds: Rectangle, text:[^]cstring, count: c.int, scrollIndex: ^c.int, active: ^c.int, focus: ^c.int) -> c.int --- // List View with extended parameters GuiMessageBox :: proc(bounds: Rectangle, title: cstring, message: cstring, buttons: cstring) -> c.int --- // Message Box control, displays a message
GuiMessageBox :: proc(bounds: Rectangle, title: cstring, message: cstring, buttons: cstring) -> c.int --- // Message Box control, displays a message GuiTextInputBox :: proc(bounds: Rectangle, title: cstring, message: cstring, buttons: cstring, text: cstring, textMaxSize: c.int, secretViewActive: ^bool) -> c.int --- // Text Input Box control, ask for text, supports secret
GuiTextInputBox :: proc(bounds: Rectangle, title: cstring, message: cstring, buttons: cstring, text: cstring, textMaxSize: c.int, secretViewActive: ^bool) -> c.int --- // Text Input Box control, ask for text, supports secret GuiColorPicker :: proc(bounds: Rectangle, text: cstring, color: ^Color) -> c.int --- // Color Picker control (multiple color controls)
GuiColorPicker :: proc(bounds: Rectangle, text: cstring, color: ^Color) -> c.int --- // Color Picker control (multiple color controls) GuiColorPanel :: proc(bounds: Rectangle, text: cstring, color: ^Color) -> c.int --- // Color Panel control
GuiColorPanel :: proc(bounds: Rectangle, text: cstring, color: ^Color) -> c.int --- // Color Panel control GuiColorBarAlpha :: proc(bounds: Rectangle, text: cstring, alpha: ^f32) -> c.int --- // Color Bar Alpha control
GuiColorBarAlpha :: proc(bounds: Rectangle, text: cstring, alpha: ^f32) -> c.int --- // Color Bar Alpha control GuiColorBarHue :: proc(bounds: Rectangle, text: cstring, value: ^f32) -> c.int --- // Color Bar Hue control
GuiColorBarHue :: proc(bounds: Rectangle, text: cstring, value: ^f32) -> c.int --- // Color Bar Hue control GuiColorPickerHSV :: proc(bounds: Rectangle, text: cstring, colorHsv: ^Vector3) -> c.int --- // Color Picker control that avoids conversion to RGB on each call (multiple color controls)
GuiColorPickerHSV :: proc(bounds: Rectangle, text: cstring, colorHsv: ^Vector3) -> c.int --- // Color Picker control that avoids conversion to RGB on each call (multiple color controls) GuiColorPanelHSV :: proc(bounds: Rectangle, text: cstring, colorHsv: ^Vector3) -> c.int --- // Color Panel control that returns HSV color value, used by GuiColorPickerHSV()
GuiColorPanelHSV :: proc(bounds: Rectangle, text: cstring, colorHsv: ^Vector3) -> c.int --- // Color Panel control that returns HSV color value, used by GuiColorPickerHSV() //----------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------
} }
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Icons enumeration // Icons enumeration
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
GuiIconName :: enum c.int { GuiIconName :: enum c.int {
ICON_NONE = 0, ICON_NONE = 0,
ICON_FOLDER_FILE_OPEN = 1, ICON_FOLDER_FILE_OPEN = 1,
ICON_FILE_SAVE_CLASSIC = 2, ICON_FILE_SAVE_CLASSIC = 2,
ICON_FOLDER_OPEN = 3, ICON_FOLDER_OPEN = 3,
ICON_FOLDER_SAVE = 4, ICON_FOLDER_SAVE = 4,
ICON_FILE_OPEN = 5, ICON_FILE_OPEN = 5,
ICON_FILE_SAVE = 6, ICON_FILE_SAVE = 6,
ICON_FILE_EXPORT = 7, ICON_FILE_EXPORT = 7,
ICON_FILE_ADD = 8, ICON_FILE_ADD = 8,
ICON_FILE_DELETE = 9, ICON_FILE_DELETE = 9,
ICON_FILETYPE_TEXT = 10, ICON_FILETYPE_TEXT = 10,
ICON_FILETYPE_AUDIO = 11, ICON_FILETYPE_AUDIO = 11,
ICON_FILETYPE_IMAGE = 12, ICON_FILETYPE_IMAGE = 12,
ICON_FILETYPE_PLAY = 13, ICON_FILETYPE_PLAY = 13,
ICON_FILETYPE_VIDEO = 14, ICON_FILETYPE_VIDEO = 14,
ICON_FILETYPE_INFO = 15, ICON_FILETYPE_INFO = 15,
ICON_FILE_COPY = 16, ICON_FILE_COPY = 16,
ICON_FILE_CUT = 17, ICON_FILE_CUT = 17,
ICON_FILE_PASTE = 18, ICON_FILE_PASTE = 18,
ICON_CURSOR_HAND = 19, ICON_CURSOR_HAND = 19,
ICON_CURSOR_POINTER = 20, ICON_CURSOR_POINTER = 20,
ICON_CURSOR_CLASSIC = 21, ICON_CURSOR_CLASSIC = 21,
ICON_PENCIL = 22, ICON_PENCIL = 22,
ICON_PENCIL_BIG = 23, ICON_PENCIL_BIG = 23,
ICON_BRUSH_CLASSIC = 24, ICON_BRUSH_CLASSIC = 24,
ICON_BRUSH_PAINTER = 25, ICON_BRUSH_PAINTER = 25,
ICON_WATER_DROP = 26, ICON_WATER_DROP = 26,
ICON_COLOR_PICKER = 27, ICON_COLOR_PICKER = 27,
ICON_RUBBER = 28, ICON_RUBBER = 28,
ICON_COLOR_BUCKET = 29, ICON_COLOR_BUCKET = 29,
ICON_TEXT_T = 30, ICON_TEXT_T = 30,
ICON_TEXT_A = 31, ICON_TEXT_A = 31,
ICON_SCALE = 32, ICON_SCALE = 32,
ICON_RESIZE = 33, ICON_RESIZE = 33,
ICON_FILTER_POINT = 34, ICON_FILTER_POINT = 34,
ICON_FILTER_BILINEAR = 35, ICON_FILTER_BILINEAR = 35,
ICON_CROP = 36, ICON_CROP = 36,
ICON_CROP_ALPHA = 37, ICON_CROP_ALPHA = 37,
ICON_SQUARE_TOGGLE = 38, ICON_SQUARE_TOGGLE = 38,
ICON_SYMMETRY = 39, ICON_SYMMETRY = 39,
ICON_SYMMETRY_HORIZONTAL = 40, ICON_SYMMETRY_HORIZONTAL = 40,
ICON_SYMMETRY_VERTICAL = 41, ICON_SYMMETRY_VERTICAL = 41,
ICON_LENS = 42, ICON_LENS = 42,
ICON_LENS_BIG = 43, ICON_LENS_BIG = 43,
ICON_EYE_ON = 44, ICON_EYE_ON = 44,
ICON_EYE_OFF = 45, ICON_EYE_OFF = 45,
ICON_FILTER_TOP = 46, ICON_FILTER_TOP = 46,
ICON_FILTER = 47, ICON_FILTER = 47,
ICON_TARGET_POINT = 48, ICON_TARGET_POINT = 48,
ICON_TARGET_SMALL = 49, ICON_TARGET_SMALL = 49,
ICON_TARGET_BIG = 50, ICON_TARGET_BIG = 50,
ICON_TARGET_MOVE = 51, ICON_TARGET_MOVE = 51,
ICON_CURSOR_MOVE = 52, ICON_CURSOR_MOVE = 52,
ICON_CURSOR_SCALE = 53, ICON_CURSOR_SCALE = 53,
ICON_CURSOR_SCALE_RIGHT = 54, ICON_CURSOR_SCALE_RIGHT = 54,
ICON_CURSOR_SCALE_LEFT = 55, ICON_CURSOR_SCALE_LEFT = 55,
ICON_UNDO = 56, ICON_UNDO = 56,
ICON_REDO = 57, ICON_REDO = 57,
ICON_REREDO = 58, ICON_REREDO = 58,
ICON_MUTATE = 59, ICON_MUTATE = 59,
ICON_ROTATE = 60, ICON_ROTATE = 60,
ICON_REPEAT = 61, ICON_REPEAT = 61,
ICON_SHUFFLE = 62, ICON_SHUFFLE = 62,
ICON_EMPTYBOX = 63, ICON_EMPTYBOX = 63,
ICON_TARGET = 64, ICON_TARGET = 64,
ICON_TARGET_SMALL_FILL = 65, ICON_TARGET_SMALL_FILL = 65,
ICON_TARGET_BIG_FILL = 66, ICON_TARGET_BIG_FILL = 66,
ICON_TARGET_MOVE_FILL = 67, ICON_TARGET_MOVE_FILL = 67,
ICON_CURSOR_MOVE_FILL = 68, ICON_CURSOR_MOVE_FILL = 68,
ICON_CURSOR_SCALE_FILL = 69, ICON_CURSOR_SCALE_FILL = 69,
ICON_CURSOR_SCALE_RIGHT_FILL = 70, ICON_CURSOR_SCALE_RIGHT_FILL = 70,
ICON_CURSOR_SCALE_LEFT_FILL = 71, ICON_CURSOR_SCALE_LEFT_FILL = 71,
ICON_UNDO_FILL = 72, ICON_UNDO_FILL = 72,
ICON_REDO_FILL = 73, ICON_REDO_FILL = 73,
ICON_REREDO_FILL = 74, ICON_REREDO_FILL = 74,
ICON_MUTATE_FILL = 75, ICON_MUTATE_FILL = 75,
ICON_ROTATE_FILL = 76, ICON_ROTATE_FILL = 76,
ICON_REPEAT_FILL = 77, ICON_REPEAT_FILL = 77,
ICON_SHUFFLE_FILL = 78, ICON_SHUFFLE_FILL = 78,
ICON_EMPTYBOX_SMALL = 79, ICON_EMPTYBOX_SMALL = 79,
ICON_BOX = 80, ICON_BOX = 80,
ICON_BOX_TOP = 81, ICON_BOX_TOP = 81,
ICON_BOX_TOP_RIGHT = 82, ICON_BOX_TOP_RIGHT = 82,
ICON_BOX_RIGHT = 83, ICON_BOX_RIGHT = 83,
ICON_BOX_BOTTOM_RIGHT = 84, ICON_BOX_BOTTOM_RIGHT = 84,
ICON_BOX_BOTTOM = 85, ICON_BOX_BOTTOM = 85,
ICON_BOX_BOTTOM_LEFT = 86, ICON_BOX_BOTTOM_LEFT = 86,
ICON_BOX_LEFT = 87, ICON_BOX_LEFT = 87,
ICON_BOX_TOP_LEFT = 88, ICON_BOX_TOP_LEFT = 88,
ICON_BOX_CENTER = 89, ICON_BOX_CENTER = 89,
ICON_BOX_CIRCLE_MASK = 90, ICON_BOX_CIRCLE_MASK = 90,
ICON_POT = 91, ICON_POT = 91,
ICON_ALPHA_MULTIPLY = 92, ICON_ALPHA_MULTIPLY = 92,
ICON_ALPHA_CLEAR = 93, ICON_ALPHA_CLEAR = 93,
ICON_DITHERING = 94, ICON_DITHERING = 94,
ICON_MIPMAPS = 95, ICON_MIPMAPS = 95,
ICON_BOX_GRID = 96, ICON_BOX_GRID = 96,
ICON_GRID = 97, ICON_GRID = 97,
ICON_BOX_CORNERS_SMALL = 98, ICON_BOX_CORNERS_SMALL = 98,
ICON_BOX_CORNERS_BIG = 99, ICON_BOX_CORNERS_BIG = 99,
ICON_FOUR_BOXES = 100, ICON_FOUR_BOXES = 100,
ICON_GRID_FILL = 101, ICON_GRID_FILL = 101,
ICON_BOX_MULTISIZE = 102, ICON_BOX_MULTISIZE = 102,
ICON_ZOOM_SMALL = 103, ICON_ZOOM_SMALL = 103,
ICON_ZOOM_MEDIUM = 104, ICON_ZOOM_MEDIUM = 104,
ICON_ZOOM_BIG = 105, ICON_ZOOM_BIG = 105,
ICON_ZOOM_ALL = 106, ICON_ZOOM_ALL = 106,
ICON_ZOOM_CENTER = 107, ICON_ZOOM_CENTER = 107,
ICON_BOX_DOTS_SMALL = 108, ICON_BOX_DOTS_SMALL = 108,
ICON_BOX_DOTS_BIG = 109, ICON_BOX_DOTS_BIG = 109,
ICON_BOX_CONCENTRIC = 110, ICON_BOX_CONCENTRIC = 110,
ICON_BOX_GRID_BIG = 111, ICON_BOX_GRID_BIG = 111,
ICON_OK_TICK = 112, ICON_OK_TICK = 112,
ICON_CROSS = 113, ICON_CROSS = 113,
ICON_ARROW_LEFT = 114, ICON_ARROW_LEFT = 114,
ICON_ARROW_RIGHT = 115, ICON_ARROW_RIGHT = 115,
ICON_ARROW_DOWN = 116, ICON_ARROW_DOWN = 116,
ICON_ARROW_UP = 117, ICON_ARROW_UP = 117,
ICON_ARROW_LEFT_FILL = 118, ICON_ARROW_LEFT_FILL = 118,
ICON_ARROW_RIGHT_FILL = 119, ICON_ARROW_RIGHT_FILL = 119,
ICON_ARROW_DOWN_FILL = 120, ICON_ARROW_DOWN_FILL = 120,
ICON_ARROW_UP_FILL = 121, ICON_ARROW_UP_FILL = 121,
ICON_AUDIO = 122, ICON_AUDIO = 122,
ICON_FX = 123, ICON_FX = 123,
ICON_WAVE = 124, ICON_WAVE = 124,
ICON_WAVE_SINUS = 125, ICON_WAVE_SINUS = 125,
ICON_WAVE_SQUARE = 126, ICON_WAVE_SQUARE = 126,
ICON_WAVE_TRIANGULAR = 127, ICON_WAVE_TRIANGULAR = 127,
ICON_CROSS_SMALL = 128, ICON_CROSS_SMALL = 128,
ICON_PLAYER_PREVIOUS = 129, ICON_PLAYER_PREVIOUS = 129,
ICON_PLAYER_PLAY_BACK = 130, ICON_PLAYER_PLAY_BACK = 130,
ICON_PLAYER_PLAY = 131, ICON_PLAYER_PLAY = 131,
ICON_PLAYER_PAUSE = 132, ICON_PLAYER_PAUSE = 132,
ICON_PLAYER_STOP = 133, ICON_PLAYER_STOP = 133,
ICON_PLAYER_NEXT = 134, ICON_PLAYER_NEXT = 134,
ICON_PLAYER_RECORD = 135, ICON_PLAYER_RECORD = 135,
ICON_MAGNET = 136, ICON_MAGNET = 136,
ICON_LOCK_CLOSE = 137, ICON_LOCK_CLOSE = 137,
ICON_LOCK_OPEN = 138, ICON_LOCK_OPEN = 138,
ICON_CLOCK = 139, ICON_CLOCK = 139,
ICON_TOOLS = 140, ICON_TOOLS = 140,
ICON_GEAR = 141, ICON_GEAR = 141,
ICON_GEAR_BIG = 142, ICON_GEAR_BIG = 142,
ICON_BIN = 143, ICON_BIN = 143,
ICON_HAND_POINTER = 144, ICON_HAND_POINTER = 144,
ICON_LASER = 145, ICON_LASER = 145,
ICON_COIN = 146, ICON_COIN = 146,
ICON_EXPLOSION = 147, ICON_EXPLOSION = 147,
ICON_1UP = 148, ICON_1UP = 148,
ICON_PLAYER = 149, ICON_PLAYER = 149,
ICON_PLAYER_JUMP = 150, ICON_PLAYER_JUMP = 150,
ICON_KEY = 151, ICON_KEY = 151,
ICON_DEMON = 152, ICON_DEMON = 152,
ICON_TEXT_POPUP = 153, ICON_TEXT_POPUP = 153,
ICON_GEAR_EX = 154, ICON_GEAR_EX = 154,
ICON_CRACK = 155, ICON_CRACK = 155,
ICON_CRACK_POINTS = 156, ICON_CRACK_POINTS = 156,
ICON_STAR = 157, ICON_STAR = 157,
ICON_DOOR = 158, ICON_DOOR = 158,
ICON_EXIT = 159, ICON_EXIT = 159,
ICON_MODE_2D = 160, ICON_MODE_2D = 160,
ICON_MODE_3D = 161, ICON_MODE_3D = 161,
ICON_CUBE = 162, ICON_CUBE = 162,
ICON_CUBE_FACE_TOP = 163, ICON_CUBE_FACE_TOP = 163,
ICON_CUBE_FACE_LEFT = 164, ICON_CUBE_FACE_LEFT = 164,
ICON_CUBE_FACE_FRONT = 165, ICON_CUBE_FACE_FRONT = 165,
ICON_CUBE_FACE_BOTTOM = 166, ICON_CUBE_FACE_BOTTOM = 166,
ICON_CUBE_FACE_RIGHT = 167, ICON_CUBE_FACE_RIGHT = 167,
ICON_CUBE_FACE_BACK = 168, ICON_CUBE_FACE_BACK = 168,
ICON_CAMERA = 169, ICON_CAMERA = 169,
ICON_SPECIAL = 170, ICON_SPECIAL = 170,
ICON_LINK_NET = 171, ICON_LINK_NET = 171,
ICON_LINK_BOXES = 172, ICON_LINK_BOXES = 172,
ICON_LINK_MULTI = 173, ICON_LINK_MULTI = 173,
ICON_LINK = 174, ICON_LINK = 174,
ICON_LINK_BROKE = 175, ICON_LINK_BROKE = 175,
ICON_TEXT_NOTES = 176, ICON_TEXT_NOTES = 176,
ICON_NOTEBOOK = 177, ICON_NOTEBOOK = 177,
ICON_SUITCASE = 178, ICON_SUITCASE = 178,
ICON_SUITCASE_ZIP = 179, ICON_SUITCASE_ZIP = 179,
ICON_MAILBOX = 180, ICON_MAILBOX = 180,
ICON_MONITOR = 181, ICON_MONITOR = 181,
ICON_PRINTER = 182, ICON_PRINTER = 182,
ICON_PHOTO_CAMERA = 183, ICON_PHOTO_CAMERA = 183,
ICON_PHOTO_CAMERA_FLASH = 184, ICON_PHOTO_CAMERA_FLASH = 184,
ICON_HOUSE = 185, ICON_HOUSE = 185,
ICON_HEART = 186, ICON_HEART = 186,
ICON_CORNER = 187, ICON_CORNER = 187,
ICON_VERTICAL_BARS = 188, ICON_VERTICAL_BARS = 188,
ICON_VERTICAL_BARS_FILL = 189, ICON_VERTICAL_BARS_FILL = 189,
ICON_LIFE_BARS = 190, ICON_LIFE_BARS = 190,
ICON_INFO = 191, ICON_INFO = 191,
ICON_CROSSLINE = 192, ICON_CROSSLINE = 192,
ICON_HELP = 193, ICON_HELP = 193,
ICON_FILETYPE_ALPHA = 194, ICON_FILETYPE_ALPHA = 194,
ICON_FILETYPE_HOME = 195, ICON_FILETYPE_HOME = 195,
ICON_LAYERS_VISIBLE = 196, ICON_LAYERS_VISIBLE = 196,
ICON_LAYERS = 197, ICON_LAYERS = 197,
ICON_WINDOW = 198, ICON_WINDOW = 198,
ICON_HIDPI = 199, ICON_HIDPI = 199,
ICON_FILETYPE_BINARY = 200, ICON_FILETYPE_BINARY = 200,
ICON_HEX = 201, ICON_HEX = 201,
ICON_SHIELD = 202, ICON_SHIELD = 202,
ICON_FILE_NEW = 203, ICON_FILE_NEW = 203,
ICON_FOLDER_ADD = 204, ICON_FOLDER_ADD = 204,
ICON_ALARM = 205, ICON_ALARM = 205,
ICON_CPU = 206, ICON_CPU = 206,
ICON_ROM = 207, ICON_ROM = 207,
ICON_STEP_OVER = 208, ICON_STEP_OVER = 208,
ICON_STEP_INTO = 209, ICON_STEP_INTO = 209,
ICON_STEP_OUT = 210, ICON_STEP_OUT = 210,
ICON_RESTART = 211, ICON_RESTART = 211,
ICON_BREAKPOINT_ON = 212, ICON_BREAKPOINT_ON = 212,
ICON_BREAKPOINT_OFF = 213, ICON_BREAKPOINT_OFF = 213,
ICON_BURGER_MENU = 214, ICON_BURGER_MENU = 214,
ICON_CASE_SENSITIVE = 215, ICON_CASE_SENSITIVE = 215,
ICON_REG_EXP = 216, ICON_REG_EXP = 216,
ICON_FOLDER = 217, ICON_FOLDER = 217,
ICON_FILE = 218, ICON_FILE = 218,
ICON_SAND_TIMER = 219, ICON_SAND_TIMER = 219,
ICON_220 = 220, ICON_220 = 220,
ICON_221 = 221, ICON_221 = 221,
ICON_222 = 222, ICON_222 = 222,
ICON_223 = 223, ICON_223 = 223,
ICON_224 = 224, ICON_224 = 224,
ICON_225 = 225, ICON_225 = 225,
ICON_226 = 226, ICON_226 = 226,
ICON_227 = 227, ICON_227 = 227,
ICON_228 = 228, ICON_228 = 228,
ICON_229 = 229, ICON_229 = 229,
ICON_230 = 230, ICON_230 = 230,
ICON_231 = 231, ICON_231 = 231,
ICON_232 = 232, ICON_232 = 232,
ICON_233 = 233, ICON_233 = 233,
ICON_234 = 234, ICON_234 = 234,
ICON_235 = 235, ICON_235 = 235,
ICON_236 = 236, ICON_236 = 236,
ICON_237 = 237, ICON_237 = 237,
ICON_238 = 238, ICON_238 = 238,
ICON_239 = 239, ICON_239 = 239,
ICON_240 = 240, ICON_240 = 240,
ICON_241 = 241, ICON_241 = 241,
ICON_242 = 242, ICON_242 = 242,
ICON_243 = 243, ICON_243 = 243,
ICON_244 = 244, ICON_244 = 244,
ICON_245 = 245, ICON_245 = 245,
ICON_246 = 246, ICON_246 = 246,
ICON_247 = 247, ICON_247 = 247,
ICON_248 = 248, ICON_248 = 248,
ICON_249 = 249, ICON_249 = 249,
ICON_250 = 250, ICON_250 = 250,
ICON_251 = 251, ICON_251 = 251,
ICON_252 = 252, ICON_252 = 252,
ICON_253 = 253, ICON_253 = 253,
ICON_254 = 254, ICON_254 = 254,
ICON_255 = 255, ICON_255 = 255,
} }