MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / IGFD_GetFileStyle

Function IGFD_GetFileStyle

ImGuiFileDialog.cpp:5137–5157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5135}
5136
5137IGFD_C_API bool IGFD_GetFileStyle(ImGuiFileDialog* vContextPtr, IGFD_FileStyleFlags vFlags, const char* vCriteria, ImVec4* vOutColor, char** vOutIconText, ImFont** vOutFont) {
5138 if (vContextPtr != nullptr) {
5139 std::string icon;
5140 bool res = vContextPtr->GetFileStyle(vFlags, vCriteria, vOutColor, &icon, vOutFont);
5141 if (!icon.empty() && vOutIconText) {
5142 size_t siz = icon.size() + 1U;
5143 *vOutIconText = (char*)malloc(siz);
5144 if (*vOutIconText) {
5145#ifndef _MSC_VER
5146 strncpy(*vOutIconText, icon.c_str(), siz);
5147#else // _MSC_VER
5148 strncpy_s(*vOutIconText, siz, icon.c_str(), siz);
5149#endif // _MSC_VER
5150 (*vOutIconText)[siz - 1U] = '\0';
5151 }
5152 }
5153 return res;
5154 }
5155
5156 return false;
5157}
5158
5159IGFD_C_API void IGFD_ClearFilesStyle(ImGuiFileDialog* vContextPtr) {
5160 if (vContextPtr != nullptr) {

Callers

nothing calls this directly

Calls 3

GetFileStyleMethod · 0.80
emptyMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected