mirror of
https://github.com/Ed94/metadesk.git
synced 2026-06-13 07:52:22 -07:00
44 lines
838 B
C
44 lines
838 B
C
#ifdef INTELLISENSE_DIRECTIVES
|
|
# pragma once
|
|
# include "linkage.h"
|
|
# include "strings.h"
|
|
# include "arena.h"
|
|
#endif
|
|
|
|
////////////////////////////////
|
|
//~ rjf: Text 2D Coordinates & Ranges
|
|
|
|
typedef struct TxtPt TxtPt;
|
|
struct TxtPt
|
|
{
|
|
S64 line;
|
|
S64 column;
|
|
};
|
|
|
|
typedef struct TxtRng TxtRng;
|
|
struct TxtRng
|
|
{
|
|
TxtPt min;
|
|
TxtPt max;
|
|
};
|
|
|
|
////////////////////////////////
|
|
//~ rjf: String Pair Types
|
|
|
|
typedef struct String8TxtPtPair String8TxtPtPair;
|
|
struct String8TxtPtPair
|
|
{
|
|
String8 string;
|
|
TxtPt pt;
|
|
};
|
|
|
|
////////////////////////////////
|
|
//~ rjf: Text Path Helpers
|
|
|
|
internal String8TxtPtPair str8_txt_pt_pair_from_string(String8 string);
|
|
|
|
////////////////////////////////
|
|
//~ rjf: Text Wrapping
|
|
|
|
internal String8List wrapped_lines_from_string(Arena *arena, String8 string, U64 first_line_max_width, U64 max_width, U64 wrap_indent);
|