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-rp-element">&lt;rp&gt;</a>
023 * element.
024 *
025 * <p>
026 * The rp element represents a fallback parenthesis for browsers that do not support ruby annotations.
027 * It is used within a ruby element to provide fallback text that will be displayed when ruby
028 * annotations are not supported. The rp element is typically used to wrap parentheses around
029 * ruby text (rt elements) to provide a fallback display format. It is part of the ruby annotation
030 * system and helps ensure that ruby annotations are displayed correctly across different browsers.
031 *
032 * <h5 class='section'>Examples:</h5>
033 * <p class='bcode w800'>
034 *    <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*;
035 *
036 *    <jc>// Simple ruby parenthesis</jc>
037 *    Rp <jv>simple</jv> = <jsm>rp</jsm>(<js>"("</js>);
038 *
039 *    <jc>// Rp with styling</jc>
040 *    Rp <jv>styled</jv> = <jsm>rp</jsm>(<js>")"</js>)
041 *       .class_(<js>"ruby-paren"</js>);
042 *
043 *    <jc>// Rp with complex content</jc>
044 *    Rp <jv>complex</jv> = <jsm>rp</jsm>(
045 *       <js>"("</js>,
046 *       <jsm>strong</jsm>(<js>"注"</js>),
047 *       <js>")"</js>
048 *    );
049 *
050 *    <jc>// Rp with ID</jc>
051 *    Rp <jv>withId</jv> = <jsm>rp</jsm>(<js>"("</js>)
052 *       .id(<js>"ruby-paren-1"</js>);
053 *
054 *    <jc>// Rp with styling</jc>
055 *    Rp <jv>styled2</jv> = <jsm>rp</jsm>(<js>")"</js>)
056 *       .style(<js>"color: #999; font-size: 0.8em;"</js>);
057 *
058 *    <jc>// Rp with multiple elements</jc>
059 *    Rp <jv>multiple</jv> = <jsm>rp</jsm>(
060 *       <js>"("</js>,
061 *       <jsm>rp</jsm>(<js>"注"</js>),
062 *       <js>")"</js>
063 *    );
064 *
065 *    // Rp with links
066 *    Rp withLinks = new Rp()
067 *       .children(
068 *          "(",
069 *          new A().href("/help/ruby").children("注"),
070 *          ")"
071 *       );
072 * </p>
073 *
074 * <h5 class='section'>See Also:</h5><ul>
075 *    <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
076 * </ul>
077 */
078@Marshalled(typeName = "rp")
079public class Rp extends HtmlElementMixed<Rp> {
080
081   /**
082    * Creates an empty {@link Rp} element.
083    */
084   public Rp() {}
085
086   /**
087    * Creates a {@link Rp} element with the specified {@link Rp#children(Object[])} nodes.
088    *
089    * @param children The {@link Rp#children(Object[])} nodes. Must not be <jk>null</jk>.
090    */
091   public Rp(Object...children) {
092      children(children);
093   }
094}