1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_CONTAINER_MODAL_RENDER_CONTAINER_MODAL_H
17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_CONTAINER_MODAL_RENDER_CONTAINER_MODAL_H
18 
19 #include "core/components/box/render_box.h"
20 #include "core/components/container_modal/container_modal_component.h"
21 #include "core/gestures/click_recognizer.h"
22 #include "core/gestures/drag_recognizer.h"
23 #include "core/pipeline/base/render_node.h"
24 
25 namespace OHOS::Ace {
26 
27 class RenderContainerModal : public RenderNode {
28     DECLARE_ACE_TYPE(RenderContainerModal, RenderNode);
29 
30 public:
31     static RefPtr<RenderNode> Create();
32     void Update(const RefPtr<Component>& component) override;
33     void PerformLayout() override;
34 
35 private:
36     void ContainerBoxLayout();
37     bool ParseRequiredRenderNodes();
38     void UpdateStyle(const RefPtr<Component>& component) const;
39 
40     WeakPtr<RenderBox> containerBox_;
41 };
42 
43 } // namespace OHOS::Ace
44 
45 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_CONTAINER_MODAL_RENDER_CONTAINER_MODAL_H
46