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 >
Wrap
Text File
|
1993-10-08
|
2KB
|
48 lines
#include <iframe.hpp>
#include <ientryfd.hpp>
#include <idmefit.hpp>
#include <idmhndlr.hpp>
/*------------------------------------------------------------------------------
| main |
------------------------------------------------------------------------------*/
void main()
{
/***********************************************************************/
/* Create a generic frame window. */
/***********************************************************************/
IFrameWindow
frame( "ICLUI Direct Manipulation Sample 1" );
/***********************************************************************/
/* Create 2 entry fields for the client area. */
/***********************************************************************/
IEntryField
client( 1000, &frame, &frame ),
ext ( 1001, &frame, &frame );
/***********************************************************************/
/* Enable source and target direct manipulation support for both */
/* entry fields. */
/***********************************************************************/
IDMHandler::enableDragDropFor( &client );
IDMHandler::enableDragDropFor( &ext );
/***********************************************************************/
/* Frame setup - Put both entry fields in the client area, with one */
/* added as an extension. */
/***********************************************************************/
frame
.setClient( &client )
.addExtension( &ext, IFrameWindow::belowClient, 0.5 )
.setFocus()
.show();
/***********************************************************************/
/* Run Direct Manipulation Sample 1 */
/***********************************************************************/
IApplication::current().run();
}