This is the class that defines a rectangular region on the screen for the
explicit MouseWatcherRegion(std::string const &name, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top)¶
PN_stdfloat get_area(void) const¶
Returns the area of the rectangular region.
bool get_keyboard(void) const¶
Returns whether the region is interested in global keyboard events; see
void output(std::ostream &out) const¶
void set_active(bool active)¶
Sets whether the region is active or not. If it is not active, the
MouseWatcherwill never consider the mouse to be over the region. The region might still receive keypress events if its
set_keyboard()flag is true.
void set_frame(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top)¶
void set_keyboard(bool keyboard)¶
Sets whether the region is interested in global keyboard events. If this is true, then any keyboard button events will be passed to press() and release() regardless of the position of the mouse onscreen; otherwise, these events will only be passed if the mouse is over the region.
void set_sort(int sort)¶
Changes the sorting order of this particular region. The sorting order is used to resolve conflicts in the case of overlapping region; the region with the highest sort value will be preferred, and between regions of the same sort value, the smallest region will be preferred. The default sorting order, if none is explicitly specified, is 0.
void set_suppress_flags(int suppress_flags)¶
Sets which events are suppressed when the mouse is over the region. This is the union of zero or more various SF_* values. Normally, this is 0, indicating that no events are suppressed.
If you set this to a non-zero value, for instance SF_mouse_position, then the mouse position will not be sent along the data graph when the mouse is over this particular region.
void write(std::ostream &out, int indent_level = 0) const¶
- explicit MouseWatcherRegion(std::string const &name, PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top)¶