openshot-audio
0.1.6
|
#include <juce_TabbedButtonBar.h>
Public Types | |
enum | ExtraComponentPlacement { beforeText, afterText } |
![]() | |
enum | ConnectedEdgeFlags { ConnectedOnLeft = 1, ConnectedOnRight = 2, ConnectedOnTop = 4, ConnectedOnBottom = 8 } |
enum | ButtonState { buttonNormal, buttonOver, buttonDown } |
![]() | |
enum | FocusChangeType { focusChangedByMouseClick, focusChangedByTabKey, focusChangedDirectly } |
Protected Attributes | |
TabbedButtonBar & | owner |
int | overlapPixels |
ScopedPointer< Component > | extraComponent |
ExtraComponentPlacement | extraCompPlacement |
Friends | |
class | TabbedButtonBar |
In a TabbedButtonBar, this component is used for each of the buttons.
If you want to create a TabbedButtonBar with custom tab components, derive your component from this class, and override the TabbedButtonBar::createTabButton() method to create it instead of the default one.
TabBarButton::TabBarButton | ( | const String & | name, |
TabbedButtonBar & | ownerBar | ||
) |
Creates the tab button.
TabBarButton::~TabBarButton | ( | ) |
Destructor.
|
overridevirtual |
Called when one of this component's children is moved or resized.
If the parent wants to know about changes to its immediate children (not to children of its children), this is the method to override.
Reimplemented from Component.
|
overridevirtual |
This method is called when the button has been clicked.
By default it just calls clicked(), but you might want to override it to handle things like clicking when a modifier key is pressed, etc.
Reimplemented from Button.
Rectangle< int > TabBarButton::getActiveArea | ( | ) | const |
Returns an area of the component that's safe to draw in.
This deals with the orientation of the tabs, which affects which side is touching the tabbed box's content component.
|
virtual |
Chooses the best length for the tab, given the specified depth.
If the tab is horizontal, this should return its width, and the depth specifies its height. If it's vertical, it should return the height, and the depth is actually its width.
|
inlinenoexcept |
Returns the custom component, if there is one.
|
inlinenoexcept |
Returns the placement of the custom component, if there is one.
int TabBarButton::getIndex | ( | ) | const |
Returns this tab's index in its tab bar.
Colour TabBarButton::getTabBackgroundColour | ( | ) | const |
Returns the colour of the tab.
|
inline |
Returns the bar that contains this button.
Rectangle< int > TabBarButton::getTextArea | ( | ) | const |
Returns the area of the component that should contain its text.
|
overridevirtual |
Tests whether a given point is inside the component.
Overriding this method allows you to create components which only intercept mouse-clicks within a user-defined area.
This is called to find out whether a particular x, y coordinate is considered to be inside the component or not, and is used by methods such as contains() and getComponentAt() to work out which component the mouse is clicked on.
Components with custom shapes will probably want to override it to perform some more complex hit-testing.
The default implementation of this method returns either true or false, depending on the value that was set by calling setInterceptsMouseClicks() (true is the default return value).
Note that the hit-test region is not related to the opacity with which areas of a component are painted.
Applications should never call hitTest() directly - instead use the contains() method, because this will also test for occlusion by the component's parent.
Note that for components on the desktop, this method will be ignored, because it's not always possible to implement this behaviour on all platforms.
x | the x coordinate to test, relative to the left hand edge of this component. This value is guaranteed to be greater than or equal to zero, and less than the component's width |
y | the y coordinate to test, relative to the top edge of this component. This value is guaranteed to be greater than or equal to zero, and less than the component's height |
Reimplemented from Component.
bool TabBarButton::isFrontTab | ( | ) | const |
Returns true if this is the frontmost (selected) tab.
|
overridevirtual |
Subclasses should override this to actually paint the button's contents.
It's better to use this than the paint method, because it gives you information about the over/down state of the button.
g | the graphics context to use |
isMouseOverButton | true if the button is either in the 'over' or 'down' state |
isButtonDown | true if the button should be drawn in the 'down' position |
Implements Button.
|
overridevirtual |
Called when this component's size has been changed.
A component can implement this method to do things such as laying out its child components when its width or height changes.
The method is called synchronously as a result of the setBounds or setSize methods, so repeatedly changing a components size will repeatedly call its resized method (unlike things like repainting, where multiple calls to repaint are coalesced together).
If the component is a top-level window on the desktop, its size could also be changed by operating-system factors beyond the application's control.
Reimplemented from Component.
void TabBarButton::setExtraComponent | ( | Component * | extraTabComponent, |
ExtraComponentPlacement | extraComponentPlacement | ||
) |
Sets an extra component that will be shown in the tab.
This optional component will be positioned inside the tab, either to the left or right of the text. You could use this to implement things like a close button or a graphical status indicator. If a non-null component is passed-in, the TabbedButtonBar will take ownership of it and delete it when required.
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |