Questions about the cursor use

Hi there, have some questions, trying to make a game which involves a slingshot, so:

1.- How can I do to detect the position of the cursor?
2.- How can I draw a line with the cursor when I press LMB?
3.- How can I limit the size of that line?