Skip to content

Commit

Permalink
docs: link to component lifecycle docs in descriptions of relevant me…
Browse files Browse the repository at this point in the history
…thods
  • Loading branch information
joshtynjala committed Jan 13, 2025
1 parent 7d15e74 commit 006fb0c
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 10 deletions.
3 changes: 3 additions & 0 deletions src/feathers/core/FeathersControl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ class FeathersControl extends MeasureSprite implements IUIControl implements IVa

/**
@see `feathers.core.IUIControl.initializeNow`
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function initializeNow():Void {
if (this._initialized || this._initializing) {
Expand Down Expand Up @@ -838,6 +839,7 @@ class FeathersControl extends MeasureSprite implements IUIControl implements IVa

/**
@see `feathers.core.IUIControl.dispose`
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function dispose():Void {
this.clearStyles();
Expand Down Expand Up @@ -866,6 +868,7 @@ class FeathersControl extends MeasureSprite implements IUIControl implements IVa
@since 1.0.0
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
@see `feathers.events.FeathersEvent.INITIALIZE`
**/
@:dox(show)
Expand Down
5 changes: 5 additions & 0 deletions src/feathers/core/IUIControl.hx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ interface IUIControl extends IDisplayObject {
and validate immediately, call `validateNow()` instead.
@since 1.0.0
@see `feathers.core.FeathersControl.initialize()`
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function initializeNow():Void;

Expand All @@ -81,6 +84,8 @@ interface IUIControl extends IDisplayObject {
use cases where some extra cleanup may benefit memory usage.
@since 1.3.0
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function dispose():Void;
}
2 changes: 2 additions & 0 deletions src/feathers/core/IValidating.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ interface IValidating {
time without requiring a full update every time.
@since 1.0.0
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function validateNow():Void;
}
22 changes: 12 additions & 10 deletions src/feathers/core/ValidatingSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,7 @@ import openfl.events.Event;
@:event(openfl.events.TouchEvent.TOUCH_ROLL_OVER)
@:event(openfl.events.TouchEvent.TOUCH_TAP)
#if air
@:event(openfl.events.MouseEvent.CONTEXT_MENU)
@:event(openfl.events.TouchEvent.PROXIMITY_BEGIN)
@:event(openfl.events.TouchEvent.PROXIMITY_END)
@:event(openfl.events.TouchEvent.PROXIMITY_MOVE)
@:event(openfl.events.TouchEvent.PROXIMITY_OUT)
@:event(openfl.events.TouchEvent.PROXIMITY_OVER)
@:event(openfl.events.TouchEvent.PROXIMITY_ROLL_OUT)
@:event(openfl.events.TouchEvent.PROXIMITY_ROLL_OVER)
@:event(openfl.events.MouseEvent.CONTEXT_MENU) @:event(openfl.events.TouchEvent.PROXIMITY_BEGIN) @:event(openfl.events.TouchEvent.PROXIMITY_END) @:event(openfl.events.TouchEvent.PROXIMITY_MOVE) @:event(openfl.events.TouchEvent.PROXIMITY_OUT) @:event(openfl.events.TouchEvent.PROXIMITY_OVER) @:event(openfl.events.TouchEvent.PROXIMITY_ROLL_OUT) @:event(openfl.events.TouchEvent.PROXIMITY_ROLL_OVER)
#end
class ValidatingSprite extends Sprite implements IValidating {
private function new() {
Expand Down Expand Up @@ -134,6 +127,8 @@ class ValidatingSprite extends Sprite implements IValidating {
```
@since 1.0.0
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function isInvalid(?flag:InvalidationFlag):Bool {
if (this._allInvalid) {
Expand Down Expand Up @@ -205,6 +200,8 @@ class ValidatingSprite extends Sprite implements IValidating {
```
@since 1.0.0
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function setInvalid(?flag:InvalidationFlag):Void {
if (this._ignoreInvalidationFlags) {
Expand Down Expand Up @@ -273,6 +270,8 @@ class ValidatingSprite extends Sprite implements IValidating {

/**
@see `feathers.core.IValidating.validateNow`
@see `ValidatingSprite.update`
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
public function validateNow():Void {
// if we're not actually invalid, there's nothing to do here, so
Expand Down Expand Up @@ -303,9 +302,10 @@ class ValidatingSprite extends Sprite implements IValidating {
this function during `draw()` to manipulate the flags that
its superclass sees.
@see `ValidatingSprite.setInvalid()`
@since 1.0.0
@see `ValidatingSprite.setInvalid()`
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
@:dox(show)
private function setInvalidationFlag(flag:InvalidationFlag):Void {
Expand Down Expand Up @@ -333,6 +333,8 @@ class ValidatingSprite extends Sprite implements IValidating {
```
@since 1.0.0
@see [The Feathers UI Component Lifecycle](https://feathersui.com/learn/haxe-openfl/ui-component-lifecycle/)
**/
@:dox(show)
private function update():Void {}
Expand Down

0 comments on commit 006fb0c

Please sign in to comment.