ATOMIC AI USER INTERFACES SPEC (EN) SCOPE RULE: This document defines the complete and binding user interface system of the Atomic language. RULE: All rules defined here are mandatory. RULE: No interface-related behavior exists outside this specification. GENERAL INTERFACE MODEL RULE: Interfaces in Atomic are special simplified objects. RULE: Interfaces do not require the definition of an OGGETTO. RULE: Interfaces are created and used directly. RULE: Every interface: has a name maintains an internal state exposes its state as a value can be read directly using its name, as if it were a variable RULE: Interfaces do not use events. RULE: Interfaces do not use callbacks. USER INTERFACES FUNCTIONS crea tasto virtuale --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (COLORE SFONDO:) (COLORE TESTO:) (TRASPARENZA:) (LARGHEZZA:) (ALTEZZA:) (CLASSE:) crea interruttore --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (COLORE:) (VALORE PREDEFINITO:) crea casella di spunta --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (COLORE:) (VALORE PREDEFINITO:) crea barra di controllo orizzontale --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (LARGHEZZA:) (COLORE:) (VALORE MINIMO:) (VALORE MASSIMO:) (VALORE PREDEFINITO:) crea barra di controllo verticale --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (LARGHEZZA:) (COLORE:) (VALORE MINIMO:) (VALORE MASSIMO:) (VALORE PREDEFINITO:) crea gruppo di opzioni --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (COLORE:) (VALORE 1:) (VALORE PREDEFINITO:) (VALORE 2:) (VALORE 3:) (VALORE 4:) (VALORE 5:) (VALORE 6:) (VALORE 7:) (VALORE 8:) crea casella di testo--> (NOME:) (ETICHETTA: " ") (X:) (Y:) (COLORE:) (TESTO: " ") (LARGHEZZA:) crea casella di testo multilinea --> (NOME:) (ETICHETTA: " ") (X:) (Y:) (COLORE:) (TESTO:) (LARGHEZZA:) (ALTEZZA) imposta testo in una casella di testo --> (NOME:) (TESTO: " ") crea classe di tasti --> (NOME:) (ETICHETTA: " ") (X: 300) (Y: 20) (COLORE SFONDO:) (COLORE TESTO:) (TRASPARENZA:) (LARGHEZZA:) (ALTEZZA:) distruggi interfaccia --> (NOME:) INTERFACE CREATION CONTEXT RULE: All interfaces are normally created inside the INIZIA event. RULE: Interfaces created outside INIZIA are invalid unless explicitly documented. VIRTUAL BUTTON RULE: A virtual button is a clickable interface element. RULE: A virtual button is created using: crea tasto virtuale --> (NOME:) (ETICHETTA:) (X:) (Y:) (LARGHEZZA:) (ALTEZZA:) (COLORE SFONDO:) (COLORE TESTO:) (TRASPARENZA:) (CLASSE:) RULE: A virtual button exposes its state using predefined constants. SINGLE-LINE TEXT BOX RULE: A single-line text box is created using: crea casella di testo --> (NOME:) (ETICHETTA:) (X:) (Y:) (COLORE:) (TESTO:) (LARGHEZZA:) RULE: The value of the text box is the text entered by the user. RULE: The value is read directly using the name of the text box. MULTILINE TEXT BOX RULE: A multiline text box is created using: crea casella di testo multilinea --> (NOME:) (ETICHETTA:) (X:) (Y:) (COLORE:) (TESTO:) (LARGHEZZA:) (ALTEZZA:) RULE: The value of the multiline text box is a string that may contain multiple lines. CHECKBOX RULE: A checkbox is created using: crea casella di spunta --> (NOME:) (ETICHETTA:) (X:) (Y:) (COLORE:) (VALORE PREDEFINITO:) RULE: The value of a checkbox is always one of the following constants: vero falso OPTION GROUP RULE: An option group is created using: crea gruppo di opzioni --> (NOME:) (ETICHETTA:) (X:) (Y:) (VALORE 1:) (VALORE 2:) (VALORE 3:) (VALORE 4:) (VALORE 5:) (VALORE 6:) (VALORE 7:) (VALORE 8:) (VALORE PREDEFINITO:) RULE: The value of an option group is a text string. RULE: The value is exactly equal to the selected option value. INTERFACE MODIFICATION RULE: Interfaces may be modified after creation. SETTING TEXT IN A TEXT BOX RULE: Text may be written into a text box or multiline text box using: imposta testo in una casella di testo --> (NOME:) (TESTO:) RULE: This function is typically used for output. DESTROYING AN INTERFACE RULE: An interface may be destroyed using: distruggi interfaccia --> (NOME:) RULE: Destroying an interface removes it from the window. ENVIRONMENT GRID RULE: The environment grid is configured using: imposta griglia --> (VISIBILE:) (COLORE SFONDO:) (COLORE LINEE:) (DIMENSIONE:) RULE: The grid belongs to the environment. RULE: The grid is not a clickable interface. USING INTERFACES AS VARIABLES RULE: Interfaces expose their value directly. RULE: The interface name evaluates to its current value. RULE: No ottieni function is required to read interface values. VIRTUAL BUTTON STATES RULE: Virtual buttons expose their state using predefined constants. RULE: The following constants exist: è cliccato non è cliccato è stato cliccato RULE: These constants are compared against the button name. RULE: Correct usage examples conceptually include: button = è cliccato button = non è cliccato button = è stato cliccato RULE: These are constants. RULE: These are not functions. RULE: These are not control constructs. FUNDAMENTAL DISTINCTION RULE: Interfaces are read directly using their name. RULE: Functions that check clicks on elements apply only to real scene objects. RULE: Interface elements must never use object click-check functions. DESIGN PRINCIPLES RULE: The Atomic interface system: avoids a separate event system uses only values and comparisons keeps the language simple and consistent is designed for immediate and didactic use FORMAL CLOSURE RULE: The interface system of Atomic is limited to what is defined in this document. RULE: Any undocumented interface behavior: is invalid is not part of the Atomic language