def on_click(self, event):
button = event["<STR_LIT>"]<EOL>index = event["<STR_LIT:index>"]<EOL>if self.click_mode == "<STR_LIT>":<EOL><INDENT>if not self.py3.is_my_event(event) or index != "<STR_LIT>":<EOL><INDENT>return<EOL><DEDENT><DEDENT>self.cycle = self.cycle_timeout<EOL>self.cycle_time = time() + self.cycle<EOL>if button == self.button_next:<EOL><INDENT>if self.open:<EOL><INDENT>self._change_active(+<NUM_LIT:1>)<EOL><DEDENT><DEDENT>elif button == self.button_prev:<EOL><INDENT>if self.open:<EOL><INDENT>self._change_active(-<NUM_LIT:1>)<EOL><DEDENT><DEDENT>elif button == self.button_toggle:<EOL><INDENT>if index == "<STR_LIT>":<EOL><INDENT>self.open = not self.open<EOL><DEDENT><DEDENT>
Switch the displayed module or pass the event on to the active module