/foundation/arkui/ace_engine/frameworks/core/components_v2/inspector/ |
H A D | button_composed_element.cpp | 39 std::string("ButtonType: ").append(GetButtonType())); in Dump() 58 auto type = renderButton ? renderButton->GetButtonType() : ButtonType::CAPSULE; in GetButtonType() 142 std::string ButtonComposedElement::ConvertButtonTypeToString(ButtonType buttonType) const in ConvertButtonTypeToString() 146 case ButtonType::NORMAL: in ConvertButtonTypeToString() 147 result = "ButtonType.Normal"; in ConvertButtonTypeToString() 149 case ButtonType::CAPSULE: in ConvertButtonTypeToString() 150 result = "ButtonType.Capsule"; in ConvertButtonTypeToString() 152 case ButtonType::CIRCLE: in ConvertButtonTypeToString() 153 result = "ButtonType.Circle"; in ConvertButtonTypeToString() 155 case ButtonType in ConvertButtonTypeToString() [all...] |
H A D | button_composed_element.h | 42 std::string ConvertButtonTypeToString(ButtonType buttonType) const;
|
/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/button/ |
H A D | button_pattern.h | 88 layoutProperty->GetType().value_or(ButtonType::CAPSULE) != ButtonType::CIRCLE; 91 layoutProperty->GetType().value_or(ButtonType::ROUNDED_RECTANGLE) != ButtonType::CIRCLE; 140 auto buttonType = layoutProperty->GetType().value_or(ButtonType::CAPSULE); 142 buttonType = layoutProperty->GetType().value_or(ButtonType::ROUNDED_RECTANGLE); 168 ConvertButtonTypeToString(layoutProperty->GetType().value_or(ButtonType::ROUNDED_RECTANGLE)).c_str()); 172 ConvertButtonTypeToString(layoutProperty->GetType().value_or(ButtonType::CAPSULE)).c_str()); 246 static std::string ConvertButtonTypeToString(ButtonType buttonType) in ConvertButtonTypeToString() 250 case ButtonType in ConvertButtonTypeToString() [all...] |
H A D | button_layout_algorithm.cpp | 39 if (buttonLayoutProperty->HasType() && buttonLayoutProperty->GetType() == ButtonType::CIRCLE && in Measure() 88 auto buttonType = buttonLayoutProperty->GetType().value_or(ButtonType::CAPSULE); in HandleChildLayoutConstraint() 90 buttonType = buttonLayoutProperty->GetType().value_or(ButtonType::ROUNDED_RECTANGLE); in HandleChildLayoutConstraint() 92 if (buttonType == ButtonType::CIRCLE) { in HandleChildLayoutConstraint() 109 // If the ButtonType is CIRCLE, then omit text by the smaller edge. 196 auto buttonType = buttonLayoutProperty->GetType().value_or(ButtonType::CAPSULE); in HandleBorderRadius() 198 buttonType = buttonLayoutProperty->GetType().value_or(ButtonType::ROUNDED_RECTANGLE); in HandleBorderRadius() 200 if (buttonType == ButtonType::CIRCLE) { in HandleBorderRadius() 209 } else if (buttonType == ButtonType::CAPSULE) { in HandleBorderRadius() 211 } else if (buttonType == ButtonType in HandleBorderRadius() [all...] |
H A D | button_model_ng.cpp | 56 ACE_UPDATE_LAYOUT_PROPERTY(ButtonLayoutProperty, Type, static_cast<ButtonType>(value)); in SetType() 399 void ButtonModelNG::SetTypeAndStateEffect(const std::optional<ButtonType>& type, const std::optional<bool>& stateEffect) in SetTypeAndStateEffect() 406 ACE_UPDATE_LAYOUT_PROPERTY(ButtonLayoutProperty, Type, ButtonType::ROUNDED_RECTANGLE); in SetTypeAndStateEffect() 409 ACE_UPDATE_LAYOUT_PROPERTY(ButtonLayoutProperty, Type, ButtonType::CAPSULE); in SetTypeAndStateEffect() 472 ACE_UPDATE_NODE_LAYOUT_PROPERTY(ButtonLayoutProperty, Type, static_cast<ButtonType>(value), frameNode); in SetType() 597 ButtonType ButtonModelNG::GetType(FrameNode* frameNode) in GetType() 599 ButtonType value = ButtonType::CAPSULE; in GetType() 601 value = ButtonType::ROUNDED_RECTANGLE; in GetType() 603 frameNode, ButtonType in GetType() [all...] |
H A D | button_request_data.h | 30 std::optional<ButtonType> type;
|
H A D | button_model_ng.h | 87 static ButtonType GetType(FrameNode* frameNode); 95 static void SetTypeAndStateEffect(const std::optional<ButtonType>& type, const std::optional<bool>& stateEffect);
|
/foundation/arkui/ace_engine/frameworks/core/components/button/ |
H A D | render_button.cpp | 325 ButtonType type = buttonComponent_->GetType(); in OnMouseHoverEnterTest() 326 if ((isPhone_ || isTablet_) && ((type == ButtonType::TEXT) || (type == ButtonType::NORMAL))) { in OnMouseHoverEnterTest() 501 if (type_ == ButtonType::ARC) { in PerformLayout() 512 if (type_ == ButtonType::CAPSULE) { in PerformLayout() 520 bool isWatchText = (isWatch_ && (type_ == ButtonType::TEXT)); in SetChildrenLayoutSize() 528 if (!heightDefined_ && type_ != ButtonType::CIRCLE) { in SetChildrenLayoutSize() 575 if (buttonComponent_->GetDeclarativeFlag() && type_ != ButtonType::CIRCLE) { in NeedAdaptiveChild() 578 if ((type_ == ButtonType::TEXT) && isWatch_) { in NeedAdaptiveChild() 581 if ((type_ == ButtonType in NeedAdaptiveChild() [all...] |
H A D | rosen_render_button.cpp | 68 float translateY = (buttonComponent_->GetType() == ButtonType::ARC) in UpdateLayer() 103 if (buttonComponent_->GetType() == ButtonType::ICON) { in Paint() 145 if (buttonComponent_->GetType() == ButtonType::ARC) { in Measure() 152 if (buttonComponent_->GetType() == ButtonType::NORMAL) { in Measure() 165 if (buttonComponent_->GetType() == ButtonType::ICON) { in MeasureButtonSize() 171 if (buttonComponent_->GetType() == ButtonType::CAPSULE) { in MeasureButtonSize() 175 if (buttonComponent_->GetType() == ButtonType::CIRCLE) { in MeasureButtonSize() 179 if (isWatch_ && (buttonComponent_->GetType() == ButtonType::DOWNLOAD)) { in MeasureButtonSize() 250 if (buttonComponent_->GetType() == ButtonType::CUSTOM) { in DrawShape() 269 if (buttonComponent_->GetType() == ButtonType in DrawShape() [all...] |
H A D | button_component.h | 50 ButtonType GetType() const in GetType() 55 void SetType(ButtonType type) in SetType() 256 ButtonType type_ { ButtonType::NORMAL };
|
H A D | render_button.h | 104 ButtonType GetButtonType() const in GetButtonType() 161 ButtonType type_ = ButtonType::NORMAL;
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/security_component/ |
H A D | security_component_test_ng.cpp | 289 EXPECT_EQ(property->GetBackgroundType().value_or(static_cast<int32_t>(ButtonType::NORMAL)), in CheckSecurityComponentDefaultProp() 290 static_cast<int32_t>(ButtonType::CAPSULE)); in CheckSecurityComponentDefaultProp() 303 RefPtr<FrameNode> frameNode = CreateSecurityComponent(0, 0, static_cast<int32_t>(ButtonType::CAPSULE), in HWTEST_F() 348 EXPECT_EQ(buttonProp->GetType().value_or(ButtonType::NORMAL), ButtonType::CAPSULE); in HWTEST_F() 366 EXPECT_EQ(property->GetBackgroundType().value_or(static_cast<int32_t>(ButtonType::NORMAL)), in HWTEST_F() 395 EXPECT_EQ(buttonProp->GetType().value_or(ButtonType::CAPSULE), ButtonType::NORMAL); in HWTEST_F() 428 CreateSecurityComponentNotFinish(0, 0, static_cast<int32_t>(ButtonType::CAPSULE), V2::LOCATION_BUTTON_ETS_TAG); in HWTEST_F() 486 CreateSecurityComponentNotFinish(0, 0, static_cast<int32_t>(ButtonType in HWTEST_F() [all...] |
H A D | security_component_test_ng_extension.cpp | 96 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 99 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 122 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 125 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 146 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 149 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 173 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 176 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 199 static_cast<int32_t>(ButtonType::CAPSULE), V2::PASTE_BUTTON_ETS_TAG); in HWTEST_F() 202 static_cast<int32_t>(ButtonType in HWTEST_F() [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/cj_frontend/interfaces/cj_ffi/ |
H A D | cj_button_ffi.cpp | 27 const std::vector<ButtonType> BUTTON_TYPES = { ButtonType::NORMAL, ButtonType::CAPSULE, ButtonType::CIRCLE };
|
/foundation/arkui/ace_engine/frameworks/core/interfaces/native/node/ |
H A D | button_modifier.cpp | 23 constexpr int32_t DEFAULT_BUTTON_TYPE = (int32_t)ButtonType::CAPSULE; 24 constexpr int32_t DEFAULT_BUTTON_TYPE_VERSION_THIRTEEN = (int32_t)ButtonType::ROUNDED_RECTANGLE; 117 if ((ButtonType)type == ButtonType::CAPSULE || (ButtonType)type == ButtonType::CIRCLE || in SetButtonType() 118 (ButtonType)type == ButtonType::ARC || (ButtonType)type == ButtonType in SetButtonType() [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/ |
H A D | js_location_button.cpp | 70 if ((bg < static_cast<int32_t>(ButtonType::NORMAL)) || in ParseComponentStyle() 71 (bg > static_cast<int32_t>(ButtonType::CIRCLE))) { in ParseComponentStyle() 75 bg = static_cast<int32_t>(ButtonType::CAPSULE); in ParseComponentStyle() 89 static_cast<int32_t>(ButtonType::CAPSULE), false); in Create()
|
H A D | js_save_button.cpp | 70 if ((bg < static_cast<int32_t>(ButtonType::NORMAL)) || in ParseComponentStyle() 71 (bg > static_cast<int32_t>(ButtonType::CIRCLE))) { in ParseComponentStyle() 75 bg = static_cast<int32_t>(ButtonType::CAPSULE); in ParseComponentStyle() 89 static_cast<int32_t>(ButtonType::CAPSULE), false); in Create()
|
H A D | js_paste_button.cpp | 69 if ((bg < static_cast<int32_t>(ButtonType::NORMAL)) || in ParseComponentStyle() 70 (bg > static_cast<int32_t>(ButtonType::CIRCLE))) { in ParseComponentStyle() 74 bg = static_cast<int32_t>(ButtonType::CAPSULE); in ParseComponentStyle() 88 static_cast<int32_t>(ButtonType::CAPSULE), false); in Create()
|
H A D | js_button.cpp | 183 int32_t value = static_cast<int32_t>(ButtonType::CAPSULE); in SetType() 185 value = static_cast<int32_t>(ButtonType::ROUNDED_RECTANGLE); in SetType() 190 if ((ButtonType)value == ButtonType::CAPSULE || (ButtonType)value == ButtonType::CIRCLE || in SetType() 191 (ButtonType)value == ButtonType::ARC || (ButtonType)value == ButtonType in SetType() [all...] |
/foundation/arkui/ace_engine/frameworks/bridge/common/dom/ |
H A D | dom_button.cpp | 216 buttonChild_->SetType(ButtonType::ICON); in PrepareIconButton() 225 buttonChild_->SetType(ButtonType::CAPSULE); in PrepareCapsuleButton() 241 buttonChild_->SetType(ButtonType::TEXT); in PrepareTextButton() 275 buttonChild_->SetType(ButtonType::CIRCLE); in PrepareCircleButton() 287 buttonChild_->SetType(ButtonType::DOWNLOAD); in PrepareDownloadButton() 321 buttonChild_->SetType(ButtonType::ARC); in PrepareArcButton() 471 if (buttonChild_->GetType() == ButtonType::CIRCLE) { in PrepareBackDecorationStyle()
|
/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/models/ |
H A D | button_model_impl.cpp | 91 buttonComponent->SetType((ButtonType)value); in SetType() 350 if (buttonComponent->GetType() == ButtonType::CIRCLE) { in ResetButtonHeight() 358 void ButtonModelImpl::SetTypeAndStateEffect(const std::optional<ButtonType>& type, in SetTypeAndStateEffect() 365 buttonComponent->SetType(ButtonType::CAPSULE); in SetTypeAndStateEffect() 375 buttonComponent->SetType(ButtonType::CAPSULE); in SetDefaultAttributes()
|
H A D | button_model_impl.h | 52 static void SetTypeAndStateEffect(const std::optional<ButtonType>& type, const std::optional<bool>& stateEffect,
|
/foundation/arkui/ace_engine/test/unittest/core/pattern/button/ |
H A D | button_test_ng.cpp | 69 const ButtonType BUTTON_TYPE_CAPSULE_VALUE = ButtonType::CAPSULE; 70 const ButtonType BUTTON_TYPE_CUSTOM_VALUE = ButtonType::CUSTOM; 71 const ButtonType BUTTON_TYPE_DOWNLOAD_VALUE = ButtonType::DOWNLOAD; 72 const ButtonType BUTTON_TYPE_CIRCLE_VALUE = ButtonType::CIRCLE; 73 const ButtonType BUTTON_TYPE_ROUNDED_RECTANGLE_VALUE = ButtonType [all...] |
/foundation/arkui/ace_engine/test/unittest/core/pattern/text_picker/ |
H A D | text_picker_test_update.cpp | 388 info1.type = std::make_optional<ButtonType>(ButtonType::CIRCLE); in HWTEST_F() 417 EXPECT_EQ(testval, ButtonType::CIRCLE); in HWTEST_F() 608 info1.type = std::make_optional<ButtonType>(ButtonType::CIRCLE); in HWTEST_F() 609 info2.type = std::make_optional<ButtonType>(ButtonType::CAPSULE); in HWTEST_F() 639 EXPECT_EQ(testval, ButtonType::CIRCLE); in HWTEST_F() 645 EXPECT_EQ(testval2, ButtonType::CAPSULE); in HWTEST_F() 755 info1.type = std::make_optional<ButtonType>(ButtonTyp in HWTEST_F() [all...] |
/foundation/arkui/ace_engine/test/unittest/core/pattern/calendar_picker/ |
H A D | calendar_picker_test_update.cpp | 344 info1.type = std::make_optional<ButtonType>(ButtonType::CIRCLE); in HWTEST_F() 378 EXPECT_EQ(testval, ButtonType::CIRCLE); in HWTEST_F() 584 info1.type = std::make_optional<ButtonType>(ButtonType::CIRCLE); in HWTEST_F() 585 info2.type = std::make_optional<ButtonType>(ButtonType::CAPSULE); in HWTEST_F() 618 EXPECT_EQ(testval, ButtonType::CIRCLE); in HWTEST_F() 624 EXPECT_EQ(testval2, ButtonType::CAPSULE); in HWTEST_F() 738 info1.type = std::make_optional<ButtonType>(ButtonTyp in HWTEST_F() [all...] |