Graphics.TrickCustomizations - lordmundi/wikidoctest GitHub Wiki
Trick Customizations
Intro
I just want to remember some of the things I do locally
Trick UI: Key Bindings
ansicolor::text $err_box -relief raised \
-background "#404040" \
-foreground white \
-undo 1
$sw_info setwidget $err_box
bind $err_box <Control-Key-s> save_file
bind $err_box <Control-Key-z> "$err_box edit undo"
bind $err_box <Control-Key-r> "$err_box edit redo"
Trick UI: Show Math Macros And Functions
To the menu I added:
trick_ui
"&Show" {} {} 0 {
{command "&Vector Macros" {} "Vector Macros" {} \
-command {
global env
set ts $env(TRICK_HOME)/trick_source
set tu $ts/trick_utils/math/include
set file $tu/vector_macros.h
hs_write "delete" $file
}
}
{command "&Matrix Macros" {} "Matrix Macros" {} \
-command {
global env
set ts $env(TRICK_HOME)/trick_source
set tu $ts/trick_utils/math/include
set file $tu/matrix_macros.h
hs_write "delete" $file
}
}
{command "&Math Funcs" {} "Math Functions" {} \
-command {
global env
set ts $env(TRICK_HOME)/trick_source
set tu $ts/trick_utils/math/include
set file $tu/trick_math_proto.h
hs_write "delete" $file
}
}
{command "&Exec Funcs" {} "Exec Functions" {} \
-command {
global env
set ts $env(TRICK_HOME)/trick_source
set te $ts/sim_services/include
set file $te/exec_proto.h
hs_write "delete" $file
}
}
{command "&Exec Structs" {} "Exec Structs" {} \
-command {
global env
set ts $env(TRICK_HOME)/trick_source
set te $ts/sim_services/include
set file $te/executive.h
hs_write "delete" $file
}
}
}
Vector Set Macro
#define V_SET ( vect , xx , yy , zz ) \
{ vect[0] = xx ; vect[1] = yy ; vect[2] = zz ; }