Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Forms: the designer file and your file

A form is what you draw in the Designer: a window with its components and their properties. CrawRAD keeps each form in three files, and each file has an owner.

FileOwnerWhat it holds
form_main.crawformthe IDEThe form itself: components, properties and event links, as JSON.
form_main.designer.rsthe IDEThe Rust code that builds the form.
form_main.rsyouYour code: the event handlers and anything else you write.

The Explorer shows the owner as a badge next to each file:

  • Rewritten — rewritten in full on every Generate. Anything you type there is lost.
  • Yours — written once and never touched again.
  • Yours now — written by the IDE the first time; from then on it is yours, and Generate only adds what is missing.

Your code is never overwritten

When you link an event in the Object Inspector (for example OnClick on a button), the IDE adds an empty handler to your file. It never changes or removes code you wrote.

The one thing Generate cleans up is a handler the IDE created that you left empty: Generate removes it, together with its event link, so the form does not keep links to code that does nothing. As soon as you write anything in the handler, it is yours like the rest of the file.

The project’s Cargo.toml is yours too

The project manifest is created by Cargo, not by the IDE, and it belongs to you. You add dependencies to it the normal Cargo way. CrawRAD reads it, for example to find out which target the project uses.