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

Function CursorToIndex

GUI/TabbedFiles.cpp:43–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 unsigned int CursorToIndex(HWND wnd, unsigned int x)
44 {
45 TabbedFilesData *data = GetData(wnd);
46
47 // Remove left padding
48 x -= 15;
49
50 unsigned int retValue = ~0u;
51 for(unsigned int i = 0; i < data->tabCount + 1; i++)
52 {
53 if(x < data->tabInfo[i].width)
54 {
55 retValue = i;
56 break;
57 }
58 x -= data->tabInfo[i].width;
59 }
60 return retValue;
61 }
62
63 void OnCreate(HWND wnd)
64 {

Callers 2

OnMouseLeftFunction · 0.85
OnMouseMoveFunction · 0.85

Calls 1

GetDataFunction · 0.70

Tested by

no test coverage detected