JUCE
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions
StretchableLayoutResizerBar Class Reference

A component that acts as one of the vertical or horizontal bars you see being used to resize panels in a window. More...

Inherits Component.

List of all members.

Public Member Functions

 StretchableLayoutResizerBar (StretchableLayoutManager *layoutToUse, int itemIndexInLayout, bool isBarVertical)
 Creates a resizer bar for use on a specified layout.
 ~StretchableLayoutResizerBar ()
 Destructor.
virtual void hasBeenMoved ()
 This is called when the bar is dragged.
void paint (Graphics &g)
void mouseDown (const MouseEvent &e)
void mouseDrag (const MouseEvent &e)

Detailed Description

A component that acts as one of the vertical or horizontal bars you see being used to resize panels in a window.

One of these acts with a StretchableLayoutManager to resize the other components.

See also:
StretchableLayoutManager

Constructor & Destructor Documentation

StretchableLayoutResizerBar::StretchableLayoutResizerBar ( StretchableLayoutManager layoutToUse,
int  itemIndexInLayout,
bool  isBarVertical 
)

Creates a resizer bar for use on a specified layout.

Parameters:
layoutToUsethe layout that will be affected when this bar is dragged
itemIndexInLayoutthe item index in the layout that corresponds to this bar component. You'll need to set up the item properties in a suitable way for a divider bar, e.g. for an 8-pixel wide bar which, you could call myLayout->setItemLayout (barIndex, 8, 8, 8)
isBarVerticaltrue if it's an upright bar that you drag left and right; false for a horizontal one that you drag up and down

Destructor.


Member Function Documentation

virtual void StretchableLayoutResizerBar::hasBeenMoved ( ) [virtual]

This is called when the bar is dragged.

This method must update the positions of any components whose position is determined by the StretchableLayoutManager, because they might have just moved.

The default implementation calls the resized() method of this component's parent component, because that's often where you're likely to apply the layout, but it can be overridden for more specific needs.

Reimplemented from Component.

void StretchableLayoutResizerBar::mouseDown ( const MouseEvent e) [virtual]

Reimplemented from Component.

void StretchableLayoutResizerBar::mouseDrag ( const MouseEvent e) [virtual]

Reimplemented from Component.


The documentation for this class was generated from the following file: