![]() Void MyWindow::undoThreeCallback( Widget, XtPointer clientData, XtPointer) Void MyWindow::undoTwoCallback( Widget, XtPointer clientData, XtPointer) Void MyWindow::undoOneCallback( Widget, XtPointer clientData, XtPointer) Void MyWindow::threeCallback( Widget, XtPointer clientData, XtPointer) Void MyWindow::twoCallback( Widget, XtPointer clientData, XtPointer) Static void undoCutCallback(Widget, XtPointer, XtPointer) Static void cutCallback(Widget, XtPointer, XtPointer) The undo callback function should reverse the effects of the item's action.įor example, the following static description describes a Cut menu item that executes the callback function cutCallback() when the user chooses the item and undoCutCallback() when the user undoes the command: ![]() To add undo support for an undoable menu item ( VkMenuAction and VkMenuToggle items), simply provide an undo callback function when you define the menu item. Providing Undo Support for Actions That Are Menu Items In most cases, all you need to provide for each command is a callback function that reverses the effects of that command. The undo manager also supports undoing command classes as implemented by the VkAction(3x) and VkMenuActionObject(3x) classes described in “Command Classes”. You can use the undo manager to support undoing any command, regardless of whether the user issues the command through a menu or through other interface methods (for example, pushbuttons). If you choose, you can also force the undo manager to provide only single-level undo support, where it remembers only the last command the user issued. Also, executing any non-undoable command clears the undo stack. Once a user has undone at least one command, executing any new command clears the undo stack. When the user undoes a command, the undo manager pops it from the stack, revealing the previously executed command. The undo manager keeps commands on a stack. To undo the command, the user simply chooses the undo manager's menu item.īy default, ViewKit's undo manager provides multi-level undo support. Whenever the user issues a command, the undo manager automatically updates the menu item to reflect the latest command. By default, the label of that menu item is “Undo: last_command”, where last_command is the name of the last command the user issued. The user interface to the ViewKit undo manager is a single menu item that you add to one of your application's menus. The ViewKit undo manager provides an easy-to-use method for users to undo commands that they issue to your application. Not as convenient, and the MSDE install still fails (being crap), but now people know that it's MSDE, and that means that a) I don't get the blame for MSDE's installation failings, and b) it's easier to figure out what happened and do something about it.The VkMenuUndoManager class is the basis of ViewKit's undo manager. We separated the installs, creating an extra step (install MSDE using its own installer, then install our software). MS realised they were rubbish as well, and said "erm, actually, they don't work properly, don't use them." By then, installs were failing left right and centre, and because it was all integrated into our install, it looked like our install was causing the errors, and our install got the blame. We used to use these merge modules, until we realised that they were rubbish. Case in point: our product uses MSDE, which you can ship with an installation using merge modules (predefined components that you can just drop into an MSI install, for those not familiar with the term). If DirectX fails in some non-obvious way, it can impact on the host installer meaning people come back to with complaints about their installs. Duck: Because what you're suggesting means the installer would have to accept more responsibility for getting DirectX working. As an installation developer, I like installations to be quite verbose. Of course, whether you prefer to be notified of its decision is a matter of taste. Because I would expect a game to install DirectX if it needs to, and quite often there's a checkbox to say whether or not it should do this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |