|
|
@ -1630,11 +1630,11 @@ struct ImGuiTextBuffer
|
|
|
|
IMGUI_API static char EmptyString[1];
|
|
|
|
IMGUI_API static char EmptyString[1];
|
|
|
|
|
|
|
|
|
|
|
|
ImGuiTextBuffer() { }
|
|
|
|
ImGuiTextBuffer() { }
|
|
|
|
inline char operator[](int i) { IM_ASSERT(Buf.Data != NULL); return Buf.Data[i]; }
|
|
|
|
inline char operator[](int i) const { IM_ASSERT(Buf.Data != NULL); return Buf.Data[i]; }
|
|
|
|
const char* begin() const { return Buf.Data ? &Buf.front() : EmptyString; }
|
|
|
|
const char* begin() const { return Buf.Data ? &Buf.front() : EmptyString; }
|
|
|
|
const char* end() const { return Buf.Data ? &Buf.back() : EmptyString; } // Buf is zero-terminated, so end() will point on the zero-terminator
|
|
|
|
const char* end() const { return Buf.Data ? &Buf.back() : EmptyString; } // Buf is zero-terminated, so end() will point on the zero-terminator
|
|
|
|
int size() const { return Buf.Size ? Buf.Size - 1 : 0; }
|
|
|
|
int size() const { return Buf.Size ? Buf.Size - 1 : 0; }
|
|
|
|
bool empty() { return Buf.Size <= 1; }
|
|
|
|
bool empty() const { return Buf.Size <= 1; }
|
|
|
|
void clear() { Buf.clear(); }
|
|
|
|
void clear() { Buf.clear(); }
|
|
|
|
void reserve(int capacity) { Buf.reserve(capacity); }
|
|
|
|
void reserve(int capacity) { Buf.reserve(capacity); }
|
|
|
|
const char* c_str() const { return Buf.Data ? Buf.Data : EmptyString; }
|
|
|
|
const char* c_str() const { return Buf.Data ? Buf.Data : EmptyString; }
|
|
|
@ -2111,7 +2111,7 @@ struct ImFontAtlas
|
|
|
|
IMGUI_API bool Build(); // Build pixels data. This is called automatically for you by the GetTexData*** functions.
|
|
|
|
IMGUI_API bool Build(); // Build pixels data. This is called automatically for you by the GetTexData*** functions.
|
|
|
|
IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 1 byte per-pixel
|
|
|
|
IMGUI_API void GetTexDataAsAlpha8(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 1 byte per-pixel
|
|
|
|
IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 4 bytes-per-pixel
|
|
|
|
IMGUI_API void GetTexDataAsRGBA32(unsigned char** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel = NULL); // 4 bytes-per-pixel
|
|
|
|
bool IsBuilt() { return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
|
|
|
|
bool IsBuilt() const { return Fonts.Size > 0 && (TexPixelsAlpha8 != NULL || TexPixelsRGBA32 != NULL); }
|
|
|
|
void SetTexID(ImTextureID id) { TexID = id; }
|
|
|
|
void SetTexID(ImTextureID id) { TexID = id; }
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------
|
|
|
|
//-------------------------------------------
|
|
|
@ -2144,7 +2144,7 @@ struct ImFontAtlas
|
|
|
|
const ImFontAtlasCustomRect*GetCustomRectByIndex(int index) const { if (index < 0) return NULL; return &CustomRects[index]; }
|
|
|
|
const ImFontAtlasCustomRect*GetCustomRectByIndex(int index) const { if (index < 0) return NULL; return &CustomRects[index]; }
|
|
|
|
|
|
|
|
|
|
|
|
// [Internal]
|
|
|
|
// [Internal]
|
|
|
|
IMGUI_API void CalcCustomRectUV(const ImFontAtlasCustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max);
|
|
|
|
IMGUI_API void CalcCustomRectUV(const ImFontAtlasCustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max) const;
|
|
|
|
IMGUI_API bool GetMouseCursorTexData(ImGuiMouseCursor cursor, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]);
|
|
|
|
IMGUI_API bool GetMouseCursorTexData(ImGuiMouseCursor cursor, ImVec2* out_offset, ImVec2* out_size, ImVec2 out_uv_border[2], ImVec2 out_uv_fill[2]);
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------------------------------
|
|
|
|
//-------------------------------------------
|
|
|
|