Home
last modified time | relevance | path

Searched refs:buttonRole (Results 1 – 20 of 20) sorted by relevance

/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/ark_theme/theme_apply/
H A Djs_button_theme.h28 JSButtonTheme::buttonRole = role; in ApplyTheme()
34 JSButtonTheme::buttonRole = role; in ApplyTheme()
44 inline static ButtonRole buttonRole = ButtonRole::NORMAL;
73 if (JSButtonTheme::buttonRole == ButtonRole::ERROR) { in FontColor()
92 if (JSButtonTheme::buttonRole == ButtonRole::ERROR) { in BackgroundColor()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/button/
H A Dbutton_model_ng.cpp92 auto bgColor = buttonTheme->GetBgColor(buttonStyle.value(), buttonRole); in SetButtonStyle()
93 auto textColor = buttonTheme->GetTextColor(buttonStyle.value(), buttonRole); in SetButtonStyle()
99 void ButtonModelNG::SetRole(const std::optional<ButtonRole>& buttonRole) in SetRole() argument
101 if (buttonRole.has_value()) { in SetRole()
111 auto bgColor = buttonTheme->GetBgColor(buttonStyleMode, buttonRole.value()); in SetRole()
137 if (buttonRole.has_value()) { in SetRole()
164 auto bgColor = buttonTheme->GetBgColor(buttonStyle.value(), buttonRole); in SetButtonStyle()
194 SetRole(para.buttonRole); in CreateWithLabel()
273 SetRole(para.buttonRole); in CreateWithChild()
596 auto bgColor = buttonTheme->GetBgColor(buttonStyle, buttonRole); in ApplyTheme()
[all …]
H A Dbutton_pattern.cpp162 ButtonRole buttonRole = layoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in UpdateTextStyle() local
163 Color fontColor = buttonTheme->GetTextColor(buttonStyle, buttonRole); in UpdateTextStyle()
376 ButtonRole buttonRole = layoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in HandleBackgroundColor() local
384 renderContext->UpdateBackgroundColor(buttonTheme->GetBgColor(buttonStyle, buttonRole)); in HandleBackgroundColor()
386 themeBgColor_ = buttonTheme->GetBgColor(buttonStyle, buttonRole); in HandleBackgroundColor()
387 themeTextColor_ = buttonTheme->GetTextColor(buttonStyle, buttonRole); in HandleBackgroundColor()
531 ButtonRole buttonRole = buttonLayoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in OnColorConfigurationUpdate() local
535 auto color = buttonTheme->GetBgColor(buttonStyle, buttonRole); in OnColorConfigurationUpdate()
543 textLayoutProperty->UpdateTextColor(buttonTheme->GetTextColor(buttonStyle, buttonRole)); in OnColorConfigurationUpdate()
H A Dbutton_model_ng.h56 void SetRole(const std::optional<ButtonRole>& buttonRole) override;
79 static void SetRole(FrameNode* frameNode, const std::optional<ButtonRole>& buttonRole);
85 … static void ApplyTheme(FrameNode* frameNode, ButtonStyleMode buttonStyle, ButtonRole buttonRole);
H A Dbutton_request_data.h34 std::optional<ButtonRole> buttonRole; member
H A Dbutton_model.h56 virtual void SetRole(const std::optional<ButtonRole>& buttonRole) {} in SetRole() argument
H A Dbutton_pattern.h213 static std::string ConvertButtonRoleToString(ButtonRole buttonRole) in ConvertButtonRoleToString() argument
216 switch (buttonRole) { in ConvertButtonRoleToString()
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/jsview/
H A Djs_button.cpp171 auto buttonRole = static_cast<ButtonRole>(value); in SetRole() local
172 if (!JSButtonTheme::ApplyTheme(buttonRole, isLabelButton_)) { in SetRole()
173 ButtonModel::GetInstance()->SetRole(buttonRole); in SetRole()
374 auto buttonRole = para.buttonRole.value_or(ButtonRole::NORMAL); in CreateWithLabel() local
376 JSButtonTheme::ApplyTheme(buttonRole, buttonStyleMode, isLabelButton_); in CreateWithLabel()
385 auto buttonRole = para.buttonRole.value_or(ButtonRole::NORMAL); in CreateWithChild() local
387 JSButtonTheme::ApplyTheme(buttonRole, buttonStyleMode, isLabelButton_); in CreateWithChild()
696 param.buttonRole = ButtonRole::NORMAL; in ParseButtonRole()
702 param.buttonRole = static_cast<ButtonRole>(buttonRoleIntValue); in ParseButtonRole()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/interfaces/native/node/
H A Dbutton_modifier.cpp525 void SetButtonRole(ArkUINodeHandle node, ArkUI_Uint32 buttonRole) in SetButtonRole() argument
530 if (buttonRole >= static_cast<uint32_t>(ButtonRole::NORMAL) && buttonRole <= in SetButtonRole()
532 role = static_cast<ButtonRole>(buttonRole); in SetButtonRole()
603 void SetButtonOptions(ArkUINodeHandle node, ArkUI_Uint32 buttonStyle, ArkUI_Uint32 buttonRole) in SetButtonOptions() argument
613 if (buttonRole >= static_cast<uint32_t>(ButtonRole::NORMAL) && buttonRole <= in SetButtonOptions()
615 role = static_cast<ButtonRole>(buttonRole); in SetButtonOptions()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components/button/
H A Dbutton_theme.h354 Color GetBgColor(ButtonStyleMode buttonStyle, ButtonRole buttonRole) const in GetBgColor() argument
356 auto bgColorMapByRole_ = bgColorMap_.find(buttonRole); in GetBgColor()
367 const Color& GetTextColor(ButtonStyleMode buttonStyle, ButtonRole buttonRole) const in GetTextColor() argument
369 auto roleResult = textColorByRoleMap_.find(buttonRole); in GetTextColor()
372 if (buttonRole == ButtonRole::ERROR) { in GetTextColor()
/ohos5.0/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/engine/jsi/nativeModule/
H A Darkts_native_button_bridge.cpp145 uint32_t buttonRole = DEFAULT_ROLE; in SetOptions() local
147 buttonRole = roleArg->Uint32Value(vm); in SetOptions()
153 GetArkUINodeModifiers()->getButtonModifier()->setButtonRole(nativeNode, buttonRole); in SetOptions()
154 …etArkUINodeModifiers()->getButtonModifier()->setButtonOptions(nativeNode, buttonStyle, buttonRole); in SetOptions()
669 uint32_t buttonRole = buttonRoleArgs->Uint32Value(vm); in SetButtonRole() local
670 GetArkUINodeModifiers()->getButtonModifier()->setButtonRole(nativeNode, buttonRole); in SetButtonRole()
/ohos5.0/foundation/arkui/ace_engine/test/unittest/core/pattern/button/
H A Dbutton_extend_test_ng.cpp91 std::optional<ButtonRole> buttonRole = std::nullopt; member
H A Dbutton_test_ng.cpp104 std::optional<ButtonRole> buttonRole = std::nullopt; member
275 if (testProperty.buttonRole.has_value()) { in CreateLabelButtonParagraph()
276 buttonModelNG.SetRole(testProperty.buttonRole.value()); in CreateLabelButtonParagraph()
1308 testProperty.buttonRole = ButtonRole::NORMAL;
1359 testProperty.buttonRole = ButtonRole::ERROR;
H A Dbutton_content_modifier_test_ng.cpp86 std::optional<ButtonRole> buttonRole = std::nullopt; member
247 if (testProperty.buttonRole.has_value()) { in CreateLabelButtonParagraph()
248 buttonModelNG.SetRole(testProperty.buttonRole.value()); in CreateLabelButtonParagraph()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/calendar_picker/
H A Dcalendar_dialog_view.cpp665 ButtonRole buttonRole = buttonLayoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in UpdateButtonStyleAndRole() local
666 auto bgColor = buttonTheme->GetBgColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
667 … auto textColor = buttonTheme->GetTextColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/time_picker/
H A Dtimepicker_dialog_view.cpp859 ButtonRole buttonRole = buttonLayoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in UpdateButtonStyleAndRole() local
860 auto bgColor = buttonTheme->GetBgColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
861 … auto textColor = buttonTheme->GetTextColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/text_picker/
H A Dtextpicker_dialog_view.cpp789 ButtonRole buttonRole = buttonLayoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in UpdateButtonStyleAndRole() local
790 auto bgColor = buttonTheme->GetBgColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
791 … auto textColor = buttonTheme->GetTextColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/components_ng/pattern/picker/
H A Ddatepicker_dialog_view.cpp924 ButtonRole buttonRole = buttonLayoutProperty->GetButtonRole().value_or(ButtonRole::NORMAL); in UpdateButtonStyleAndRole() local
925 auto bgColor = buttonTheme->GetBgColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
926 … auto textColor = buttonTheme->GetTextColor(buttonInfos[index].buttonStyle.value(), buttonRole); in UpdateButtonStyleAndRole()
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/interfaces/cjui/
H A Dcjui_api.h687 void (*setButtonRole)(ArkUINodeHandle node, ArkUI_Uint32 buttonRole);
696 … void (*setButtonOptions)(ArkUINodeHandle node, ArkUI_Uint32 buttonStyle, ArkUI_Uint32 buttonRole);
/ohos5.0/foundation/arkui/ace_engine/frameworks/core/interfaces/arkoala/
H A Darkoala_api.h2213 void (*setButtonRole)(ArkUINodeHandle node, ArkUI_Uint32 buttonRole);
2222 … void (*setButtonOptions)(ArkUINodeHandle node, ArkUI_Uint32 buttonStyle, ArkUI_Uint32 buttonRole);