aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/pages
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2023-02-24 17:44:24 +0200
committerGitHub <noreply@github.com>2023-02-24 17:44:24 +0200
commit1040288ca76e070445f1400df2fcc5a56310be28 (patch)
tree52bed40e8a320f0835540b0cd38ea1899800e395 /core/src/main/kotlin/pages
parent8d23340d1c377b8f490cdee3c2c874453d321dd8 (diff)
downloaddokka-1040288ca76e070445f1400df2fcc5a56310be28.tar.gz
dokka-1040288ca76e070445f1400df2fcc5a56310be28.tar.bz2
dokka-1040288ca76e070445f1400df2fcc5a56310be28.zip
Reorganize tabs for Classlike (#2764)
Diffstat (limited to 'core/src/main/kotlin/pages')
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt9
-rw-r--r--core/src/main/kotlin/pages/contentNodeProperties.kt20
2 files changed, 25 insertions, 4 deletions
diff --git a/core/src/main/kotlin/pages/ContentNodes.kt b/core/src/main/kotlin/pages/ContentNodes.kt
index 3c6fa5ac..78760044 100644
--- a/core/src/main/kotlin/pages/ContentNodes.kt
+++ b/core/src/main/kotlin/pages/ContentNodes.kt
@@ -392,7 +392,14 @@ enum class TextStyle : Style {
}
enum class ContentStyle : Style {
- RowTitle, TabbedContent, WithExtraAttributes, RunnableSample, InDocumentationAnchor, Caption,
+ RowTitle,
+ /**
+ * The style is used only for HTML. It is applied only for [ContentGroup].
+ * Creating and rendering tabs is a part of a renderer.
+ */
+ TabbedContent,
+
+ WithExtraAttributes, RunnableSample, InDocumentationAnchor, Caption,
Wrapped, Indented, KDocTag, Footnote
}
diff --git a/core/src/main/kotlin/pages/contentNodeProperties.kt b/core/src/main/kotlin/pages/contentNodeProperties.kt
index cfd7f769..3c9bd422 100644
--- a/core/src/main/kotlin/pages/contentNodeProperties.kt
+++ b/core/src/main/kotlin/pages/contentNodeProperties.kt
@@ -6,9 +6,23 @@ class SimpleAttr(val extraKey: String, val extraValue: String) : ExtraProperty<C
data class SimpleAttrKey(val key: String) : ExtraProperty.Key<ContentNode, SimpleAttr>
override val key: ExtraProperty.Key<ContentNode, SimpleAttr> = SimpleAttrKey(extraKey)
- companion object {
- fun header(value: String) = SimpleAttr("data-togglable", value)
- }
+}
+
+enum class BasicTabbedContentType : TabbedContentType {
+ TYPE, CONSTRUCTOR, FUNCTION, PROPERTY, ENTRY, EXTENSION_PROPERTY, EXTENSION_FUNCTION
+}
+
+/**
+ * It is used only to mark content for tabs in HTML format
+ */
+interface TabbedContentType
+
+/**
+ * @see TabbedContentType
+ */
+class TabbedContentTypeExtra(val value: TabbedContentType) : ExtraProperty<ContentNode> {
+ companion object : ExtraProperty.Key<ContentNode, TabbedContentTypeExtra>
+ override val key: ExtraProperty.Key<ContentNode, TabbedContentTypeExtra> = TabbedContentTypeExtra
}
object HtmlContent : ExtraProperty<ContentNode>, ExtraProperty.Key<ContentNode, HtmlContent> {