Email compose dialog

To start our compose window layout, we create a new drawComposeLayout() function that (for testing) we can call instead of drawLayout() from the draw() function. Before we can add the text edit widgets that the email compose UI will use, we need to create buffers to manage the content they'll edit. Remember that this is an immediate mode toolkit so, to remember any state, we must provide the data storage. This is where the compose window will store the subject, email address, and content for a new email message:

var composeSubject = make([]byte, 512, 512)var composeEmail = make([]byte, 512, 512)var composeContent = make([]byte, 4096, 4096)

It's also helpful to our user to provide a hint (often called a placeholder) for ...

Get Hands-On GUI Application Development in Go now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.