27 void paint(Graphics& g)
override;
35 void mouseDown(
const MouseEvent& e)
override;
39 void mouseDrag(
const MouseEvent& e)
override;
43 void mouseUp(
const MouseEvent& e)
override;
47 void setNames(std::vector<std::string> names) { names_ = names; }
63 Slider::valueChanged();
78 int getTabX(
int position);
81 float font_height_percent_;
83 std::vector<std::string> names_;
85 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(
TabSelector)
A component that uses OpenGL to render a cached image of a JUCE component or custom drawing.
Definition open_gl_image_component.h:18
virtual void redrawImage(bool force)
Redraws the image if necessary, creating or updating the internal Image.
Definition open_gl_image_component.cpp:16
A slider-based UI component that displays selectable tabs.
Definition tab_selector.h:16
void redoImage()
Redraws the image component.
Definition tab_selector.h:72
void valueChanged() override
Called when the slider value changes, triggers a redraw of the image.
Definition tab_selector.h:62
TabSelector(String name)
Definition tab_selector.cpp:11
void setNames(std::vector< std::string > names)
Definition tab_selector.h:47
void paint(Graphics &g) override
Definition tab_selector.cpp:23
OpenGlImageComponent * getImageComponent()
Definition tab_selector.h:69
void mouseEvent(const MouseEvent &e)
Definition tab_selector.cpp:57
void mouseDrag(const MouseEvent &e) override
Definition tab_selector.cpp:71
static constexpr float kDefaultFontHeightPercent
Default percentage of the font height relative to the component height.
Definition tab_selector.h:19
void setFontHeightPercent(float percent)
Definition tab_selector.h:51
void mouseDown(const MouseEvent &e) override
Definition tab_selector.cpp:65
float getFontHeightPercent()
Definition tab_selector.h:55
void setActive(bool active)
Definition tab_selector.h:59
void mouseUp(const MouseEvent &e) override
Definition tab_selector.cpp:77