Drag the logic gates (top). And place them inside the box. You can put the mosue in the lef to grab inputs that you can connect with logic gates or right pins.
Thanks to Sebastian League for the idea