MCPcopy Create free account
hub / github.com/WheretIB/nullc / AddTab

Method AddTab

GUI/TabbedFiles.cpp:270–288  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268};
269
270void TabbedFiles::AddTab(HWND wnd, const char* filename, HWND childWindow)
271{
272 TabbedFilesData *data = GetData(wnd);
273 if(data->tabCount >= TAB_MAX_COUNT)
274 {
275 MessageBox(wnd, "Maximum limit of opened tabs exceeded", "ERROR", MB_OK);
276 return;
277 }
278 data->tabInfo[data->tabCount].name = strdup(filename);
279 const char *filePart = strrchr(data->tabInfo[data->tabCount].name, '\\');
280 data->tabInfo[data->tabCount].last = filePart ? filePart + 1 : data->tabInfo[data->tabCount].name;
281 data->tabInfo[data->tabCount].window = childWindow;
282 data->tabInfo[data->tabCount].dirty = false;
283 data->tabCount++;
284
285 data->tabInfo[data->tabCount].name = data->tabInfo[data->tabCount].last = "+";
286 data->tabInfo[data->tabCount].window = data->newTab;
287 InvalidateRect(wnd, NULL, true);
288}
289
290void TabbedFiles::SetNewTabWindow(HWND wnd, HWND newTab)
291{

Callers

nothing calls this directly

Calls 1

GetDataFunction · 0.70

Tested by

no test coverage detected