home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 10 / ioProg_10.iso / soft / optima / samples.z / TabFileParts.wxf < prev    next >
Encoding:
Text File  |  1996-09-16  |  8.3 KB  |  431 lines

  1. Save Format v1.3
  2. @begin Form "TabFileParts"
  3.  Exported 0;
  4.  
  5.  @begin Object "WModelessDialog"
  6.   WSChild 1;
  7.   WSVisible 1;
  8.   Font "8.MS Sans Serif";
  9.   FormPositionType "Centered";
  10.   FormAbsTop "23";
  11.   FormAbsLeft "8";
  12.   FDXStructName "TabFilePartsFDXStruct";
  13.   Text "Using GetFileParts()";
  14.   @begin Event "Create"
  15.    GencodeSrcLine 239;
  16.    FunctionName "TabFileParts::TabFileParts_Create";
  17.   @end;
  18.   @begin UserFunction "TabFileParts()"
  19.    Compiler 1;
  20.    GencodeSrcLine 251;
  21.    FunctionName "TabFileParts::TabFileParts()";
  22.   @end;
  23.   @begin UserFunction "~TabFileParts()"
  24.    Compiler 1;
  25.    GencodeSrcLine 255;
  26.    FunctionName "TabFileParts::~TabFileParts()";
  27.   @end;
  28.   ResID 103;
  29.   DesignName TabFileParts;
  30.   TabIndex 0;
  31.   DesignRect 38,149,236,216;
  32.  @end;
  33.  
  34.  @begin Object "WTextBox"
  35.   WTextBoxAutoHScroll 1;
  36.   WSBorder 1;
  37.   WSChild 1;
  38.   WSMinimizeBox 1;
  39.   WSMaximizeBox 1;
  40.   WSGroup 1;
  41.   WSTabStop 1;
  42.   WSExClientEdge 1;
  43.   WSVisible 1;
  44.   ResID 101;
  45.   DesignName textb_1;
  46.   TabIndex 0;
  47.   DesignRect 5,20,170,15;
  48.  @end;
  49.  
  50.  @begin Object "WLabel"
  51.   WSSLeftNoWordWrap 1;
  52.   WSSNotify 1;
  53.   WCCSNoResize 1;
  54.   WCCSNoParentAlign 1;
  55.   WSChild 1;
  56.   WSVisible 1;
  57.   Text "Enter a file path:";
  58.   ResID 102;
  59.   DesignName label_1;
  60.   TabIndex 1;
  61.   DesignRect 5,5,160,10;
  62.  @end;
  63.  
  64.  @begin Object "WCommandButton"
  65.   WSChild 1;
  66.   WSMaximizeBox 1;
  67.   WSTabStop 1;
  68.   WSVisible 1;
  69.   Pressed "0";
  70.   FDXFieldName "cb_1_data";
  71.   FDXFieldType "WBool";
  72.   Text "&Get Parts";
  73.   @begin Event "Click"
  74.    GencodeSrcLine 259;
  75.    FunctionName "TabFileParts::cb_1_Click";
  76.   @end;
  77.   ResID 103;
  78.   DesignName cb_1;
  79.   TabIndex 2;
  80.   DesignRect 180,20,45,15;
  81.  @end;
  82.  
  83.  @begin Object "WGroupBox"
  84.   WCCSTop 1;
  85.   WCCSNoMoveY 1;
  86.   WCCSBottom 1;
  87.   WCCSNoResize 1;
  88.   WSChild 1;
  89.   WSVisible 1;
  90.   Text "Individual parts";
  91.   ResID 104;
  92.   DesignName groupb_1;
  93.   TabIndex 3;
  94.   DesignRect 5,50,220,75;
  95.  @end;
  96.  
  97.  @begin Object "WGroupBox"
  98.   WCCSTop 1;
  99.   WCCSNoMoveY 1;
  100.   WCCSBottom 1;
  101.   WCCSNoResize 1;
  102.   WSChild 1;
  103.   WSVisible 1;
  104.   Text "Multiple parts";
  105.   ResID 105;
  106.   DesignName groupb_2;
  107.   TabIndex 4;
  108.   DesignRect 5,135,220,75;
  109.  @end;
  110.  
  111.  @begin Object "WLabel"
  112.   WSSLeftNoWordWrap 1;
  113.   WSSNotify 1;
  114.   WCCSNoResize 1;
  115.   WCCSNoParentAlign 1;
  116.   WSChild 1;
  117.   WSVisible 1;
  118.   Text "Drive:";
  119.   ResID 106;
  120.   DesignName label_2;
  121.   TabIndex 5;
  122.   DesignRect 15,65,45,10;
  123.  @end;
  124.  
  125.  @begin Object "WLabel"
  126.   WSSLeftNoWordWrap 1;
  127.   WSSNotify 1;
  128.   WCCSNoResize 1;
  129.   WCCSNoParentAlign 1;
  130.   WSChild 1;
  131.   WSVisible 1;
  132.   Text "Filename:";
  133.   ResID 107;
  134.   DesignName label_3;
  135.   TabIndex 6;
  136.   DesignRect 15,95,45,10;
  137.  @end;
  138.  
  139.  @begin Object "WLabel"
  140.   WSSLeftNoWordWrap 1;
  141.   WSSNotify 1;
  142.   WCCSNoResize 1;
  143.   WCCSNoParentAlign 1;
  144.   WSChild 1;
  145.   WSVisible 1;
  146.   Text "Directory:";
  147.   ResID 108;
  148.   DesignName label_4;
  149.   TabIndex 7;
  150.   DesignRect 15,80,45,10;
  151.  @end;
  152.  
  153.  @begin Object "WLabel"
  154.   WSSLeftNoWordWrap 1;
  155.   WSSNotify 1;
  156.   WCCSNoResize 1;
  157.   WCCSNoParentAlign 1;
  158.   WSChild 1;
  159.   WSVisible 1;
  160.   Text "Extension:";
  161.   ResID 109;
  162.   DesignName label_5;
  163.   TabIndex 8;
  164.   DesignRect 15,110,45,10;
  165.  @end;
  166.  
  167.  @begin Object "WLabel"
  168.   WSSLeftNoWordWrap 1;
  169.   WSSNotify 1;
  170.   WCCSNoResize 1;
  171.   WCCSNoParentAlign 1;
  172.   WSChild 1;
  173.   WSVisible 1;
  174.   ResID 110;
  175.   DesignName label_Drive;
  176.   TabIndex 9;
  177.   DesignRect 65,65,156,10;
  178.  @end;
  179.  
  180.  @begin Object "WLabel"
  181.   WSSLeftNoWordWrap 1;
  182.   WSSNotify 1;
  183.   WCCSNoResize 1;
  184.   WCCSNoParentAlign 1;
  185.   WSChild 1;
  186.   WSVisible 1;
  187.   ResID 111;
  188.   DesignName label_Dir;
  189.   TabIndex 10;
  190.   DesignRect 65,80,156,10;
  191.  @end;
  192.  
  193.  @begin Object "WLabel"
  194.   WSSLeftNoWordWrap 1;
  195.   WSSNotify 1;
  196.   WCCSNoResize 1;
  197.   WCCSNoParentAlign 1;
  198.   WSChild 1;
  199.   WSVisible 1;
  200.   ResID 112;
  201.   DesignName label_Fname;
  202.   TabIndex 11;
  203.   DesignRect 65,95,156,10;
  204.  @end;
  205.  
  206.  @begin Object "WLabel"
  207.   WSSLeftNoWordWrap 1;
  208.   WSSNotify 1;
  209.   WCCSNoResize 1;
  210.   WCCSNoParentAlign 1;
  211.   WSChild 1;
  212.   WSVisible 1;
  213.   ResID 113;
  214.   DesignName label_Ext;
  215.   TabIndex 12;
  216.   DesignRect 65,110,156,10;
  217.  @end;
  218.  
  219.  @begin Object "WCheckBox"
  220.   WBSAutoCheckBox 1;
  221.   WCCSTop 1;
  222.   WCCSNoMoveY 1;
  223.   WCCSBottom 1;
  224.   WSChild 1;
  225.   WSMaximizeBox 1;
  226.   WSTabStop 1;
  227.   WSVisible 1;
  228.   FDXFieldName "checkbox_1_data";
  229.   FDXFieldType "WULong";
  230.   Text "Drive";
  231.   Checked "0";
  232.   ResID 114;
  233.   DesignName checkbox_Drive;
  234.   TabIndex 13;
  235.   DesignRect 55,150,45,10;
  236.  @end;
  237.  
  238.  @begin Object "WCheckBox"
  239.   WBSAutoCheckBox 1;
  240.   WCCSTop 1;
  241.   WCCSNoMoveY 1;
  242.   WCCSBottom 1;
  243.   WSChild 1;
  244.   WSMaximizeBox 1;
  245.   WSTabStop 1;
  246.   WSVisible 1;
  247.   FDXFieldName "checkbox_1_data";
  248.   FDXFieldType "WULong";
  249.   Text "Filename";
  250.   Checked "0";
  251.   ResID 115;
  252.   DesignName checkbox_Fname;
  253.   TabIndex 14;
  254.   DesignRect 111,150,44,10;
  255.  @end;
  256.  
  257.  @begin Object "WCheckBox"
  258.   WBSAutoCheckBox 1;
  259.   WCCSTop 1;
  260.   WCCSNoMoveY 1;
  261.   WCCSBottom 1;
  262.   WSChild 1;
  263.   WSMaximizeBox 1;
  264.   WSTabStop 1;
  265.   WSVisible 1;
  266.   FDXFieldName "checkbox_1_data";
  267.   FDXFieldType "WULong";
  268.   Text "Directory";
  269.   Checked "0";
  270.   ResID 116;
  271.   DesignName checkbox_Dir;
  272.   TabIndex 15;
  273.   DesignRect 55,165,45,10;
  274.  @end;
  275.  
  276.  @begin Object "WCheckBox"
  277.   WBSAutoCheckBox 1;
  278.   WCCSTop 1;
  279.   WCCSNoMoveY 1;
  280.   WCCSBottom 1;
  281.   WSChild 1;
  282.   WSMaximizeBox 1;
  283.   WSTabStop 1;
  284.   WSVisible 1;
  285.   FDXFieldName "checkbox_1_data";
  286.   FDXFieldType "WULong";
  287.   Text "Extension";
  288.   Checked "0";
  289.   ResID 117;
  290.   DesignName checkbox_Ext;
  291.   TabIndex 16;
  292.   DesignRect 111,165,44,10;
  293.  @end;
  294.  
  295.  @begin Object "WLabel"
  296.   WSSLeftNoWordWrap 1;
  297.   WSSNotify 1;
  298.   WCCSNoResize 1;
  299.   WCCSNoParentAlign 1;
  300.   WSChild 1;
  301.   WSVisible 1;
  302.   ResID 118;
  303.   DesignName label_10;
  304.   TabIndex 17;
  305.   DesignRect 45,190,170,15;
  306.  @end;
  307.  
  308.  @begin Object "WLabel"
  309.   WSSLeftNoWordWrap 1;
  310.   WSSNotify 1;
  311.   WCCSNoResize 1;
  312.   WCCSNoParentAlign 1;
  313.   WSChild 1;
  314.   WSVisible 1;
  315.   Text "Parts:";
  316.   ResID 119;
  317.   DesignName label_6;
  318.   TabIndex 18;
  319.   DesignRect 10,190,30,15;
  320.  @end;
  321.  
  322.  @begin HPPPrefixBlock
  323. @begin-code HPPPrefix
  324.  
  325. // Declarations added here will be included at the top of the .HPP file
  326.  
  327. @end-code;
  328.   GencodeSrcLine 10;
  329.  @end;
  330.  
  331.  @begin CPPPrefixBlock
  332. @begin-code CPPPrefix
  333.  
  334. // Code added here will be included at the top of the .CPP file
  335.  
  336. //  Include definitions for resources.
  337. #include "WRes.h"
  338.  
  339. @end-code;
  340.   GencodeSrcLine 10;
  341.  @end;
  342.  
  343.  @begin ClassContentsBlock
  344. @begin-code ClassContents
  345.  
  346.     public:
  347.         // add your public instance data here
  348.     private:
  349.         // add your private instance data here
  350.     protected:
  351.         // add your protected instance data here
  352.  
  353. @end-code;
  354.   GencodeSrcLine 78;
  355.  @end;
  356.  
  357. @begin-code GeneratedClassContents
  358.  
  359.         TabFileParts();
  360.         ~TabFileParts();
  361.  
  362. @end-code;
  363.  
  364. @begin-code Code "TabFileParts::TabFileParts()"
  365.  
  366. @@CLASSNAME@::@CLASSNAME@()
  367. {
  368.     
  369. }
  370.  
  371. @end-code;
  372.  
  373. @begin-code Code "TabFileParts::~TabFileParts()"
  374.  
  375. @@CLASSNAME@::~@CLASSNAME@()
  376. {
  377.     
  378. }
  379.  
  380. @end-code;
  381.  
  382. @begin-code Code "TabFileParts::TabFileParts_Create"
  383.  
  384. WBool @CLASSNAME@::TabFileParts_Create(
  385.     WObject *               source,
  386.     WCreateEventData *      event )
  387. {
  388.     // set the initial state of the controls on the dialog
  389.     textb_1->SetText( WString( WTEXT( "c:\\programs\\optima.exe" ) ) );
  390.     checkbox_Drive->SetChecked( TRUE );
  391.     checkbox_Dir->SetChecked( TRUE );
  392.     checkbox_Fname->SetChecked( TRUE );
  393.     checkbox_Ext->SetChecked( TRUE );
  394.     return FALSE;
  395. }
  396.  
  397. @end-code;
  398.  
  399. @begin-code Code "TabFileParts::cb_1_Click"
  400.  
  401. WBool @CLASSNAME@::cb_1_Click(
  402.     WObject *           source,
  403.     WEventData *        event )
  404. {
  405.     WFilePath       fp;
  406.     WString         line;
  407.     WUInt           flags;
  408.     
  409.     fp = textb_1->GetText();
  410.     
  411.     // fill in the 'Individual parts' section of the dialog
  412.     label_Drive->SetText( fp.GetDrive() );
  413.     label_Dir->SetText( fp.GetDirectory() );
  414.     label_Fname->SetText( fp.GetFileName() );
  415.     label_Ext->SetText( fp.GetExtension() );
  416.     
  417.     // fill in the 'Multiple parts' section of the dialog
  418.     flags = 0;
  419.     if( checkbox_Drive->GetChecked() ) flags |= _WFILEPATH_DRIVE;
  420.     if( checkbox_Dir->GetChecked() ) flags |= _WFILEPATH_DIR;
  421.     if( checkbox_Fname->GetChecked() ) flags |= _WFILEPATH_FNAME;
  422.     if( checkbox_Ext->GetChecked() ) flags |= _WFILEPATH_EXT;
  423.     line = fp.GetFileParts( flags );
  424.     label_10->SetText( line );
  425.     
  426.     return FALSE;
  427. }
  428.  
  429. @end-code;
  430. @end;
  431.