aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/model/Documentable.kt2
-rw-r--r--core/src/main/kotlin/model/documentableUtils.kt2
-rw-r--r--core/src/main/kotlin/pages/ContentNodes.kt9
-rw-r--r--core/src/main/kotlin/pages/contentNodeProperties.kt20
4 files changed, 28 insertions, 5 deletions
diff --git a/core/src/main/kotlin/model/Documentable.kt b/core/src/main/kotlin/model/Documentable.kt
index 73ab35d4..adc51cfc 100644
--- a/core/src/main/kotlin/model/Documentable.kt
+++ b/core/src/main/kotlin/model/Documentable.kt
@@ -519,4 +519,4 @@ interface DocumentableSource {
val path: String
}
-data class TypeConstructorWithKind(val typeConstructor: TypeConstructor, val kind: ClassKind)
+data class TypeConstructorWithKind(val typeConstructor: TypeConstructor, val kind: ClassKind) \ No newline at end of file
diff --git a/core/src/main/kotlin/model/documentableUtils.kt b/core/src/main/kotlin/model/documentableUtils.kt
index e32605ca..076ca23a 100644
--- a/core/src/main/kotlin/model/documentableUtils.kt
+++ b/core/src/main/kotlin/model/documentableUtils.kt
@@ -19,3 +19,5 @@ fun DTypeParameter.filter(filteredSet: Set<DokkaSourceSet>) =
extra
)
}
+
+fun Documentable.isExtension() = this is Callable && receiver != null \ No newline at end of file
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> {