@@ -168,7 +168,8 @@ default boolean hasChildren() {
168168 ModularPanel getPanel ();
169169
170170 /**
171- * Returns if this element is enabled. Disabled elements are not drawn and can not be interacted with.
171+ * Returns if this element is enabled. Disabled elements are not drawn and can not be interacted with. If this is disabled, the children
172+ * will be considered disabled to without actually being disabled.
172173 *
173174 * @return if this element is enabled
174175 */
@@ -177,6 +178,11 @@ default boolean hasChildren() {
177178
178179 void setEnabled (boolean enabled );
179180
181+ /**
182+ * Checks if all ancestors are enabled. Only then this widget is visible and interactable.
183+ *
184+ * @return if all ancestors are enabled.
185+ */
180186 default boolean areAncestorsEnabled () {
181187 IWidget parent = this ;
182188 do {
@@ -186,14 +192,32 @@ default boolean areAncestorsEnabled() {
186192 return true ;
187193 }
188194
195+ /**
196+ * If this widget can be seen on the screen even partly. If this returns false it will be culled. This is visually only!
197+ *
198+ * @param stack viewport stack
199+ * @return false if this widget can not be seen currently and should not be drawn
200+ */
189201 default boolean canBeSeen (IViewportStack stack ) {
190202 return Stencil .isInsideScissorArea (getArea (), stack );
191203 }
192204
205+ /**
206+ * Determines if this widget can have any hover interaction. Interactions with mouse or keyboard like clicks ignore this.
207+ * This is useful, when you have a widget which changes its background when hovered or has a tooltip and some decoration child. Normally
208+ * you can click through the child, but while you hover it the widget will not show its tooltip etc. To change that return false here.
209+ *
210+ * @return if this widget can have any hover interaction
211+ */
193212 default boolean canHover () {
194213 return true ;
195214 }
196215
216+ /**
217+ * Determines if widgets below this can receive a click callback. This is only called when this widget didn't consume the click.
218+ *
219+ * @return if widgets below this should be able to receive a click
220+ */
197221 default boolean canClickThrough () {
198222 return true ;
199223 }
0 commit comments