============以下是DCL文件=============
- gcad : dialog {
- label = "镜框辅助设计系统";
- :text { label = "馒头型眼睛镜框设计";alignment = centered; }
- :row {
- :boxed_radio_column {
- label = "方法选用:";
- key = "rad";
- fixed_width = true;
- width = 30;
- height = 15;
- :radio_button {
- label = "整体比例缩放";
- key = "Scale_All";
- }
- :edit_box {
- label = "缩放因子(0-1.5)";
- key = "Scale";
- }
- :radio_button {
- label = "长宽尺寸调整";
- key = "Scale_Long";
- }
- :edit_box {
- label = "基线长:";
- key = "Long";
- }
- :edit_box {
- label = "基线宽:";
- key = "Width";
- }
- :radio_button {
- label = "内调";
- key = "Scale_Turn_In";
- }
- :edit_box {
- label = "调节值:";
- key = "Val_In";
- }
- :radio_button {
- label = "外调";
- key = "Scale_Turn_Out";
- }
- :edit_box {
- label = "调节值:";
- key = "Val_Out";
- }
- }
- :boxed_column {
- label = "视图";
- :image {
- key = "cur_color";
- label = "color";
- color = 7;
- fixed_width = true;
- width = 40;
- height = 15;
- }
- :text { label = "系统设定中心为调整中心(详细见图样)";}
- }
- }
- ok_cancel;
- }
========以下是控制函数,OK后打印选中的RADIO的KEY值========
- (defun Radio_click(key)
- (set_tile "Scale_All" "0")
- (set_tile "Scale_Long" "0")
- (set_tile "Scale_Turn_In" "0")
- (set_tile "Scale_Turn_Out" "0")
- (set_tile key "1")
- )
- (defun c:main( / dcl_id m)
- (if (< (setq dcl_id (load_dialog "gcad.dcl")) 0)
- (exit)
- )
- (new_dialog "gcad" dcl_id)
- (set_tile "Scale_All" "1")
- (action_tile "Scale_All" "(Radio_click $key)")
- (action_tile "Scale_Long" "(Radio_click $key)")
- (action_tile "Scale_Turn_In" "(Radio_click $key)")
- (action_tile "Scale_Turn_Out" "(Radio_click $key)")
- (action_tile "accept" "(setq m (get_tile "rad")) (done_dialog)")
- (start_dialog)
- (unload_dialog dcl_id)
- (princ m)
- (princ)
- )
|