The graphics code was ported from some Arduino examples. I'm changing it somewhat do suit my application. I simply wanted something known as a starting point, as the TFT modules are a bit fiddly to configure. The data sheet for the driver chip is a little sparse for my liking.
I did notice that you can add C or C++ units in Atmel Studio. As I'm also starting to use XC8 for PICs, I'll probably stay with C for Atmel too.
As for the x/y positioning, I was thinking of using structures for the (touch) buttons to store the position, size, colour, caption, etc. This will make it easier to add and move them around.