| 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 | { |
no test coverage detected