home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / SAMPLES / ICLUI / DRAG1 / DMSAMP1.CPP < prev    next >
Text File  |  1993-10-08  |  2KB  |  48 lines

  1. #include <iframe.hpp>
  2. #include <ientryfd.hpp>
  3. #include <idmefit.hpp>
  4. #include <idmhndlr.hpp>
  5.  
  6. /*------------------------------------------------------------------------------
  7. | main                                                                         |
  8. ------------------------------------------------------------------------------*/
  9. void main()
  10. {
  11.  
  12.   /***********************************************************************/
  13.   /* Create a generic frame window.                                      */
  14.   /***********************************************************************/
  15.   IFrameWindow
  16.     frame( "ICLUI Direct Manipulation Sample 1" );
  17.  
  18.   /***********************************************************************/
  19.   /* Create 2 entry fields for the client area.                          */
  20.   /***********************************************************************/
  21.   IEntryField
  22.     client( 1000, &frame, &frame ),
  23.     ext   ( 1001, &frame, &frame );
  24.  
  25.   /***********************************************************************/
  26.   /* Enable source and target direct manipulation support for both       */
  27.   /* entry fields.                                                       */
  28.   /***********************************************************************/
  29.   IDMHandler::enableDragDropFor( &client );
  30.   IDMHandler::enableDragDropFor( &ext );
  31.  
  32.   /***********************************************************************/
  33.   /* Frame setup - Put both entry fields in the client area, with one    */
  34.   /* added as an extension.                                              */
  35.   /***********************************************************************/
  36.   frame
  37.     .setClient( &client )
  38.     .addExtension( &ext, IFrameWindow::belowClient, 0.5 )
  39.     .setFocus()
  40.     .show();
  41.  
  42.   /***********************************************************************/
  43.   /* Run Direct Manipulation Sample 1                                    */
  44.   /***********************************************************************/
  45.   IApplication::current().run();
  46.  
  47. }
  48.