
# This code creates the user interface for autohex
#
# Copyright (c) 1997 Pacific Marketing and Consulting, Inc,
#       and ICEM Systems, GmbH.  All rights reserved.
# Author:  Wayne A. Christopher, wayne@icemcfd.com
#

# The first string is the full command name.  The second is what shows up in
# the menus.

command_define "New project" "New" bw_newg \
    "file_new" {
	Create a new project.
    } no_help always

command_define "Open project" "Open" open_icon \
    "file_job" {
	Open an existing project.
    } no_help always

command_define "Reload main version" "Reload" no_icon \
    "job_switch_version {} 1 1" {
	Go back to the main version of the project.
    } no_help always

command_define "Quit" "Quit" no_icon \
    "file_quit 1" {
	Quit the program.
    } no_help always

command_define "Print screen" "Print" print_icon \
    "print_hardcopy" {
    } no_help always

command_define "Create image file" "Create image file" icepak_paint \
    "file_hardcopy" {
    } no_help always

command_define "Command prompt" "Prompt" no_icon \
    "file_shell" {
    } no_help always
if !$is_win {
    command_set_text "Command prompt" "Shell window" "Shell" "" ""
}
    
command_define "Merge project" "Merge project" no_icon \
    file_merge {
    } no_help always

# ----------------------------------------------------

command_define "Import IGES points+lines" "IGES points+lines" no_icon \
    "file_import_points_lines IGES" {
    } no_help always

command_define "Import DXF points+lines" "DXF points+lines" no_icon \
    "file_import_points_lines DXF" {
    } no_help always

command_define "Import IGES/Step surfaces+curves" "IGES/Step surfaces+curves" no_icon \
    "cad_load_iges" {
    } no_help always

command_define "Import DWG surfaces+curves" "DWG surfaces+curves" no_icon \
    "cad_load_dwg" {
    } no_help always

command_define "Import ACIS surfaces+curves" "ACIS surfaces+curves" no_icon \
    "cad_load_acis" {
    } no_help always

command_define "Import Tetin surfaces+curves" "Tetin surfaces+curves" no_icon \
    "file_import_surfaces_curves tetin" {
    } no_help always

command_define "Export IGES" "IGES" no_icon \
    "cad_save iges" {
    } no_help always

command_define "Export Step" "Step" no_icon \
    "cad_save step" {
    } no_help always

command_define "Export Tetin" "Tetin" no_icon \
    "cad_save tetin" {
    } no_help always

# ----------------------------------------------------

command_define "Preferences" "Preferences" no_icon \
    options_edit_auto {
    } no_help always

command_define "Title" "Title" no_icon \
    file_notes {
    } no_help always

command_define "Configure" "Configure" no_icon \
    file_options {
    } no_help always

command_define "Annotations" "Annotate" no_icon \
    annotation_form {
    } no_help always

command_define "Add rubber band" "Add" no_icon \
    "disp_add_ruler" {
    } no_help always

command_define "Clear rubber bands" "Clear" no_icon \
    "disp_clear_rulers" {
    } no_help always

command_define "Local coords" "Local coords" no_icon \
    model_local_coords {
    } no_help always

command_define "Unpack project" "Unpack project" no_icon \
    file_unpack {
    } no_help always

command_define "Pack project" "Pack project" no_icon \
    "file_diagpack 0" {
    } no_help always

command_define "Email project" "Email project" no_icon \
    "file_diagpack 1" {
    } no_help always

command_define "Undo" "Undo" bw_undo \
    "undo_action" {
    } no_help always

command_define "Redo" "Redo" bw_redo \
    "redo_action" {
    } no_help always

command_define "Groups" "Groups" no_icon \
    "coll_edit group" {
    } no_help always

command_define "Summary" "Summary" no_icon \
    "summary_sheet" {
    } no_help always

# "debugger_eval" is for use with the Tcl Dev Kit
# Debugger.  This call instruments proc summary_html_write
# and all its child proc's for debugging.
#
# debugger_eval {
command_define "Summary (HTML)" "Summary" no_icon \
    "summary_html_write" {
    } no_help always
# }

command_define "Check model" "Check model" check \
    "model_check" {
    } no_help always

command_define "Snap to grid" "Snap to grid" no_icon \
    "model_snap_grid" {
    } no_help always

command_define "Generate mesh" "Mesh" icepak_mesh \
    "edit_grid_check_meshers" {
	Create or display the mesh
	for the current model.
    } no_help always

command_define "Edit priorities" "Edit priorities" no_icon \
    "model_edit_priority" {
    } no_help always

command_define "Edit params" "Edit params" no_icon \
    "expression_edit_values_and_trials" {
    } no_help always

command_define "Define trials" "Define trials" no_icon \
    "expression_edit_values_and_trials" {
    } no_help always

command_define "CAD data" "CAD data" no_icon \
    "cad_form" {
    } no_help always

command_define "Load tetin file for CAD" "Load tetin file" no_icon \
    "cad_load_tetin" {
    } no_help always

command_define "Load IGES file for CAD" "Load IGES file" no_icon \
    "cad_load_iges" {
    } no_help always

command_define "CAD Options" "Options" no_icon \
    "cad_edit_options 1" {
    } no_help always

command_define "Selected CAD -> objects" "Selected -> objects" no_icon \
    {cascade_func {cad_set_create_menu single}} {
} no_help always

command_define "CAD families -> objects" "Families -> objects" no_icon \
    {cascade_func {cad_set_create_menu family}} {
    } no_help always

command_define "CAD regions -> objects" "Regions -> objects" no_icon \
    {cascade_func {cad_set_create_menu region}} {
    } no_help always

command_define "Update existing objects from CAD" "Update existing" no_icon \
    "cad_regenerate" {
    } no_help always

command_define "Load Nastran file for CAD" "Load Nastran file" no_icon \
    "cad_load_mesh nastran Nastran" {
    } no_help always

command_define "Blank CAD surfaces" "Blank surfaces" no_icon \
    "cad_blank_surface" {
    } no_help always

command_define "Unblank CAD surfaces" "Unblank surfaces" no_icon \
    "cad_unblank_surface" {
    } no_help always

command_define "Delete CAD surfaces" "Delete CAD surfaces" no_icon \
    "cad_delete_surface" {
    } no_help always

command_define "Delete all CAD data" "Delete all CAD data" no_icon \
    "cad_clear 1" {
    } no_help always

command_define "Change CAD family" "Change family" no_icon \
    "cad_change_family" {
    } no_help always

command_define "Delete unused CAD families" "Delete unused families" no_icon \
    "cad_delete_unused_family" {
    } no_help always

command_define "CAD family visibility" "Family visibility" no_icon \
    "cad_edit_families" {
    } no_help always

command_define "Show used CAD" "Show used" no_icon \
    "checkbutton cad_show_used cad_toggle_show" {
    } no_help always

command_define "Show unused CAD" "Show unused" no_icon \
    "checkbutton cad_show_unused cad_toggle_show" {
    } no_help always

command_define "Solid shading for CAD" "Solid shading" no_icon \
    "checkbutton cad_show_solid cad_toggle_show" {
    } no_help always

command_define "Fast movement for CAD" "Fast movement" no_icon \
    "checkbutton geom_fast_dynamics" {
    } no_help always

command_define "Display construction lines" "Construction lines" no_icon \
    "checkbutton type_visible(cad_line) {update_type_visible cad_line}" {
    } no_help always

command_define "Display construction points" "Construction points" no_icon \
    "checkbutton type_visible(cad_point) {update_type_visible cad_point}" {
    } no_help always

command_define "Current assembly object names" "Current assembly" icepak_names \
    "radiobutton type_visible(names) 1 {update_type_visible names}" {
    } no_help always

command_define "No object names" "None" icepak_names \
    "radiobutton type_visible(names) 0 {update_type_visible names}" {
    } no_help always

command_define "Selected object names" "Selected" icepak_names \
    "radiobutton type_visible(names) 2 {update_type_visible names}" {
    } no_help always

command_define "Display object names" "Display object names" icepak_names \
    "cyclebutton type_visible(names) {0 1 2} {update_type_visible names}" {
    } no_help always

command_define "Display mesh" "Mesh" no_icon \
    "checkbutton grid_display" {
    } no_help always

command_define "One viewing window" "1" one_window \
    "radiobutton view_panes(mode) 1 toggle_view_split_mode" {
    } no_help always

command_define "Two viewing windows" "2" two_windows \
    "radiobutton view_panes(mode) 2 toggle_view_split_mode" {
    } no_help always

command_define "Four viewing windows" "4" four_windows \
    "radiobutton view_panes(mode) 4 toggle_view_split_mode" {
    } no_help always

# ----------------------------------------------------------

command_define "Move object" "Move" icepak_move_object \
    "edit_move_object_or_group 0" {
	Move selected objects or groups
    } no_help always

command_define "Copy object" "Copy" icepak_copy_object \
    "edit_move_object_or_group 1" {
	Copy and move selected objects or groups
    } no_help always

command_define "Edit object" "Edit" icepak_edit_object \
    "tree_edit_current_selection" {
	Bring up the edit form for the current object
    } no_help always

command_define "Delete object" "Delete" icepak_delete_object \
    "tree_delete_selected" {
	Delete the current object
    } no_help always

command_define "Activate object" "Active" no_icon \
    "checkbutton edit_current_active tree_toggle_current_active" {
    } no_help always

command_define "Open/close tree node" "Open/close tree node" no_icon \
    "tree_open_close_current" {
	Open or close the currently selected tree node.
    } no_help always

command_define "Open/close model subtree" "Open/close model subtree" no_icon \
    "tree_open_close_current model 1" {
	Open or close the model subtree.
    } no_help always

if 0 {
    command_define "Make type visible" "Visible" no_icon \
	"checkbutton tree(this_type_visible) tree_update_type_visible" {
	} no_help always
}

command_define "Toggle object active" "Active" no_icon \
    "tree_toggle_current_active 1" {
    } no_help always

command_define "Toggle object visible" "Visible" no_icon \
    "tree_toggle_current_visible 1" {
    } no_help always

command_define "Remove object from group" "Remove from group" no_icon \
    "tree_remove_from_group_action" {
    } no_help always

command_define "Edit via spreadsheet" "Spreadsheet" no_icon \
    "tree_spreadsheet" {
    } no_help always

command_define "Create group" "Create" no_icon \
    "coll_create group __ask__" {
    } no_help always

command_define "Add to group screen select" "Screen select" no_icon \
    "coll_op group add" {
    } no_help always

command_define "Add to group screen region" "Screen region" no_icon \
    "coll_region group add" {
    } no_help always

command_define "Add to group by name/pattern" "Name/pattern" no_icon \
    "coll_pattern group add" {
    } no_help always

command_define "Remove from group screen select" "Screen select" no_icon \
    "coll_op group remove" {
    } no_help always

command_define "Remove from group screen region" "Screen region" no_icon \
    "coll_region group remove" {
    } no_help always

command_define "Remove from group by name/pattern" "Name/pattern" no_icon \
    "coll_pattern group remove" {
    } no_help always

command_define "Rename group" "Rename" no_icon \
    "coll_rename" {
    } no_help always

command_define "Delete group" "Delete" no_icon \
    "coll_delete group \$coll_current" {
    } no_help always

# Merging done through mouse drag/drop actions 
#command_define "Merge group" "Merge" no_icon \
#    "coll_merge group \$coll_current" {
#    } no_help always

command_define "Copy group" "Copy" no_icon \
    "coll_copy group" {
    } no_help always

command_define "Move group" "Move" no_icon \
    "coll_move group" {
    } no_help always

command_define "Edit group" "Edit" no_icon \
    "coll_properties group" {
    } no_help always

command_define "Activate all in group" "Activate all" no_icon \
    "coll_act_all group 1" {
    } no_help always

command_define "Deactivate all in group" "Deactivate all" no_icon \
    "coll_act_all group 0" {
    } no_help always

command_define "Delete all in group" "Delete all" no_icon \
    "coll_del_all group" {
    } no_help always

command_define "Create assembly from group" "Create assembly" no_icon \
    "coll_create_part group" {
    } no_help always

command_define "Copy params to group" "Copy params" no_icon \
    "coll_copy_props group 0" {
    } no_help always

command_define "Save group as project" "Save as project" no_icon \
    "coll_save_as_job" {
    } no_help always

command_define "Modify parameters" "Modify" no_icon \
    "edit_modify_params" {
    } no_help always

command_define "Reset parameters" "Reset" no_icon \
    "edit_reset_params" {
    } no_help always

command_define "Copy parameters from" "Copy from" no_icon \
    "edit_copyfrom" {
    } no_help always

# --------------------------------------------

command_define "Align and morph faces" "Align and morph faces" auto_align_face \
    "edit_alignment face 0" {
	Align faces of two objects, in the
	normal direction to the faces.  The
	shape will be resized in this direction
	but not the other two directions.
    } no_help always

command_define "Align and morph edges" "Align and morph edges" auto_align_edge \
    "edit_alignment edge 0" {
	Align edges of two objects.  The
	shape will be resized so that the
	edges are co-linear.
    } no_help always

command_define "Align and morph vertices" "Align and morph vertices" auto_align_vert \
    "edit_alignment vert 0" {
	Align vertices of two objects.
	The shape will be resized so that
	the vertices are at the same 
	location.
    } no_help always

command_define "Align faces - move only" "Align faces - move only" auto_align_face_move \
    "edit_alignment face -1" {
	Align faces of two objects without resizing.
	The shape will be moved so that the selected
	face is in the same plane as the other one.
    } no_help always

command_define "Align edges - move only" "Align edges - move only" auto_align_edge_move \
    "edit_alignment edge -1" {
	Align edges of two objects without resizing.
	The shape will be moved so that the selected
	edge will be co-linear with the other one.
    } no_help always

command_define "Align vertices - move only" "Align vertices - move only" auto_align_vert_move \
    "edit_alignment vert -1" {
	Align vertices of two objects without resizing.
	The shape will be moved so that the selected
	vertex will be at the same location as the
	other one.
    } no_help always

command_define "Align object centers" "Align object centers" auto_align_center \
    "edit_alignment center 0" {
	Align centers of two objects.  The
	object will be moved so that its
	center will coincide with the center
	of the other object.
    } no_help always

command_define "Align face centers" "Align face centers" auto_align_centerface \
    "edit_alignment center_face 0" {
	Align centers of two faces.  The
	object will be moved so that the
	selected face will be centered on 
	the face of the other one.
    } no_help always

command_define "Morph faces" "Morph faces" auto_match_face \
    "edit_alignment face 1" {
	Match faces of two objects.  The object
	will be resized so that the selected face
	is the same location and shape as the
	other face.
    } no_help always

command_define "Morph edges" "Morph edges" auto_match_edge \
    "edit_alignment edge 1" {
	Match edges of two objects.  The object
	will be resized so that the selected edge
	is the same location and shape as the
	other edge.
    } no_help always

# --------------------------------------------

command_define "Action" "Action" no_icon \
    "checkbutton graph_action_var graph_toggle_action" {
    } no_help always

command_define "Hidden line" "Hidden line" no_icon \
    "checkbutton tdv_hiddenline_var($tdv_default)" {
    } no_help always

command_define "Wireframe shading" "Wireframe" no_icon \
    "radiobutton shading_type wire model_graph_options_changed" {
    } no_help always

command_define "Solid shading" "Solid" no_icon \
    "radiobutton shading_type gouraud model_graph_options_changed" {
    } no_help always

command_define "Selected solid shading" "Selected solid" no_icon \
    "radiobutton shading_type selected_solid model_graph_options_changed" {
    } no_help always

command_define "Toggle shading type" "Toggle shading type" no_icon \
    {command_cycle_variable shading_type {wire gouraud selected_solid} model_graph_options_changed} {
	Toggle shading between wireframe, solid, and selected-solid.
    } no_help always

# --------------------------------------------

command_define "Find in tree" "Find" no_icon \
    "tree_find_form" {
    } no_help always

command_define "Sort tree alphabetically" "Alphabetical" no_icon \
    "radiobutton job_listsort alpha tree_sort_all" {
    } no_help always

command_define "Sort tree by meshing priority" "Meshing priority" no_icon \
    "radiobutton job_listsort priority tree_sort_all" {
    } no_help always

command_define "Sort tree by creation order" "Creation order" no_icon \
    "radiobutton job_listsort creation_order tree_sort_all" {
    } no_help always

command_define "Organize tree flat" "Flat" no_icon \
    "radiobutton tree(detail) 0 tree_detail" {
    } no_help always

command_define "Organize tree by types" "Types" no_icon \
    "radiobutton tree(detail) 1 tree_detail" {
    } no_help always

command_define "Organize tree by types / subtypes" "Types / subtypes" no_icon \
    "radiobutton tree(detail) 2 tree_detail" {
    } no_help always

command_define "Organize tree by types / subtypes / shapes" "Types / subtypes / shapes" no_icon \
    "radiobutton tree(detail) 3 tree_detail" {
    } no_help always

command_define "Close all tree nodes" "Close all" no_icon \
    "tree_open_close_all 0" {
    } no_help always

command_define "Open all tree nodes" "Open all" no_icon \
    "tree_open_close_all 1" {
    } no_help always

command_define "Close all model nodes" "Close all" no_icon \
    "tree_open_close_all 0 model" {
    } no_help always

command_define "Open all model nodes" "Open all" no_icon \
    "tree_open_close_all 1 model" {
    } no_help always

command_define "Import CSV/Excel" "CSV/Excel" no_icon \
    "csv_file_import_object_geometry" {
    } no_help always

command_define "Export CSV/Excel" "CSV/Excel" no_icon \
    "csv_file_export_object_geometry" {
    } no_help always
    
command_define "About Autohexa" "About Autohexa" no_icon \
    "about_autohexa" {
    } no_help always
    
