-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
143 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...ose-mpp/src/commonMain/kotlin/space/kscience/visionforge/compose/ComposeVisionRenderer.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package space.kscience.visionforge.compose | ||
|
||
import androidx.compose.runtime.Composable | ||
import space.kscience.dataforge.meta.Meta | ||
import space.kscience.dataforge.names.Name | ||
import space.kscience.visionforge.Vision | ||
import space.kscience.visionforge.VisionClient | ||
|
||
public interface ComposeVisionRenderer { | ||
public fun rateVision(vision: Vision): Int | ||
@Composable | ||
public fun render(client: VisionClient, name: Name, vision: Vision, meta: Meta) | ||
|
||
public companion object | ||
} |
24 changes: 24 additions & 0 deletions
24
...rge-compose-mpp/src/commonMain/kotlin/space/kscience/visionforge/compose/composeVision.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package space.kscience.visionforge.compose | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import space.kscience.dataforge.context.Context | ||
import space.kscience.dataforge.meta.Meta | ||
import space.kscience.dataforge.names.Name | ||
import space.kscience.dataforge.names.asName | ||
import space.kscience.visionforge.Vision | ||
|
||
|
||
/** | ||
* Render an Element vision via injected vision renderer inside compose-html | ||
*/ | ||
@Composable | ||
public fun Vision( | ||
context: Context, | ||
vision: Vision, | ||
name: Name = "@vision[${vision.hashCode().toString(16)}]".asName(), | ||
meta: Meta = Meta.EMPTY, | ||
modifier: Modifier = Modifier, | ||
) { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.