001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.juneau.bean.html5;
018
019import org.apache.juneau.marshall.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-rtc-element">&lt;rtc&gt;</a>
023 * element.
024 *
025 * <p>
026 * The rtc element represents a ruby text container for a ruby annotation. It is used within
027 * a ruby element to group multiple ruby text (rt) elements together. The rtc element is part
028 * of the ruby annotation system and is used to provide multiple levels of annotations for
029 * the same base text. It is typically used when you need to provide both pronunciation and
030 * translation annotations for the same text, or when you need to group related ruby text
031 * elements together.
032 *
033 * <h5 class='section'>Examples:</h5>
034 * <p class='bcode w800'>
035 *    <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*;
036 *
037 *    <jc>// Simple ruby text container</jc>
038 *    Rtc <jv>simple</jv> = <jsm>rtc</jsm>(
039 *       <jsm>rt</jsm>(<js>"かんじ"</js>),
040 *       <jsm>rt</jsm>(<js>"Chinese characters"</js>)
041 *    );
042 *
043 *    <jc>// Rtc with styling</jc>
044 *    Rtc <jv>styled</jv> = <jsm>rtc</jsm>(
045 *       <jsm>rt</jsm>(<js>"にほんご"</js>),
046 *       <jsm>rt</jsm>(<js>"Japanese language"</js>)
047 *    ).class_(<js>"ruby-text-container"</js>);
048 *
049 *    <jc>// Rtc with complex content</jc>
050 *    Rtc <jv>complex</jv> = <jsm>rtc</jsm>(
051 *       <jsm>rt</jsm>(<js>"ふくざつな"</js>),
052 *       <jsm>rt</jsm>(<js>"complex"</js>),
053 *       <jsm>rt</jsm>(<js>"かんじ"</js>),
054 *       <jsm>rt</jsm>(<js>"kanji"</js>)
055 *    );
056 *
057 *    <jc>// Rtc with ID</jc>
058 *    Rtc <jv>withId</jv> = <jsm>rtc</jsm>(
059 *       <jsm>rt</jsm>(<js>"かんじ"</js>),
060 *       <jsm>rt</jsm>(<js>"Chinese characters"</js>)
061 *    ).id(<js>"ruby-text-container-1"</js>);
062 *
063 *    <jc>// Rtc with styling</jc>
064 *    Rtc <jv>styled2</jv> = <jsm>rtc</jsm>(
065 *       .style("font-size: 0.8em; color: #666;")
066 *       .children(
067 *          new Rt().children("かんじ"),
068 *          new Rt().children("Chinese characters")
069 *       );
070 *
071 *    // Rtc with multiple elements
072 *    Rtc multiple = new Rtc()
073 *       .children(
074 *          new Rt().children("ふくざつな"),
075 *          new Rt().children("complex"),
076 *          new Rt().children("かんじ"),
077 *          new Rt().children("kanji")
078 *       );
079 *
080 *    // Rtc with links
081 *    Rtc withLinks = new Rtc()
082 *       .children(
083 *          new Rt().children("かんじ"),
084 *          new Rt().children(
085 *             new A().href("/dictionary/kanji").children("Chinese characters")
086 *          )
087 *       );
088 * </p>
089 *
090 * <h5 class='section'>See Also:</h5><ul>
091 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
092 * </ul>
093 */
094@Marshalled(typeName = "rtc")
095public class Rtc extends HtmlElementMixed<Rtc> {
096
097   /**
098    * Creates an empty {@link Rtc} element.
099    */
100   public Rtc() {}
101
102   /**
103    * Creates an {@link Rtc} element with the specified child nodes.
104    *
105    * @param children The child nodes. Must not be <jk>null</jk>.
106    */
107   public Rtc(Object...children) {
108      children(children);
109   }
110}