SFL UIUpdating
SFL provides a fully functional UI Updating system for keeping your application's user interface consistent with the state of the applicationComments
SFL's User Interface Updating mechanism is comprised of several components. These components include CUIUpdateGenerator, the IEventRouter interface, CUIUpdateAdapter, and an interface named IIdleHandler.The UIUpdating mechanism works like this. Any class wishing to implement User Interface updating handles idle-time processing by plugging in its own idle-time processing interface while processing the WM_CREATE message. We'll see the specific calls for doing that shortly. The class performing User Interface updating also inherits from a class named CUIUpdateGenerator, which has a member function named GenerateUIUpdates. The class performing User Interface updating handles idle-time processing by calling GenerateUIUpdates. GenerateUIUpdates goes through the menu, toolbars, and status bars that have been registered in to the User Interface Updating mechanism, creating a wrapper class for each User Interface item (menu, tool bar button, status pane). The User Interface mechanism generates a WM_UIUPDATE message and routes the event, where the class performing User Interface updating may modify the element handles it .
Classes wanting to receive UIUpdating events inherit from CUIUpdateAdapter, which redirects the ui updating logic to a handler function. The handler function takes each incoming User Interface element and massages it in a way appropriate for the current state of the application. For example, if the toolbar is already showing, you my want to put a check mark on the Toolbar toggling menu option. When the toolbar is hidden, you may wish to remove that check mark.