ResizableCornerComponent Class Reference

A component that resizes a parent window when dragged. More...

Inherits Component.

List of all members.

Public Member Functions

 ResizableCornerComponent (Component *componentToResize, ComponentBoundsConstrainer *constrainer)
 Creates a resizer.
 ~ResizableCornerComponent ()
 Destructor.

Protected Member Functions

void paint (Graphics &g)
void mouseDown (const MouseEvent &e)
void mouseDrag (const MouseEvent &e)
void mouseUp (const MouseEvent &e)
bool hitTest (int x, int y)

Detailed Description

A component that resizes a parent window when dragged.

This is the small triangular stripey resizer component you get in the bottom-right of windows (more commonly on the Mac than Windows). Put one in the corner of a larger component and it will automatically resize its parent when it gets dragged around.

See also:
ResizableFrameComponent

Constructor & Destructor Documentation

ResizableCornerComponent::ResizableCornerComponent ( Component componentToResize,
ComponentBoundsConstrainer constrainer 
)

Creates a resizer.

Pass in the target component which you want to be resized when this one is dragged.

The target component will usually be a parent of the resizer component, but this isn't mandatory.

Remember that when the target component is resized, it'll need to move and resize this component to keep it in place, as this won't happen automatically.

If the constrainer parameter is non-zero, then this object will be used to enforce limits on the size and position that the component can be stretched to. Make sure that the constrainer isn't deleted while still in use by this object. If you pass a zero in here, no limits will be put on the sizes it can be stretched to.

See also:
ComponentBoundsConstrainer
ResizableCornerComponent::~ResizableCornerComponent (  ) 

Destructor.


Member Function Documentation

void ResizableCornerComponent::paint ( Graphics g  )  [protected, virtual]

For internal use only.

Reimplemented from Component.

void ResizableCornerComponent::mouseDown ( const MouseEvent e  )  [protected, virtual]

For internal use only.

Reimplemented from Component.

void ResizableCornerComponent::mouseDrag ( const MouseEvent e  )  [protected, virtual]

For internal use only.

Reimplemented from Component.

void ResizableCornerComponent::mouseUp ( const MouseEvent e  )  [protected, virtual]

For internal use only.

Reimplemented from Component.

bool ResizableCornerComponent::hitTest ( int  x,
int  y 
) [protected, virtual]

For internal use only.

Reimplemented from Component.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Apr 26 11:42:16 2010 for JUCE by  doxygen 1.6.3