A Formal Approach for Modeling Interactive Visual Interfaces