#include "ui/views/controls/tabbed_pane/tabbed_pane.h"
#include <algorithm>
#include <string>
#include <utility>
#include "base/check_op.h"
#include "base/i18n/rtl.h"
#include "build/build_config.h"
#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkPath.h"
#include "ui/accessibility/ax_action_data.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/base/default_style.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/animation/tween.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/font_list.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/skia_conversions.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/border.h"
#include "ui/views/controls/label.h"
#include "ui/views/controls/scroll_view.h"
#include "ui/views/controls/tabbed_pane/tabbed_pane_listener.h"
#include "ui/views/layout/box_layout.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/layout/layout_manager.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/widget/widget.h"
namespace views {
TabbedPaneTab::TabbedPaneTab(TabbedPane* tabbed_pane,
const std::u16string& title,
View* contents)
: … { … }
TabbedPaneTab::~TabbedPaneTab() = default;
void TabbedPaneTab::SetSelected(bool selected) { … }
const std::u16string& TabbedPaneTab::GetTitleText() const { … }
void TabbedPaneTab::SetTitleText(const std::u16string& text) { … }
bool TabbedPaneTab::OnMousePressed(const ui::MouseEvent& event) { … }
void TabbedPaneTab::OnMouseEntered(const ui::MouseEvent& event) { … }
void TabbedPaneTab::OnMouseExited(const ui::MouseEvent& event) { … }
void TabbedPaneTab::OnGestureEvent(ui::GestureEvent* event) { … }
gfx::Size TabbedPaneTab::CalculatePreferredSize(
const SizeBounds& available_size) const { … }
bool TabbedPaneTab::HandleAccessibleAction(
const ui::AXActionData& action_data) { … }
void TabbedPaneTab::OnFocus() { … }
void TabbedPaneTab::OnBlur() { … }
bool TabbedPaneTab::OnKeyPressed(const ui::KeyEvent& event) { … }
void TabbedPaneTab::OnThemeChanged() { … }
void TabbedPaneTab::SetState(State state) { … }
void TabbedPaneTab::OnStateChanged() { … }
void TabbedPaneTab::OnPaint(gfx::Canvas* canvas) { … }
void TabbedPaneTab::UpdatePreferredTitleWidth() { … }
void TabbedPaneTab::UpdateTitleColor() { … }
void TabbedPaneTab::UpdateAccessibleName() { … }
void TabbedPaneTab::UpdateAccessibleSelection() { … }
BEGIN_METADATA(…)
constexpr size_t TabbedPaneTabStrip::kNoSelectedTab;
TabbedPaneTabStrip::TabbedPaneTabStrip(TabbedPane::Orientation orientation,
TabbedPane::TabStripStyle style)
: … { … }
TabbedPaneTabStrip::~TabbedPaneTabStrip() = default;
void TabbedPaneTabStrip::AnimationProgressed(const gfx::Animation* animation) { … }
void TabbedPaneTabStrip::AnimationEnded(const gfx::Animation* animation) { … }
void TabbedPaneTabStrip::OnSelectedTabChanged(TabbedPaneTab* from_tab,
TabbedPaneTab* to_tab,
bool animate) { … }
TabbedPaneTab* TabbedPaneTabStrip::GetSelectedTab() const { … }
TabbedPaneTab* TabbedPaneTabStrip::GetTabAtDeltaFromSelected(int delta) const { … }
TabbedPaneTab* TabbedPaneTabStrip::GetTabAtIndex(size_t index) const { … }
size_t TabbedPaneTabStrip::GetSelectedTabIndex() const { … }
TabbedPane::Orientation TabbedPaneTabStrip::GetOrientation() const { … }
TabbedPane::TabStripStyle TabbedPaneTabStrip::GetStyle() const { … }
void TabbedPaneTabStrip::OnPaintBorder(gfx::Canvas* canvas) { … }
BEGIN_METADATA(…)
TabbedPane::TabbedPane(TabbedPane::Orientation orientation,
TabbedPane::TabStripStyle style,
bool scrollable) { … }
TabbedPane::~TabbedPane() = default;
size_t TabbedPane::GetSelectedTabIndex() const { … }
size_t TabbedPane::GetTabCount() const { … }
void TabbedPane::AddTabInternal(size_t index,
const std::u16string& title,
std::unique_ptr<View> contents) { … }
void TabbedPane::SelectTab(TabbedPaneTab* new_selected_tab, bool animate) { … }
void TabbedPane::SelectTabAt(size_t index, bool animate) { … }
ScrollView* TabbedPane::GetScrollView() { … }
TabbedPane::Orientation TabbedPane::GetOrientation() const { … }
TabbedPane::TabStripStyle TabbedPane::GetStyle() const { … }
TabbedPaneTab* TabbedPane::GetTabAt(size_t index) { … }
TabbedPaneTab* TabbedPane::GetSelectedTab() { … }
View* TabbedPane::GetSelectedTabContentView() { … }
bool TabbedPane::MoveSelectionBy(int delta) { … }
gfx::Size TabbedPane::CalculatePreferredSize(
const SizeBounds& available_size) const { … }
bool TabbedPane::AcceleratorPressed(const ui::Accelerator& accelerator) { … }
void TabbedPane::GetAccessibleNodeData(ui::AXNodeData* node_data) { … }
BEGIN_METADATA(…)
}
DEFINE_ENUM_CONVERTERS(…)
DEFINE_ENUM_CONVERTERS(…)