Customizing the User Interface

You can customize the following user interface items:

These changes are made by editing the files that control the interface. These are text files with the file name extension .ets (external tool support).

Editing Keyboard Shortcuts

Shortcuts are key combinations that substitute for selecting a particular menu item. For example, pressing F1 has the same effect as choosing Product Documentation from the Help menu. You can change the defined shortcuts or add new ones.

Procedure 1: Adding or Changing a Shortcut

  1. From the system prompt, move to the <reldir>/sys/configs directory.

  2. Locate the .ets file that contains the operation definition of the operation you will create a shortcut for. Check each of the following files in turn, until you find the desired operation definition:

    • std_modeler_project_operations.ets
    • std_help_operations.ets
    • std_edit_operations.ets
    • std_shortcut_operations.ets

    Result: Each of these files consists of numerous operation definitions, as shown in the following example.

    # button list for Project Editor
    File format: operation list
    
    start_operation
       menu header:   “File”
       menu string:   “Close Project”
       operation:     exec_builtin close_project
       position:      2
       shortcut:      “ctrl-w”
       separator      “yes”
    end_operation
    
    start_operation
       menu header:   “File”
       menu string:   “Save Project”
       operation:     exec_builtin save_project
       position:      4
       shortcut:      “ctrl-s”
    end_operation
    
  3. Use the text editor’s search capability to locate the operation you want to modify. The text string shown as “menu string” duplicates the menu item shown in Modeler.

  4. Change the shortcut defined, or add a line for a new shortcut. Shortcut keys can be function keys (<F1>, <F2>) or control key combinations (specified as ctrl-<key> in the operation definition).

  5. Save the changes to the file, close the text editor, and start Modeler.

  6. Test the new shortcut. Ensure that the shortcut

    • appears on the menu list next to the operation
    • has the intended functionality

Adding Optional Operations

Modeler includes code for some optional operations that are not normally included in the menus, such as the Edit Comment Log operation. You can add action buttons or menu items for these operations.

Procedure 2: Adding an Optional Operation

  1. From a system prompt, move to the <reldir>/sys/configs directory.

  2. In a text editor, open the std_modeler_project_operations.ets file.

  3. Add operation definitions for the optional operations to the file.

    For example, the definitions below create the following effects:

    • User lock and comment log operations are added to the File menu. User lock is the last item in the list; comment log is next to last. The position of the menu item in the list is controlled by the position variable.
    • Buttons for both operations appear in the button bar. The position of the button in the button bar is determined by the order of the operation definition in the file (for example, the first operation listed will be the left-most button).
    start_operation
       menu header:   “File”
       menu string:   “Comment Log”
       operation:     exec_builtin open_comment_log
       position:      9998
       icon:          comments
    end_operation
    
    start_operation
       menu header:   “File”
       menu string:   “User Lock”
       operation:     exec_builtin toggle_user_lock
       position:      9999
       icon:          lock_unlock
    end_operation
    
  4. Save the changes to the file, close the text editor, and start Modeler.

  5. Test the new operation. Ensure that the operation

    • appears on the menu list in the desired position
    • appears in the button bar in the desired position
    • has the intended functionality

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com