|
|||
• Scrollers |
Menus Menus in Guildhall applets are not resource driven. While it would be a moderately sized task to implement that, it would be by its nature very host specfic, which is to say macOS specific. For the moment there's no advantage to it, either. The approach I'm using, outlined here, works nicely with either a single host target or multiple host targets. Creating a menu structure is very easy and dovetails nicely with the update mechanism in response to a user selection. Here's an example.
Guildhall provides a lot of default functionality to set up standard menus, just like every toolkit. As shown above, standard methods set up the menu bar and make it easy to fill out the Home (Guildhall icon) menu, the applet menu, the File menu, and the Edit menu . Companion methods (not shown) similarly complete the View menu, the Window menu, the Help menu, and the language (flag) menu. All of Guildhall's standard menus allow for a moderate amount of customization. For example, the standard File menu above is customized to include printing options but to exclude import and export. And just after that the file menu is customized further to include a menu item that exports Tome applet pages to produce the site you are currently reading. When triggered, menus send messages to the owning applet's command handler. The applet can process these messages however it sees fit, and for certain well-defined behaviors there are toolkit methods that provide assistance. But the same command handler can also process messages from other sources, for example the console applet Terminus or a TBanner field installed in the applet's window. These latter two entry points are a boon to debugging and allow new user experiences to be tested before the graphics are complete. Constructible Classes
|