Skip to content

Commit

Permalink
Generated updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
chRyNaN committed Apr 14, 2023
1 parent 4784171 commit c3306f8
Show file tree
Hide file tree
Showing 125 changed files with 2,177 additions and 160 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[ComposeFragment](-compose-fragment.md)

# ComposeFragment

[android]\
constructor()
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[Content](-content.md)

# Content

[android]\

@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)

abstract fun [Content](-content.md)()

Display the UI content. Remember to subscribe to the state changes using the [stateChanges](../../../../cycle-compose/cycle-compose/com.chrynan.cycle.compose/state-changes.md) function within this function. Using the [renderState](../../../../cycle-compose/com.chrynan.cycle.compose/-compose-fragment/render-state.md) property won't work because it won't trigger a recomposition of the composable function when the state changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[composeViewInitializer](compose-view-initializer.md)

# composeViewInitializer

[android]\
open fun [ComposeView](https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ComposeView.html).[composeViewInitializer](compose-view-initializer.md)()

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[ComposeFragment](index.md)/[onCreateView](on-create-view.md)

# onCreateView

[android]\
open override fun [onCreateView](on-create-view.md)(inflater: [LayoutInflater](https://developer.android.com/reference/kotlin/android/view/LayoutInflater.html), container: [ViewGroup](https://developer.android.com/reference/kotlin/android/view/ViewGroup.html)?, savedInstanceState: [Bundle](https://developer.android.com/reference/kotlin/android/os/Bundle.html)?): [View](https://developer.android.com/reference/kotlin/android/view/View.html)?
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//[cycle-compose](../../index.md)/[com.chrynan.cycle.compose](index.md)/[ComposeLayout](-compose-layout.md)

# ComposeLayout

[common]\

@ExperimentalCoroutinesApi

@FlowPreview

@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)

@[Stable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Stable.html)

fun <[State](-compose-layout.md), [Change](-compose-layout.md)> [ComposeLayout](-compose-layout.md)(layout: [Layout](-layout/index.md)<[State](-compose-layout.md), [Change](-compose-layout.md)>)

Renders the provided [layout](-compose-layout.md) as a [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html).

Example usage:

```kotlin
@Composable
fun Home {
ComposeLayout(homeLayout)
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[Content](-content.md)

# Content

[common]\

@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)

abstract fun [Content](-content.md)()

Renders the UI content for this Layout. Remember to subscribe to the state changes using the [stateChanges](../state-changes.md) function within this function. Using the [renderState](render-state.md) property won't work because it won't trigger a recomposition of the composable function when the state changes.

Example usage:

```kotlin
@Composable
override fun Content() {
val state by stateChanges()

Text("State = $state")
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[Layout](-layout.md)

# Layout

[common]\
constructor()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[bind](bind.md)

# bind

[common]\
override fun [bind](bind.md)()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[equals](equals.md)

# equals

[common]\
open operator override fun [equals](equals.md)(other: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[hashCode](hash-code.md)

# hashCode

[common]\
open override fun [hashCode](hash-code.md)(): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)

# Layout

[common]\
@FlowPreview

@ExperimentalCoroutinesApi

@[Stable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Stable.html)

abstract class [Layout](index.md)<[State](index.md), [Change](index.md)> : [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md)<[State](index.md), [Change](index.md)> , [Bindable](../../../../cycle-core/cycle-core/com.chrynan.cycle/-bindable/index.md)

A component that implements the [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md) interface and serves as the binding between this presentation library and Jetpack Compose. Typically, [Layout](index.md)s are used to represent the "Screen" components in an application.

Example usage:

```kotlin
class HomeLayout : Layout<HomeState, HomeChange>() {

override val viewModel = ViewModel<I, S, C>(
perform = { intent, state -> ... },
reduce = { state, change -> ... })

@Composable
override fun Content() {
val state by stateChanges()

// Put Composable UI code here using the [state] value
}
}
```

## Constructors

| | |
|---|---|
| [Layout](-layout.md) | [common]<br>constructor() |

## Functions

| Name | Summary |
|---|---|
| [bind](bind.md) | [common]<br>override fun [bind](bind.md)() |
| [Content](-content.md) | [common]<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>abstract fun [Content](-content.md)()<br>Renders the UI content for this Layout. Remember to subscribe to the state changes using the [stateChanges](../state-changes.md) function within this function. Using the [renderState](render-state.md) property won't work because it won't trigger a recomposition of the composable function when the state changes. |
| [equals](equals.md) | [common]<br>open operator override fun [equals](equals.md)(other: [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [hashCode](hash-code.md) | [common]<br>open override fun [hashCode](hash-code.md)(): [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) |
| [stateChanges](../state-changes.md) | [common]<br>@ExperimentalCoroutinesApi<br>@FlowPreview<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>fun &lt;[State](../state-changes.md), [Change](../state-changes.md)&gt; [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md)&lt;[State](../state-changes.md), [Change](../state-changes.md)&gt;.[stateChanges](../state-changes.md)(context: [CoroutineContext](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/-coroutine-context/index.html) = EmptyCoroutineContext): [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html)&lt;[State](../state-changes.md)?&gt;<br>Obtains the changes to the underlying [State](../state-changes.md) as a Jetpack Compose [androidx.compose.runtime.State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html) value, so that the changes can cause the [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function to be re-composed.<br>[common]<br>@ExperimentalCoroutinesApi<br>@FlowPreview<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>fun &lt;[State](../state-changes.md), [Change](../state-changes.md)&gt; [View](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view/index.md)&lt;[State](../state-changes.md), [Change](../state-changes.md)&gt;.[stateChanges](../state-changes.md)(initial: [State](../state-changes.md)?, context: [CoroutineContext](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.coroutines/-coroutine-context/index.html) = EmptyCoroutineContext): [State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html)&lt;[State](../state-changes.md)?&gt;<br>Obtains the changes to the underlying [State](../state-changes.md), starting with the provided [initial](../state-changes.md) value, as a Jetpack Compose [androidx.compose.runtime.State](https://developer.android.com/reference/kotlin/androidx/compose/runtime/State.html) value, so that the changes can cause the [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html) function to be re-composed. |
| [toString](to-string.md) | [common]<br>open override fun [toString](to-string.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) |
| [unaryPlus](../unary-plus.md) | [common]<br>@ExperimentalCoroutinesApi<br>@FlowPreview<br>@[Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html)<br>inline operator fun &lt;[State](../unary-plus.md), [Change](../unary-plus.md)&gt; [Layout](index.md)&lt;[State](../unary-plus.md), [Change](../unary-plus.md)&gt;.[unaryPlus](../unary-plus.md)()<br>Renders this [Layout](index.md) as a [Composable](https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable.html). |
| [unbind](unbind.md) | [common]<br>override fun [unbind](unbind.md)() |

## Properties

| Name | Summary |
|---|---|
| [isBound](is-bound.md) | [common]<br>override val [isBound](is-bound.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) |
| [key](key.md) | [common]<br>open val [key](key.md): [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)? |
| [renderState](render-state.md) | [common]<br>override val [renderState](render-state.md): [State](index.md)? |
| [viewModel](view-model.md) | [common]<br>abstract override val [viewModel](view-model.md): [ViewModel](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model/index.md)&lt;[State](index.md), [Change](index.md)&gt; |
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[isBound](is-bound.md)

# isBound

[common]\
override val [isBound](is-bound.md): [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[key](key.md)

# key

[common]\
open val [key](key.md): [Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)?
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[renderState](render-state.md)

# renderState

[common]\
override val [renderState](render-state.md): [State](index.md)?
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[toString](to-string.md)

# toString

[common]\
open override fun [toString](to-string.md)(): [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[unbind](unbind.md)

# unbind

[common]\
override fun [unbind](unbind.md)()
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//[cycle-compose](../../../index.md)/[com.chrynan.cycle.compose](../index.md)/[Layout](index.md)/[viewModel](view-model.md)

# viewModel

[common]\
abstract override val [viewModel](view-model.md): [ViewModel](../../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model/index.md)&lt;[State](index.md), [Change](index.md)&gt;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//[cycle-compose](../../index.md)/[com.chrynan.cycle.compose](index.md)/[LocalViewModelProvider](-local-view-model-provider.md)

# LocalViewModelProvider

[common]\

@[ExperimentalPresentationApi](../../../cycle-core/cycle-core/com.chrynan.cycle/-experimental-presentation-api/index.md)

@FlowPreview

@ExperimentalCoroutinesApi

val [LocalViewModelProvider](-local-view-model-provider.md): [ProvidableCompositionLocal](https://developer.android.com/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal.html)&lt;[ViewModelProvider](../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model-provider/index.md)&gt;

A [ProvidableCompositionLocal](https://developer.android.com/reference/kotlin/androidx/compose/runtime/ProvidableCompositionLocal.html) of [ViewModelProvider](../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model-provider/index.md). This allows a parent composable function to provide a [ViewModelProvider](../../../cycle-core/cycle-core/com.chrynan.cycle/-view-model-provider/index.md) which can then be obtained from a child composable function.
Loading

0 comments on commit c3306f8

Please sign in to comment.