home *** CD-ROM | disk | FTP | other *** search
/ Computerworld 1996 March / Computerworld_1996-03_cd.bin / idg_cd3 / grafika / 3d_graf / genv10 / toolexmp / toolexmp.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-29  |  3.3 KB  |  125 lines

  1. /*---------------------------------------------------------------------------
  2.                 ExampleTool
  3.                 -----------
  4.  
  5.     Example tool class
  6.  
  7.     (C) Silicon Dream Ltd 1995
  8.  
  9.   ---------------------------------------------------------------------------
  10.  
  11. Changes:                            Date:
  12. * Created file                            08/02/95
  13. */
  14.  
  15. #include <tool.h>
  16.  
  17. #include "resource.h"
  18.  
  19. // YOU DO: Change the class name below to describe your tool and anywhere else
  20. //       this class name is used in this file
  21. class ExampleTool: public Tool
  22.     {
  23.     private:
  24.         // YOU DO: Declare your private variables here. eg.
  25.         //  Vec        vecCursorPos;
  26.         //       (Non C++ users: 'private' means those
  27.         //        variables which have global scope from
  28.         //        within the functions you define here)
  29.  
  30.         // YOU DO: Uncomment any functions to trap events you're interested in
  31.         //  void _cppdyn Initialise();            // Called once when DLL loaded
  32.         //  void _cppdyn OnConfigure();            // Called to configure tool
  33.         //  Redraw _cppdyn OnSelect(Vec &vec);        // Called when tool is selected
  34.         //  Redraw _cppdyn OnUnSelect(bool *pbOkToChange); // Called when another tool is selected
  35.         //  Redraw _cppdyn OnButtonDown(Vec &vec);    // Called when button pressed
  36.         //  Redraw _cppdyn OnMouseMove(Vec &vec);    // Called when mouse moves with button down
  37.         //  Redraw _cppdyn OnButtonUp(Vec &vec);    // Called when button is released
  38.         //  Redraw _cppdyn OnSet(Vec &vec);        // Called when the 'Set' button is clicked
  39.         //  Redraw _cppdyn OnUndo();            // Called when user wishes to undo effect of tool
  40.         //  Redraw _cppdyn OnDo(Vec &vec);        // Called to end use of tool
  41.         //  void _cppdyn OnViewChange(HanCoorSys hcsys, Vec &vec); // Called when active view changes
  42.         //  void _cppdyn DrawSoFar(HDC hdc, HanCoorSys hcsys, void *pvViewData, bool bInvalid); // Called to draw object so far into the view
  43.  
  44.     public:
  45.         _cppdyn ~ExampleTool() {};
  46.     };
  47.  
  48. IMPLEMENT_OBJECT(ExampleTool)
  49.  
  50. // YOU DO: Uncomment and fill in any functions for events you want to trap.
  51. //       (Non C++ users: If you create any functions of your own which need
  52. //        to access your private variables (see above), you must make the
  53. //        funtion part of your class by declaring it along with the other
  54. //        functions (see above), and prefixing the function name with
  55. //        'classname::' in the implementation)
  56.  
  57. /*
  58. void _cppdyn ExampleTool::Initialise()
  59.     {
  60.     }
  61. */
  62. /*
  63. void _cppdyn ExampleTool::OnConfigure()
  64.     {
  65.     }
  66. */
  67. /*
  68. Redraw _cppdyn ExampleTool::OnSelect(Vec &vec)
  69.     {
  70.     return REDRAW_NONE;
  71.     }
  72. */
  73. /*
  74. Redraw _cppdyn ExampleTool::OnUnSelect(bool *pbOkToChange)
  75.     {
  76.     *pbOkToChange=TRUE;
  77.     return REDRAW_NONE;
  78.     }
  79. */
  80. /*
  81. Redraw _cppdyn ExampleTool::OnButtonDown(Vec &vec)
  82.     {
  83.     return REDRAW_NONE;
  84.     }
  85. */
  86. /*
  87. Redraw _cppdyn ExampleTool::OnMouseMove(Vec &vec)
  88.     {
  89.     return REDRAW_NONE;
  90.     }
  91. */
  92. /*
  93. Redraw _cppdyn ExampleTool::OnButtonUp(Vec &vec)
  94.     {
  95.     return REDRAW_NONE;
  96.     }
  97. */
  98. /*
  99. Redraw _cppdyn ExampleTool::OnSet(Vec &vec)
  100.     {
  101.     return REDRAW_NONE;
  102.     }
  103. */
  104. /*
  105. Redraw _cppdyn ExampleTool::OnUndo()
  106.     {
  107.     return REDRAW_NONE;
  108.     }
  109. */
  110. /*
  111. Redraw _cppdyn ExampleTool::OnDo(Vec &vec)
  112.     {
  113.     return REDRAW_NONE;
  114.     }
  115. */
  116. /*
  117. void _cppdyn ExampleTool::OnViewChange(HanCoorSys hcsys, Vec &vec)
  118.     {
  119.     }
  120. */
  121. /*
  122. void _cppdyn ExampleTool::DrawSoFar(HDC hdc, HanCoorSys hcsys, void *pvViewData, bool bInvalid)
  123.     {
  124.     }
  125. */