MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / IGFD_GetFileStyle

Function IGFD_GetFileStyle

external/ImGuiFileDialog/ImGuiFileDialog.cpp:5202–5222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5200}
5201
5202IGFD_C_API bool IGFD_GetFileStyle(ImGuiFileDialog* vContextPtr, IGFD_FileStyleFlags vFlags, const char* vCriteria, ImVec4* vOutColor, char** vOutIconText, ImFont** vOutFont) {
5203 if (vContextPtr != nullptr) {
5204 std::string icon;
5205 bool res = vContextPtr->GetFileStyle(vFlags, vCriteria, vOutColor, &icon, vOutFont);
5206 if (!icon.empty() && vOutIconText) {
5207 size_t siz = icon.size() + 1U;
5208 *vOutIconText = (char*)malloc(siz);
5209 if (*vOutIconText) {
5210#ifndef _MSC_VER
5211 strncpy(*vOutIconText, icon.c_str(), siz);
5212#else // _MSC_VER
5213 strncpy_s(*vOutIconText, siz, icon.c_str(), siz);
5214#endif // _MSC_VER
5215 (*vOutIconText)[siz - 1U] = '\0';
5216 }
5217 }
5218 return res;
5219 }
5220
5221 return false;
5222}
5223
5224IGFD_C_API void IGFD_ClearFilesStyle(ImGuiFileDialog* vContextPtr) {
5225 if (vContextPtr != nullptr) {

Callers

nothing calls this directly

Calls 4

GetFileStyleMethod · 0.80
c_strMethod · 0.80
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected