OGL demo

Hi

I have some questions regarding the OGL demo:

1. In the "OnLeftClick" method there's an if test on shape.Selected(). What's
the reason for this? Isn't it obvious that the shape that's clicked is
selected?

2. How is this possible: shape.Select(False, dc). The "Select" method only
accept ONE bool argument.

Thomas

Thomas Aanensen wrote:

1. In the "OnLeftClick" method there's an if test on shape.Selected(). What's the reason for this? Isn't it obvious that the shape that's clicked is selected?

Its because when you click in a shape and this shape is already selected the program deselect the shape. if not the program select.

Diego

Thomas Aanensen wrote:

Hi

I have some questions regarding the OGL demo:

1. In the "OnLeftClick" method there's an if test on shape.Selected(). What's the reason for this? Isn't it obvious that the shape that's clicked is selected?

No. The shape is either selected or deselected in the OnLeftClick method.

2. How is this possible: shape.Select(False, dc). The "Select" method only accept ONE bool argument.

class wxShape : public wxShapeEvtHandler
  ...
  void Select(bool select = TRUE, wxDC* dc = NULL);
  ...
};

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!