A toff = a fop, a swell. Toffy (tofficky) = dressy, showy, smart.
At Oxford noblemen students used to wear a golden tassel (a tuft) in their cap. Hence they were called »tufts»; so we get toff.
to be up a tree
»What would he do without you?»—
»Well, I’m afraid he would be a little up a tree, sir, if I may be permitted a vulgarism.» (Woodb. Farm 31. 9.)
A servant.
To be up a tree or treed means to be cornered, done for, obliged to surrender. To be up the tree is a phrase often used by City tradesmen in the sense of bankrupt.
Probably the expression derives its origin from a cant-word tree = gallows.