Classes | Macros | Typedefs | Enumerations | Functions
rhino/demo/c/dr_libs/old/dr_gui.h File Reference
#include "dr_2d.h"
#include <stdbool.h>
Include dependency graph for rhino/demo/c/dr_libs/old/dr_gui.h:

Go to the source code of this file.

Classes

struct  drgui_color
 Structure representing an RGBA color. Color components are specified in the range of 0 - 255. More...
 
struct  drgui_context
 
struct  drgui_draw_image_args
 
struct  drgui_element
 
struct  drgui_font
 
struct  drgui_font_metrics
 Font metrics. More...
 
struct  drgui_glyph_metrics
 Glyph metrics. More...
 
struct  drgui_image
 
struct  drgui_painting_callbacks
 Structure containing callbacks for painting routines. More...
 
struct  drgui_rect
 Structure representing a rectangle. More...
 
struct  drgui_text_run
 

Macros

#define DRGUI_ARROW_DOWN   0x8fe
 
#define DRGUI_ARROW_LEFT   0x8fb
 
#define DRGUI_ARROW_RIGHT   0x8fd
 
#define DRGUI_ARROW_UP   0x8fc
 
#define DRGUI_BACKSPACE   0xff08
 
#define DRGUI_DELETE   0xffff
 
#define DRGUI_END   0xff57
 
#define DRGUI_ESCAPE   0xff1b
 
#define DRGUI_F1   0xffbe
 
#define DRGUI_F10   0xffc7
 
#define DRGUI_F11   0xffc8
 
#define DRGUI_F12   0xffc9
 
#define DRGUI_F2   0xffbf
 
#define DRGUI_F3   0xffc0
 
#define DRGUI_F4   0xffc1
 
#define DRGUI_F5   0xffc2
 
#define DRGUI_F6   0xffc3
 
#define DRGUI_F7   0xffc4
 
#define DRGUI_F8   0xffc5
 
#define DRGUI_F9   0xffc6
 
#define DRGUI_FONT_NO_CLEARTYPE   (1 << 0)
 
#define DRGUI_HOME   0xff50
 
#define DRGUI_IMAGE_ALIGN_CENTER   (1 << 4)
 
#define DRGUI_IMAGE_CLIP_BOUNDS   (1 << 3)
 
#define DRGUI_IMAGE_DRAW_BACKGROUND   (1 << 0)
 
#define DRGUI_IMAGE_DRAW_BOUNDS   (1 << 2)
 
#define DRGUI_IMAGE_HINT_NO_ALPHA   (1 << 1)
 
#define DRGUI_KEY_STATE_ALT_DOWN   (1 << 7)
 
#define DRGUI_KEY_STATE_AUTO_REPEATED   (1 << 31)
 
#define DRGUI_KEY_STATE_CTRL_DOWN   (1 << 6)
 
#define DRGUI_KEY_STATE_SHIFT_DOWN   (1 << 5)
 
#define DRGUI_MAX_FONT_FAMILY_LENGTH   128
 
#define DRGUI_MAX_TAB_TEXT_LENGTH   256
 
#define DRGUI_MOUSE_BUTTON_4_DOWN   (1 << 3)
 
#define DRGUI_MOUSE_BUTTON_5_DOWN   (1 << 4)
 
#define DRGUI_MOUSE_BUTTON_LEFT   1
 
#define DRGUI_MOUSE_BUTTON_LEFT_DOWN   (1 << 0)
 
#define DRGUI_MOUSE_BUTTON_MIDDLE   3
 
#define DRGUI_MOUSE_BUTTON_MIDDLE_DOWN   (1 << 2)
 
#define DRGUI_MOUSE_BUTTON_RIGHT   2
 
#define DRGUI_MOUSE_BUTTON_RIGHT_DOWN   (1 << 1)
 
#define DRGUI_PAGE_DOWN   0xff56
 
#define DRGUI_PAGE_UP   0xff55
 
#define DRGUI_READ   (1 << 0)
 
#define drgui_scrollbar_h
 
#define DRGUI_SHIFT   0xff10
 
#define drgui_tab_bar_h
 
#define drgui_text_engine_h
 
#define drgui_textbox_h
 
#define drgui_tree_view_h
 
#define DRGUI_WRITE   (1 << 1)
 
#define EG_MAX_TREE_VIEW_ITEM_TEXT_LENGTH   256
 

Typedefs

typedef unsigned char drgui_byte
 
typedef void(* drgui_callback) ()
 
typedef struct drgui_color drgui_color
 
typedef struct drgui_context drgui_context
 
typedef drgui_resource(* drgui_create_font_proc) (void *pPaintingContext, const char *family, unsigned int size, drgui_font_weight weight, drgui_font_slant slant, float rotation, unsigned int flags)
 
typedef drgui_resource(* drgui_create_image_proc) (void *pPaintingContext, unsigned int width, unsigned int height, drgui_image_format format, unsigned int stride, const void *pImageData)
 
typedef void(* drgui_delete_font_proc) (drgui_resource font)
 
typedef void(* drgui_delete_image_proc) (drgui_resource image)
 
typedef void(* drgui_draw_begin_proc) (void *pPaintData)
 
typedef void(* drgui_draw_end_proc) (void *pPaintData)
 
typedef void(* drgui_draw_image_proc) (drgui_resource image, drgui_draw_image_args *pArgs, void *pPaintData)
 
typedef void(* drgui_draw_line_proc) (float startX, float startY, float endX, float endY, float width, drgui_color color, void *pPaintData)
 
typedef void(* drgui_draw_rect_outline_proc) (drgui_rect relativeRect, drgui_color color, float outlineWidth, void *pPaintData)
 
typedef void(* drgui_draw_rect_proc) (drgui_rect relativeRect, drgui_color color, void *pPaintData)
 
typedef void(* drgui_draw_rect_with_outline_proc) (drgui_rect relativeRect, drgui_color color, float outlineWidth, drgui_color outlineColor, void *pPaintData)
 
typedef void(* drgui_draw_round_rect_outline_proc) (drgui_rect relativeRect, drgui_color color, float radius, float outlineWidth, void *pPaintData)
 
typedef void(* drgui_draw_round_rect_proc) (drgui_rect relativeRect, drgui_color color, float radius, void *pPaintData)
 
typedef void(* drgui_draw_round_rect_with_outline_proc) (drgui_rect relativeRect, drgui_color color, float radius, float outlineWidth, drgui_color outlineColor, void *pPaintData)
 
typedef void(* drgui_draw_text_proc) (drgui_resource font, const char *text, int textLengthInBytes, float posX, float posY, drgui_color color, drgui_color backgroundColor, void *pPaintData)
 
typedef struct drgui_element drgui_element
 
typedef struct drgui_font drgui_font
 
typedef struct drgui_font_metrics drgui_font_metrics
 
typedef void(* drgui_get_clip_proc) (drgui_rect *pRectOut, void *pPaintData)
 
typedef bool(* drgui_get_font_metrics_proc) (drgui_resource font, drgui_font_metrics *pMetricsOut)
 
typedef unsigned int(* drgui_get_font_size_proc) (drgui_resource font)
 
typedef bool(* drgui_get_glyph_metrics_proc) (drgui_resource font, unsigned int utf32, drgui_glyph_metrics *pMetricsOut)
 
typedef void(* drgui_get_image_size_proc) (drgui_resource image, unsigned int *pWidthOut, unsigned int *pHeightOut)
 
typedef drgui_image_format(* drgui_get_optimal_image_format_proc) (void *pPaintingContext)
 
typedef bool(* drgui_get_text_cursor_position_from_char_proc) (drgui_resource font, const char *text, size_t characterIndex, float *pTextCursorPosXOut)
 
typedef bool(* drgui_get_text_cursor_position_from_point_proc) (drgui_resource font, const char *text, size_t textSizeInBytes, float maxWidth, float inputPosX, float *pTextCursorPosXOut, size_t *pCharacterIndexOut)
 
typedef struct drgui_glyph_metrics drgui_glyph_metrics
 
typedef struct drgui_image drgui_image
 
typedef unsigned int drgui_key
 
typedef void *(* drgui_map_image_data_proc) (drgui_resource image, unsigned int accessFlags)
 
typedef bool(* drgui_measure_string_proc) (drgui_resource font, const char *text, size_t textSizeInBytes, float *pWidthOut, float *pHeightOut)
 
typedef void(* drgui_on_capture_keyboard_proc) (drgui_element *pElement, drgui_element *pPrevCapturedElement)
 
typedef void(* drgui_on_capture_mouse_proc) (drgui_element *pElement)
 
typedef void(* drgui_on_change_cursor_proc) (drgui_element *pElement, drgui_cursor_type cursor)
 
typedef void(* drgui_on_delete_element_proc) (drgui_element *pElement)
 
typedef void(* drgui_on_dirty_proc) (drgui_element *pElement, drgui_rect relativeRect)
 
typedef bool(* drgui_on_hittest_proc) (drgui_element *pElement, float relativePosX, float relativePosY)
 
typedef void(* drgui_on_key_down_proc) (drgui_element *pElement, drgui_key key, int stateFlags)
 
typedef void(* drgui_on_key_up_proc) (drgui_element *pElement, drgui_key key, int stateFlags)
 
typedef void(* drgui_on_log) (drgui_context *pContext, const char *message)
 
typedef void(* drgui_on_mouse_button_dblclick_proc) (drgui_element *pElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 
typedef void(* drgui_on_mouse_button_down_proc) (drgui_element *pElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 
typedef void(* drgui_on_mouse_button_up_proc) (drgui_element *pElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 
typedef void(* drgui_on_mouse_enter_proc) (drgui_element *pElement)
 
typedef void(* drgui_on_mouse_leave_proc) (drgui_element *pElement)
 
typedef void(* drgui_on_mouse_move_proc) (drgui_element *pElement, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 
typedef void(* drgui_on_mouse_wheel_proc) (drgui_element *pElement, int delta, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 
typedef void(* drgui_on_move_proc) (drgui_element *pElement, float newRelativePosX, float newRelativePosY)
 
typedef void(* drgui_on_paint_proc) (drgui_element *pElement, drgui_rect relativeRect, void *pPaintData)
 
typedef void(* drgui_on_printable_key_down_proc) (drgui_element *pElement, unsigned int character, int stateFlags)
 
typedef void(* drgui_on_release_keyboard_proc) (drgui_element *pElement, drgui_element *pNewCapturedElement)
 
typedef void(* drgui_on_release_mouse_proc) (drgui_element *pElement)
 
typedef void(* drgui_on_size_proc) (drgui_element *pElement, float newWidth, float newHeight)
 
typedef struct drgui_painting_callbacks drgui_painting_callbacks
 
typedef struct drgui_rect drgui_rect
 
typedef void * drgui_resource
 
typedef void(* drgui_sb_on_scroll_proc) (drgui_element *pSBElement, int scrollPos)
 
typedef void(* drgui_set_clip_proc) (drgui_rect relativeRect, void *pPaintData)
 
typedef struct drgui_tab drgui_tab
 
typedef void(* drgui_tabbar_on_measure_tab_proc) (drgui_element *pTBElement, drgui_tab *pTab, float *pWidthOut, float *pHeightOut)
 
typedef void(* drgui_tabbar_on_paint_tab_proc) (drgui_element *pTBElement, drgui_tab *pTab, drgui_rect relativeClippingRect, float offsetX, float offsetY, float width, float height, void *pPaintData)
 
typedef void(* drgui_tabbar_on_tab_activated_proc) (drgui_element *pTBElement, drgui_tab *pTab, drgui_tab *pOldActiveTab)
 
typedef void(* drgui_tabbar_on_tab_close_proc) (drgui_element *pTBElement, drgui_tab *pTab)
 
typedef void(* drgui_tabbar_on_tab_deactivated_proc) (drgui_element *pTBElement, drgui_tab *pTab, drgui_tab *pNewActiveTab)
 
typedef void(* drgui_tabbar_on_tab_mouse_button_up_proc) (drgui_element *pTBElement, drgui_tab *pTab, int mouseButton, int mouseRelativePosX, int mouseRelativePosY, int stateFlags)
 
typedef struct drgui_text_engine drgui_text_engine
 
typedef void(* drgui_text_engine_on_cursor_move_proc) (drgui_text_engine *pTL)
 
typedef void(* drgui_text_engine_on_dirty_proc) (drgui_text_engine *pTL, drgui_rect rect)
 
typedef void(* drgui_text_engine_on_paint_rect_proc) (drgui_text_engine *pTL, drgui_rect rect, drgui_color color, drgui_element *pElement, void *pPaintData)
 
typedef void(* drgui_text_engine_on_paint_text_proc) (drgui_text_engine *pTL, drgui_text_run *pRun, drgui_element *pElement, void *pPaintData)
 
typedef void(* drgui_text_engine_on_text_changed_proc) (drgui_text_engine *pTL)
 
typedef void(* drgui_text_engine_on_undo_point_changed_proc) (drgui_text_engine *pTL, unsigned int iUndoPoint)
 
typedef void(* drgui_textbox_on_cursor_move_proc) (drgui_element *pTBElement)
 
typedef void(* drgui_textbox_on_undo_point_changed_proc) (drgui_element *pTBElement, unsigned int iUndoPoint)
 
typedef struct drgui_tree_view_item drgui_tree_view_item
 
typedef void(* drgui_tvi_measure_proc) (drgui_tree_view_item *pItem, float *pWidthOut, float *pHeightOut)
 
typedef void(* drgui_tvi_on_mouse_leave_proc) (drgui_tree_view_item *pItem)
 
typedef void(* drgui_tvi_on_mouse_move_proc) (drgui_tree_view_item *pItem, int relativeMousePosX, int relativeMousePosY, bool *pIsOverArrow)
 
typedef void(* drgui_tvi_on_paint_proc) (drgui_element *pTVElement, drgui_tree_view_item *pItem, drgui_rect relativeClippingRect, drgui_color backgroundColor, float offsetX, float offsetY, float width, float height, void *pPaintData)
 
typedef void(* drgui_tvi_on_picked_proc) (drgui_tree_view_item *pItem)
 
typedef void(* drgui_unmap_image_data_proc) (drgui_resource image)
 
typedef bool(* drgui_visible_iteration_proc) (drgui_element *pElement, drgui_rect *pRelativeRect, void *pUserData)
 

Enumerations

enum  drgui_cursor_type {
  drgui_cursor_none, drgui_cursor_default, drgui_cursor_arrow = drgui_cursor_default, drgui_cursor_text,
  drgui_cursor_cross, drgui_cursor_size_ns, drgui_cursor_size_we, drgui_cursor_size_nesw,
  drgui_cursor_size_nwse, drgui_cursor_none, drgui_cursor_default, drgui_cursor_arrow = drgui_cursor_default,
  drgui_cursor_text, drgui_cursor_cross, drgui_cursor_size_ns, drgui_cursor_size_we,
  drgui_cursor_size_nesw, drgui_cursor_size_nwse
}
 Common system cursors. More...
 
enum  drgui_font_slant {
  drgui_font_slant_none, drgui_font_slant_italic, drgui_font_slant_oblique, drgui_font_slant_none,
  drgui_font_slant_italic, drgui_font_slant_oblique
}
 Font slants. More...
 
enum  drgui_font_weight {
  drgui_font_weight_medium, drgui_font_weight_thin, drgui_font_weight_extra_light, drgui_font_weight_light,
  drgui_font_weight_semi_light, drgui_font_weight_book, drgui_font_weight_semi_bold, drgui_font_weight_bold,
  drgui_font_weight_extra_bold, drgui_font_weight_heavy, drgui_font_weight_extra_heavy, drgui_font_weight_normal = drgui_font_weight_medium,
  drgui_font_weight_default = drgui_font_weight_medium, drgui_font_weight_medium, drgui_font_weight_thin, drgui_font_weight_extra_light,
  drgui_font_weight_light, drgui_font_weight_semi_light, drgui_font_weight_book, drgui_font_weight_semi_bold,
  drgui_font_weight_bold, drgui_font_weight_extra_bold, drgui_font_weight_heavy, drgui_font_weight_extra_heavy,
  drgui_font_weight_normal = drgui_font_weight_medium, drgui_font_weight_default = drgui_font_weight_medium
}
 Font weights. More...
 
enum  drgui_image_format {
  drgui_image_format_rgba8, drgui_image_format_bgra8, drgui_image_format_argb8, drgui_image_format_rgba8,
  drgui_image_format_bgra8, drgui_image_format_argb8
}
 Image formats. More...
 
enum  drgui_sb_orientation {
  drgui_sb_orientation_none, drgui_sb_orientation_vertical, drgui_sb_orientation_horizontal, drgui_sb_orientation_none,
  drgui_sb_orientation_vertical, drgui_sb_orientation_horizontal
}
 
enum  drgui_tabbar_orientation {
  drgui_tabbar_orientation_top, drgui_tabbar_orientation_bottom, drgui_tabbar_orientation_left, drgui_tabbar_orientation_right,
  drgui_tabbar_orientation_top, drgui_tabbar_orientation_bottom, drgui_tabbar_orientation_left, drgui_tabbar_orientation_right
}
 
enum  drgui_text_engine_alignment {
  drgui_text_engine_alignment_left, drgui_text_engine_alignment_top, drgui_text_engine_alignment_center, drgui_text_engine_alignment_right,
  drgui_text_engine_alignment_bottom, drgui_text_engine_alignment_left, drgui_text_engine_alignment_top, drgui_text_engine_alignment_center,
  drgui_text_engine_alignment_right, drgui_text_engine_alignment_bottom
}
 

Functions

void drgui_append (drgui_element *pChildElement, drgui_element *pParentElement)
 Attaches the given element as a child of the given parent element, and appends it to the end of the children list. More...
 
void drgui_append_sibling (drgui_element *pElementToAppend, drgui_element *pElementToAppendTo)
 Appends the given element to the given sibling. More...
 
drgui_elementdrgui_begin_dirty (drgui_element *pElement)
 
void drgui_capture_keyboard (drgui_element *pElement)
 
void drgui_capture_mouse (drgui_element *pElement)
 
drgui_rect drgui_clamp_rect (drgui_rect rect, drgui_rect other)
 Clamps the given rectangle to another. More...
 
bool drgui_clamp_rect_to_element (const drgui_element *pElement, drgui_rect *pRelativeRect)
 Clamps the given rectangle to the given element and returns whether or not any of it is contained within the element's rectangle. More...
 
drgui_contextdrgui_create_context ()
 Creates a context. More...
 
drgui_contextdrgui_create_context_dr_2d (dr2d_context *pDrawingContext)
 
drgui_elementdrgui_create_element (drgui_context *pContext, drgui_element *pParent, size_t extraDataSize, const void *pExtraData)
 Creates an element. More...
 
drgui_fontdrgui_create_font (drgui_context *pContext, const char *family, unsigned int size, drgui_font_weight weight, drgui_font_slant slant, float rotation, unsigned int flags)
 Creates a font resource. More...
 
drgui_imagedrgui_create_image (drgui_context *pContext, unsigned int width, unsigned int height, drgui_image_format format, unsigned int stride, const void *pData)
 
drgui_elementdrgui_create_scrollbar (drgui_context *pContext, drgui_element *pParent, drgui_sb_orientation orientation, size_t extraDataSize, const void *pExtraData)
 Creates a scrollbar element. More...
 
drgui_elementdrgui_create_tab_bar (drgui_context *pContext, drgui_element *pParent, drgui_tabbar_orientation orientation, size_t extraDataSize, const void *pExtraData)
 Creates a new tab bar control. More...
 
drgui_text_enginedrgui_create_text_engine (drgui_context *pContext, size_t extraDataSize, void *pExtraData)
 Creates a new text engine object. More...
 
drgui_elementdrgui_create_textbox (drgui_context *pContext, drgui_element *pParent, size_t extraDataSize, const void *pExtraData)
 Creates a new text box control. More...
 
drgui_elementdrgui_create_tree_view (drgui_context *pContext, drgui_element *pParent, size_t extraDataSize, const void *pExtraData)
 Creates a tree-view control. More...
 
void drgui_delete_context (drgui_context *pContext)
 Deletes a context and everything that it created. More...
 
void drgui_delete_element (drgui_element *pElement)
 Deletes and element. More...
 
void drgui_delete_font (drgui_font *pFont)
 Deletes a font resource. More...
 
void drgui_delete_image (drgui_image *pImage)
 Deletes the given image. More...
 
void drgui_delete_scrollbar (drgui_element *pSBElement)
 Deletes the given scrollbar element. More...
 
void drgui_delete_tab_bar (drgui_element *pTBElement)
 Deletes the given tab bar control. More...
 
void drgui_delete_text_engine (drgui_text_engine *pTL)
 Deletes the given text engine. More...
 
void drgui_delete_textbox (drgui_element *pTBElement)
 Deletest the given text box control. More...
 
void drgui_delete_tree_view (drgui_element *pTVElement)
 Deletes the given tree-view control. More...
 
void drgui_detach (drgui_element *pChildElement)
 Detaches the given element from it's parent. More...
 
void drgui_dirty (drgui_element *pElement, drgui_rect relativeRect)
 
void drgui_disable_auto_dirty (drgui_context *pContext)
 Disable's automatic dirtying of elements. More...
 
void drgui_disable_clipping (drgui_element *pElement)
 Disables clipping against the parent for the given element. More...
 
void drgui_draw (drgui_element *pElement, drgui_rect relativeRect, void *pPaintData)
 
void drgui_draw_border (drgui_element *pElement, float borderWidth, drgui_color color, void *pUserData)
 Draws a border around the given element. More...
 
void drgui_draw_image (drgui_element *pElement, drgui_image *pImage, drgui_draw_image_args *pArgs, void *pPaintData)
 Draws an image. More...
 
void drgui_draw_rect (drgui_element *pElement, drgui_rect relativeRect, drgui_color color, void *pPaintData)
 Draws a rectangle on the given element. More...
 
void drgui_draw_rect_outline (drgui_element *pElement, drgui_rect relativeRect, drgui_color color, float outlineWidth, void *pPaintData)
 Draws the outline of a rectangle on the given element. More...
 
void drgui_draw_rect_with_outline (drgui_element *pElement, drgui_rect relativeRect, drgui_color color, float outlineWidth, drgui_color outlineColor, void *pPaintData)
 Draws a filled rectangle with an outline on the given element. More...
 
void drgui_draw_round_rect (drgui_element *pElement, drgui_rect relativeRect, drgui_color color, float radius, void *pPaintData)
 Draws a rectangle with rounded corners on the given element. More...
 
void drgui_draw_round_rect_outline (drgui_element *pElement, drgui_rect relativeRect, drgui_color color, float radius, float outlineWidth, void *pPaintData)
 Draws the outline of a rectangle with rounded corners on the given element. More...
 
void drgui_draw_round_rect_with_outline (drgui_element *pElement, drgui_rect relativeRect, drgui_color color, float radius, float outlineWidth, drgui_color outlineColor, void *pPaintData)
 Draws a filled rectangle and it's outline with rounded corners on the given element. More...
 
void drgui_draw_text (drgui_element *pElement, drgui_font *pFont, const char *text, int textLengthInBytes, float posX, float posY, drgui_color color, drgui_color backgroundColor, void *pPaintData)
 
void drgui_enable_auto_dirty (drgui_context *pContext)
 Enable's automatic dirtying of elements. More...
 
void drgui_enable_clipping (drgui_element *pElement)
 Enables clipping against the parent for the given element. More...
 
void drgui_end_dirty (drgui_element *pElement)
 Ends accumulating a dirty rectangle, and requests a redraw from the backend if the counter reaches zero. More...
 
drgui_elementdrgui_find_element_under_point (drgui_element *pTopLevelElement, float absolutePosX, float absolutePosY)
 Finds the element under the given point taking mouse pass-through and hit testing into account. More...
 
drgui_elementdrgui_find_top_level_element (drgui_element *pElement)
 
void drgui_get_absolute_position (const drgui_element *pElement, float *positionXOut, float *positionYOut)
 Retrieves the absolute position of the given element. More...
 
float drgui_get_absolute_position_x (const drgui_element *pElement)
 
float drgui_get_absolute_position_y (const drgui_element *pElement)
 
drgui_rect drgui_get_absolute_rect (const drgui_element *pElement)
 Retrieves the absolute rectangle for the given element. More...
 
void drgui_get_clip (drgui_element *pElement, drgui_rect *pRelativeRect, void *pPaintData)
 Retrieves the current clipping rectangle. More...
 
drgui_cursor_type drgui_get_cursor (drgui_element *pElement)
 Retrieves the cursor to use when the mouse enters the given GUI element. More...
 
drgui_elementdrgui_get_element_with_keyboard_capture (drgui_context *pContext)
 Retrieves a pointer to the element with the keyboard capture. More...
 
drgui_elementdrgui_get_element_with_mouse_capture (drgui_context *pContext)
 Retrieves a pointer to the element with the mouse capture. More...
 
void * drgui_get_extra_data (drgui_element *pElement)
 Retrieves a pointer to the extra data of the given element. More...
 
size_t drgui_get_extra_data_size (drgui_element *pElement)
 Retrieves the size of the extra data of the given element, in bytes. More...
 
bool drgui_get_font_metrics (drgui_font *pFont, drgui_font_metrics *pMetricsOut)
 Retrieves the metrics of the given font. More...
 
bool drgui_get_glyph_metrics (drgui_font *pFont, unsigned int utf32, drgui_glyph_metrics *pMetricsOut)
 Retrieves the metrics of the glyph for the given character when rendered with the given font. More...
 
float drgui_get_height (const drgui_element *pElement)
 
void drgui_get_image_size (drgui_image *pImage, unsigned int *pWidthOut, unsigned int *pHeightOut)
 Retrieves the size of the given image. More...
 
drgui_rect drgui_get_local_rect (const drgui_element *pElement)
 
drgui_image_format drgui_get_optimal_image_format (drgui_context *pContext)
 Retrieves the optimal image format for the given context. More...
 
drgui_elementdrgui_get_parent (drgui_element *pChildElement)
 
void drgui_get_relative_position (const drgui_element *pElement, float *relativePosXOut, float *relativePosYOut)
 Retrieves the relative position of the given element. More...
 
float drgui_get_relative_position_x (const drgui_element *pElement)
 
float drgui_get_relative_position_y (const drgui_element *pElement)
 
drgui_rect drgui_get_relative_rect (const drgui_element *pElement)
 Retrieves the relative rectangle for the given element. More...
 
void drgui_get_size (const drgui_element *pElement, float *widthOut, float *heightOut)
 Retrieves the size of the given element. More...
 
bool drgui_get_text_cursor_position_from_char (drgui_font *pFont, const char *text, size_t characterIndex, float *pTextCursorPosXOut)
 Retrieves the position to palce a text cursor based on the character at the given index for the given string when drawn with the given font. More...
 
bool drgui_get_text_cursor_position_from_point (drgui_font *pFont, const char *text, size_t textSizeInBytes, float maxWidth, float inputPosX, float *pTextCursorPosXOut, size_t *pCharacterIndexOut)
 Retrieves the position to place a text cursor based on the given point for the given string when drawn with the given font. More...
 
const char * drgui_get_type (drgui_element *pElement)
 Retrieves the type fo the element. More...
 
float drgui_get_width (const drgui_element *pElement)
 
drgui_rect drgui_grow_rect (drgui_rect rect, float amount)
 
bool drgui_has_keyboard_capture (drgui_element *pElement)
 Determines whether or not the given element has the keyboard capture. More...
 
bool drgui_has_mouse_capture (drgui_element *pElement)
 Determines whether or not the given element has the mouse capture. More...
 
void drgui_hide (drgui_element *pElement)
 Hides the given element. More...
 
bool drgui_is_ancestor (drgui_element *pAncestorElement, drgui_element *pChildElement)
 Determines whether or not the given element is an ancestor of the other. More...
 
bool drgui_is_auto_dirty_enabled (drgui_context *pContext)
 Determines whether or not automatic dirtying is enabled. More...
 
bool drgui_is_child (drgui_element *pChildElement, drgui_element *pParentElement)
 
bool drgui_is_clipping_enabled (const drgui_element *pElement)
 Determines whether or not clipping is enabled for the given element. More...
 
bool drgui_is_descendant (drgui_element *pChildElement, drgui_element *pAncestorElement)
 Determines whether or not the given element is a descendant of the other. More...
 
bool drgui_is_element_under_mouse (drgui_element *pTopLevelElement)
 Determines whether or not the given element is currently sitting directly under the mouse. More...
 
bool drgui_is_of_type (drgui_element *pElement, const char *type)
 Determines whether or not the given element is of the given type. More...
 
bool drgui_is_parent (drgui_element *pParentElement, drgui_element *pChildElement)
 
bool drgui_is_point_inside_element (drgui_element *pElement, float absolutePosX, float absolutePosY)
 
bool drgui_is_point_inside_element_bounds (const drgui_element *pElement, float absolutePosX, float absolutePosY)
 
bool drgui_is_self_or_ancestor (drgui_element *pAncestorElement, drgui_element *pChildElement)
 Determines whether or not the given element is itself or a descendant. More...
 
bool drgui_is_self_or_descendant (drgui_element *pChildElement, drgui_element *pAncestorElement)
 Determines whether or not the given element is itself or a descendant. More...
 
bool drgui_is_visible (const drgui_element *pElement)
 
bool drgui_is_visible_recursive (const drgui_element *pElement)
 Recursively determines whether or not the element is marked as visible. More...
 
bool drgui_iterate_visible_elements (drgui_element *pParentElement, drgui_rect relativeRect, drgui_visible_iteration_proc callback, void *pUserData)
 
static drgui_key drgui_key_parse (const char *str)
 
static size_t drgui_key_to_string (drgui_key key, char *strOut, size_t strOutSize)
 
drgui_rect drgui_make_inside_out_rect ()
 
void drgui_make_point_absolute (const drgui_element *pElement, float *positionX, float *positionY)
 Converts the given point from relative to absolute based on the given element. More...
 
void drgui_make_point_relative (const drgui_element *pElement, float *positionX, float *positionY)
 Converts the given point from absolute to relative to the given element. More...
 
drgui_rect drgui_make_rect (float left, float top, float right, float bottom)
 Creates a drgui_rect object. More...
 
drgui_rect drgui_make_rect_absolute (const drgui_element *pElement, drgui_rect *pRect)
 Converts the given rectangle from relative to absolute based on the given element. More...
 
drgui_rect drgui_make_rect_relative (const drgui_element *pElement, drgui_rect *pRect)
 Converts the given rectangle from absolute to relative to the given element. More...
 
void * drgui_map_image_data (drgui_image *pImage, unsigned int accessFlags)
 
bool drgui_measure_string (drgui_font *pFont, const char *text, size_t textLengthInBytes, float *pWidthOut, float *pHeightOut)
 
drgui_rect drgui_offset_rect (drgui_rect rect, float offsetX, float offsetY)
 Offsets the given rectangle. More...
 
void drgui_on_size_fit_children_to_parent (drgui_element *pElement, float newWidth, float newHeight)
 An on_size event callback that resizes every child element to that of the parent. More...
 
bool drgui_pass_through_hit_test (drgui_element *pElement, float mousePosX, float mousePosY)
 An on_hit_test event callback that can be used to always fail the mouse hit test. More...
 
void drgui_post_inbound_event_key_down (drgui_context *pContext, drgui_key key, int stateFlags)
 Posts a key down inbound event. More...
 
void drgui_post_inbound_event_key_up (drgui_context *pContext, drgui_key key, int stateFlags)
 Posts a key up inbound event. More...
 
void drgui_post_inbound_event_mouse_button_dblclick (drgui_element *pTopLevelElement, int mouseButton, int mousePosX, int mousePosY, int stateFlags)
 Posts a mouse button double-clicked inbound event. More...
 
void drgui_post_inbound_event_mouse_button_down (drgui_element *pTopLevelElement, int mouseButton, int mousePosX, int mousePosY, int stateFlags)
 Posts a mouse button down inbound event. More...
 
void drgui_post_inbound_event_mouse_button_up (drgui_element *pTopLevelElement, int mouseButton, int mousePosX, int mousePosY, int stateFlags)
 Posts a mouse button up inbound event. More...
 
void drgui_post_inbound_event_mouse_leave (drgui_element *pTopLevelElement)
 
void drgui_post_inbound_event_mouse_move (drgui_element *pTopLevelElement, int mousePosX, int mousePosY, int stateFlags)
 Posts a mouse move inbound event. More...
 
void drgui_post_inbound_event_mouse_wheel (drgui_element *pTopLevelElement, int mouseButton, int mousePosX, int mousePosY, int stateFlags)
 Posts a mouse wheel inbound event. More...
 
void drgui_post_inbound_event_printable_key_down (drgui_context *pContext, unsigned int character, int stateFlags)
 
void drgui_prepend (drgui_element *pChildElement, drgui_element *pParentElement)
 Attaches the given element as a child of the given parent element, and prepends it to the end of the children list. More...
 
void drgui_prepend_sibling (drgui_element *pElementToPrepend, drgui_element *pElementToPrependTo)
 Prepends the given element to the given sibling. More...
 
bool drgui_rect_contains_point (drgui_rect rect, float posX, float posY)
 
bool drgui_rect_equal (drgui_rect rect0, drgui_rect rect1)
 Determines whether or not two rectangles are equal. More...
 
bool drgui_rect_has_volume (drgui_rect rect)
 Determines whether or not the given rectangle has any volume (width and height > 0). More...
 
drgui_rect drgui_rect_union (drgui_rect rect0, drgui_rect rect1)
 Creates a rectangle that contains both of the given rectangles. More...
 
void drgui_register_dr_2d_callbacks (drgui_context *pContext, dr2d_context *pDrawingContext)
 
bool drgui_register_painting_callbacks (drgui_context *pContext, void *pPaintingContext, drgui_painting_callbacks callbacks)
 
void drgui_release_keyboard (drgui_context *pContext)
 Releases the keyboard capture. More...
 
void drgui_release_keyboard_no_global_notify (drgui_context *pContext)
 Releases the keyboard capture without posting the global-scoped event. Should only be used in very specific cases, usually in combination with awkward interop with the window system. More...
 
void drgui_release_mouse (drgui_context *pContext)
 Releases the mouse capture. More...
 
void drgui_release_mouse_no_global_notify (drgui_context *pContext)
 Releases the mouse capture without posting the global-scoped event. Should only be used in very specific cases, usually in combination with awkward interop with the window system. More...
 
drgui_color drgui_rgb (drgui_byte r, drgui_byte g, drgui_byte b)
 Creates a color object from a set of RGB color components. More...
 
drgui_color drgui_rgba (drgui_byte r, drgui_byte g, drgui_byte b, drgui_byte a)
 Creates a color object from a set of RGBA color components. More...
 
void drgui_sb_disable_thumb_auto_hide (drgui_element *pSBElement)
 Disables auto-hiding of the thumb. More...
 
void drgui_sb_enable_thumb_auto_hide (drgui_element *pSBElement)
 Enables auto-hiding of the thumb. More...
 
void * drgui_sb_get_extra_data (drgui_element *pSBElement)
 Retrieves a pointer to the extra data associated with the scrollbar. More...
 
size_t drgui_sb_get_extra_data_size (drgui_element *pSBElement)
 Retrieves the size of the extra data associated with the scrollbar. More...
 
int drgui_sb_get_mouse_wheel_scale (drgui_element *pSBElement)
 Retrieves the mouse wheel scale. More...
 
drgui_sb_on_scroll_proc drgui_sb_get_on_scroll (drgui_element *pSBElement)
 Retrieves the function call when the given scrollbar is scrolled. More...
 
drgui_sb_orientation drgui_sb_get_orientation (drgui_element *pSBElement)
 Retrieves the orientation of the given scrollbar. More...
 
int drgui_sb_get_page_size (drgui_element *pSBElement)
 Retrieves the page size of the given scrollbar's page. More...
 
void drgui_sb_get_range (drgui_element *pSBElement, int *pRangeMinOut, int *pRangeMaxOut)
 Retrieves the given scrollbar's range. More...
 
int drgui_sb_get_scroll_position (drgui_element *pSBElement)
 Retrieves the scroll position. More...
 
drgui_rect drgui_sb_get_thumb_rect (drgui_element *pSBElement)
 Calculates the relative rectangle of the given scrollbar's thumb. More...
 
bool drgui_sb_is_thumb_auto_hide_enabled (drgui_element *pSBElement)
 Determines whether or not thumb auto-hiding is enabled. More...
 
bool drgui_sb_is_thumb_visible (drgui_element *pSBElement)
 
void drgui_sb_on_mouse_button_down (drgui_element *pSBElement, int button, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button down event needs to be processed for the given scrollbar. More...
 
void drgui_sb_on_mouse_button_up (drgui_element *pSBElement, int button, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button up event needs to be processed for the given scrollbar. More...
 
void drgui_sb_on_mouse_leave (drgui_element *pSBElement)
 Called when the mouse leave event needs to be processed for the given scrollbar. More...
 
void drgui_sb_on_mouse_move (drgui_element *pSBElement, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse move event needs to be processed for the given scrollbar. More...
 
void drgui_sb_on_mouse_wheel (drgui_element *pSBElement, int delta, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse wheel event needs to be processed for the given scrollbar. More...
 
void drgui_sb_on_paint (drgui_element *pSBElement, drgui_rect relativeClippingRect, void *pPaintData)
 Called when the paint event needs to be processed. More...
 
void drgui_sb_on_size (drgui_element *pSBElement, float newWidth, float newHeight)
 Called when the size event needs to be processed for the given scrollbar. More...
 
void drgui_sb_scroll (drgui_element *pSBElement, int offset)
 
void drgui_sb_scroll_to (drgui_element *pSBElement, int newScrollPos)
 
void drgui_sb_set_default_thumb_color (drgui_element *pSBElement, drgui_color color)
 Sets the default color of the thumb. More...
 
void drgui_sb_set_hovered_thumb_color (drgui_element *pSBElement, drgui_color color)
 Sets the hovered color of the thumb. More...
 
void drgui_sb_set_mouse_wheel_scele (drgui_element *pSBElement, int scale)
 
void drgui_sb_set_on_scroll (drgui_element *pSBElement, drgui_sb_on_scroll_proc onScroll)
 Sets the function to call when the given scrollbar is scrolled. More...
 
void drgui_sb_set_page_size (drgui_element *pSBElement, int pageSize)
 Sets the page size of the given scrollbar's page. More...
 
void drgui_sb_set_pressed_thumb_color (drgui_element *pSBElement, drgui_color color)
 Sets the pressed color of the thumb. More...
 
void drgui_sb_set_range (drgui_element *pSBElement, int rangeMin, int rangeMax)
 Sets the given scrollbar's range. More...
 
void drgui_sb_set_range_and_page_size (drgui_element *pSBElement, int rangeMin, int rangeMax, int pageSize)
 
void drgui_sb_set_scroll_position (drgui_element *pSBElement, int position)
 
void drgui_sb_set_track_color (drgui_element *pSBElement, drgui_color color)
 Sets the color of the track. More...
 
drgui_rect drgui_scale_rect (drgui_rect rect, float scaleX, float scaleY)
 
void drgui_set_absolute_position (drgui_element *pElement, float positionX, float positionY)
 Sets the absolute position of the given element. More...
 
void drgui_set_clip (drgui_element *pElement, drgui_rect relativeRect, void *pPaintData)
 Sets the clipping rectangle to apply to all future draw operations on this element. More...
 
void drgui_set_cursor (drgui_element *pElement, drgui_cursor_type cursor)
 Sets the cursor to use when the mouse enters the given GUI element. More...
 
void drgui_set_global_on_capture_keyboard (drgui_context *pContext, drgui_on_capture_keyboard_proc onCaptureKeyboard)
 
void drgui_set_global_on_capture_mouse (drgui_context *pContext, drgui_on_capture_mouse_proc onCaptureMouse)
 
void drgui_set_global_on_change_cursor (drgui_context *pContext, drgui_on_change_cursor_proc onChangeCursor)
 
void drgui_set_global_on_dirty (drgui_context *pContext, drgui_on_dirty_proc onDirty)
 
void drgui_set_global_on_release_keyboard (drgui_context *pContext, drgui_on_capture_keyboard_proc onReleaseKeyboard)
 
void drgui_set_global_on_release_mouse (drgui_context *pContext, drgui_on_release_mouse_proc onReleaseMouse)
 
void drgui_set_on_capture_keyboard (drgui_element *pElement, drgui_on_capture_keyboard_proc callback)
 Registers the on_capture_keyboard event callback. More...
 
void drgui_set_on_capture_mouse (drgui_element *pElement, drgui_on_capture_mouse_proc callback)
 Registers the on_capture_mouse event callback. More...
 
void drgui_set_on_delete_element (drgui_context *pContext, drgui_on_delete_element_proc onDeleteElement)
 Sets the function to call when an element is deleted. More...
 
void drgui_set_on_dirty (drgui_element *pElement, drgui_on_dirty_proc callback)
 Registers the on_dirty event callback. More...
 
void drgui_set_on_hittest (drgui_element *pElement, drgui_on_hittest_proc callback)
 Registers the on_hittest event callback. More...
 
void drgui_set_on_key_down (drgui_element *pElement, drgui_on_key_down_proc callback)
 Registers the on_key_down event callback. More...
 
void drgui_set_on_key_up (drgui_element *pElement, drgui_on_key_up_proc callback)
 Registers the on_key_up event callback. More...
 
void drgui_set_on_log (drgui_context *pContext, drgui_on_log onLog)
 Registers the callback to call when a log message is posted. More...
 
void drgui_set_on_mouse_button_dblclick (drgui_element *pElement, drgui_on_mouse_button_dblclick_proc callback)
 Registers the on_mouse_button_down event callback. More...
 
void drgui_set_on_mouse_button_down (drgui_element *pElement, drgui_on_mouse_button_down_proc callback)
 Registers the on_mouse_button_down event callback. More...
 
void drgui_set_on_mouse_button_up (drgui_element *pElement, drgui_on_mouse_button_up_proc callback)
 Registers the on_mouse_button_up event callback. More...
 
void drgui_set_on_mouse_enter (drgui_element *pElement, drgui_on_mouse_enter_proc callback)
 Registers the on_mouse_enter event callback. More...
 
void drgui_set_on_mouse_leave (drgui_element *pElement, drgui_on_mouse_leave_proc callback)
 Registers the on_mouse_leave event callback. More...
 
void drgui_set_on_mouse_move (drgui_element *pElement, drgui_on_mouse_move_proc callback)
 Registers the on_mouse_move event callback. More...
 
void drgui_set_on_mouse_wheel (drgui_element *pElement, drgui_on_mouse_wheel_proc callback)
 Registers the on_mouse_wheel event callback. More...
 
void drgui_set_on_move (drgui_element *pElement, drgui_on_move_proc callback)
 Registers the on_move event callback. More...
 
void drgui_set_on_paint (drgui_element *pElement, drgui_on_paint_proc callback)
 Registers the on_paint event callback. More...
 
void drgui_set_on_printable_key_down (drgui_element *pElement, drgui_on_printable_key_down_proc callback)
 Registers the on_printable_key_down event callback. More...
 
void drgui_set_on_release_keyboard (drgui_element *pElement, drgui_on_release_keyboard_proc callback)
 Registers the on_release_keyboard event callback. More...
 
void drgui_set_on_release_mouse (drgui_element *pElement, drgui_on_release_mouse_proc callback)
 Registers the on_release_mouse event callback. More...
 
void drgui_set_on_size (drgui_element *pElement, drgui_on_size_proc callback)
 Registers the on_size event callback. More...
 
void drgui_set_relative_position (drgui_element *pElement, float relativePosX, float relativePosY)
 Sets the relative position of the given element. More...
 
void drgui_set_size (drgui_element *pElement, float width, float height)
 Sets the size of the given element. More...
 
bool drgui_set_type (drgui_element *pElement, const char *type)
 
void drgui_show (drgui_element *pElement)
 Shows the given element. More...
 
static size_t drgui_strcpy (char *dst, size_t dstSize, const char *src)
 
void drgui_tab_delete (drgui_tab *pTab)
 Recursively deletes a tree view item. More...
 
void * drgui_tab_get_extra_data (drgui_tab *pTab)
 Retrieves a pointer to the extra data associated with the given tree-view item. More...
 
size_t drgui_tab_get_extra_data_size (drgui_tab *pTab)
 Retrieves the size of the extra data associated with the given tree-view item. More...
 
drgui_tabdrgui_tab_get_next_tab (drgui_tab *pTab)
 Retrieves a pointer to the next tab in the tab bar. More...
 
drgui_tabdrgui_tab_get_prev_tab (drgui_tab *pTab)
 Retrieves a pointer to the previous tab in the tab bar. More...
 
drgui_elementdrgui_tab_get_tab_bar_element (drgui_tab *pTab)
 Retrieves the tab bar GUI element that owns the given item. More...
 
const char * drgui_tab_get_text (drgui_tab *pTab)
 Retrieves the text of the given tab bar item. More...
 
bool drgui_tab_is_in_view (drgui_tab *pTab)
 Determines whether or not the given tab is in view. More...
 
void drgui_tab_move_into_view (drgui_tab *pTab)
 
void drgui_tab_move_to_front (drgui_tab *pTab)
 Moves the given tab to the front of the tab bar that owns it. More...
 
void drgui_tab_set_text (drgui_tab *pTab, const char *text)
 Sets the text of the given tab bar item. More...
 
void drgui_tabbar_activate_next_tab (drgui_element *pTBElement)
 
void drgui_tabbar_activate_prev_tab (drgui_element *pTBElement)
 
void drgui_tabbar_activate_tab (drgui_element *pTBElement, drgui_tab *pTab)
 Activates the given tab. More...
 
drgui_tabdrgui_tabbar_create_and_append_tab (drgui_element *pTBElement, const char *text, size_t extraDataSize, const void *pExtraData)
 Creates and appends a tab. More...
 
drgui_tabdrgui_tabbar_create_and_prepend_tab (drgui_element *pTBElement, const char *text, size_t extraDataSize, const void *pExtraData)
 Creates and prepends a tab. More...
 
void drgui_tabbar_disable_auto_size (drgui_element *pTBElement)
 Disables auto-resizing based on tabs. More...
 
void drgui_tabbar_disable_close_on_middle_click (drgui_element *pTBElement)
 Disables the on_close event on middle click. More...
 
void drgui_tabbar_enable_auto_size (drgui_element *pTBElement)
 
void drgui_tabbar_enable_close_on_middle_click (drgui_element *pTBElement)
 Enables the on_close event on middle click. More...
 
drgui_tabdrgui_tabbar_get_active_tab (drgui_element *pTBElement)
 Retrieves a pointer to the currently active tab. More...
 
drgui_imagedrgui_tabbar_get_close_button_image (drgui_element *pTBElement)
 Retrieves the image being used for the close buttons. More...
 
float drgui_tabbar_get_close_button_left_padding (drgui_element *pTBElement)
 
void * drgui_tabbar_get_extra_data (drgui_element *pTBElement)
 Retrieves a pointer to the extra data associated with the scrollbar. More...
 
size_t drgui_tabbar_get_extra_data_size (drgui_element *pTBElement)
 Retrieves the size of the extra data associated with the scrollbar. More...
 
drgui_tabdrgui_tabbar_get_first_tab (drgui_element *pTBElement)
 
drgui_fontdrgui_tabbar_get_font (drgui_element *pTBElement)
 Retrieves the default font to use for tabs. More...
 
drgui_tabdrgui_tabbar_get_last_tab (drgui_element *pTBElement)
 
drgui_tabdrgui_tabbar_get_next_tab (drgui_element *pTBElement, drgui_tab *pTab)
 
drgui_tabbar_orientation drgui_tabbar_get_orientation (drgui_element *pTBElement)
 Retrieves the orientation of the given scrollbar. More...
 
drgui_tabdrgui_tabbar_get_prev_tab (drgui_element *pTBElement, drgui_tab *pTab)
 
drgui_color drgui_tabbar_get_tab_background_color (drgui_element *pTBElement)
 
drgui_color drgui_tabbar_get_tab_background_color_actived (drgui_element *pTBElement)
 
drgui_color drgui_tabbar_get_tab_background_color_hovered (drgui_element *pTBElement)
 
float drgui_tabbar_get_tab_padding (drgui_element *pTBElement)
 
drgui_color drgui_tabbar_get_text_color (drgui_element *pTBElement)
 
void drgui_tabbar_hide_close_buttons (drgui_element *pTBElement)
 Hides the close buttons on each tab. More...
 
bool drgui_tabbar_is_auto_size_enabled (drgui_element *pTBElement)
 Determines whether or not auto-sizing is enabled. More...
 
bool drgui_tabbar_is_close_on_middle_click_enabled (drgui_element *pTBElement)
 Determines whether or not close-on-middle-click is enabled. More...
 
bool drgui_tabbar_is_tab_in_view (drgui_element *pTBElement, drgui_tab *pTab)
 Determines whether or not the given tab is in view. More...
 
void drgui_tabbar_measure_tab (drgui_element *pTBElement, drgui_tab *pTab, float *pWidthOut, float *pHeightOut)
 Measures the given tab. More...
 
void drgui_tabbar_on_mouse_button_down (drgui_element *pTBElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button down event needs to be processed for the given tab bar control. More...
 
void drgui_tabbar_on_mouse_button_up (drgui_element *pTBElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button up event needs to be processed for the given tab bar control. More...
 
void drgui_tabbar_on_mouse_leave (drgui_element *pTBElement)
 Called when the mouse leave event needs to be processed for the given tab bar control. More...
 
void drgui_tabbar_on_mouse_move (drgui_element *pTBElement, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse move event needs to be processed for the given tab bar control. More...
 
void drgui_tabbar_on_paint (drgui_element *pTBElement, drgui_rect relativeClippingRect, void *pPaintData)
 Called when the paint event needs to be processed for the given tab control. More...
 
void drgui_tabbar_paint_tab (drgui_element *pTBElement, drgui_tab *pTab, drgui_rect relativeClippingRect, float offsetX, float offsetY, float width, float height, void *pPaintData)
 Paints the given tab. More...
 
void drgui_tabbar_resize_by_tabs (drgui_element *pTBElement)
 
void drgui_tabbar_set_close_button_color (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_set_close_button_image (drgui_element *pTBElement, drgui_image *pImage)
 Sets the image to use for close buttons. More...
 
void drgui_tabbar_set_close_button_left_padding (drgui_element *pTBElement, float padding)
 
void drgui_tabbar_set_font (drgui_element *pTBElement, drgui_font *pFont)
 Sets the default font to use for tabs. More...
 
void drgui_tabbar_set_on_measure_tab (drgui_element *pTBElement, drgui_tabbar_on_measure_tab_proc proc)
 Sets the function to call when a tab needs to be measured. More...
 
void drgui_tabbar_set_on_paint_tab (drgui_element *pTBElement, drgui_tabbar_on_paint_tab_proc proc)
 Sets the function to call when a tab needs to be painted. More...
 
void drgui_tabbar_set_on_tab_activated (drgui_element *pTBElement, drgui_tabbar_on_tab_activated_proc proc)
 Sets the function to call when a tab is activated. More...
 
void drgui_tabbar_set_on_tab_closed (drgui_element *pTBElement, drgui_tabbar_on_tab_close_proc proc)
 Sets the function to call when a tab is closed with the close button. More...
 
void drgui_tabbar_set_on_tab_deactivated (drgui_element *pTBElement, drgui_tabbar_on_tab_deactivated_proc proc)
 Sets the function to call when a tab is deactivated. More...
 
void drgui_tabbar_set_on_tab_mouse_button_up (drgui_element *pTBElement, drgui_tabbar_on_tab_mouse_button_up_proc proc)
 
void drgui_tabbar_set_tab_background_color (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_set_tab_background_color_active (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_set_tab_background_color_hovered (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_set_tab_padding (drgui_element *pTBElement, float padding)
 
void drgui_tabbar_set_text_color (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_set_text_color_active (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_set_text_color_hovered (drgui_element *pTBElement, drgui_color color)
 
void drgui_tabbar_show_close_buttons (drgui_element *pTBElement)
 Shows the close buttons on each tab. More...
 
void drgui_text_engine_clear_undo_stack (drgui_text_engine *pTL)
 Clears the undo stack. More...
 
bool drgui_text_engine_commit_undo_point (drgui_text_engine *pTL)
 Creates a snapshot of the current state of the text engine and pushes it to the top of the undo/redo stack. More...
 
bool drgui_text_engine_delete_character_to_left_of_cursor (drgui_text_engine *pTL)
 
bool drgui_text_engine_delete_character_to_right_of_cursor (drgui_text_engine *pTL)
 
bool drgui_text_engine_delete_selected_text (drgui_text_engine *pTL)
 
bool drgui_text_engine_delete_text_range (drgui_text_engine *pTL, size_t iFirstCh, size_t iLastChPlus1)
 
void drgui_text_engine_deselect_all (drgui_text_engine *pTL)
 Deselects everything in the given text engine. More...
 
void drgui_text_engine_enter_selection_mode (drgui_text_engine *pTL)
 
bool drgui_text_engine_find_next (drgui_text_engine *pTL, const char *text, size_t *pSelectionStartOut, size_t *pSelectionEndOut)
 Finds the given string starting from the cursor and then looping back. More...
 
bool drgui_text_engine_find_next_no_loop (drgui_text_engine *pTL, const char *text, size_t *pSelectionStartOut, size_t *pSelectionEndOut)
 Finds the given string starting from the cursor, but does not loop back. More...
 
drgui_color drgui_text_engine_get_active_line_bg_color (drgui_text_engine *pTL)
 Retrieves the background color of the line the cursor is sitting on. More...
 
float drgui_text_engine_get_container_height (drgui_text_engine *pTL)
 Retrieves the height of the container. More...
 
void drgui_text_engine_get_container_size (drgui_text_engine *pTL, float *pContainerWidthOut, float *pContainerHeightOut)
 Retrieves the size of the container. More...
 
float drgui_text_engine_get_container_width (drgui_text_engine *pTL)
 Retrieves the width of the container. More...
 
unsigned int drgui_text_engine_get_cursor_blink_rate (drgui_text_engine *pTL)
 Retrieves the blink rate of the cursor in milliseconds. More...
 
size_t drgui_text_engine_get_cursor_character (drgui_text_engine *pTL)
 Retrieves the index of the character the cursor is currently sitting on. More...
 
drgui_color drgui_text_engine_get_cursor_color (drgui_text_engine *pTL)
 Retrieves the color of the text cursor. More...
 
size_t drgui_text_engine_get_cursor_column (drgui_text_engine *pTL)
 Retrieves the index of the column the cursor is currently sitting on. More...
 
size_t drgui_text_engine_get_cursor_line (drgui_text_engine *pTL)
 Retrieves the index of the line the cursor is currently sitting on. More...
 
void drgui_text_engine_get_cursor_position (drgui_text_engine *pTL, float *pPosXOut, float *pPosYOut)
 Retrieves the position of the cursor, relative to the container. More...
 
drgui_rect drgui_text_engine_get_cursor_rect (drgui_text_engine *pTL)
 Retrieves the rectangle of the cursor, relative to the container. More...
 
float drgui_text_engine_get_cursor_width (drgui_text_engine *pTL)
 Retrieves the width of the text cursor. More...
 
drgui_color drgui_text_engine_get_default_bg_color (drgui_text_engine *pTL)
 Retrieves the default background color of the given text engine. More...
 
drgui_fontdrgui_text_engine_get_default_font (drgui_text_engine *pTL)
 Retrieves the default font to use for text runs. More...
 
drgui_color drgui_text_engine_get_default_text_color (drgui_text_engine *pTL)
 Retrieves the default text color of the given text engine. More...
 
void * drgui_text_engine_get_extra_data (drgui_text_engine *pTL)
 Retrieves a pointer to the extra data associated with the given text engine. More...
 
size_t drgui_text_engine_get_extra_data_size (drgui_text_engine *pTL)
 Retrieves the size of the extra data associated with the given text engine. More...
 
drgui_text_engine_alignment drgui_text_engine_get_horizontal_align (drgui_text_engine *pTL)
 Retrieves the horizontal aligment of the given text engine. More...
 
void drgui_text_engine_get_inner_offset (drgui_text_engine *pTL, float *pInnerOffsetX, float *pInnerOffsetY)
 Retrieves the inner offset of the given text engine. More...
 
float drgui_text_engine_get_inner_offset_x (drgui_text_engine *pTL)
 Retrieves the inner offset of the given text engine on the x axis. More...
 
float drgui_text_engine_get_inner_offset_y (drgui_text_engine *pTL)
 Retrieves the inner offset of the given text engine on the x axis. More...
 
size_t drgui_text_engine_get_line_at_pos_y (drgui_text_engine *pTL, float posY)
 Finds the line under the given point on the y axis relative to the container. More...
 
void drgui_text_engine_get_line_character_range (drgui_text_engine *pTL, size_t iLine, size_t *pCharStartOut, size_t *pCharEndOut)
 Retrieves teh index of the first and last character of the line at the given index. More...
 
size_t drgui_text_engine_get_line_count (drgui_text_engine *pTL)
 Retrieves the number of lines in the given text engine. More...
 
size_t drgui_text_engine_get_line_first_character (drgui_text_engine *pTL, size_t iLine)
 Retrieves the index of the first character of the line at the given index. More...
 
size_t drgui_text_engine_get_line_last_character (drgui_text_engine *pTL, size_t iLine)
 Retrieves the index of the last character of the line at the given index. More...
 
float drgui_text_engine_get_line_pos_y (drgui_text_engine *pTL, size_t iLine)
 
unsigned int drgui_text_engine_get_redo_points_remaining_count (drgui_text_engine *pTL)
 Retrieves the number of redo points remaining in the stack. More...
 
size_t drgui_text_engine_get_selected_text (drgui_text_engine *pTL, char *textOut, size_t textOutLength)
 
size_t drgui_text_engine_get_selection_anchor_line (drgui_text_engine *pTL)
 Retrieves the line the selection anchor is sitting on. More...
 
drgui_color drgui_text_engine_get_selection_bg_color (drgui_text_engine *pTL)
 Retrieves the background color of selected text. More...
 
size_t drgui_text_engine_get_selection_first_line (drgui_text_engine *pTL)
 Retrieves the index of the first line of the current selection. More...
 
size_t drgui_text_engine_get_selection_last_line (drgui_text_engine *pTL)
 Retrieves the index of the last line of the current selection. More...
 
unsigned int drgui_text_engine_get_tab_size (drgui_text_engine *pTL)
 Retrieves the size of a tab in spaces. More...
 
size_t drgui_text_engine_get_text (drgui_text_engine *pTL, char *textOut, size_t textOutSize)
 
drgui_rect drgui_text_engine_get_text_rect_relative_to_bounds (drgui_text_engine *pTL)
 Retrieves the rectangle of the text relative to the bounds, taking alignment into account. More...
 
unsigned int drgui_text_engine_get_undo_points_remaining_count (drgui_text_engine *pTL)
 Retrieves the number of undo points remaining in the stack. More...
 
drgui_text_engine_alignment drgui_text_engine_get_vertical_align (drgui_text_engine *pTL)
 Retrieves the vertical aligment of the given text engine. More...
 
size_t drgui_text_engine_get_visible_line_count_starting_at (drgui_text_engine *pTL, size_t iFirstLine)
 
void drgui_text_engine_hide_cursor (drgui_text_engine *pTL)
 Hides the cursor. More...
 
bool drgui_text_engine_insert_character (drgui_text_engine *pTL, unsigned int character, size_t insertIndex)
 
bool drgui_text_engine_insert_character_at_cursor (drgui_text_engine *pTL, unsigned int character)
 
bool drgui_text_engine_insert_text (drgui_text_engine *pTL, const char *text, size_t insertIndex)
 
bool drgui_text_engine_insert_text_at_cursor (drgui_text_engine *pTL, const char *text)
 
bool drgui_text_engine_is_anything_selected (drgui_text_engine *pTL)
 Determines whether or not anything is selected in the given text engine. More...
 
bool drgui_text_engine_is_cursor_at_end_of_selection (drgui_text_engine *pTL)
 Determines whether or not the cursor is sitting at the end fo the selection. More...
 
bool drgui_text_engine_is_cursor_at_start_of_selection (drgui_text_engine *pTL)
 Determines whether or not the cursor is sitting at the start of the selection. More...
 
bool drgui_text_engine_is_in_selection_mode (drgui_text_engine *pTL)
 Determines whether or not the given text engine is in selection mode. More...
 
bool drgui_text_engine_is_showing_cursor (drgui_text_engine *pTL)
 Determines whether or not the cursor is visible. More...
 
void drgui_text_engine_leave_selection_mode (drgui_text_engine *pTL)
 
bool drgui_text_engine_move_cursor_down (drgui_text_engine *pTL)
 Moves the cursor of the given text engine down one line. More...
 
bool drgui_text_engine_move_cursor_left (drgui_text_engine *pTL)
 Moves the cursor of the given text engine to the left by one character. More...
 
bool drgui_text_engine_move_cursor_right (drgui_text_engine *pTL)
 Moves the cursor of the given text engine to the right by one character. More...
 
void drgui_text_engine_move_cursor_to_character (drgui_text_engine *pTL, size_t characterIndex)
 Moves the cursor to the given character index. More...
 
bool drgui_text_engine_move_cursor_to_end_of_line (drgui_text_engine *pTL)
 Moves the cursor of the given text engine to the end of the line. More...
 
bool drgui_text_engine_move_cursor_to_end_of_line_by_index (drgui_text_engine *pTL, size_t iLine)
 Moves the cursor of the given text engine to the end of the line at the given index. More...
 
void drgui_text_engine_move_cursor_to_end_of_selection (drgui_text_engine *pTL)
 Moves the cursor to the end of the selected text. More...
 
bool drgui_text_engine_move_cursor_to_end_of_text (drgui_text_engine *pTL)
 Moves the cursor of the given text engine to the end of the text. More...
 
void drgui_text_engine_move_cursor_to_point (drgui_text_engine *pTL, float posX, float posY)
 Moves the cursor to the closest character based on the given input position. More...
 
bool drgui_text_engine_move_cursor_to_start_of_line (drgui_text_engine *pTL)
 Moves the cursor of the given text engine to the start of the line. More...
 
bool drgui_text_engine_move_cursor_to_start_of_line_by_index (drgui_text_engine *pTL, size_t iLine)
 Moves the cursor of the given text engine to the start of the line at the given index. More...
 
void drgui_text_engine_move_cursor_to_start_of_selection (drgui_text_engine *pTL)
 Moves the cursor to the start of the selected text. More...
 
bool drgui_text_engine_move_cursor_to_start_of_text (drgui_text_engine *pTL)
 Moves the cursor of the given text engine to the end of the text. More...
 
bool drgui_text_engine_move_cursor_up (drgui_text_engine *pTL)
 Moves the cursor of the given text engine up one line. More...
 
bool drgui_text_engine_move_cursor_y (drgui_text_engine *pTL, int amount)
 Moves the cursor up or down the given number of lines. More...
 
void drgui_text_engine_move_selection_anchor_to_end_of_line (drgui_text_engine *pTL, size_t iLine)
 Moves the selection anchor to the end of the given line. More...
 
void drgui_text_engine_move_selection_anchor_to_start_of_line (drgui_text_engine *pTL, size_t iLine)
 Moves the selection anchor to the start of the given line. More...
 
void drgui_text_engine_paint (drgui_text_engine *pTL, drgui_rect rect, drgui_element *pElement, void *pPaintData)
 
void drgui_text_engine_paint_line_numbers (drgui_text_engine *pTL, float lineNumbersWidth, float lineNumbersHeight, drgui_color textColor, drgui_color backgroundColor, drgui_text_engine_on_paint_text_proc onPaintText, drgui_text_engine_on_paint_rect_proc onPaintRect, drgui_element *pElement, void *pPaintData)
 Calls the given painting callbacks for the line numbers of the given text engine. More...
 
bool drgui_text_engine_prepare_undo_point (drgui_text_engine *pTL)
 
bool drgui_text_engine_redo (drgui_text_engine *pTL)
 Performs a redo operation. More...
 
void drgui_text_engine_refresh_markers (drgui_text_engine *pTL)
 Refreshes the cursor and selection marker positions. More...
 
void drgui_text_engine_select (drgui_text_engine *pTL, size_t firstCharacter, size_t lastCharacter)
 Selects the given range of text. More...
 
void drgui_text_engine_select_all (drgui_text_engine *pTL)
 Selects everything in the given text engine. More...
 
void drgui_text_engine_set_active_line_bg_color (drgui_text_engine *pTL, drgui_color color)
 Sets the background color of the line the cursor is sitting on. More...
 
void drgui_text_engine_set_container_size (drgui_text_engine *pTL, float containerWidth, float containerHeight)
 Sets the size of the container. More...
 
void drgui_text_engine_set_cursor_blink_rate (drgui_text_engine *pTL, unsigned int blinkRateInMilliseconds)
 Sets the blink rate of the cursor in milliseconds. More...
 
void drgui_text_engine_set_cursor_color (drgui_text_engine *pTL, drgui_color cursorColor)
 Sets the color of the text cursor. More...
 
void drgui_text_engine_set_cursor_width (drgui_text_engine *pTL, float cursorWidth)
 Sets the width of the text cursor. More...
 
void drgui_text_engine_set_default_bg_color (drgui_text_engine *pTL, drgui_color color)
 Sets the default background color of the given text engine. More...
 
void drgui_text_engine_set_default_font (drgui_text_engine *pTL, drgui_font *pFont)
 Sets the default font to use for text runs. More...
 
void drgui_text_engine_set_default_text_color (drgui_text_engine *pTL, drgui_color color)
 Sets the default text color of the given text engine. More...
 
void drgui_text_engine_set_horizontal_align (drgui_text_engine *pTL, drgui_text_engine_alignment alignment)
 Sets the horizontal alignment of the given text engine. More...
 
void drgui_text_engine_set_inner_offset (drgui_text_engine *pTL, float innerOffsetX, float innerOffsetY)
 Sets the inner offset of the given text engine. More...
 
void drgui_text_engine_set_inner_offset_x (drgui_text_engine *pTL, float innerOffsetX)
 Sets the inner offset of the given text engine on the x axis. More...
 
void drgui_text_engine_set_inner_offset_y (drgui_text_engine *pTL, float innerOffsetY)
 Sets the inner offset of the given text engine on the y axis. More...
 
void drgui_text_engine_set_on_cursor_move (drgui_text_engine *pTL, drgui_text_engine_on_cursor_move_proc proc)
 Sets the function to call when the cursor in the given text engine is mvoed. More...
 
void drgui_text_engine_set_on_dirty (drgui_text_engine *pTL, drgui_text_engine_on_dirty_proc proc)
 Sets the function to call when a region of the text engine needs to be redrawn. More...
 
void drgui_text_engine_set_on_paint_rect (drgui_text_engine *pTL, drgui_text_engine_on_paint_rect_proc proc)
 Sets the function to call when a quad needs to the be painted for the given text engine. More...
 
void drgui_text_engine_set_on_paint_text (drgui_text_engine *pTL, drgui_text_engine_on_paint_text_proc proc)
 Sets the function to call when a run of text needs to be painted for the given text engine. More...
 
void drgui_text_engine_set_on_text_changed (drgui_text_engine *pTL, drgui_text_engine_on_text_changed_proc proc)
 Sets the function to call when the content of the given text engine has changed. More...
 
void drgui_text_engine_set_on_undo_point_changed (drgui_text_engine *pTL, drgui_text_engine_on_undo_point_changed_proc proc)
 Sets the function to call when the content of the given text engine's current undo point has moved. More...
 
void drgui_text_engine_set_selection_bg_color (drgui_text_engine *pTL, drgui_color color)
 Sets the background color of selected text. More...
 
void drgui_text_engine_set_tab_size (drgui_text_engine *pTL, unsigned int sizeInSpaces)
 Sets the size of a tab in spaces. More...
 
void drgui_text_engine_set_text (drgui_text_engine *pTL, const char *text)
 Sets the given text engine's text. More...
 
void drgui_text_engine_set_vertical_align (drgui_text_engine *pTL, drgui_text_engine_alignment alignment)
 Sets the vertical alignment of the given text engine. More...
 
void drgui_text_engine_show_cursor (drgui_text_engine *pTL)
 Shows the cursor. More...
 
void drgui_text_engine_step (drgui_text_engine *pTL, unsigned int milliseconds)
 
void drgui_text_engine_swap_selection_markers (drgui_text_engine *pTL)
 Swaps the position of the cursor based on the current selection. More...
 
bool drgui_text_engine_undo (drgui_text_engine *pTL)
 Performs an undo operation. More...
 
void drgui_textbox_clear_undo_stack (drgui_element *pTBElement)
 Clears the undo/redo stack. More...
 
bool drgui_textbox_delete_character_to_right_of_cursor (drgui_element *pTBElement)
 
bool drgui_textbox_delete_selected_text (drgui_element *pTBElement)
 
void drgui_textbox_deselect_all (drgui_element *pTBElement)
 Deselect everything. More...
 
void drgui_textbox_disable_horizontal_scrollbar (drgui_element *pTBElement)
 Disables the horizontal scrollbar. More...
 
void drgui_textbox_disable_vertical_scrollbar (drgui_element *pTBElement)
 Disables the vertical scrollbar. More...
 
void drgui_textbox_enable_horizontal_scrollbar (drgui_element *pTBElement)
 Enables the horizontal scrollbar. More...
 
void drgui_textbox_enable_vertical_scrollbar (drgui_element *pTBElement)
 Enables the vertical scrollbar. More...
 
bool drgui_textbox_find_and_replace_all (drgui_element *pTBElement, const char *text, const char *replacement)
 Finds every occurance of the given string and replaces it with another. More...
 
bool drgui_textbox_find_and_replace_next (drgui_element *pTBElement, const char *text, const char *replacement)
 Finds the next occurance of the given string and replaces it with another. More...
 
bool drgui_textbox_find_and_select_next (drgui_element *pTBElement, const char *text)
 Finds and selects the next occurance of the given string, starting from the cursor and looping back to the start. More...
 
size_t drgui_textbox_get_cursor_column (drgui_element *pTBElement)
 Retrieves the index of the column the cursor is current sitting on. More...
 
size_t drgui_textbox_get_cursor_line (drgui_element *pTBElement)
 Retrieves the index of the line the cursor is current sitting on. More...
 
float drgui_textbox_get_cursor_width (drgui_element *pTBElement)
 Retrieves the width of the text cursor. More...
 
void * drgui_textbox_get_extra_data (drgui_element *pTBElement)
 Retrieves a pointer to the extra data associated with the given text box. More...
 
size_t drgui_textbox_get_extra_data_size (drgui_element *pTBElement)
 Retrieves the size of the extra data associated with the given text box. More...
 
drgui_fontdrgui_textbox_get_font (drgui_element *pTBElement)
 Retrieves the font being used with the given text box. More...
 
drgui_elementdrgui_textbox_get_horizontal_scrollbar (drgui_element *pTBElement)
 
size_t drgui_textbox_get_line_count (drgui_element *pTBElement)
 Retrieves the number of lines in the given text box. More...
 
drgui_color drgui_textbox_get_line_numbers_background_color (drgui_element *pTBElement)
 
drgui_color drgui_textbox_get_line_numbers_color (drgui_element *pTBElement)
 
float drgui_textbox_get_line_numbers_padding (drgui_element *pTBElement)
 
float drgui_textbox_get_line_numbers_width (drgui_element *pTBElement)
 
float drgui_textbox_get_padding_horz (drgui_element *pTBElement)
 Retrieves the amound of horizontal padding to apply to the given text box. More...
 
float drgui_textbox_get_padding_vert (drgui_element *pTBElement)
 Retrieves the amound of vertical padding to apply to the given text box. More...
 
unsigned int drgui_textbox_get_redo_points_remaining_count (drgui_element *pTBElement)
 Retrieves the number of redo points remaining. More...
 
size_t drgui_textbox_get_selected_text (drgui_element *pTBElement, char *textOut, size_t textOutLength)
 
drgui_color drgui_textbox_get_selection_background_color (drgui_element *pTBElement)
 Retrieves the background color of selected text. More...
 
size_t drgui_textbox_get_text (drgui_element *pTBElement, char *pTextOut, size_t textOutSize)
 Retrieves the text of the given text box. More...
 
unsigned int drgui_textbox_get_undo_points_remaining_count (drgui_element *pTBElement)
 Retrieves the number of undo points remaining. More...
 
drgui_elementdrgui_textbox_get_vertical_scrollbar (drgui_element *pTBElement)
 
void drgui_textbox_hide_line_numbers (drgui_element *pTBElement)
 Hides the line numbers. More...
 
bool drgui_textbox_insert_text_at_cursor (drgui_element *pTBElement, const char *text)
 
bool drgui_textbox_is_anything_selected (drgui_element *pTBElement)
 Determines whether or not anything is selected in the given text box. More...
 
void drgui_textbox_move_cursor_to_end_of_text (drgui_element *pTBElement)
 Moves the caret to the end of the text. More...
 
void drgui_textbox_move_cursor_to_start_of_line_by_index (drgui_element *pTBElement, size_t iLine)
 Moves the caret to the beginning of the line at the given index. More...
 
void drgui_textbox_on_capture_keyboard (drgui_element *pTBElement, drgui_element *pPrevCapturedElement)
 on_capture_keyboard More...
 
void drgui_textbox_on_capture_mouse (drgui_element *pTBElement)
 on_capture_mouse More...
 
void drgui_textbox_on_key_down (drgui_element *pTBElement, drgui_key key, int stateFlags)
 on_key_down. More...
 
void drgui_textbox_on_key_up (drgui_element *pTBElement, drgui_key key, int stateFlags)
 on_key_up. More...
 
void drgui_textbox_on_mouse_button_dblclick (drgui_element *pTBElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 on_mouse_button_dblclick. More...
 
void drgui_textbox_on_mouse_button_down (drgui_element *pTBElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 on_mouse_button_down. More...
 
void drgui_textbox_on_mouse_button_up (drgui_element *pTBElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 on_mouse_button_up. More...
 
void drgui_textbox_on_mouse_move (drgui_element *pTBElement, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 on_mouse_move. More...
 
void drgui_textbox_on_mouse_wheel (drgui_element *pTBElement, int delta, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 on_mouse_wheel More...
 
void drgui_textbox_on_paint (drgui_element *pTBElement, drgui_rect relativeRect, void *pPaintData)
 on_paint. More...
 
void drgui_textbox_on_printable_key_down (drgui_element *pTBElement, unsigned int utf32, int stateFlags)
 on_printable_key_down. More...
 
void drgui_textbox_on_release_keyboard (drgui_element *pTBElement, drgui_element *pNewCapturedElement)
 on_release_keyboard More...
 
void drgui_textbox_on_release_mouse (drgui_element *pTBElement)
 on_release_mouse More...
 
void drgui_textbox_on_size (drgui_element *pTBElement, float newWidth, float newHeight)
 on_size. More...
 
bool drgui_textbox_redo (drgui_element *pTBElement)
 Performs a redo operation. More...
 
void drgui_textbox_select_all (drgui_element *pTBElement)
 Selects all of the text inside the text box. More...
 
void drgui_textbox_set_active_line_background_color (drgui_element *pTBElement, drgui_color color)
 Sets the background color for the line the caret is currently sitting on. More...
 
void drgui_textbox_set_background_color (drgui_element *pTBElement, drgui_color color)
 Sets the background color of the given text box. More...
 
void drgui_textbox_set_border_color (drgui_element *pTBElement, drgui_color color)
 Sets the border color of the given text box. More...
 
void drgui_textbox_set_border_width (drgui_element *pTBElement, float borderWidth)
 Sets the border width of the given text box. More...
 
void drgui_textbox_set_cursor_blink_rate (drgui_element *pTBElement, unsigned int blinkRateInMilliseconds)
 Sets the blink rate of the cursor in milliseconds. More...
 
void drgui_textbox_set_cursor_color (drgui_element *pTBElement, drgui_color color)
 Sets the color of the cursor of the given text box. More...
 
void drgui_textbox_set_cursor_width (drgui_element *pTBElement, float cursorWidth)
 Sets the width of the text cursor. More...
 
void drgui_textbox_set_font (drgui_element *pTBElement, drgui_font *pFont)
 Sets the font to use with the given text box. More...
 
void drgui_textbox_set_horizontal_align (drgui_element *pTBElement, drgui_text_engine_alignment align)
 Sets the horizontal alignment of the given text box. More...
 
void drgui_textbox_set_line_numbers_background_color (drgui_element *pTBElement, drgui_color color)
 
void drgui_textbox_set_line_numbers_color (drgui_element *pTBElement, drgui_color color)
 
void drgui_textbox_set_line_numbers_padding (drgui_element *pTBElement, float lineNumbersPadding)
 
void drgui_textbox_set_line_numbers_width (drgui_element *pTBElement, float lineNumbersWidth)
 
void drgui_textbox_set_on_cursor_move (drgui_element *pTBElement, drgui_textbox_on_cursor_move_proc proc)
 Sets the function to call when the cursor moves. More...
 
void drgui_textbox_set_on_undo_point_changed (drgui_element *pTBElement, drgui_textbox_on_undo_point_changed_proc proc)
 Sets the function to call when the undo point changes. More...
 
void drgui_textbox_set_padding (drgui_element *pTBElement, float padding)
 Sets the amount of padding to apply to given text box. More...
 
void drgui_textbox_set_scrollbar_size (drgui_element *pTBElement, float size)
 
void drgui_textbox_set_selection_background_color (drgui_element *pTBElement, drgui_color color)
 Sets the background color of selected text. More...
 
void drgui_textbox_set_text (drgui_element *pTBElement, const char *text)
 Sets the text of the given text box. More...
 
void drgui_textbox_set_text_color (drgui_element *pTBElement, drgui_color color)
 Sets the color of the text in teh given text box. More...
 
void drgui_textbox_set_vertical_align (drgui_element *pTBElement, drgui_text_engine_alignment align)
 Sets the vertical alignment of the given text box. More...
 
void drgui_textbox_show_line_numbers (drgui_element *pTBElement)
 Shows the line numbers. More...
 
void drgui_textbox_step (drgui_element *pTBElement, unsigned int milliseconds)
 Steps the text box to allow it to blink the cursor. More...
 
bool drgui_textbox_undo (drgui_element *pTBElement)
 Performs an undo operation. More...
 
drgui_tree_view_itemdrgui_tv_create_item (drgui_element *pTVElement, drgui_tree_view_item *pParent, size_t extraDataSize, const void *pExtraData)
 
void drgui_tv_deselect_all_items (drgui_element *pTVElement)
 Deselects every tree-view item. More...
 
void drgui_tv_disable_multi_select (drgui_element *pTVElement)
 Disables multi-select. More...
 
void drgui_tv_enable_multi_select (drgui_element *pTVElement)
 
float drgui_tv_get_child_offset_x (drgui_element *pTVElement)
 Retrieves the amount of indentation to apply to each child item in the given tree-view. More...
 
drgui_color drgui_tv_get_default_background_color (drgui_element *pTVElement)
 Retrieves the default background color. More...
 
void * drgui_tv_get_extra_data (drgui_element *pTVElement)
 Retrieves a pointer to the buffer containing the given tree-view's extra data. More...
 
size_t drgui_tv_get_extra_data_size (drgui_element *pTVElement)
 Retrieves the size of the extra data associated with the given tree-view control. More...
 
drgui_tree_view_itemdrgui_tv_get_first_selected_item (drgui_element *pTVElement)
 
drgui_elementdrgui_tv_get_horizontal_scrollbar (drgui_element *pTVElement)
 Retrieves a pointer to the horizontal scrollbar. More...
 
drgui_color drgui_tv_get_hovered_background_color (drgui_element *pTVElement)
 Retrieves the default background color of hovered items. More...
 
drgui_tree_view_itemdrgui_tv_get_next_selected_item (drgui_element *pTVElement, drgui_tree_view_item *pItem)
 
drgui_tree_view_itemdrgui_tv_get_root_item (drgui_element *pTVElement)
 Retrieves a pointer to the root element of the given tree view control. More...
 
drgui_color drgui_tv_get_selected_background_color (drgui_element *pTVElement)
 Retrieves the default background color of selected items. More...
 
drgui_elementdrgui_tv_get_vertical_scrollbar (drgui_element *pTVElement)
 Retrieves a pointer to the vertical scrollbar. More...
 
bool drgui_tv_is_multi_select_enabled (drgui_element *pTVElement)
 Determines whether or not multi-select is enabled. More...
 
bool drgui_tv_measure_item (drgui_element *pTVElement, drgui_tree_view_item *pItem, float *pWidthOut, float *pHeightOut)
 Measures the given item. More...
 
void drgui_tv_on_mouse_button_dblclick (drgui_element *pTVElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button double-click event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_mouse_button_down (drgui_element *pTVElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button down event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_mouse_button_up (drgui_element *pTVElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse button up event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_mouse_leave (drgui_element *pTVElement)
 Called when the mouse leave event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_mouse_move (drgui_element *pTVElement, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse move event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_mouse_wheel (drgui_element *pTVElement, int delta, int relativeMousePosX, int relativeMousePosY, int stateFlags)
 Called when the mouse wheel event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_paint (drgui_element *pTVElement, drgui_rect relativeClippingRect, void *pPaintData)
 Called when the paint event needs to be processed for the given tree-view control. More...
 
void drgui_tv_on_size (drgui_element *pTVElement, float newWidth, float newHeight)
 Called when the size event needs to be processed for the given tree-view control. More...
 
void drgui_tv_set_child_offset_x (drgui_element *pTVElement, float childOffsetX)
 Sets the amount of indentation to apply to each child item in the given tree-view. More...
 
void drgui_tv_set_default_background_color (drgui_element *pTVElement, drgui_color color)
 Sets the default background color. More...
 
void drgui_tv_set_hovered_background_color (drgui_element *pTVElement, drgui_color color)
 Sets the default background color of hovered items. More...
 
void drgui_tv_set_on_item_measure (drgui_element *pTVElement, drgui_tvi_measure_proc proc)
 Sets the function to call when a tree-view item needs to be measured. More...
 
void drgui_tv_set_on_item_mouse_leave (drgui_element *pTVElement, drgui_tvi_on_mouse_leave_proc proc)
 Sets the function call when the mouse leaves a tree-view item. More...
 
void drgui_tv_set_on_item_mouse_move (drgui_element *pTVElement, drgui_tvi_on_mouse_move_proc proc)
 Sets the function to call when the mouse is moved while over a tree-view item. More...
 
void drgui_tv_set_on_item_paint (drgui_element *pTVElement, drgui_tvi_on_paint_proc proc)
 Sets the function to call when a tree-view item needs to be drawn. More...
 
void drgui_tv_set_on_item_picked (drgui_element *pTVElement, drgui_tvi_on_picked_proc proc)
 
void drgui_tv_set_selected_background_color (drgui_element *pTVElement, drgui_color color)
 Sets the default background color of selected items. More...
 
void drgui_tvi_append (drgui_tree_view_item *pItem, drgui_tree_view_item *pParent)
 Appends a tree view item as a child of the given parent item. More...
 
void drgui_tvi_append_sibling (drgui_tree_view_item *pItemToAppend, drgui_tree_view_item *pItemToAppendTo)
 Appends the given tree view item to the given sibling. More...
 
void drgui_tvi_collapse (drgui_tree_view_item *pItem)
 Collapses the given item. More...
 
void drgui_tvi_delete (drgui_tree_view_item *pItem)
 Recursively deletes a tree view item. More...
 
void drgui_tvi_deselect (drgui_tree_view_item *pItem)
 Deselects the given item. More...
 
void drgui_tvi_expand (drgui_tree_view_item *pItem)
 Expands the given item. More...
 
int drgui_tvi_get_depth (drgui_tree_view_item *pItem)
 
void * drgui_tvi_get_extra_data (drgui_tree_view_item *pItem)
 Retrieves a pointer to the extra data associated with the given tree-view item. More...
 
size_t drgui_tvi_get_extra_data_size (drgui_tree_view_item *pItem)
 Retrieves the size of the extra data associated with the given tree-view item. More...
 
drgui_tree_view_itemdrgui_tvi_get_first_child (drgui_tree_view_item *pItem)
 Retrieves a pointer to the first child of the given tree-view item. More...
 
drgui_tree_view_itemdrgui_tvi_get_last_child (drgui_tree_view_item *pItem)
 Retrieves a pointer to the last child of the given tree-view item. More...
 
drgui_tree_view_itemdrgui_tvi_get_next_sibling (drgui_tree_view_item *pItem)
 Retrieves a pointer to the next sibling of the given tree-view item. More...
 
drgui_tree_view_itemdrgui_tvi_get_parent (drgui_tree_view_item *pItem)
 Retrieves the parent tree-view item. More...
 
drgui_tree_view_itemdrgui_tvi_get_prev_sibling (drgui_tree_view_item *pItem)
 Retrieves a pointer to the previous sibling of the given tree-view item. More...
 
drgui_elementdrgui_tvi_get_tree_view_element (drgui_tree_view_item *pItem)
 Retrieves the tree-view GUI element that owns the given item. More...
 
bool drgui_tvi_has_children (drgui_tree_view_item *pItem)
 Determines whether or not the given item has any children. More...
 
bool drgui_tvi_is_expanded (drgui_tree_view_item *pItem)
 Determines whether or not the given item is expanded. More...
 
bool drgui_tvi_is_selected (drgui_tree_view_item *pItem)
 Determines whether or not the given tree view item is selected. More...
 
drgui_tree_view_itemdrgui_tvi_next_visible_non_child (drgui_tree_view_item *pItem, int *pDepthInOut)
 
void drgui_tvi_prepend (drgui_tree_view_item *pItem, drgui_tree_view_item *pParent)
 Prepends a tree view item as a child of the given parent item. More...
 
void drgui_tvi_prepend_sibling (drgui_tree_view_item *pItemToPrepend, drgui_tree_view_item *pItemToPrependTo)
 Prepends the given tree view item to the given sibling. More...
 
void drgui_tvi_select (drgui_tree_view_item *pItem)
 Selects the given item. More...
 
void drgui_unmap_image_data (drgui_image *pImage)
 Unmaps the given image data. More...
 

Macro Definition Documentation

◆ DRGUI_ARROW_DOWN

#define DRGUI_ARROW_DOWN   0x8fe

Definition at line 441 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_ARROW_LEFT

#define DRGUI_ARROW_LEFT   0x8fb

Definition at line 438 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_ARROW_RIGHT

#define DRGUI_ARROW_RIGHT   0x8fd

Definition at line 440 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_ARROW_UP

#define DRGUI_ARROW_UP   0x8fc

Definition at line 439 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_BACKSPACE

#define DRGUI_BACKSPACE   0xff08

Definition at line 431 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_DELETE

#define DRGUI_DELETE   0xffff

Definition at line 442 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_END

#define DRGUI_END   0xff57

Definition at line 436 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_ESCAPE

#define DRGUI_ESCAPE   0xff1b

Definition at line 433 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F1

#define DRGUI_F1   0xffbe

Definition at line 443 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F10

#define DRGUI_F10   0xffc7

Definition at line 452 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F11

#define DRGUI_F11   0xffc8

Definition at line 453 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F12

#define DRGUI_F12   0xffc9

Definition at line 454 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F2

#define DRGUI_F2   0xffbf

Definition at line 444 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F3

#define DRGUI_F3   0xffc0

Definition at line 445 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F4

#define DRGUI_F4   0xffc1

Definition at line 446 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F5

#define DRGUI_F5   0xffc2

Definition at line 447 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F6

#define DRGUI_F6   0xffc3

Definition at line 448 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F7

#define DRGUI_F7   0xffc4

Definition at line 449 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F8

#define DRGUI_F8   0xffc5

Definition at line 450 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_F9

#define DRGUI_F9   0xffc6

Definition at line 451 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_FONT_NO_CLEARTYPE

#define DRGUI_FONT_NO_CLEARTYPE   (1 << 0)

Definition at line 296 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_HOME

#define DRGUI_HOME   0xff50

Definition at line 437 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_IMAGE_ALIGN_CENTER

#define DRGUI_IMAGE_ALIGN_CENTER   (1 << 4)

Definition at line 291 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_IMAGE_CLIP_BOUNDS

#define DRGUI_IMAGE_CLIP_BOUNDS   (1 << 3)

Definition at line 290 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_IMAGE_DRAW_BACKGROUND

#define DRGUI_IMAGE_DRAW_BACKGROUND   (1 << 0)

Definition at line 287 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_IMAGE_DRAW_BOUNDS

#define DRGUI_IMAGE_DRAW_BOUNDS   (1 << 2)

Definition at line 289 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_IMAGE_HINT_NO_ALPHA

#define DRGUI_IMAGE_HINT_NO_ALPHA   (1 << 1)

Definition at line 288 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_KEY_STATE_ALT_DOWN

#define DRGUI_KEY_STATE_ALT_DOWN   (1 << 7)

Definition at line 422 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_KEY_STATE_AUTO_REPEATED

#define DRGUI_KEY_STATE_AUTO_REPEATED   (1 << 31)

Definition at line 423 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_KEY_STATE_CTRL_DOWN

#define DRGUI_KEY_STATE_CTRL_DOWN   (1 << 6)

Definition at line 421 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_KEY_STATE_SHIFT_DOWN

#define DRGUI_KEY_STATE_SHIFT_DOWN   (1 << 5)

Definition at line 420 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MAX_FONT_FAMILY_LENGTH

#define DRGUI_MAX_FONT_FAMILY_LENGTH   128

Definition at line 172 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MAX_TAB_TEXT_LENGTH

#define DRGUI_MAX_TAB_TEXT_LENGTH   256

Definition at line 11131 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_4_DOWN

#define DRGUI_MOUSE_BUTTON_4_DOWN   (1 << 3)

Definition at line 418 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_5_DOWN

#define DRGUI_MOUSE_BUTTON_5_DOWN   (1 << 4)

Definition at line 419 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_LEFT

#define DRGUI_MOUSE_BUTTON_LEFT   1

Definition at line 426 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_LEFT_DOWN

#define DRGUI_MOUSE_BUTTON_LEFT_DOWN   (1 << 0)

Definition at line 415 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_MIDDLE

#define DRGUI_MOUSE_BUTTON_MIDDLE   3

Definition at line 428 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_MIDDLE_DOWN

#define DRGUI_MOUSE_BUTTON_MIDDLE_DOWN   (1 << 2)

Definition at line 417 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_RIGHT

#define DRGUI_MOUSE_BUTTON_RIGHT   2

Definition at line 427 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_MOUSE_BUTTON_RIGHT_DOWN

#define DRGUI_MOUSE_BUTTON_RIGHT_DOWN   (1 << 1)

Definition at line 416 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_PAGE_DOWN

#define DRGUI_PAGE_DOWN   0xff56

Definition at line 435 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_PAGE_UP

#define DRGUI_PAGE_UP   0xff55

Definition at line 434 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_READ

#define DRGUI_READ   (1 << 0)

Definition at line 293 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_scrollbar_h

#define drgui_scrollbar_h

Definition at line 10130 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_SHIFT

#define DRGUI_SHIFT   0xff10

Definition at line 432 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tab_bar_h

#define drgui_tab_bar_h

Definition at line 11125 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_h

#define drgui_text_engine_h

Definition at line 5250 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_textbox_h

#define drgui_textbox_h

Definition at line 12988 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tree_view_h

#define drgui_tree_view_h

Definition at line 15220 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ DRGUI_WRITE

#define DRGUI_WRITE   (1 << 1)

Definition at line 294 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ EG_MAX_TREE_VIEW_ITEM_TEXT_LENGTH

#define EG_MAX_TREE_VIEW_ITEM_TEXT_LENGTH   256

Definition at line 15226 of file rhino/demo/c/dr_libs/old/dr_gui.h.

Typedef Documentation

◆ drgui_byte

typedef unsigned char drgui_byte

Definition at line 190 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_callback

typedef void(* drgui_callback) ()

Definition at line 356 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_color

typedef struct drgui_color drgui_color

Definition at line 182 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_context

typedef struct drgui_context drgui_context

Definition at line 180 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_create_font_proc

typedef drgui_resource(* drgui_create_font_proc) (void *pPaintingContext, const char *family, unsigned int size, drgui_font_weight weight, drgui_font_slant slant, float rotation, unsigned int flags)

Definition at line 395 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_create_image_proc

typedef drgui_resource(* drgui_create_image_proc) (void *pPaintingContext, unsigned int width, unsigned int height, drgui_image_format format, unsigned int stride, const void *pImageData)

Definition at line 404 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_delete_font_proc

typedef void(* drgui_delete_font_proc) (drgui_resource font)

Definition at line 396 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_delete_image_proc

typedef void(* drgui_delete_image_proc) (drgui_resource image)

Definition at line 405 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_begin_proc

typedef void(* drgui_draw_begin_proc) (void *pPaintData)

Definition at line 381 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_end_proc

typedef void(* drgui_draw_end_proc) (void *pPaintData)

Definition at line 382 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_image_proc

typedef void(* drgui_draw_image_proc) (drgui_resource image, drgui_draw_image_args *pArgs, void *pPaintData)

Definition at line 393 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_line_proc

typedef void(* drgui_draw_line_proc) (float startX, float startY, float endX, float endY, float width, drgui_color color, void *pPaintData)

Definition at line 385 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_rect_outline_proc

typedef void(* drgui_draw_rect_outline_proc) (drgui_rect relativeRect, drgui_color color, float outlineWidth, void *pPaintData)

Definition at line 387 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_rect_proc

typedef void(* drgui_draw_rect_proc) (drgui_rect relativeRect, drgui_color color, void *pPaintData)

Definition at line 386 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_rect_with_outline_proc

typedef void(* drgui_draw_rect_with_outline_proc) (drgui_rect relativeRect, drgui_color color, float outlineWidth, drgui_color outlineColor, void *pPaintData)

Definition at line 388 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_round_rect_outline_proc

typedef void(* drgui_draw_round_rect_outline_proc) (drgui_rect relativeRect, drgui_color color, float radius, float outlineWidth, void *pPaintData)

Definition at line 390 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_round_rect_proc

typedef void(* drgui_draw_round_rect_proc) (drgui_rect relativeRect, drgui_color color, float radius, void *pPaintData)

Definition at line 389 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_round_rect_with_outline_proc

typedef void(* drgui_draw_round_rect_with_outline_proc) (drgui_rect relativeRect, drgui_color color, float radius, float outlineWidth, drgui_color outlineColor, void *pPaintData)

Definition at line 391 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_draw_text_proc

typedef void(* drgui_draw_text_proc) (drgui_resource font, const char *text, int textLengthInBytes, float posX, float posY, drgui_color color, drgui_color backgroundColor, void *pPaintData)

Definition at line 392 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_element

typedef struct drgui_element drgui_element

Definition at line 181 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_font

typedef struct drgui_font drgui_font

Definition at line 185 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_font_metrics

Definition at line 187 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_clip_proc

typedef void(* drgui_get_clip_proc) (drgui_rect *pRectOut, void *pPaintData)

Definition at line 384 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_font_metrics_proc

typedef bool(* drgui_get_font_metrics_proc) (drgui_resource font, drgui_font_metrics *pMetricsOut)

Definition at line 398 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_font_size_proc

typedef unsigned int(* drgui_get_font_size_proc) (drgui_resource font)

Definition at line 397 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_glyph_metrics_proc

typedef bool(* drgui_get_glyph_metrics_proc) (drgui_resource font, unsigned int utf32, drgui_glyph_metrics *pMetricsOut)

Definition at line 399 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_image_size_proc

typedef void(* drgui_get_image_size_proc) (drgui_resource image, unsigned int *pWidthOut, unsigned int *pHeightOut)

Definition at line 407 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_optimal_image_format_proc

typedef drgui_image_format(* drgui_get_optimal_image_format_proc) (void *pPaintingContext)

Definition at line 406 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_text_cursor_position_from_char_proc

typedef bool(* drgui_get_text_cursor_position_from_char_proc) (drgui_resource font, const char *text, size_t characterIndex, float *pTextCursorPosXOut)

Definition at line 402 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_get_text_cursor_position_from_point_proc

typedef bool(* drgui_get_text_cursor_position_from_point_proc) (drgui_resource font, const char *text, size_t textSizeInBytes, float maxWidth, float inputPosX, float *pTextCursorPosXOut, size_t *pCharacterIndexOut)

Definition at line 401 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_glyph_metrics

Definition at line 188 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_image

typedef struct drgui_image drgui_image

Definition at line 186 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_key

typedef unsigned int drgui_key

Definition at line 191 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_map_image_data_proc

typedef void*(* drgui_map_image_data_proc) (drgui_resource image, unsigned int accessFlags)

Definition at line 408 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_measure_string_proc

typedef bool(* drgui_measure_string_proc) (drgui_resource font, const char *text, size_t textSizeInBytes, float *pWidthOut, float *pHeightOut)

Definition at line 400 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_capture_keyboard_proc

typedef void(* drgui_on_capture_keyboard_proc) (drgui_element *pElement, drgui_element *pPrevCapturedElement)

Definition at line 375 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_capture_mouse_proc

typedef void(* drgui_on_capture_mouse_proc) (drgui_element *pElement)

Definition at line 373 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_change_cursor_proc

typedef void(* drgui_on_change_cursor_proc) (drgui_element *pElement, drgui_cursor_type cursor)

Definition at line 377 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_delete_element_proc

typedef void(* drgui_on_delete_element_proc) (drgui_element *pElement)

Definition at line 378 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_dirty_proc

typedef void(* drgui_on_dirty_proc) (drgui_element *pElement, drgui_rect relativeRect)

Definition at line 371 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_hittest_proc

typedef bool(* drgui_on_hittest_proc) (drgui_element *pElement, float relativePosX, float relativePosY)

Definition at line 372 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_key_down_proc

typedef void(* drgui_on_key_down_proc) (drgui_element *pElement, drgui_key key, int stateFlags)

Definition at line 367 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_key_up_proc

typedef void(* drgui_on_key_up_proc) (drgui_element *pElement, drgui_key key, int stateFlags)

Definition at line 368 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_log

typedef void(* drgui_on_log) (drgui_context *pContext, const char *message)

Definition at line 379 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_button_dblclick_proc

typedef void(* drgui_on_mouse_button_dblclick_proc) (drgui_element *pElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)

Definition at line 365 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_button_down_proc

typedef void(* drgui_on_mouse_button_down_proc) (drgui_element *pElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)

Definition at line 363 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_button_up_proc

typedef void(* drgui_on_mouse_button_up_proc) (drgui_element *pElement, int mouseButton, int relativeMousePosX, int relativeMousePosY, int stateFlags)

Definition at line 364 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_enter_proc

typedef void(* drgui_on_mouse_enter_proc) (drgui_element *pElement)

Definition at line 360 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_leave_proc

typedef void(* drgui_on_mouse_leave_proc) (drgui_element *pElement)

Definition at line 361 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_move_proc

typedef void(* drgui_on_mouse_move_proc) (drgui_element *pElement, int relativeMousePosX, int relativeMousePosY, int stateFlags)

Definition at line 362 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_mouse_wheel_proc

typedef void(* drgui_on_mouse_wheel_proc) (drgui_element *pElement, int delta, int relativeMousePosX, int relativeMousePosY, int stateFlags)

Definition at line 366 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_move_proc

typedef void(* drgui_on_move_proc) (drgui_element *pElement, float newRelativePosX, float newRelativePosY)

Definition at line 358 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_paint_proc

typedef void(* drgui_on_paint_proc) (drgui_element *pElement, drgui_rect relativeRect, void *pPaintData)

Definition at line 370 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_printable_key_down_proc

typedef void(* drgui_on_printable_key_down_proc) (drgui_element *pElement, unsigned int character, int stateFlags)

Definition at line 369 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_release_keyboard_proc

typedef void(* drgui_on_release_keyboard_proc) (drgui_element *pElement, drgui_element *pNewCapturedElement)

Definition at line 376 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_release_mouse_proc

typedef void(* drgui_on_release_mouse_proc) (drgui_element *pElement)

Definition at line 374 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_on_size_proc

typedef void(* drgui_on_size_proc) (drgui_element *pElement, float newWidth, float newHeight)

Definition at line 359 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_painting_callbacks

Definition at line 184 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_rect

typedef struct drgui_rect drgui_rect

Definition at line 183 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_resource

typedef void* drgui_resource

Definition at line 193 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_sb_on_scroll_proc

typedef void(* drgui_sb_on_scroll_proc) (drgui_element *pSBElement, int scrollPos)

Definition at line 10144 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_set_clip_proc

typedef void(* drgui_set_clip_proc) (drgui_rect relativeRect, void *pPaintData)

Definition at line 383 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tab

typedef struct drgui_tab drgui_tab

Definition at line 11141 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_on_measure_tab_proc

typedef void(* drgui_tabbar_on_measure_tab_proc) (drgui_element *pTBElement, drgui_tab *pTab, float *pWidthOut, float *pHeightOut)

Definition at line 11143 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_on_paint_tab_proc

typedef void(* drgui_tabbar_on_paint_tab_proc) (drgui_element *pTBElement, drgui_tab *pTab, drgui_rect relativeClippingRect, float offsetX, float offsetY, float width, float height, void *pPaintData)

Definition at line 11144 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_on_tab_activated_proc

typedef void(* drgui_tabbar_on_tab_activated_proc) (drgui_element *pTBElement, drgui_tab *pTab, drgui_tab *pOldActiveTab)

Definition at line 11145 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_on_tab_close_proc

typedef void(* drgui_tabbar_on_tab_close_proc) (drgui_element *pTBElement, drgui_tab *pTab)

Definition at line 11147 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_on_tab_deactivated_proc

typedef void(* drgui_tabbar_on_tab_deactivated_proc) (drgui_element *pTBElement, drgui_tab *pTab, drgui_tab *pNewActiveTab)

Definition at line 11146 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_on_tab_mouse_button_up_proc

typedef void(* drgui_tabbar_on_tab_mouse_button_up_proc) (drgui_element *pTBElement, drgui_tab *pTab, int mouseButton, int mouseRelativePosX, int mouseRelativePosY, int stateFlags)

Definition at line 11148 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine

Definition at line 5256 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_on_cursor_move_proc

typedef void(* drgui_text_engine_on_cursor_move_proc) (drgui_text_engine *pTL)

Definition at line 5315 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_on_dirty_proc

typedef void(* drgui_text_engine_on_dirty_proc) (drgui_text_engine *pTL, drgui_rect rect)

Definition at line 5316 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_on_paint_rect_proc

typedef void(* drgui_text_engine_on_paint_rect_proc) (drgui_text_engine *pTL, drgui_rect rect, drgui_color color, drgui_element *pElement, void *pPaintData)

Definition at line 5314 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_on_paint_text_proc

typedef void(* drgui_text_engine_on_paint_text_proc) (drgui_text_engine *pTL, drgui_text_run *pRun, drgui_element *pElement, void *pPaintData)

Definition at line 5313 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_on_text_changed_proc

typedef void(* drgui_text_engine_on_text_changed_proc) (drgui_text_engine *pTL)

Definition at line 5317 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_on_undo_point_changed_proc

typedef void(* drgui_text_engine_on_undo_point_changed_proc) (drgui_text_engine *pTL, unsigned int iUndoPoint)

Definition at line 5318 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_textbox_on_cursor_move_proc

typedef void(* drgui_textbox_on_cursor_move_proc) (drgui_element *pTBElement)

Definition at line 12994 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_textbox_on_undo_point_changed_proc

typedef void(* drgui_textbox_on_undo_point_changed_proc) (drgui_element *pTBElement, unsigned int iUndoPoint)

Definition at line 12995 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tree_view_item

Definition at line 15228 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tvi_measure_proc

typedef void(* drgui_tvi_measure_proc) (drgui_tree_view_item *pItem, float *pWidthOut, float *pHeightOut)

Definition at line 15233 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tvi_on_mouse_leave_proc

typedef void(* drgui_tvi_on_mouse_leave_proc) (drgui_tree_view_item *pItem)

Definition at line 15231 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tvi_on_mouse_move_proc

typedef void(* drgui_tvi_on_mouse_move_proc) (drgui_tree_view_item *pItem, int relativeMousePosX, int relativeMousePosY, bool *pIsOverArrow)

Definition at line 15230 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tvi_on_paint_proc

typedef void(* drgui_tvi_on_paint_proc) (drgui_element *pTVElement, drgui_tree_view_item *pItem, drgui_rect relativeClippingRect, drgui_color backgroundColor, float offsetX, float offsetY, float width, float height, void *pPaintData)

Definition at line 15232 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tvi_on_picked_proc

typedef void(* drgui_tvi_on_picked_proc) (drgui_tree_view_item *pItem)

Definition at line 15234 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_unmap_image_data_proc

typedef void(* drgui_unmap_image_data_proc) (drgui_resource image)

Definition at line 409 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_visible_iteration_proc

typedef bool(* drgui_visible_iteration_proc) (drgui_element *pElement, drgui_rect *pRelativeRect, void *pUserData)

Definition at line 411 of file rhino/demo/c/dr_libs/old/dr_gui.h.

Enumeration Type Documentation

◆ drgui_cursor_type

Common system cursors.

Enumerator
drgui_cursor_none 
drgui_cursor_default 
drgui_cursor_arrow 
drgui_cursor_text 
drgui_cursor_cross 
drgui_cursor_size_ns 
drgui_cursor_size_we 
drgui_cursor_size_nesw 
drgui_cursor_size_nwse 
drgui_cursor_none 
drgui_cursor_default 
drgui_cursor_arrow 
drgui_cursor_text 
drgui_cursor_cross 
drgui_cursor_size_ns 
drgui_cursor_size_we 
drgui_cursor_size_nesw 
drgui_cursor_size_nwse 

Definition at line 196 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_font_slant

Font slants.

Enumerator
drgui_font_slant_none 
drgui_font_slant_italic 
drgui_font_slant_oblique 
drgui_font_slant_none 
drgui_font_slant_italic 
drgui_font_slant_oblique 

Definition at line 230 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_font_weight

Font weights.

Enumerator
drgui_font_weight_medium 
drgui_font_weight_thin 
drgui_font_weight_extra_light 
drgui_font_weight_light 
drgui_font_weight_semi_light 
drgui_font_weight_book 
drgui_font_weight_semi_bold 
drgui_font_weight_bold 
drgui_font_weight_extra_bold 
drgui_font_weight_heavy 
drgui_font_weight_extra_heavy 
drgui_font_weight_normal 
drgui_font_weight_default 
drgui_font_weight_medium 
drgui_font_weight_thin 
drgui_font_weight_extra_light 
drgui_font_weight_light 
drgui_font_weight_semi_light 
drgui_font_weight_book 
drgui_font_weight_semi_bold 
drgui_font_weight_bold 
drgui_font_weight_extra_bold 
drgui_font_weight_heavy 
drgui_font_weight_extra_heavy 
drgui_font_weight_normal 
drgui_font_weight_default 

Definition at line 210 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_image_format

Image formats.

Enumerator
drgui_image_format_rgba8 
drgui_image_format_bgra8 
drgui_image_format_argb8 
drgui_image_format_rgba8 
drgui_image_format_bgra8 
drgui_image_format_argb8 

Definition at line 239 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_sb_orientation

Enumerator
drgui_sb_orientation_none 
drgui_sb_orientation_vertical 
drgui_sb_orientation_horizontal 
drgui_sb_orientation_none 
drgui_sb_orientation_vertical 
drgui_sb_orientation_horizontal 

Definition at line 10136 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tabbar_orientation

Enumerator
drgui_tabbar_orientation_top 
drgui_tabbar_orientation_bottom 
drgui_tabbar_orientation_left 
drgui_tabbar_orientation_right 
drgui_tabbar_orientation_top 
drgui_tabbar_orientation_bottom 
drgui_tabbar_orientation_left 
drgui_tabbar_orientation_right 

Definition at line 11133 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_text_engine_alignment

Enumerator
drgui_text_engine_alignment_left 
drgui_text_engine_alignment_top 
drgui_text_engine_alignment_center 
drgui_text_engine_alignment_right 
drgui_text_engine_alignment_bottom 
drgui_text_engine_alignment_left 
drgui_text_engine_alignment_top 
drgui_text_engine_alignment_center 
drgui_text_engine_alignment_right 
drgui_text_engine_alignment_bottom 

Definition at line 5258 of file rhino/demo/c/dr_libs/old/dr_gui.h.

Function Documentation

◆ drgui_append()

void drgui_append ( drgui_element pChildElement,
drgui_element pParentElement 
)

Attaches the given element as a child of the given parent element, and appends it to the end of the children list.

◆ drgui_append_sibling()

void drgui_append_sibling ( drgui_element pElementToAppend,
drgui_element pElementToAppendTo 
)

Appends the given element to the given sibling.

◆ drgui_begin_dirty()

drgui_element* drgui_begin_dirty ( drgui_element pElement)

Begins accumulating a dirty rectangle.

Returns a pointer to the top level element that was made dirty.

◆ drgui_capture_keyboard()

void drgui_capture_keyboard ( drgui_element pElement)

Sets the element that should receive all future keyboard related events.

Remarks
Releases the keyboard capture with drgui_release_keyboard().

◆ drgui_capture_mouse()

void drgui_capture_mouse ( drgui_element pElement)

Sets the element that should receive all future mouse related events.

Remarks
Release the mouse capture with drgui_release_mosue().

◆ drgui_clamp_rect()

drgui_rect drgui_clamp_rect ( drgui_rect  rect,
drgui_rect  other 
)

Clamps the given rectangle to another.

◆ drgui_clamp_rect_to_element()

bool drgui_clamp_rect_to_element ( const drgui_element pElement,
drgui_rect pRelativeRect 
)

Clamps the given rectangle to the given element and returns whether or not any of it is contained within the element's rectangle.

◆ drgui_create_context()

drgui_context* drgui_create_context ( )

Creates a context.

◆ drgui_create_context_dr_2d()

drgui_context* drgui_create_context_dr_2d ( dr2d_context pDrawingContext)

A covenience function for creating a new context and registering the easy_draw painting callbacks.

Remarks
This is equivalent to drgui_create_context() followed by drgui_register_dr_2d_callbacks().

◆ drgui_create_element()

drgui_element* drgui_create_element ( drgui_context pContext,
drgui_element pParent,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates an element.

◆ drgui_create_font()

drgui_font* drgui_create_font ( drgui_context pContext,
const char *  family,
unsigned int  size,
drgui_font_weight  weight,
drgui_font_slant  slant,
float  rotation,
unsigned int  flags 
)

Creates a font resource.

◆ drgui_create_image()

drgui_image* drgui_create_image ( drgui_context pContext,
unsigned int  width,
unsigned int  height,
drgui_image_format  format,
unsigned int  stride,
const void *  pData 
)

Creates an image that can be passed to drgui_draw_image().

Remarks
The dimensions and format of an image are immutable. If these need to change, then the image needs to be deleted and re-created.
If pData is NULL, the default image data is undefined.
If stride is set to 0, it is assumed to be tightly packed.
Use drgui_map_image_data() and drgui_unmap_image_data() to update or retrieve image data.

◆ drgui_create_scrollbar()

drgui_element* drgui_create_scrollbar ( drgui_context pContext,
drgui_element pParent,
drgui_sb_orientation  orientation,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates a scrollbar element.

◆ drgui_create_tab_bar()

drgui_element* drgui_create_tab_bar ( drgui_context pContext,
drgui_element pParent,
drgui_tabbar_orientation  orientation,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates a new tab bar control.

◆ drgui_create_text_engine()

drgui_text_engine* drgui_create_text_engine ( drgui_context pContext,
size_t  extraDataSize,
void *  pExtraData 
)

Creates a new text engine object.

◆ drgui_create_textbox()

drgui_element* drgui_create_textbox ( drgui_context pContext,
drgui_element pParent,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates a new text box control.

◆ drgui_create_tree_view()

drgui_element* drgui_create_tree_view ( drgui_context pContext,
drgui_element pParent,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates a tree-view control.

◆ drgui_delete_context()

void drgui_delete_context ( drgui_context pContext)

Deletes a context and everything that it created.

◆ drgui_delete_element()

void drgui_delete_element ( drgui_element pElement)

Deletes and element.

◆ drgui_delete_font()

void drgui_delete_font ( drgui_font pFont)

Deletes a font resource.

◆ drgui_delete_image()

void drgui_delete_image ( drgui_image pImage)

Deletes the given image.

◆ drgui_delete_scrollbar()

void drgui_delete_scrollbar ( drgui_element pSBElement)

Deletes the given scrollbar element.

◆ drgui_delete_tab_bar()

void drgui_delete_tab_bar ( drgui_element pTBElement)

Deletes the given tab bar control.

◆ drgui_delete_text_engine()

void drgui_delete_text_engine ( drgui_text_engine pTL)

Deletes the given text engine.

◆ drgui_delete_textbox()

void drgui_delete_textbox ( drgui_element pTBElement)

Deletest the given text box control.

◆ drgui_delete_tree_view()

void drgui_delete_tree_view ( drgui_element pTVElement)

Deletes the given tree-view control.

◆ drgui_detach()

void drgui_detach ( drgui_element pChildElement)

Detaches the given element from it's parent.

◆ drgui_dirty()

void drgui_dirty ( drgui_element pElement,
drgui_rect  relativeRect 
)

Marks a region of the given element as dirty.

Remarks
This will not redraw the element immediately, but instead post a paint event.

◆ drgui_disable_auto_dirty()

void drgui_disable_auto_dirty ( drgui_context pContext)

Disable's automatic dirtying of elements.

◆ drgui_disable_clipping()

void drgui_disable_clipping ( drgui_element pElement)

Disables clipping against the parent for the given element.

◆ drgui_draw()

void drgui_draw ( drgui_element pElement,
drgui_rect  relativeRect,
void *  pPaintData 
)

Draws the given element.

Remarks
Do not call this on one element, then again on it's children. Any children that fall inside the specified rectangle will also be redrawn.
This will call painting event handlers which will give the application time to do custom drawing.
When using easy_draw to do drawing, pPaintData must be set to a pointer to the relevant easydraw_surface object.

◆ drgui_draw_border()

void drgui_draw_border ( drgui_element pElement,
float  borderWidth,
drgui_color  color,
void *  pUserData 
)

Draws a border around the given element.

◆ drgui_draw_image()

void drgui_draw_image ( drgui_element pElement,
drgui_image pImage,
drgui_draw_image_args pArgs,
void *  pPaintData 
)

Draws an image.

◆ drgui_draw_rect()

void drgui_draw_rect ( drgui_element pElement,
drgui_rect  relativeRect,
drgui_color  color,
void *  pPaintData 
)

Draws a rectangle on the given element.

◆ drgui_draw_rect_outline()

void drgui_draw_rect_outline ( drgui_element pElement,
drgui_rect  relativeRect,
drgui_color  color,
float  outlineWidth,
void *  pPaintData 
)

Draws the outline of a rectangle on the given element.

◆ drgui_draw_rect_with_outline()

void drgui_draw_rect_with_outline ( drgui_element pElement,
drgui_rect  relativeRect,
drgui_color  color,
float  outlineWidth,
drgui_color  outlineColor,
void *  pPaintData 
)

Draws a filled rectangle with an outline on the given element.

◆ drgui_draw_round_rect()

void drgui_draw_round_rect ( drgui_element pElement,
drgui_rect  relativeRect,
drgui_color  color,
float  radius,
void *  pPaintData 
)

Draws a rectangle with rounded corners on the given element.

◆ drgui_draw_round_rect_outline()

void drgui_draw_round_rect_outline ( drgui_element pElement,
drgui_rect  relativeRect,
drgui_color  color,
float  radius,
float  outlineWidth,
void *  pPaintData 
)

Draws the outline of a rectangle with rounded corners on the given element.

◆ drgui_draw_round_rect_with_outline()

void drgui_draw_round_rect_with_outline ( drgui_element pElement,
drgui_rect  relativeRect,
drgui_color  color,
float  radius,
float  outlineWidth,
drgui_color  outlineColor,
void *  pPaintData 
)

Draws a filled rectangle and it's outline with rounded corners on the given element.

◆ drgui_draw_text()

void drgui_draw_text ( drgui_element pElement,
drgui_font pFont,
const char *  text,
int  textLengthInBytes,
float  posX,
float  posY,
drgui_color  color,
drgui_color  backgroundColor,
void *  pPaintData 
)

Draws a run of text on the given element.

Remarks
This does not do any complex formatting like multiple lines and whatnot. Complex formatting can be achieved with multiple calls to this function.
textSizeInBytes can be -1 in which case the text string is treated as null terminated.

◆ drgui_enable_auto_dirty()

void drgui_enable_auto_dirty ( drgui_context pContext)

Enable's automatic dirtying of elements.

◆ drgui_enable_clipping()

void drgui_enable_clipping ( drgui_element pElement)

Enables clipping against the parent for the given element.

◆ drgui_end_dirty()

void drgui_end_dirty ( drgui_element pElement)

Ends accumulating a dirty rectangle, and requests a redraw from the backend if the counter reaches zero.

◆ drgui_find_element_under_point()

drgui_element* drgui_find_element_under_point ( drgui_element pTopLevelElement,
float  absolutePosX,
float  absolutePosY 
)

Finds the element under the given point taking mouse pass-through and hit testing into account.

◆ drgui_find_top_level_element()

drgui_element* drgui_find_top_level_element ( drgui_element pElement)

Retrieves a pointer to the given element's top-level ancestor.

Remarks
If pElement is the top level element, the return value will be pElement.

◆ drgui_get_absolute_position()

void drgui_get_absolute_position ( const drgui_element pElement,
float *  positionXOut,
float *  positionYOut 
)

Retrieves the absolute position of the given element.

◆ drgui_get_absolute_position_x()

float drgui_get_absolute_position_x ( const drgui_element pElement)

◆ drgui_get_absolute_position_y()

float drgui_get_absolute_position_y ( const drgui_element pElement)

◆ drgui_get_absolute_rect()

drgui_rect drgui_get_absolute_rect ( const drgui_element pElement)

Retrieves the absolute rectangle for the given element.

◆ drgui_get_clip()

void drgui_get_clip ( drgui_element pElement,
drgui_rect pRelativeRect,
void *  pPaintData 
)

Retrieves the current clipping rectangle.

◆ drgui_get_cursor()

drgui_cursor_type drgui_get_cursor ( drgui_element pElement)

Retrieves the cursor to use when the mouse enters the given GUI element.

◆ drgui_get_element_with_keyboard_capture()

drgui_element* drgui_get_element_with_keyboard_capture ( drgui_context pContext)

Retrieves a pointer to the element with the keyboard capture.

◆ drgui_get_element_with_mouse_capture()

drgui_element* drgui_get_element_with_mouse_capture ( drgui_context pContext)

Retrieves a pointer to the element with the mouse capture.

◆ drgui_get_extra_data()

void* drgui_get_extra_data ( drgui_element pElement)

Retrieves a pointer to the extra data of the given element.

◆ drgui_get_extra_data_size()

size_t drgui_get_extra_data_size ( drgui_element pElement)

Retrieves the size of the extra data of the given element, in bytes.

◆ drgui_get_font_metrics()

bool drgui_get_font_metrics ( drgui_font pFont,
drgui_font_metrics pMetricsOut 
)

Retrieves the metrics of the given font.

◆ drgui_get_glyph_metrics()

bool drgui_get_glyph_metrics ( drgui_font pFont,
unsigned int  utf32,
drgui_glyph_metrics pMetricsOut 
)

Retrieves the metrics of the glyph for the given character when rendered with the given font.

◆ drgui_get_height()

float drgui_get_height ( const drgui_element pElement)

◆ drgui_get_image_size()

void drgui_get_image_size ( drgui_image pImage,
unsigned int *  pWidthOut,
unsigned int *  pHeightOut 
)

Retrieves the size of the given image.

◆ drgui_get_local_rect()

drgui_rect drgui_get_local_rect ( const drgui_element pElement)

Retrieves the local rectangle for the given element.

Remarks
The local rectangle is equivalent to drgui_make_rect(0, 0, drgui_get_width(pElement), drgui_get_height(pElement));

◆ drgui_get_optimal_image_format()

drgui_image_format drgui_get_optimal_image_format ( drgui_context pContext)

Retrieves the optimal image format for the given context.

◆ drgui_get_parent()

drgui_element* drgui_get_parent ( drgui_element pChildElement)

◆ drgui_get_relative_position()

void drgui_get_relative_position ( const drgui_element pElement,
float *  relativePosXOut,
float *  relativePosYOut 
)

Retrieves the relative position of the given element.

◆ drgui_get_relative_position_x()

float drgui_get_relative_position_x ( const drgui_element pElement)

◆ drgui_get_relative_position_y()

float drgui_get_relative_position_y ( const drgui_element pElement)

◆ drgui_get_relative_rect()

drgui_rect drgui_get_relative_rect ( const drgui_element pElement)

Retrieves the relative rectangle for the given element.

◆ drgui_get_size()

void drgui_get_size ( const drgui_element pElement,
float *  widthOut,
float *  heightOut 
)

Retrieves the size of the given element.

◆ drgui_get_text_cursor_position_from_char()

bool drgui_get_text_cursor_position_from_char ( drgui_font pFont,
const char *  text,
size_t  characterIndex,
float *  pTextCursorPosXOut 
)

Retrieves the position to palce a text cursor based on the character at the given index for the given string when drawn with the given font.

◆ drgui_get_text_cursor_position_from_point()

bool drgui_get_text_cursor_position_from_point ( drgui_font pFont,
const char *  text,
size_t  textSizeInBytes,
float  maxWidth,
float  inputPosX,
float *  pTextCursorPosXOut,
size_t *  pCharacterIndexOut 
)

Retrieves the position to place a text cursor based on the given point for the given string when drawn with the given font.

◆ drgui_get_type()

const char* drgui_get_type ( drgui_element pElement)

Retrieves the type fo the element.

◆ drgui_get_width()

float drgui_get_width ( const drgui_element pElement)

◆ drgui_grow_rect()

drgui_rect drgui_grow_rect ( drgui_rect  rect,
float  amount 
)

Expands the given rectangle on all sides by the given amount.

Remarks
This will increase the width and height of the rectangle by <amount> x 2.
The growth amount can be negative, in which case it will be shrunk. Note that this does not do any checking to ensure the rectangle contains positive dimensions after a shrink.

◆ drgui_has_keyboard_capture()

bool drgui_has_keyboard_capture ( drgui_element pElement)

Determines whether or not the given element has the keyboard capture.

◆ drgui_has_mouse_capture()

bool drgui_has_mouse_capture ( drgui_element pElement)

Determines whether or not the given element has the mouse capture.

◆ drgui_hide()

void drgui_hide ( drgui_element pElement)

Hides the given element.

◆ drgui_is_ancestor()

bool drgui_is_ancestor ( drgui_element pAncestorElement,
drgui_element pChildElement 
)

Determines whether or not the given element is an ancestor of the other.

◆ drgui_is_auto_dirty_enabled()

bool drgui_is_auto_dirty_enabled ( drgui_context pContext)

Determines whether or not automatic dirtying is enabled.

◆ drgui_is_child()

bool drgui_is_child ( drgui_element pChildElement,
drgui_element pParentElement 
)

Determines whether or not the given element is a child of the other.

Remarks
This is not recursive. Use drgui_is_descendant() to do a recursive traversal.

◆ drgui_is_clipping_enabled()

bool drgui_is_clipping_enabled ( const drgui_element pElement)

Determines whether or not clipping is enabled for the given element.

◆ drgui_is_descendant()

bool drgui_is_descendant ( drgui_element pChildElement,
drgui_element pAncestorElement 
)

Determines whether or not the given element is a descendant of the other.

◆ drgui_is_element_under_mouse()

bool drgui_is_element_under_mouse ( drgui_element pTopLevelElement)

Determines whether or not the given element is currently sitting directly under the mouse.

◆ drgui_is_of_type()

bool drgui_is_of_type ( drgui_element pElement,
const char *  type 
)

Determines whether or not the given element is of the given type.

◆ drgui_is_parent()

bool drgui_is_parent ( drgui_element pParentElement,
drgui_element pChildElement 
)

Determines whether or not the given element is the parent of the other.

Remarks
This is not recursive. Use drgui_is_ancestor() to do a recursive traversal.

◆ drgui_is_point_inside_element()

bool drgui_is_point_inside_element ( drgui_element pElement,
float  absolutePosX,
float  absolutePosY 
)

Determines whether or not the given point is inside the given element.

Remarks
This will use hit testing to determine whether or not the point is inside the element.

◆ drgui_is_point_inside_element_bounds()

bool drgui_is_point_inside_element_bounds ( const drgui_element pElement,
float  absolutePosX,
float  absolutePosY 
)

Determines whether or not the given point is inside the bounds of the given element.

Remarks
This only checks if the point is inside the bounds of the element and does not take hit testing into account. This difference with this one and drgui_is_point_inside_element() is that the latter will use hit testing.

◆ drgui_is_self_or_ancestor()

bool drgui_is_self_or_ancestor ( drgui_element pAncestorElement,
drgui_element pChildElement 
)

Determines whether or not the given element is itself or a descendant.

◆ drgui_is_self_or_descendant()

bool drgui_is_self_or_descendant ( drgui_element pChildElement,
drgui_element pAncestorElement 
)

Determines whether or not the given element is itself or a descendant.

◆ drgui_is_visible()

bool drgui_is_visible ( const drgui_element pElement)

Determines whether or not the element is marked as visible.

Remarks
This is a direct accessor for the internal visible flag of the element and is not recursive. Thus, if this element is marked as visible, but it's parent is invisible, it will still return true. Use drgui_is_visible_recursive() to do a recursive visibility check.

◆ drgui_is_visible_recursive()

bool drgui_is_visible_recursive ( const drgui_element pElement)

Recursively determines whether or not the element is marked as visible.

◆ drgui_iterate_visible_elements()

bool drgui_iterate_visible_elements ( drgui_element pParentElement,
drgui_rect  relativeRect,
drgui_visible_iteration_proc  callback,
void *  pUserData 
)

Performs a recursive traversal of all visible elements in the given rectangle.

Parameters
pParentElement[in] A pointer to the element to iterate.
Remarks
pParentElement will be included in the iteration is it is within the rectangle.
The rectangle should be relative to pParentElement.
The iteration callback function takes a pointer to a rectangle structure that represents the visible portion of the element. This pointer can be modified by the callback to create an adjusted rectangle which can be used for clipping.

◆ drgui_key_parse()

static drgui_key drgui_key_parse ( const char *  str)
inlinestatic

Definition at line 515 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_key_to_string()

static size_t drgui_key_to_string ( drgui_key  key,
char *  strOut,
size_t  strOutSize 
)
inlinestatic

Definition at line 465 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_make_inside_out_rect()

drgui_rect drgui_make_inside_out_rect ( )

Creates an inside-out rectangle.

Remarks
An inside our rectangle is a negative-dimension rectangle with each edge at the extreme edges. The left edge will be at the right-most side and the right edge will be at the left-most side. The same applies for the top and bottom edges.

◆ drgui_make_point_absolute()

void drgui_make_point_absolute ( const drgui_element pElement,
float *  positionX,
float *  positionY 
)

Converts the given point from relative to absolute based on the given element.

◆ drgui_make_point_relative()

void drgui_make_point_relative ( const drgui_element pElement,
float *  positionX,
float *  positionY 
)

Converts the given point from absolute to relative to the given element.

◆ drgui_make_rect()

drgui_rect drgui_make_rect ( float  left,
float  top,
float  right,
float  bottom 
)

Creates a drgui_rect object.

◆ drgui_make_rect_absolute()

drgui_rect drgui_make_rect_absolute ( const drgui_element pElement,
drgui_rect pRect 
)

Converts the given rectangle from relative to absolute based on the given element.

◆ drgui_make_rect_relative()

drgui_rect drgui_make_rect_relative ( const drgui_element pElement,
drgui_rect pRect 
)

Converts the given rectangle from absolute to relative to the given element.

◆ drgui_map_image_data()

void* drgui_map_image_data ( drgui_image pImage,
unsigned int  accessFlags 
)

Retrieves a pointer to a buffer representing the given image's data.

Call drgui_unmap_image_data() when you are done with this function.

Use this function to access an image's data. The returned pointer does not necessarilly point to the image's actual data, so when writing to this pointer, nothing is actually updated until drgui_unmap_image_data() is called.

The returned data will contain the image data at the time of the mapping.

◆ drgui_measure_string()

bool drgui_measure_string ( drgui_font pFont,
const char *  text,
size_t  textLengthInBytes,
float *  pWidthOut,
float *  pHeightOut 
)

Retrieves the dimensions of the given string when drawn with the given font.

Remarks
When the length of the text is 0, the width will be set to 0 and the height will be set to the line height.

◆ drgui_offset_rect()

drgui_rect drgui_offset_rect ( drgui_rect  rect,
float  offsetX,
float  offsetY 
)

Offsets the given rectangle.

◆ drgui_on_size_fit_children_to_parent()

void drgui_on_size_fit_children_to_parent ( drgui_element pElement,
float  newWidth,
float  newHeight 
)

An on_size event callback that resizes every child element to that of the parent.

◆ drgui_pass_through_hit_test()

bool drgui_pass_through_hit_test ( drgui_element pElement,
float  mousePosX,
float  mousePosY 
)

An on_hit_test event callback that can be used to always fail the mouse hit test.

◆ drgui_post_inbound_event_key_down()

void drgui_post_inbound_event_key_down ( drgui_context pContext,
drgui_key  key,
int  stateFlags 
)

Posts a key down inbound event.

◆ drgui_post_inbound_event_key_up()

void drgui_post_inbound_event_key_up ( drgui_context pContext,
drgui_key  key,
int  stateFlags 
)

Posts a key up inbound event.

◆ drgui_post_inbound_event_mouse_button_dblclick()

void drgui_post_inbound_event_mouse_button_dblclick ( drgui_element pTopLevelElement,
int  mouseButton,
int  mousePosX,
int  mousePosY,
int  stateFlags 
)

Posts a mouse button double-clicked inbound event.

◆ drgui_post_inbound_event_mouse_button_down()

void drgui_post_inbound_event_mouse_button_down ( drgui_element pTopLevelElement,
int  mouseButton,
int  mousePosX,
int  mousePosY,
int  stateFlags 
)

Posts a mouse button down inbound event.

◆ drgui_post_inbound_event_mouse_button_up()

void drgui_post_inbound_event_mouse_button_up ( drgui_element pTopLevelElement,
int  mouseButton,
int  mousePosX,
int  mousePosY,
int  stateFlags 
)

Posts a mouse button up inbound event.

◆ drgui_post_inbound_event_mouse_leave()

void drgui_post_inbound_event_mouse_leave ( drgui_element pTopLevelElement)

Posts a mouse leave inbound event.

Remarks
The intention behind this event is to allow the application to let dr_gui know that the mouse have left the window. Since dr_gui does not have any notion of a window it must rely on the host application to notify it.

◆ drgui_post_inbound_event_mouse_move()

void drgui_post_inbound_event_mouse_move ( drgui_element pTopLevelElement,
int  mousePosX,
int  mousePosY,
int  stateFlags 
)

Posts a mouse move inbound event.

◆ drgui_post_inbound_event_mouse_wheel()

void drgui_post_inbound_event_mouse_wheel ( drgui_element pTopLevelElement,
int  mouseButton,
int  mousePosX,
int  mousePosY,
int  stateFlags 
)

Posts a mouse wheel inbound event.

◆ drgui_post_inbound_event_printable_key_down()

void drgui_post_inbound_event_printable_key_down ( drgui_context pContext,
unsigned int  character,
int  stateFlags 
)

Posts a printable key down inbound event.

Remarks
The character argument should be a UTF-32 code point.

◆ drgui_prepend()

void drgui_prepend ( drgui_element pChildElement,
drgui_element pParentElement 
)

Attaches the given element as a child of the given parent element, and prepends it to the end of the children list.

◆ drgui_prepend_sibling()

void drgui_prepend_sibling ( drgui_element pElementToPrepend,
drgui_element pElementToPrependTo 
)

Prepends the given element to the given sibling.

◆ drgui_rect_contains_point()

bool drgui_rect_contains_point ( drgui_rect  rect,
float  posX,
float  posY 
)

Determines whether or not the given rectangle contains the given point.

Remarks
An important not here is that if the position is sitting on the right or bottom border, false will be returned. If, however, the point is sitting on the left or top border, true will be returned. The reason for this is that elements may sit exactly side-by-side with each other, and if we use this function to determine if a point is contained within an element (which we do), we would end up having this return true for both elements, which we don't want.

◆ drgui_rect_equal()

bool drgui_rect_equal ( drgui_rect  rect0,
drgui_rect  rect1 
)

Determines whether or not two rectangles are equal.

◆ drgui_rect_has_volume()

bool drgui_rect_has_volume ( drgui_rect  rect)

Determines whether or not the given rectangle has any volume (width and height > 0).

◆ drgui_rect_union()

drgui_rect drgui_rect_union ( drgui_rect  rect0,
drgui_rect  rect1 
)

Creates a rectangle that contains both of the given rectangles.

◆ drgui_register_dr_2d_callbacks()

void drgui_register_dr_2d_callbacks ( drgui_context pContext,
dr2d_context pDrawingContext 
)

Registers the drawing callbacks for use with easy_draw.

Remarks
The user data of each callback is assumed to be a pointer to an easydraw_surface object.

◆ drgui_register_painting_callbacks()

bool drgui_register_painting_callbacks ( drgui_context pContext,
void *  pPaintingContext,
drgui_painting_callbacks  callbacks 
)

Registers the custom painting callbacks.

Remarks
This can only be called once, so it should always be done after initialization. This will fail if called more than once.

◆ drgui_release_keyboard()

void drgui_release_keyboard ( drgui_context pContext)

Releases the keyboard capture.

◆ drgui_release_keyboard_no_global_notify()

void drgui_release_keyboard_no_global_notify ( drgui_context pContext)

Releases the keyboard capture without posting the global-scoped event. Should only be used in very specific cases, usually in combination with awkward interop with the window system.

◆ drgui_release_mouse()

void drgui_release_mouse ( drgui_context pContext)

Releases the mouse capture.

◆ drgui_release_mouse_no_global_notify()

void drgui_release_mouse_no_global_notify ( drgui_context pContext)

Releases the mouse capture without posting the global-scoped event. Should only be used in very specific cases, usually in combination with awkward interop with the window system.

◆ drgui_rgb()

drgui_color drgui_rgb ( drgui_byte  r,
drgui_byte  g,
drgui_byte  b 
)

Creates a color object from a set of RGB color components.

◆ drgui_rgba()

drgui_color drgui_rgba ( drgui_byte  r,
drgui_byte  g,
drgui_byte  b,
drgui_byte  a 
)

Creates a color object from a set of RGBA color components.

◆ drgui_sb_disable_thumb_auto_hide()

void drgui_sb_disable_thumb_auto_hide ( drgui_element pSBElement)

Disables auto-hiding of the thumb.

◆ drgui_sb_enable_thumb_auto_hide()

void drgui_sb_enable_thumb_auto_hide ( drgui_element pSBElement)

Enables auto-hiding of the thumb.

◆ drgui_sb_get_extra_data()

void* drgui_sb_get_extra_data ( drgui_element pSBElement)

Retrieves a pointer to the extra data associated with the scrollbar.

◆ drgui_sb_get_extra_data_size()

size_t drgui_sb_get_extra_data_size ( drgui_element pSBElement)

Retrieves the size of the extra data associated with the scrollbar.

◆ drgui_sb_get_mouse_wheel_scale()

int drgui_sb_get_mouse_wheel_scale ( drgui_element pSBElement)

Retrieves the mouse wheel scale.

◆ drgui_sb_get_on_scroll()

drgui_sb_on_scroll_proc drgui_sb_get_on_scroll ( drgui_element pSBElement)

Retrieves the function call when the given scrollbar is scrolled.

◆ drgui_sb_get_orientation()

drgui_sb_orientation drgui_sb_get_orientation ( drgui_element pSBElement)

Retrieves the orientation of the given scrollbar.

◆ drgui_sb_get_page_size()

int drgui_sb_get_page_size ( drgui_element pSBElement)

Retrieves the page size of the given scrollbar's page.

◆ drgui_sb_get_range()

void drgui_sb_get_range ( drgui_element pSBElement,
int *  pRangeMinOut,
int *  pRangeMaxOut 
)

Retrieves the given scrollbar's range.

◆ drgui_sb_get_scroll_position()

int drgui_sb_get_scroll_position ( drgui_element pSBElement)

Retrieves the scroll position.

◆ drgui_sb_get_thumb_rect()

drgui_rect drgui_sb_get_thumb_rect ( drgui_element pSBElement)

Calculates the relative rectangle of the given scrollbar's thumb.

◆ drgui_sb_is_thumb_auto_hide_enabled()

bool drgui_sb_is_thumb_auto_hide_enabled ( drgui_element pSBElement)

Determines whether or not thumb auto-hiding is enabled.

◆ drgui_sb_is_thumb_visible()

bool drgui_sb_is_thumb_visible ( drgui_element pSBElement)

Determines whether or not the thumb is visible.

Remarks
This is determined by whether or not the thumb is set to auto-hide and the current range and page size.

◆ drgui_sb_on_mouse_button_down()

void drgui_sb_on_mouse_button_down ( drgui_element pSBElement,
int  button,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button down event needs to be processed for the given scrollbar.

◆ drgui_sb_on_mouse_button_up()

void drgui_sb_on_mouse_button_up ( drgui_element pSBElement,
int  button,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button up event needs to be processed for the given scrollbar.

◆ drgui_sb_on_mouse_leave()

void drgui_sb_on_mouse_leave ( drgui_element pSBElement)

Called when the mouse leave event needs to be processed for the given scrollbar.

◆ drgui_sb_on_mouse_move()

void drgui_sb_on_mouse_move ( drgui_element pSBElement,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse move event needs to be processed for the given scrollbar.

◆ drgui_sb_on_mouse_wheel()

void drgui_sb_on_mouse_wheel ( drgui_element pSBElement,
int  delta,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse wheel event needs to be processed for the given scrollbar.

◆ drgui_sb_on_paint()

void drgui_sb_on_paint ( drgui_element pSBElement,
drgui_rect  relativeClippingRect,
void *  pPaintData 
)

Called when the paint event needs to be processed.

◆ drgui_sb_on_size()

void drgui_sb_on_size ( drgui_element pSBElement,
float  newWidth,
float  newHeight 
)

Called when the size event needs to be processed for the given scrollbar.

◆ drgui_sb_scroll()

void drgui_sb_scroll ( drgui_element pSBElement,
int  offset 
)

Scrolls by the given amount.

Remarks
If the resulting scroll position differs from the old one, the on on_scroll event will be posted.

◆ drgui_sb_scroll_to()

void drgui_sb_scroll_to ( drgui_element pSBElement,
int  newScrollPos 
)

Scrolls to the given position.

Remarks
This differs from drgui_sb_set_scroll_position in that it will post the on_scroll event.
Note that the actual maximum scrollable position is equal to the maximum range value minus the page size.

◆ drgui_sb_set_default_thumb_color()

void drgui_sb_set_default_thumb_color ( drgui_element pSBElement,
drgui_color  color 
)

Sets the default color of the thumb.

◆ drgui_sb_set_hovered_thumb_color()

void drgui_sb_set_hovered_thumb_color ( drgui_element pSBElement,
drgui_color  color 
)

Sets the hovered color of the thumb.

◆ drgui_sb_set_mouse_wheel_scele()

void drgui_sb_set_mouse_wheel_scele ( drgui_element pSBElement,
int  scale 
)

Sets the mouse wheel scale.

Remarks
Set this to a negative value to reverse the direction.

◆ drgui_sb_set_on_scroll()

void drgui_sb_set_on_scroll ( drgui_element pSBElement,
drgui_sb_on_scroll_proc  onScroll 
)

Sets the function to call when the given scrollbar is scrolled.

◆ drgui_sb_set_page_size()

void drgui_sb_set_page_size ( drgui_element pSBElement,
int  pageSize 
)

Sets the page size of the given scrollbar's page.

◆ drgui_sb_set_pressed_thumb_color()

void drgui_sb_set_pressed_thumb_color ( drgui_element pSBElement,
drgui_color  color 
)

Sets the pressed color of the thumb.

◆ drgui_sb_set_range()

void drgui_sb_set_range ( drgui_element pSBElement,
int  rangeMin,
int  rangeMax 
)

Sets the given scrollbar's range.

◆ drgui_sb_set_range_and_page_size()

void drgui_sb_set_range_and_page_size ( drgui_element pSBElement,
int  rangeMin,
int  rangeMax,
int  pageSize 
)

Sets the range and page size.

Remarks
Use this when both the range and page size need to be updated at the same time.

◆ drgui_sb_set_scroll_position()

void drgui_sb_set_scroll_position ( drgui_element pSBElement,
int  position 
)

Explicitly sets the scroll position.

Remarks
This will move the thumb, but not post the on_scroll event.
The scroll position will be clamped to the current range, minus the page size.

◆ drgui_sb_set_track_color()

void drgui_sb_set_track_color ( drgui_element pSBElement,
drgui_color  color 
)

Sets the color of the track.

◆ drgui_scale_rect()

drgui_rect drgui_scale_rect ( drgui_rect  rect,
float  scaleX,
float  scaleY 
)

Scales the given rectangle.

Parameters
scaleX[in] The scale to apply to <left> and <right>
scaleY[in] The scale to apply to <top> and <bottom>
Remarks
This will modify the <left> and <top> properties which means the rectangle will change position. To adjust only the size, scale the rectangle manually.

◆ drgui_set_absolute_position()

void drgui_set_absolute_position ( drgui_element pElement,
float  positionX,
float  positionY 
)

Sets the absolute position of the given element.

◆ drgui_set_clip()

void drgui_set_clip ( drgui_element pElement,
drgui_rect  relativeRect,
void *  pPaintData 
)

Sets the clipping rectangle to apply to all future draw operations on this element.

◆ drgui_set_cursor()

void drgui_set_cursor ( drgui_element pElement,
drgui_cursor_type  cursor 
)

Sets the cursor to use when the mouse enters the given GUI element.

◆ drgui_set_global_on_capture_keyboard()

void drgui_set_global_on_capture_keyboard ( drgui_context pContext,
drgui_on_capture_keyboard_proc  onCaptureKeyboard 
)

Registers the global on_capture_keyboard event callback.

Remarks
This is called whenever an element receives an the keyboard capture and allows an application to do an operating system level keyboard focus against the container window or whatnot.
The advantage of using a global event callback is that it can be set once at the context level rather than many times at the element level.

◆ drgui_set_global_on_capture_mouse()

void drgui_set_global_on_capture_mouse ( drgui_context pContext,
drgui_on_capture_mouse_proc  onCaptureMouse 
)

Registers the global on_capture_mouse event callback.

Remarks
This is called whenever an element receives an the mouse capture and allows an application to do operating system level mouse captures against the container window or whatnot.
The advantage of using a global event callback is that it can be set once at the context level rather than many times at the element level.

◆ drgui_set_global_on_change_cursor()

void drgui_set_global_on_change_cursor ( drgui_context pContext,
drgui_on_change_cursor_proc  onChangeCursor 
)

Sets the global on_change_cursor event callback.

Remarks
This is called whenever the operating system needs to change the cursor.

◆ drgui_set_global_on_dirty()

void drgui_set_global_on_dirty ( drgui_context pContext,
drgui_on_dirty_proc  onDirty 
)

Registers the global on_dirty event callback.

Remarks
This is called whenever a region of an element is marked as dirty and allows an application to mark the region of the container window as dirty to trigger an operating system level repaint of the window.

◆ drgui_set_global_on_release_keyboard()

void drgui_set_global_on_release_keyboard ( drgui_context pContext,
drgui_on_capture_keyboard_proc  onReleaseKeyboard 
)

Registers the global on_release_keyboard event callback.

Remarks
This is called whenever an element loses an the keyboard capture and allows an application to do an operating system level keyboard release against the container window or whatnot.
The advantage of using a global event callback is that it can be set once at the context level rather than many times at the element level.

◆ drgui_set_global_on_release_mouse()

void drgui_set_global_on_release_mouse ( drgui_context pContext,
drgui_on_release_mouse_proc  onReleaseMouse 
)

Registers the global on_release_mouse event callback.

Remarks
This is called whenever an element loses an the mouse capture and allows an application to do operating system level mouse releases against the container window or whatnot.
The advantage of using a global event callback is that it can be set once at the context level rather than many times at the element level.

◆ drgui_set_on_capture_keyboard()

void drgui_set_on_capture_keyboard ( drgui_element pElement,
drgui_on_capture_keyboard_proc  callback 
)

Registers the on_capture_keyboard event callback.

◆ drgui_set_on_capture_mouse()

void drgui_set_on_capture_mouse ( drgui_element pElement,
drgui_on_capture_mouse_proc  callback 
)

Registers the on_capture_mouse event callback.

◆ drgui_set_on_delete_element()

void drgui_set_on_delete_element ( drgui_context pContext,
drgui_on_delete_element_proc  onDeleteElement 
)

Sets the function to call when an element is deleted.

◆ drgui_set_on_dirty()

void drgui_set_on_dirty ( drgui_element pElement,
drgui_on_dirty_proc  callback 
)

Registers the on_dirty event callback.

◆ drgui_set_on_hittest()

void drgui_set_on_hittest ( drgui_element pElement,
drgui_on_hittest_proc  callback 
)

Registers the on_hittest event callback.

◆ drgui_set_on_key_down()

void drgui_set_on_key_down ( drgui_element pElement,
drgui_on_key_down_proc  callback 
)

Registers the on_key_down event callback.

◆ drgui_set_on_key_up()

void drgui_set_on_key_up ( drgui_element pElement,
drgui_on_key_up_proc  callback 
)

Registers the on_key_up event callback.

◆ drgui_set_on_log()

void drgui_set_on_log ( drgui_context pContext,
drgui_on_log  onLog 
)

Registers the callback to call when a log message is posted.

◆ drgui_set_on_mouse_button_dblclick()

void drgui_set_on_mouse_button_dblclick ( drgui_element pElement,
drgui_on_mouse_button_dblclick_proc  callback 
)

Registers the on_mouse_button_down event callback.

◆ drgui_set_on_mouse_button_down()

void drgui_set_on_mouse_button_down ( drgui_element pElement,
drgui_on_mouse_button_down_proc  callback 
)

Registers the on_mouse_button_down event callback.

◆ drgui_set_on_mouse_button_up()

void drgui_set_on_mouse_button_up ( drgui_element pElement,
drgui_on_mouse_button_up_proc  callback 
)

Registers the on_mouse_button_up event callback.

◆ drgui_set_on_mouse_enter()

void drgui_set_on_mouse_enter ( drgui_element pElement,
drgui_on_mouse_enter_proc  callback 
)

Registers the on_mouse_enter event callback.

◆ drgui_set_on_mouse_leave()

void drgui_set_on_mouse_leave ( drgui_element pElement,
drgui_on_mouse_leave_proc  callback 
)

Registers the on_mouse_leave event callback.

◆ drgui_set_on_mouse_move()

void drgui_set_on_mouse_move ( drgui_element pElement,
drgui_on_mouse_move_proc  callback 
)

Registers the on_mouse_move event callback.

◆ drgui_set_on_mouse_wheel()

void drgui_set_on_mouse_wheel ( drgui_element pElement,
drgui_on_mouse_wheel_proc  callback 
)

Registers the on_mouse_wheel event callback.

◆ drgui_set_on_move()

void drgui_set_on_move ( drgui_element pElement,
drgui_on_move_proc  callback 
)

Registers the on_move event callback.

◆ drgui_set_on_paint()

void drgui_set_on_paint ( drgui_element pElement,
drgui_on_paint_proc  callback 
)

Registers the on_paint event callback.

◆ drgui_set_on_printable_key_down()

void drgui_set_on_printable_key_down ( drgui_element pElement,
drgui_on_printable_key_down_proc  callback 
)

Registers the on_printable_key_down event callback.

◆ drgui_set_on_release_keyboard()

void drgui_set_on_release_keyboard ( drgui_element pElement,
drgui_on_release_keyboard_proc  callback 
)

Registers the on_release_keyboard event callback.

◆ drgui_set_on_release_mouse()

void drgui_set_on_release_mouse ( drgui_element pElement,
drgui_on_release_mouse_proc  callback 
)

Registers the on_release_mouse event callback.

◆ drgui_set_on_size()

void drgui_set_on_size ( drgui_element pElement,
drgui_on_size_proc  callback 
)

Registers the on_size event callback.

◆ drgui_set_relative_position()

void drgui_set_relative_position ( drgui_element pElement,
float  relativePosX,
float  relativePosY 
)

Sets the relative position of the given element.

◆ drgui_set_size()

void drgui_set_size ( drgui_element pElement,
float  width,
float  height 
)

Sets the size of the given element.

◆ drgui_set_type()

bool drgui_set_type ( drgui_element pElement,
const char *  type 
)

Sets the type of the element.

The type name cannot be more than 63 characters in length.

◆ drgui_show()

void drgui_show ( drgui_element pElement)

Shows the given element.

◆ drgui_strcpy()

static size_t drgui_strcpy ( char *  dst,
size_t  dstSize,
const char *  src 
)
static

Definition at line 456 of file rhino/demo/c/dr_libs/old/dr_gui.h.

◆ drgui_tab_delete()

void drgui_tab_delete ( drgui_tab pTab)

Recursively deletes a tree view item.

◆ drgui_tab_get_extra_data()

void* drgui_tab_get_extra_data ( drgui_tab pTab)

Retrieves a pointer to the extra data associated with the given tree-view item.

◆ drgui_tab_get_extra_data_size()

size_t drgui_tab_get_extra_data_size ( drgui_tab pTab)

Retrieves the size of the extra data associated with the given tree-view item.

◆ drgui_tab_get_next_tab()

drgui_tab* drgui_tab_get_next_tab ( drgui_tab pTab)

Retrieves a pointer to the next tab in the tab bar.

◆ drgui_tab_get_prev_tab()

drgui_tab* drgui_tab_get_prev_tab ( drgui_tab pTab)

Retrieves a pointer to the previous tab in the tab bar.

◆ drgui_tab_get_tab_bar_element()

drgui_element* drgui_tab_get_tab_bar_element ( drgui_tab pTab)

Retrieves the tab bar GUI element that owns the given item.

◆ drgui_tab_get_text()

const char* drgui_tab_get_text ( drgui_tab pTab)

Retrieves the text of the given tab bar item.

◆ drgui_tab_is_in_view()

bool drgui_tab_is_in_view ( drgui_tab pTab)

Determines whether or not the given tab is in view.

◆ drgui_tab_move_into_view()

void drgui_tab_move_into_view ( drgui_tab pTab)

Moves the given tab into view, if it's not already.

If the tab is out of view, it will be repositioned to the front of the tab bar.

◆ drgui_tab_move_to_front()

void drgui_tab_move_to_front ( drgui_tab pTab)

Moves the given tab to the front of the tab bar that owns it.

◆ drgui_tab_set_text()

void drgui_tab_set_text ( drgui_tab pTab,
const char *  text 
)

Sets the text of the given tab bar item.

◆ drgui_tabbar_activate_next_tab()

void drgui_tabbar_activate_next_tab ( drgui_element pTBElement)

◆ drgui_tabbar_activate_prev_tab()

void drgui_tabbar_activate_prev_tab ( drgui_element pTBElement)

◆ drgui_tabbar_activate_tab()

void drgui_tabbar_activate_tab ( drgui_element pTBElement,
drgui_tab pTab 
)

Activates the given tab.

◆ drgui_tabbar_create_and_append_tab()

drgui_tab* drgui_tabbar_create_and_append_tab ( drgui_element pTBElement,
const char *  text,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates and appends a tab.

◆ drgui_tabbar_create_and_prepend_tab()

drgui_tab* drgui_tabbar_create_and_prepend_tab ( drgui_element pTBElement,
const char *  text,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates and prepends a tab.

◆ drgui_tabbar_disable_auto_size()

void drgui_tabbar_disable_auto_size ( drgui_element pTBElement)

Disables auto-resizing based on tabs.

◆ drgui_tabbar_disable_close_on_middle_click()

void drgui_tabbar_disable_close_on_middle_click ( drgui_element pTBElement)

Disables the on_close event on middle click.

◆ drgui_tabbar_enable_auto_size()

void drgui_tabbar_enable_auto_size ( drgui_element pTBElement)

Enables auto-resizing based on tabs.

Remarks
This follows the same resizing rules as per drgui_tabbar_resize_by_tabs().
See also
drgui_tabbar_resize_by_tabs()

◆ drgui_tabbar_enable_close_on_middle_click()

void drgui_tabbar_enable_close_on_middle_click ( drgui_element pTBElement)

Enables the on_close event on middle click.

◆ drgui_tabbar_get_active_tab()

drgui_tab* drgui_tabbar_get_active_tab ( drgui_element pTBElement)

Retrieves a pointer to the currently active tab.

◆ drgui_tabbar_get_close_button_image()

drgui_image* drgui_tabbar_get_close_button_image ( drgui_element pTBElement)

Retrieves the image being used for the close buttons.

◆ drgui_tabbar_get_close_button_left_padding()

float drgui_tabbar_get_close_button_left_padding ( drgui_element pTBElement)

◆ drgui_tabbar_get_extra_data()

void* drgui_tabbar_get_extra_data ( drgui_element pTBElement)

Retrieves a pointer to the extra data associated with the scrollbar.

◆ drgui_tabbar_get_extra_data_size()

size_t drgui_tabbar_get_extra_data_size ( drgui_element pTBElement)

Retrieves the size of the extra data associated with the scrollbar.

◆ drgui_tabbar_get_first_tab()

drgui_tab* drgui_tabbar_get_first_tab ( drgui_element pTBElement)

◆ drgui_tabbar_get_font()

drgui_font* drgui_tabbar_get_font ( drgui_element pTBElement)

Retrieves the default font to use for tabs.

◆ drgui_tabbar_get_last_tab()

drgui_tab* drgui_tabbar_get_last_tab ( drgui_element pTBElement)

◆ drgui_tabbar_get_next_tab()

drgui_tab* drgui_tabbar_get_next_tab ( drgui_element pTBElement,
drgui_tab pTab 
)

◆ drgui_tabbar_get_orientation()

drgui_tabbar_orientation drgui_tabbar_get_orientation ( drgui_element pTBElement)

Retrieves the orientation of the given scrollbar.

◆ drgui_tabbar_get_prev_tab()

drgui_tab* drgui_tabbar_get_prev_tab ( drgui_element pTBElement,
drgui_tab pTab 
)

◆ drgui_tabbar_get_tab_background_color()

drgui_color drgui_tabbar_get_tab_background_color ( drgui_element pTBElement)

◆ drgui_tabbar_get_tab_background_color_actived()

drgui_color drgui_tabbar_get_tab_background_color_actived ( drgui_element pTBElement)

◆ drgui_tabbar_get_tab_background_color_hovered()

drgui_color drgui_tabbar_get_tab_background_color_hovered ( drgui_element pTBElement)

◆ drgui_tabbar_get_tab_padding()

float drgui_tabbar_get_tab_padding ( drgui_element pTBElement)

◆ drgui_tabbar_get_text_color()

drgui_color drgui_tabbar_get_text_color ( drgui_element pTBElement)

◆ drgui_tabbar_hide_close_buttons()

void drgui_tabbar_hide_close_buttons ( drgui_element pTBElement)

Hides the close buttons on each tab.

◆ drgui_tabbar_is_auto_size_enabled()

bool drgui_tabbar_is_auto_size_enabled ( drgui_element pTBElement)

Determines whether or not auto-sizing is enabled.

◆ drgui_tabbar_is_close_on_middle_click_enabled()

bool drgui_tabbar_is_close_on_middle_click_enabled ( drgui_element pTBElement)

Determines whether or not close-on-middle-click is enabled.

◆ drgui_tabbar_is_tab_in_view()

bool drgui_tabbar_is_tab_in_view ( drgui_element pTBElement,
drgui_tab pTab 
)

Determines whether or not the given tab is in view.

◆ drgui_tabbar_measure_tab()

void drgui_tabbar_measure_tab ( drgui_element pTBElement,
drgui_tab pTab,
float *  pWidthOut,
float *  pHeightOut 
)

Measures the given tab.

◆ drgui_tabbar_on_mouse_button_down()

void drgui_tabbar_on_mouse_button_down ( drgui_element pTBElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button down event needs to be processed for the given tab bar control.

◆ drgui_tabbar_on_mouse_button_up()

void drgui_tabbar_on_mouse_button_up ( drgui_element pTBElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button up event needs to be processed for the given tab bar control.

◆ drgui_tabbar_on_mouse_leave()

void drgui_tabbar_on_mouse_leave ( drgui_element pTBElement)

Called when the mouse leave event needs to be processed for the given tab bar control.

◆ drgui_tabbar_on_mouse_move()

void drgui_tabbar_on_mouse_move ( drgui_element pTBElement,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse move event needs to be processed for the given tab bar control.

◆ drgui_tabbar_on_paint()

void drgui_tabbar_on_paint ( drgui_element pTBElement,
drgui_rect  relativeClippingRect,
void *  pPaintData 
)

Called when the paint event needs to be processed for the given tab control.

◆ drgui_tabbar_paint_tab()

void drgui_tabbar_paint_tab ( drgui_element pTBElement,
drgui_tab pTab,
drgui_rect  relativeClippingRect,
float  offsetX,
float  offsetY,
float  width,
float  height,
void *  pPaintData 
)

Paints the given tab.

◆ drgui_tabbar_resize_by_tabs()

void drgui_tabbar_resize_by_tabs ( drgui_element pTBElement)

Sets the width or height of the tab bar to that of it's tabs based on it's orientation.

Remarks
If the orientation is set to top or bottom, the height will be resized and the width will be left alone. If the orientation is left or right, the width will be resized and the height will be left alone.
If there is no tab measuring callback set, this will do nothing.

◆ drgui_tabbar_set_close_button_color()

void drgui_tabbar_set_close_button_color ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_set_close_button_image()

void drgui_tabbar_set_close_button_image ( drgui_element pTBElement,
drgui_image pImage 
)

Sets the image to use for close buttons.

◆ drgui_tabbar_set_close_button_left_padding()

void drgui_tabbar_set_close_button_left_padding ( drgui_element pTBElement,
float  padding 
)

◆ drgui_tabbar_set_font()

void drgui_tabbar_set_font ( drgui_element pTBElement,
drgui_font pFont 
)

Sets the default font to use for tabs.

◆ drgui_tabbar_set_on_measure_tab()

void drgui_tabbar_set_on_measure_tab ( drgui_element pTBElement,
drgui_tabbar_on_measure_tab_proc  proc 
)

Sets the function to call when a tab needs to be measured.

◆ drgui_tabbar_set_on_paint_tab()

void drgui_tabbar_set_on_paint_tab ( drgui_element pTBElement,
drgui_tabbar_on_paint_tab_proc  proc 
)

Sets the function to call when a tab needs to be painted.

◆ drgui_tabbar_set_on_tab_activated()

void drgui_tabbar_set_on_tab_activated ( drgui_element pTBElement,
drgui_tabbar_on_tab_activated_proc  proc 
)

Sets the function to call when a tab is activated.

◆ drgui_tabbar_set_on_tab_closed()

void drgui_tabbar_set_on_tab_closed ( drgui_element pTBElement,
drgui_tabbar_on_tab_close_proc  proc 
)

Sets the function to call when a tab is closed with the close button.

◆ drgui_tabbar_set_on_tab_deactivated()

void drgui_tabbar_set_on_tab_deactivated ( drgui_element pTBElement,
drgui_tabbar_on_tab_deactivated_proc  proc 
)

Sets the function to call when a tab is deactivated.

◆ drgui_tabbar_set_on_tab_mouse_button_up()

void drgui_tabbar_set_on_tab_mouse_button_up ( drgui_element pTBElement,
drgui_tabbar_on_tab_mouse_button_up_proc  proc 
)

◆ drgui_tabbar_set_tab_background_color()

void drgui_tabbar_set_tab_background_color ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_set_tab_background_color_active()

void drgui_tabbar_set_tab_background_color_active ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_set_tab_background_color_hovered()

void drgui_tabbar_set_tab_background_color_hovered ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_set_tab_padding()

void drgui_tabbar_set_tab_padding ( drgui_element pTBElement,
float  padding 
)

◆ drgui_tabbar_set_text_color()

void drgui_tabbar_set_text_color ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_set_text_color_active()

void drgui_tabbar_set_text_color_active ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_set_text_color_hovered()

void drgui_tabbar_set_text_color_hovered ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_tabbar_show_close_buttons()

void drgui_tabbar_show_close_buttons ( drgui_element pTBElement)

Shows the close buttons on each tab.

◆ drgui_text_engine_clear_undo_stack()

void drgui_text_engine_clear_undo_stack ( drgui_text_engine pTL)

Clears the undo stack.

◆ drgui_text_engine_commit_undo_point()

bool drgui_text_engine_commit_undo_point ( drgui_text_engine pTL)

Creates a snapshot of the current state of the text engine and pushes it to the top of the undo/redo stack.

◆ drgui_text_engine_delete_character_to_left_of_cursor()

bool drgui_text_engine_delete_character_to_left_of_cursor ( drgui_text_engine pTL)

Deletes the character to the left of the cursor.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_delete_character_to_right_of_cursor()

bool drgui_text_engine_delete_character_to_right_of_cursor ( drgui_text_engine pTL)

Deletes the character to the right of the cursor.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_delete_selected_text()

bool drgui_text_engine_delete_selected_text ( drgui_text_engine pTL)

Deletes the currently selected text.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_delete_text_range()

bool drgui_text_engine_delete_text_range ( drgui_text_engine pTL,
size_t  iFirstCh,
size_t  iLastChPlus1 
)

Deletes a range of text in the given text engine.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_deselect_all()

void drgui_text_engine_deselect_all ( drgui_text_engine pTL)

Deselects everything in the given text engine.

◆ drgui_text_engine_enter_selection_mode()

void drgui_text_engine_enter_selection_mode ( drgui_text_engine pTL)

Enter's into selection mode.

Remarks
An application will typically enter selection mode when the Shift key is pressed, and then leave when the key is released.
This will increment an internal counter, which is decremented with a corresponding call to drgui_text_engine_leave_selection_mode(). Selection mode will be enabled so long as this counter is greater than 0. Thus, you must ensure you cleanly leave selection mode.

◆ drgui_text_engine_find_next()

bool drgui_text_engine_find_next ( drgui_text_engine pTL,
const char *  text,
size_t *  pSelectionStartOut,
size_t *  pSelectionEndOut 
)

Finds the given string starting from the cursor and then looping back.

◆ drgui_text_engine_find_next_no_loop()

bool drgui_text_engine_find_next_no_loop ( drgui_text_engine pTL,
const char *  text,
size_t *  pSelectionStartOut,
size_t *  pSelectionEndOut 
)

Finds the given string starting from the cursor, but does not loop back.

◆ drgui_text_engine_get_active_line_bg_color()

drgui_color drgui_text_engine_get_active_line_bg_color ( drgui_text_engine pTL)

Retrieves the background color of the line the cursor is sitting on.

◆ drgui_text_engine_get_container_height()

float drgui_text_engine_get_container_height ( drgui_text_engine pTL)

Retrieves the height of the container.

◆ drgui_text_engine_get_container_size()

void drgui_text_engine_get_container_size ( drgui_text_engine pTL,
float *  pContainerWidthOut,
float *  pContainerHeightOut 
)

Retrieves the size of the container.

◆ drgui_text_engine_get_container_width()

float drgui_text_engine_get_container_width ( drgui_text_engine pTL)

Retrieves the width of the container.

◆ drgui_text_engine_get_cursor_blink_rate()

unsigned int drgui_text_engine_get_cursor_blink_rate ( drgui_text_engine pTL)

Retrieves the blink rate of the cursor in milliseconds.

◆ drgui_text_engine_get_cursor_character()

size_t drgui_text_engine_get_cursor_character ( drgui_text_engine pTL)

Retrieves the index of the character the cursor is currently sitting on.

◆ drgui_text_engine_get_cursor_color()

drgui_color drgui_text_engine_get_cursor_color ( drgui_text_engine pTL)

Retrieves the color of the text cursor.

◆ drgui_text_engine_get_cursor_column()

size_t drgui_text_engine_get_cursor_column ( drgui_text_engine pTL)

Retrieves the index of the column the cursor is currently sitting on.

◆ drgui_text_engine_get_cursor_line()

size_t drgui_text_engine_get_cursor_line ( drgui_text_engine pTL)

Retrieves the index of the line the cursor is currently sitting on.

◆ drgui_text_engine_get_cursor_position()

void drgui_text_engine_get_cursor_position ( drgui_text_engine pTL,
float *  pPosXOut,
float *  pPosYOut 
)

Retrieves the position of the cursor, relative to the container.

◆ drgui_text_engine_get_cursor_rect()

drgui_rect drgui_text_engine_get_cursor_rect ( drgui_text_engine pTL)

Retrieves the rectangle of the cursor, relative to the container.

◆ drgui_text_engine_get_cursor_width()

float drgui_text_engine_get_cursor_width ( drgui_text_engine pTL)

Retrieves the width of the text cursor.

◆ drgui_text_engine_get_default_bg_color()

drgui_color drgui_text_engine_get_default_bg_color ( drgui_text_engine pTL)

Retrieves the default background color of the given text engine.

◆ drgui_text_engine_get_default_font()

drgui_font* drgui_text_engine_get_default_font ( drgui_text_engine pTL)

Retrieves the default font to use for text runs.

◆ drgui_text_engine_get_default_text_color()

drgui_color drgui_text_engine_get_default_text_color ( drgui_text_engine pTL)

Retrieves the default text color of the given text engine.

◆ drgui_text_engine_get_extra_data()

void* drgui_text_engine_get_extra_data ( drgui_text_engine pTL)

Retrieves a pointer to the extra data associated with the given text engine.

◆ drgui_text_engine_get_extra_data_size()

size_t drgui_text_engine_get_extra_data_size ( drgui_text_engine pTL)

Retrieves the size of the extra data associated with the given text engine.

◆ drgui_text_engine_get_horizontal_align()

drgui_text_engine_alignment drgui_text_engine_get_horizontal_align ( drgui_text_engine pTL)

Retrieves the horizontal aligment of the given text engine.

◆ drgui_text_engine_get_inner_offset()

void drgui_text_engine_get_inner_offset ( drgui_text_engine pTL,
float *  pInnerOffsetX,
float *  pInnerOffsetY 
)

Retrieves the inner offset of the given text engine.

◆ drgui_text_engine_get_inner_offset_x()

float drgui_text_engine_get_inner_offset_x ( drgui_text_engine pTL)

Retrieves the inner offset of the given text engine on the x axis.

◆ drgui_text_engine_get_inner_offset_y()

float drgui_text_engine_get_inner_offset_y ( drgui_text_engine pTL)

Retrieves the inner offset of the given text engine on the x axis.

◆ drgui_text_engine_get_line_at_pos_y()

size_t drgui_text_engine_get_line_at_pos_y ( drgui_text_engine pTL,
float  posY 
)

Finds the line under the given point on the y axis relative to the container.

◆ drgui_text_engine_get_line_character_range()

void drgui_text_engine_get_line_character_range ( drgui_text_engine pTL,
size_t  iLine,
size_t *  pCharStartOut,
size_t *  pCharEndOut 
)

Retrieves teh index of the first and last character of the line at the given index.

◆ drgui_text_engine_get_line_count()

size_t drgui_text_engine_get_line_count ( drgui_text_engine pTL)

Retrieves the number of lines in the given text engine.

◆ drgui_text_engine_get_line_first_character()

size_t drgui_text_engine_get_line_first_character ( drgui_text_engine pTL,
size_t  iLine 
)

Retrieves the index of the first character of the line at the given index.

◆ drgui_text_engine_get_line_last_character()

size_t drgui_text_engine_get_line_last_character ( drgui_text_engine pTL,
size_t  iLine 
)

Retrieves the index of the last character of the line at the given index.

◆ drgui_text_engine_get_line_pos_y()

float drgui_text_engine_get_line_pos_y ( drgui_text_engine pTL,
size_t  iLine 
)

Retrieves the position of the line at the given index on the y axis.

Remarks
Use this for calculating the inner offset for scrolling on the y axis.

◆ drgui_text_engine_get_redo_points_remaining_count()

unsigned int drgui_text_engine_get_redo_points_remaining_count ( drgui_text_engine pTL)

Retrieves the number of redo points remaining in the stack.

◆ drgui_text_engine_get_selected_text()

size_t drgui_text_engine_get_selected_text ( drgui_text_engine pTL,
char *  textOut,
size_t  textOutLength 
)

Retrieves a copy of the selected text.

Remarks
This returns the length of the selected text. Call this once with <textOut> set to NULL to calculate the required size of the buffer.
If the output buffer is not larger enough, the string will be truncated.

◆ drgui_text_engine_get_selection_anchor_line()

size_t drgui_text_engine_get_selection_anchor_line ( drgui_text_engine pTL)

Retrieves the line the selection anchor is sitting on.

◆ drgui_text_engine_get_selection_bg_color()

drgui_color drgui_text_engine_get_selection_bg_color ( drgui_text_engine pTL)

Retrieves the background color of selected text.

◆ drgui_text_engine_get_selection_first_line()

size_t drgui_text_engine_get_selection_first_line ( drgui_text_engine pTL)

Retrieves the index of the first line of the current selection.

◆ drgui_text_engine_get_selection_last_line()

size_t drgui_text_engine_get_selection_last_line ( drgui_text_engine pTL)

Retrieves the index of the last line of the current selection.

◆ drgui_text_engine_get_tab_size()

unsigned int drgui_text_engine_get_tab_size ( drgui_text_engine pTL)

Retrieves the size of a tab in spaces.

◆ drgui_text_engine_get_text()

size_t drgui_text_engine_get_text ( drgui_text_engine pTL,
char *  textOut,
size_t  textOutSize 
)

Retrieves the given text engine's text.

Returns
The length of the string, not including the null terminator.
Remarks
Call this function with <textOut> set to NULL to retieve the required size of <textOut>.

◆ drgui_text_engine_get_text_rect_relative_to_bounds()

drgui_rect drgui_text_engine_get_text_rect_relative_to_bounds ( drgui_text_engine pTL)

Retrieves the rectangle of the text relative to the bounds, taking alignment into account.

◆ drgui_text_engine_get_undo_points_remaining_count()

unsigned int drgui_text_engine_get_undo_points_remaining_count ( drgui_text_engine pTL)

Retrieves the number of undo points remaining in the stack.

◆ drgui_text_engine_get_vertical_align()

drgui_text_engine_alignment drgui_text_engine_get_vertical_align ( drgui_text_engine pTL)

Retrieves the vertical aligment of the given text engine.

◆ drgui_text_engine_get_visible_line_count_starting_at()

size_t drgui_text_engine_get_visible_line_count_starting_at ( drgui_text_engine pTL,
size_t  iFirstLine 
)

Retrieves the number of lines that can fit on the visible portion of the layout, starting from the given line.

Remarks
Use this for controlling the page size for scrollbars.

◆ drgui_text_engine_hide_cursor()

void drgui_text_engine_hide_cursor ( drgui_text_engine pTL)

Hides the cursor.

◆ drgui_text_engine_insert_character()

bool drgui_text_engine_insert_character ( drgui_text_engine pTL,
unsigned int  character,
size_t  insertIndex 
)

Inserts a character into the given text engine.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_insert_character_at_cursor()

bool drgui_text_engine_insert_character_at_cursor ( drgui_text_engine pTL,
unsigned int  character 
)

Inserts a character at the position of the cursor.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_insert_text()

bool drgui_text_engine_insert_text ( drgui_text_engine pTL,
const char *  text,
size_t  insertIndex 
)

Inserts the given string at the given character index.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_insert_text_at_cursor()

bool drgui_text_engine_insert_text_at_cursor ( drgui_text_engine pTL,
const char *  text 
)

Inserts a character at the position of the cursor.

Returns
True if the text within the text engine has changed.

◆ drgui_text_engine_is_anything_selected()

bool drgui_text_engine_is_anything_selected ( drgui_text_engine pTL)

Determines whether or not anything is selected in the given text engine.

◆ drgui_text_engine_is_cursor_at_end_of_selection()

bool drgui_text_engine_is_cursor_at_end_of_selection ( drgui_text_engine pTL)

Determines whether or not the cursor is sitting at the end fo the selection.

◆ drgui_text_engine_is_cursor_at_start_of_selection()

bool drgui_text_engine_is_cursor_at_start_of_selection ( drgui_text_engine pTL)

Determines whether or not the cursor is sitting at the start of the selection.

◆ drgui_text_engine_is_in_selection_mode()

bool drgui_text_engine_is_in_selection_mode ( drgui_text_engine pTL)

Determines whether or not the given text engine is in selection mode.

◆ drgui_text_engine_is_showing_cursor()

bool drgui_text_engine_is_showing_cursor ( drgui_text_engine pTL)

Determines whether or not the cursor is visible.

◆ drgui_text_engine_leave_selection_mode()

void drgui_text_engine_leave_selection_mode ( drgui_text_engine pTL)

Leaves selection mode.

Remarks
This decrements the internal counter. Selection mode will not be disabled while this reference counter is greater than 0. Always ensure a leave is correctly matched with an enter.

◆ drgui_text_engine_move_cursor_down()

bool drgui_text_engine_move_cursor_down ( drgui_text_engine pTL)

Moves the cursor of the given text engine down one line.

◆ drgui_text_engine_move_cursor_left()

bool drgui_text_engine_move_cursor_left ( drgui_text_engine pTL)

Moves the cursor of the given text engine to the left by one character.

◆ drgui_text_engine_move_cursor_right()

bool drgui_text_engine_move_cursor_right ( drgui_text_engine pTL)

Moves the cursor of the given text engine to the right by one character.

◆ drgui_text_engine_move_cursor_to_character()

void drgui_text_engine_move_cursor_to_character ( drgui_text_engine pTL,
size_t  characterIndex 
)

Moves the cursor to the given character index.

◆ drgui_text_engine_move_cursor_to_end_of_line()

bool drgui_text_engine_move_cursor_to_end_of_line ( drgui_text_engine pTL)

Moves the cursor of the given text engine to the end of the line.

◆ drgui_text_engine_move_cursor_to_end_of_line_by_index()

bool drgui_text_engine_move_cursor_to_end_of_line_by_index ( drgui_text_engine pTL,
size_t  iLine 
)

Moves the cursor of the given text engine to the end of the line at the given index.

◆ drgui_text_engine_move_cursor_to_end_of_selection()

void drgui_text_engine_move_cursor_to_end_of_selection ( drgui_text_engine pTL)

Moves the cursor to the end of the selected text.

◆ drgui_text_engine_move_cursor_to_end_of_text()

bool drgui_text_engine_move_cursor_to_end_of_text ( drgui_text_engine pTL)

Moves the cursor of the given text engine to the end of the text.

◆ drgui_text_engine_move_cursor_to_point()

void drgui_text_engine_move_cursor_to_point ( drgui_text_engine pTL,
float  posX,
float  posY 
)

Moves the cursor to the closest character based on the given input position.

◆ drgui_text_engine_move_cursor_to_start_of_line()

bool drgui_text_engine_move_cursor_to_start_of_line ( drgui_text_engine pTL)

Moves the cursor of the given text engine to the start of the line.

◆ drgui_text_engine_move_cursor_to_start_of_line_by_index()

bool drgui_text_engine_move_cursor_to_start_of_line_by_index ( drgui_text_engine pTL,
size_t  iLine 
)

Moves the cursor of the given text engine to the start of the line at the given index.

◆ drgui_text_engine_move_cursor_to_start_of_selection()

void drgui_text_engine_move_cursor_to_start_of_selection ( drgui_text_engine pTL)

Moves the cursor to the start of the selected text.

◆ drgui_text_engine_move_cursor_to_start_of_text()

bool drgui_text_engine_move_cursor_to_start_of_text ( drgui_text_engine pTL)

Moves the cursor of the given text engine to the end of the text.

◆ drgui_text_engine_move_cursor_up()

bool drgui_text_engine_move_cursor_up ( drgui_text_engine pTL)

Moves the cursor of the given text engine up one line.

◆ drgui_text_engine_move_cursor_y()

bool drgui_text_engine_move_cursor_y ( drgui_text_engine pTL,
int  amount 
)

Moves the cursor up or down the given number of lines.

◆ drgui_text_engine_move_selection_anchor_to_end_of_line()

void drgui_text_engine_move_selection_anchor_to_end_of_line ( drgui_text_engine pTL,
size_t  iLine 
)

Moves the selection anchor to the end of the given line.

◆ drgui_text_engine_move_selection_anchor_to_start_of_line()

void drgui_text_engine_move_selection_anchor_to_start_of_line ( drgui_text_engine pTL,
size_t  iLine 
)

Moves the selection anchor to the start of the given line.

◆ drgui_text_engine_paint()

void drgui_text_engine_paint ( drgui_text_engine pTL,
drgui_rect  rect,
drgui_element pElement,
void *  pPaintData 
)

Paints the given text engine by calling the appropriate painting callbacks.

Remarks
Typically a text engine will be painted to a GUI element. A pointer to an element can be passed to this function which will be passed to the callback functions. This is purely for convenience and nothing is actually drawn to the element outside of the callback functions.

◆ drgui_text_engine_paint_line_numbers()

void drgui_text_engine_paint_line_numbers ( drgui_text_engine pTL,
float  lineNumbersWidth,
float  lineNumbersHeight,
drgui_color  textColor,
drgui_color  backgroundColor,
drgui_text_engine_on_paint_text_proc  onPaintText,
drgui_text_engine_on_paint_rect_proc  onPaintRect,
drgui_element pElement,
void *  pPaintData 
)

Calls the given painting callbacks for the line numbers of the given text engine.

◆ drgui_text_engine_prepare_undo_point()

bool drgui_text_engine_prepare_undo_point ( drgui_text_engine pTL)

Prepares the next undo/redo point.

Remarks
This captures the state that will be applied when the undo/redo point is undone.

◆ drgui_text_engine_redo()

bool drgui_text_engine_redo ( drgui_text_engine pTL)

Performs a redo operation.

◆ drgui_text_engine_refresh_markers()

void drgui_text_engine_refresh_markers ( drgui_text_engine pTL)

Refreshes the cursor and selection marker positions.

◆ drgui_text_engine_select()

void drgui_text_engine_select ( drgui_text_engine pTL,
size_t  firstCharacter,
size_t  lastCharacter 
)

Selects the given range of text.

◆ drgui_text_engine_select_all()

void drgui_text_engine_select_all ( drgui_text_engine pTL)

Selects everything in the given text engine.

◆ drgui_text_engine_set_active_line_bg_color()

void drgui_text_engine_set_active_line_bg_color ( drgui_text_engine pTL,
drgui_color  color 
)

Sets the background color of the line the cursor is sitting on.

◆ drgui_text_engine_set_container_size()

void drgui_text_engine_set_container_size ( drgui_text_engine pTL,
float  containerWidth,
float  containerHeight 
)

Sets the size of the container.

◆ drgui_text_engine_set_cursor_blink_rate()

void drgui_text_engine_set_cursor_blink_rate ( drgui_text_engine pTL,
unsigned int  blinkRateInMilliseconds 
)

Sets the blink rate of the cursor in milliseconds.

◆ drgui_text_engine_set_cursor_color()

void drgui_text_engine_set_cursor_color ( drgui_text_engine pTL,
drgui_color  cursorColor 
)

Sets the color of the text cursor.

◆ drgui_text_engine_set_cursor_width()

void drgui_text_engine_set_cursor_width ( drgui_text_engine pTL,
float  cursorWidth 
)

Sets the width of the text cursor.

◆ drgui_text_engine_set_default_bg_color()

void drgui_text_engine_set_default_bg_color ( drgui_text_engine pTL,
drgui_color  color 
)

Sets the default background color of the given text engine.

◆ drgui_text_engine_set_default_font()

void drgui_text_engine_set_default_font ( drgui_text_engine pTL,
drgui_font pFont 
)

Sets the default font to use for text runs.

◆ drgui_text_engine_set_default_text_color()

void drgui_text_engine_set_default_text_color ( drgui_text_engine pTL,
drgui_color  color 
)

Sets the default text color of the given text engine.

◆ drgui_text_engine_set_horizontal_align()

void drgui_text_engine_set_horizontal_align ( drgui_text_engine pTL,
drgui_text_engine_alignment  alignment 
)

Sets the horizontal alignment of the given text engine.

◆ drgui_text_engine_set_inner_offset()

void drgui_text_engine_set_inner_offset ( drgui_text_engine pTL,
float  innerOffsetX,
float  innerOffsetY 
)

Sets the inner offset of the given text engine.

◆ drgui_text_engine_set_inner_offset_x()

void drgui_text_engine_set_inner_offset_x ( drgui_text_engine pTL,
float  innerOffsetX 
)

Sets the inner offset of the given text engine on the x axis.

◆ drgui_text_engine_set_inner_offset_y()

void drgui_text_engine_set_inner_offset_y ( drgui_text_engine pTL,
float  innerOffsetY 
)

Sets the inner offset of the given text engine on the y axis.

◆ drgui_text_engine_set_on_cursor_move()

void drgui_text_engine_set_on_cursor_move ( drgui_text_engine pTL,
drgui_text_engine_on_cursor_move_proc  proc 
)

Sets the function to call when the cursor in the given text engine is mvoed.

◆ drgui_text_engine_set_on_dirty()

void drgui_text_engine_set_on_dirty ( drgui_text_engine pTL,
drgui_text_engine_on_dirty_proc  proc 
)

Sets the function to call when a region of the text engine needs to be redrawn.

◆ drgui_text_engine_set_on_paint_rect()

void drgui_text_engine_set_on_paint_rect ( drgui_text_engine pTL,
drgui_text_engine_on_paint_rect_proc  proc 
)

Sets the function to call when a quad needs to the be painted for the given text engine.

◆ drgui_text_engine_set_on_paint_text()

void drgui_text_engine_set_on_paint_text ( drgui_text_engine pTL,
drgui_text_engine_on_paint_text_proc  proc 
)

Sets the function to call when a run of text needs to be painted for the given text engine.

◆ drgui_text_engine_set_on_text_changed()

void drgui_text_engine_set_on_text_changed ( drgui_text_engine pTL,
drgui_text_engine_on_text_changed_proc  proc 
)

Sets the function to call when the content of the given text engine has changed.

◆ drgui_text_engine_set_on_undo_point_changed()

void drgui_text_engine_set_on_undo_point_changed ( drgui_text_engine pTL,
drgui_text_engine_on_undo_point_changed_proc  proc 
)

Sets the function to call when the content of the given text engine's current undo point has moved.

◆ drgui_text_engine_set_selection_bg_color()

void drgui_text_engine_set_selection_bg_color ( drgui_text_engine pTL,
drgui_color  color 
)

Sets the background color of selected text.

◆ drgui_text_engine_set_tab_size()

void drgui_text_engine_set_tab_size ( drgui_text_engine pTL,
unsigned int  sizeInSpaces 
)

Sets the size of a tab in spaces.

◆ drgui_text_engine_set_text()

void drgui_text_engine_set_text ( drgui_text_engine pTL,
const char *  text 
)

Sets the given text engine's text.

◆ drgui_text_engine_set_vertical_align()

void drgui_text_engine_set_vertical_align ( drgui_text_engine pTL,
drgui_text_engine_alignment  alignment 
)

Sets the vertical alignment of the given text engine.

◆ drgui_text_engine_show_cursor()

void drgui_text_engine_show_cursor ( drgui_text_engine pTL)

Shows the cursor.

◆ drgui_text_engine_step()

void drgui_text_engine_step ( drgui_text_engine pTL,
unsigned int  milliseconds 
)

Steps the given text engine by the given number of milliseconds.

Remarks
This will trigger the on_dirty callback when the cursor switches it's blink states.

◆ drgui_text_engine_swap_selection_markers()

void drgui_text_engine_swap_selection_markers ( drgui_text_engine pTL)

Swaps the position of the cursor based on the current selection.

◆ drgui_text_engine_undo()

bool drgui_text_engine_undo ( drgui_text_engine pTL)

Performs an undo operation.

◆ drgui_textbox_clear_undo_stack()

void drgui_textbox_clear_undo_stack ( drgui_element pTBElement)

Clears the undo/redo stack.

◆ drgui_textbox_delete_character_to_right_of_cursor()

bool drgui_textbox_delete_character_to_right_of_cursor ( drgui_element pTBElement)

Deletes the character to the right of the cursor.

Returns
True if the text within the text engine has changed.

◆ drgui_textbox_delete_selected_text()

bool drgui_textbox_delete_selected_text ( drgui_element pTBElement)

Deletes the currently selected text.

Returns
True if the text within the text engine has changed.

◆ drgui_textbox_deselect_all()

void drgui_textbox_deselect_all ( drgui_element pTBElement)

Deselect everything.

◆ drgui_textbox_disable_horizontal_scrollbar()

void drgui_textbox_disable_horizontal_scrollbar ( drgui_element pTBElement)

Disables the horizontal scrollbar.

◆ drgui_textbox_disable_vertical_scrollbar()

void drgui_textbox_disable_vertical_scrollbar ( drgui_element pTBElement)

Disables the vertical scrollbar.

◆ drgui_textbox_enable_horizontal_scrollbar()

void drgui_textbox_enable_horizontal_scrollbar ( drgui_element pTBElement)

Enables the horizontal scrollbar.

◆ drgui_textbox_enable_vertical_scrollbar()

void drgui_textbox_enable_vertical_scrollbar ( drgui_element pTBElement)

Enables the vertical scrollbar.

◆ drgui_textbox_find_and_replace_all()

bool drgui_textbox_find_and_replace_all ( drgui_element pTBElement,
const char *  text,
const char *  replacement 
)

Finds every occurance of the given string and replaces it with another.

◆ drgui_textbox_find_and_replace_next()

bool drgui_textbox_find_and_replace_next ( drgui_element pTBElement,
const char *  text,
const char *  replacement 
)

Finds the next occurance of the given string and replaces it with another.

◆ drgui_textbox_find_and_select_next()

bool drgui_textbox_find_and_select_next ( drgui_element pTBElement,
const char *  text 
)

Finds and selects the next occurance of the given string, starting from the cursor and looping back to the start.

◆ drgui_textbox_get_cursor_column()

size_t drgui_textbox_get_cursor_column ( drgui_element pTBElement)

Retrieves the index of the column the cursor is current sitting on.

◆ drgui_textbox_get_cursor_line()

size_t drgui_textbox_get_cursor_line ( drgui_element pTBElement)

Retrieves the index of the line the cursor is current sitting on.

◆ drgui_textbox_get_cursor_width()

float drgui_textbox_get_cursor_width ( drgui_element pTBElement)

Retrieves the width of the text cursor.

◆ drgui_textbox_get_extra_data()

void* drgui_textbox_get_extra_data ( drgui_element pTBElement)

Retrieves a pointer to the extra data associated with the given text box.

◆ drgui_textbox_get_extra_data_size()

size_t drgui_textbox_get_extra_data_size ( drgui_element pTBElement)

Retrieves the size of the extra data associated with the given text box.

◆ drgui_textbox_get_font()

drgui_font* drgui_textbox_get_font ( drgui_element pTBElement)

Retrieves the font being used with the given text box.

◆ drgui_textbox_get_horizontal_scrollbar()

drgui_element* drgui_textbox_get_horizontal_scrollbar ( drgui_element pTBElement)

◆ drgui_textbox_get_line_count()

size_t drgui_textbox_get_line_count ( drgui_element pTBElement)

Retrieves the number of lines in the given text box.

◆ drgui_textbox_get_line_numbers_background_color()

drgui_color drgui_textbox_get_line_numbers_background_color ( drgui_element pTBElement)

◆ drgui_textbox_get_line_numbers_color()

drgui_color drgui_textbox_get_line_numbers_color ( drgui_element pTBElement)

◆ drgui_textbox_get_line_numbers_padding()

float drgui_textbox_get_line_numbers_padding ( drgui_element pTBElement)

◆ drgui_textbox_get_line_numbers_width()

float drgui_textbox_get_line_numbers_width ( drgui_element pTBElement)

◆ drgui_textbox_get_padding_horz()

float drgui_textbox_get_padding_horz ( drgui_element pTBElement)

Retrieves the amound of horizontal padding to apply to the given text box.

◆ drgui_textbox_get_padding_vert()

float drgui_textbox_get_padding_vert ( drgui_element pTBElement)

Retrieves the amound of vertical padding to apply to the given text box.

◆ drgui_textbox_get_redo_points_remaining_count()

unsigned int drgui_textbox_get_redo_points_remaining_count ( drgui_element pTBElement)

Retrieves the number of redo points remaining.

◆ drgui_textbox_get_selected_text()

size_t drgui_textbox_get_selected_text ( drgui_element pTBElement,
char *  textOut,
size_t  textOutLength 
)

Retrieves a copy of the selected text.

Remarks
This returns the length of the selected text. Call this once with <textOut> set to NULL to calculate the required size of the buffer.
If the output buffer is not larger enough, the string will be truncated.

◆ drgui_textbox_get_selection_background_color()

drgui_color drgui_textbox_get_selection_background_color ( drgui_element pTBElement)

Retrieves the background color of selected text.

◆ drgui_textbox_get_text()

size_t drgui_textbox_get_text ( drgui_element pTBElement,
char *  pTextOut,
size_t  textOutSize 
)

Retrieves the text of the given text box.

◆ drgui_textbox_get_undo_points_remaining_count()

unsigned int drgui_textbox_get_undo_points_remaining_count ( drgui_element pTBElement)

Retrieves the number of undo points remaining.

◆ drgui_textbox_get_vertical_scrollbar()

drgui_element* drgui_textbox_get_vertical_scrollbar ( drgui_element pTBElement)

◆ drgui_textbox_hide_line_numbers()

void drgui_textbox_hide_line_numbers ( drgui_element pTBElement)

Hides the line numbers.

◆ drgui_textbox_insert_text_at_cursor()

bool drgui_textbox_insert_text_at_cursor ( drgui_element pTBElement,
const char *  text 
)

Inserts a character at the position of the cursor.

Returns
True if the text within the text engine has changed.

◆ drgui_textbox_is_anything_selected()

bool drgui_textbox_is_anything_selected ( drgui_element pTBElement)

Determines whether or not anything is selected in the given text box.

◆ drgui_textbox_move_cursor_to_end_of_text()

void drgui_textbox_move_cursor_to_end_of_text ( drgui_element pTBElement)

Moves the caret to the end of the text.

◆ drgui_textbox_move_cursor_to_start_of_line_by_index()

void drgui_textbox_move_cursor_to_start_of_line_by_index ( drgui_element pTBElement,
size_t  iLine 
)

Moves the caret to the beginning of the line at the given index.

◆ drgui_textbox_on_capture_keyboard()

void drgui_textbox_on_capture_keyboard ( drgui_element pTBElement,
drgui_element pPrevCapturedElement 
)

on_capture_keyboard

◆ drgui_textbox_on_capture_mouse()

void drgui_textbox_on_capture_mouse ( drgui_element pTBElement)

on_capture_mouse

◆ drgui_textbox_on_key_down()

void drgui_textbox_on_key_down ( drgui_element pTBElement,
drgui_key  key,
int  stateFlags 
)

on_key_down.

◆ drgui_textbox_on_key_up()

void drgui_textbox_on_key_up ( drgui_element pTBElement,
drgui_key  key,
int  stateFlags 
)

on_key_up.

◆ drgui_textbox_on_mouse_button_dblclick()

void drgui_textbox_on_mouse_button_dblclick ( drgui_element pTBElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

on_mouse_button_dblclick.

◆ drgui_textbox_on_mouse_button_down()

void drgui_textbox_on_mouse_button_down ( drgui_element pTBElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

on_mouse_button_down.

◆ drgui_textbox_on_mouse_button_up()

void drgui_textbox_on_mouse_button_up ( drgui_element pTBElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

on_mouse_button_up.

◆ drgui_textbox_on_mouse_move()

void drgui_textbox_on_mouse_move ( drgui_element pTBElement,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

on_mouse_move.

◆ drgui_textbox_on_mouse_wheel()

void drgui_textbox_on_mouse_wheel ( drgui_element pTBElement,
int  delta,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

on_mouse_wheel

◆ drgui_textbox_on_paint()

void drgui_textbox_on_paint ( drgui_element pTBElement,
drgui_rect  relativeRect,
void *  pPaintData 
)

on_paint.

◆ drgui_textbox_on_printable_key_down()

void drgui_textbox_on_printable_key_down ( drgui_element pTBElement,
unsigned int  utf32,
int  stateFlags 
)

on_printable_key_down.

◆ drgui_textbox_on_release_keyboard()

void drgui_textbox_on_release_keyboard ( drgui_element pTBElement,
drgui_element pNewCapturedElement 
)

on_release_keyboard

◆ drgui_textbox_on_release_mouse()

void drgui_textbox_on_release_mouse ( drgui_element pTBElement)

on_release_mouse

◆ drgui_textbox_on_size()

void drgui_textbox_on_size ( drgui_element pTBElement,
float  newWidth,
float  newHeight 
)

on_size.

◆ drgui_textbox_redo()

bool drgui_textbox_redo ( drgui_element pTBElement)

Performs a redo operation.

◆ drgui_textbox_select_all()

void drgui_textbox_select_all ( drgui_element pTBElement)

Selects all of the text inside the text box.

◆ drgui_textbox_set_active_line_background_color()

void drgui_textbox_set_active_line_background_color ( drgui_element pTBElement,
drgui_color  color 
)

Sets the background color for the line the caret is currently sitting on.

◆ drgui_textbox_set_background_color()

void drgui_textbox_set_background_color ( drgui_element pTBElement,
drgui_color  color 
)

Sets the background color of the given text box.

◆ drgui_textbox_set_border_color()

void drgui_textbox_set_border_color ( drgui_element pTBElement,
drgui_color  color 
)

Sets the border color of the given text box.

◆ drgui_textbox_set_border_width()

void drgui_textbox_set_border_width ( drgui_element pTBElement,
float  borderWidth 
)

Sets the border width of the given text box.

◆ drgui_textbox_set_cursor_blink_rate()

void drgui_textbox_set_cursor_blink_rate ( drgui_element pTBElement,
unsigned int  blinkRateInMilliseconds 
)

Sets the blink rate of the cursor in milliseconds.

◆ drgui_textbox_set_cursor_color()

void drgui_textbox_set_cursor_color ( drgui_element pTBElement,
drgui_color  color 
)

Sets the color of the cursor of the given text box.

◆ drgui_textbox_set_cursor_width()

void drgui_textbox_set_cursor_width ( drgui_element pTBElement,
float  cursorWidth 
)

Sets the width of the text cursor.

◆ drgui_textbox_set_font()

void drgui_textbox_set_font ( drgui_element pTBElement,
drgui_font pFont 
)

Sets the font to use with the given text box.

◆ drgui_textbox_set_horizontal_align()

void drgui_textbox_set_horizontal_align ( drgui_element pTBElement,
drgui_text_engine_alignment  align 
)

Sets the horizontal alignment of the given text box.

◆ drgui_textbox_set_line_numbers_background_color()

void drgui_textbox_set_line_numbers_background_color ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_textbox_set_line_numbers_color()

void drgui_textbox_set_line_numbers_color ( drgui_element pTBElement,
drgui_color  color 
)

◆ drgui_textbox_set_line_numbers_padding()

void drgui_textbox_set_line_numbers_padding ( drgui_element pTBElement,
float  lineNumbersPadding 
)

◆ drgui_textbox_set_line_numbers_width()

void drgui_textbox_set_line_numbers_width ( drgui_element pTBElement,
float  lineNumbersWidth 
)

◆ drgui_textbox_set_on_cursor_move()

void drgui_textbox_set_on_cursor_move ( drgui_element pTBElement,
drgui_textbox_on_cursor_move_proc  proc 
)

Sets the function to call when the cursor moves.

◆ drgui_textbox_set_on_undo_point_changed()

void drgui_textbox_set_on_undo_point_changed ( drgui_element pTBElement,
drgui_textbox_on_undo_point_changed_proc  proc 
)

Sets the function to call when the undo point changes.

◆ drgui_textbox_set_padding()

void drgui_textbox_set_padding ( drgui_element pTBElement,
float  padding 
)

Sets the amount of padding to apply to given text box.

◆ drgui_textbox_set_scrollbar_size()

void drgui_textbox_set_scrollbar_size ( drgui_element pTBElement,
float  size 
)

◆ drgui_textbox_set_selection_background_color()

void drgui_textbox_set_selection_background_color ( drgui_element pTBElement,
drgui_color  color 
)

Sets the background color of selected text.

◆ drgui_textbox_set_text()

void drgui_textbox_set_text ( drgui_element pTBElement,
const char *  text 
)

Sets the text of the given text box.

◆ drgui_textbox_set_text_color()

void drgui_textbox_set_text_color ( drgui_element pTBElement,
drgui_color  color 
)

Sets the color of the text in teh given text box.

◆ drgui_textbox_set_vertical_align()

void drgui_textbox_set_vertical_align ( drgui_element pTBElement,
drgui_text_engine_alignment  align 
)

Sets the vertical alignment of the given text box.

◆ drgui_textbox_show_line_numbers()

void drgui_textbox_show_line_numbers ( drgui_element pTBElement)

Shows the line numbers.

◆ drgui_textbox_step()

void drgui_textbox_step ( drgui_element pTBElement,
unsigned int  milliseconds 
)

Steps the text box to allow it to blink the cursor.

◆ drgui_textbox_undo()

bool drgui_textbox_undo ( drgui_element pTBElement)

Performs an undo operation.

◆ drgui_tv_create_item()

drgui_tree_view_item* drgui_tv_create_item ( drgui_element pTVElement,
drgui_tree_view_item pParent,
size_t  extraDataSize,
const void *  pExtraData 
)

Creates a tree view item.

Remarks
When pParent is non-null, the tree-view control must match that of the tree-view control that owns the parent item.

◆ drgui_tv_deselect_all_items()

void drgui_tv_deselect_all_items ( drgui_element pTVElement)

Deselects every tree-view item.

◆ drgui_tv_disable_multi_select()

void drgui_tv_disable_multi_select ( drgui_element pTVElement)

Disables multi-select.

◆ drgui_tv_enable_multi_select()

void drgui_tv_enable_multi_select ( drgui_element pTVElement)

Enables multi-select.

Remarks
While this is enabled, selections will accumulate. Typically you would call this when the user hits the CTRL key, and then call drgui_tv_disable_multi_select() when the user releases it.

◆ drgui_tv_get_child_offset_x()

float drgui_tv_get_child_offset_x ( drgui_element pTVElement)

Retrieves the amount of indentation to apply to each child item in the given tree-view.

◆ drgui_tv_get_default_background_color()

drgui_color drgui_tv_get_default_background_color ( drgui_element pTVElement)

Retrieves the default background color.

◆ drgui_tv_get_extra_data()

void* drgui_tv_get_extra_data ( drgui_element pTVElement)

Retrieves a pointer to the buffer containing the given tree-view's extra data.

◆ drgui_tv_get_extra_data_size()

size_t drgui_tv_get_extra_data_size ( drgui_element pTVElement)

Retrieves the size of the extra data associated with the given tree-view control.

◆ drgui_tv_get_first_selected_item()

drgui_tree_view_item* drgui_tv_get_first_selected_item ( drgui_element pTVElement)

Retrieves the first selected item.

Remarks
This runs in linear time.

◆ drgui_tv_get_horizontal_scrollbar()

drgui_element* drgui_tv_get_horizontal_scrollbar ( drgui_element pTVElement)

Retrieves a pointer to the horizontal scrollbar.

◆ drgui_tv_get_hovered_background_color()

drgui_color drgui_tv_get_hovered_background_color ( drgui_element pTVElement)

Retrieves the default background color of hovered items.

◆ drgui_tv_get_next_selected_item()

drgui_tree_view_item* drgui_tv_get_next_selected_item ( drgui_element pTVElement,
drgui_tree_view_item pItem 
)

Retrieves the next select item, not including the given item.

Remarks
Use this in conjunction with drgui_tv_get_first_selected_item() to iterate over each selected item.
The order in which retrieving selected items is based on their location in the hierarchy, and not the order in which they were selected.

◆ drgui_tv_get_root_item()

drgui_tree_view_item* drgui_tv_get_root_item ( drgui_element pTVElement)

Retrieves a pointer to the root element of the given tree view control.

◆ drgui_tv_get_selected_background_color()

drgui_color drgui_tv_get_selected_background_color ( drgui_element pTVElement)

Retrieves the default background color of selected items.

◆ drgui_tv_get_vertical_scrollbar()

drgui_element* drgui_tv_get_vertical_scrollbar ( drgui_element pTVElement)

Retrieves a pointer to the vertical scrollbar.

◆ drgui_tv_is_multi_select_enabled()

bool drgui_tv_is_multi_select_enabled ( drgui_element pTVElement)

Determines whether or not multi-select is enabled.

◆ drgui_tv_measure_item()

bool drgui_tv_measure_item ( drgui_element pTVElement,
drgui_tree_view_item pItem,
float *  pWidthOut,
float *  pHeightOut 
)

Measures the given item.

◆ drgui_tv_on_mouse_button_dblclick()

void drgui_tv_on_mouse_button_dblclick ( drgui_element pTVElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button double-click event needs to be processed for the given tree-view control.

◆ drgui_tv_on_mouse_button_down()

void drgui_tv_on_mouse_button_down ( drgui_element pTVElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button down event needs to be processed for the given tree-view control.

◆ drgui_tv_on_mouse_button_up()

void drgui_tv_on_mouse_button_up ( drgui_element pTVElement,
int  mouseButton,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse button up event needs to be processed for the given tree-view control.

◆ drgui_tv_on_mouse_leave()

void drgui_tv_on_mouse_leave ( drgui_element pTVElement)

Called when the mouse leave event needs to be processed for the given tree-view control.

◆ drgui_tv_on_mouse_move()

void drgui_tv_on_mouse_move ( drgui_element pTVElement,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse move event needs to be processed for the given tree-view control.

◆ drgui_tv_on_mouse_wheel()

void drgui_tv_on_mouse_wheel ( drgui_element pTVElement,
int  delta,
int  relativeMousePosX,
int  relativeMousePosY,
int  stateFlags 
)

Called when the mouse wheel event needs to be processed for the given tree-view control.

◆ drgui_tv_on_paint()

void drgui_tv_on_paint ( drgui_element pTVElement,
drgui_rect  relativeClippingRect,
void *  pPaintData 
)

Called when the paint event needs to be processed for the given tree-view control.

◆ drgui_tv_on_size()

void drgui_tv_on_size ( drgui_element pTVElement,
float  newWidth,
float  newHeight 
)

Called when the size event needs to be processed for the given tree-view control.

◆ drgui_tv_set_child_offset_x()

void drgui_tv_set_child_offset_x ( drgui_element pTVElement,
float  childOffsetX 
)

Sets the amount of indentation to apply to each child item in the given tree-view.

◆ drgui_tv_set_default_background_color()

void drgui_tv_set_default_background_color ( drgui_element pTVElement,
drgui_color  color 
)

Sets the default background color.

◆ drgui_tv_set_hovered_background_color()

void drgui_tv_set_hovered_background_color ( drgui_element pTVElement,
drgui_color  color 
)

Sets the default background color of hovered items.

◆ drgui_tv_set_on_item_measure()

void drgui_tv_set_on_item_measure ( drgui_element pTVElement,
drgui_tvi_measure_proc  proc 
)

Sets the function to call when a tree-view item needs to be measured.

◆ drgui_tv_set_on_item_mouse_leave()

void drgui_tv_set_on_item_mouse_leave ( drgui_element pTVElement,
drgui_tvi_on_mouse_leave_proc  proc 
)

Sets the function call when the mouse leaves a tree-view item.

◆ drgui_tv_set_on_item_mouse_move()

void drgui_tv_set_on_item_mouse_move ( drgui_element pTVElement,
drgui_tvi_on_mouse_move_proc  proc 
)

Sets the function to call when the mouse is moved while over a tree-view item.

◆ drgui_tv_set_on_item_paint()

void drgui_tv_set_on_item_paint ( drgui_element pTVElement,
drgui_tvi_on_paint_proc  proc 
)

Sets the function to call when a tree-view item needs to be drawn.

◆ drgui_tv_set_on_item_picked()

void drgui_tv_set_on_item_picked ( drgui_element pTVElement,
drgui_tvi_on_picked_proc  proc 
)

Sets the function to call when a tree-view item is picked.

Remarks
An item is "picked" when it is a leaf item (has no children) and is double-clicked.

◆ drgui_tv_set_selected_background_color()

void drgui_tv_set_selected_background_color ( drgui_element pTVElement,
drgui_color  color 
)

Sets the default background color of selected items.

◆ drgui_tvi_append()

void drgui_tvi_append ( drgui_tree_view_item pItem,
drgui_tree_view_item pParent 
)

Appends a tree view item as a child of the given parent item.

◆ drgui_tvi_append_sibling()

void drgui_tvi_append_sibling ( drgui_tree_view_item pItemToAppend,
drgui_tree_view_item pItemToAppendTo 
)

Appends the given tree view item to the given sibling.

◆ drgui_tvi_collapse()

void drgui_tvi_collapse ( drgui_tree_view_item pItem)

Collapses the given item.

◆ drgui_tvi_delete()

void drgui_tvi_delete ( drgui_tree_view_item pItem)

Recursively deletes a tree view item.

◆ drgui_tvi_deselect()

void drgui_tvi_deselect ( drgui_tree_view_item pItem)

Deselects the given item.

◆ drgui_tvi_expand()

void drgui_tvi_expand ( drgui_tree_view_item pItem)

Expands the given item.

◆ drgui_tvi_get_depth()

int drgui_tvi_get_depth ( drgui_tree_view_item pItem)

Retrieves the depth of the item.

Remarks
This is a recursive call and runs in linear time.

◆ drgui_tvi_get_extra_data()

void* drgui_tvi_get_extra_data ( drgui_tree_view_item pItem)

Retrieves a pointer to the extra data associated with the given tree-view item.

◆ drgui_tvi_get_extra_data_size()

size_t drgui_tvi_get_extra_data_size ( drgui_tree_view_item pItem)

Retrieves the size of the extra data associated with the given tree-view item.

◆ drgui_tvi_get_first_child()

drgui_tree_view_item* drgui_tvi_get_first_child ( drgui_tree_view_item pItem)

Retrieves a pointer to the first child of the given tree-view item.

◆ drgui_tvi_get_last_child()

drgui_tree_view_item* drgui_tvi_get_last_child ( drgui_tree_view_item pItem)

Retrieves a pointer to the last child of the given tree-view item.

◆ drgui_tvi_get_next_sibling()

drgui_tree_view_item* drgui_tvi_get_next_sibling ( drgui_tree_view_item pItem)

Retrieves a pointer to the next sibling of the given tree-view item.

◆ drgui_tvi_get_parent()

drgui_tree_view_item* drgui_tvi_get_parent ( drgui_tree_view_item pItem)

Retrieves the parent tree-view item.

◆ drgui_tvi_get_prev_sibling()

drgui_tree_view_item* drgui_tvi_get_prev_sibling ( drgui_tree_view_item pItem)

Retrieves a pointer to the previous sibling of the given tree-view item.

◆ drgui_tvi_get_tree_view_element()

drgui_element* drgui_tvi_get_tree_view_element ( drgui_tree_view_item pItem)

Retrieves the tree-view GUI element that owns the given item.

◆ drgui_tvi_has_children()

bool drgui_tvi_has_children ( drgui_tree_view_item pItem)

Determines whether or not the given item has any children.

◆ drgui_tvi_is_expanded()

bool drgui_tvi_is_expanded ( drgui_tree_view_item pItem)

Determines whether or not the given item is expanded.

◆ drgui_tvi_is_selected()

bool drgui_tvi_is_selected ( drgui_tree_view_item pItem)

Determines whether or not the given tree view item is selected.

◆ drgui_tvi_next_visible_non_child()

drgui_tree_view_item* drgui_tvi_next_visible_non_child ( drgui_tree_view_item pItem,
int *  pDepthInOut 
)

Retrieves a pointer to the next visible item in the hierarchy that is not a child.

Remarks
This is used for iterating.
<pDepthInOut> is an input and output parameter that is decremented whenver the next item is an ancestor.

◆ drgui_tvi_prepend()

void drgui_tvi_prepend ( drgui_tree_view_item pItem,
drgui_tree_view_item pParent 
)

Prepends a tree view item as a child of the given parent item.

◆ drgui_tvi_prepend_sibling()

void drgui_tvi_prepend_sibling ( drgui_tree_view_item pItemToPrepend,
drgui_tree_view_item pItemToPrependTo 
)

Prepends the given tree view item to the given sibling.

◆ drgui_tvi_select()

void drgui_tvi_select ( drgui_tree_view_item pItem)

Selects the given item.

◆ drgui_unmap_image_data()

void drgui_unmap_image_data ( drgui_image pImage)

Unmaps the given image data.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57