I basically have something like this:
class CGlToolBase
{
public:
CGlToolBase(void)
{
}
virtual void OnMouseDown(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnMouseMove(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnMouseUp(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnKeyDown(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnLDoubleClick(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
~CGlToolBase(void);
};
class CGlToolSelect : public CGlToolBase
{
bool selected;
public:
CGlToolSelect(void)
{
selected = false;
}
virtual void OnMouseDown(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnMouseMove(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnMouseUp(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnKeyDown(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
virtual void OnLDoubleClick(CGlEngine &glEngine, WPARAM wParam, LPARAM lParam);
~CGlToolSelect(void);
};
In my select tool I set selected to false. Is this the correct way to do it if I do something like this:
CGlToolBase *tool = new CGlToolSelect;
Thanks