CViewContainer

#include <vstgui.h>

class CViewContainer : public CView;

Container Class of CView objects. It allows to manipulate a group of CView object in one entity.


CViewContainer

2.1

CViewContainer (const CRect &size, CFrame *pParent, CBitmap *pBackground = 0);

The background will be drawn at first before all children views.

size The enclosing rectangle.
pParent The parent frame.
pBackground The background pixmap.

~CViewContainer

2.1

virtual ~CViewContainer ();

Destroys a view container object.


addView

2.1

virtual void addView (CView *pView);

Adds a new view to the container. Note that all added views must be defined in coordinates relative to this container (the position (0, 0) is the upper left corner of the container).

pView The view object to add to this container.

addView

2.1

virtual void addView (CView *pView, CRect &mouseableArea, bool mouseEnabled = true);

Adds a new view to the container. Note that all added views must be defined in relative to this container (the position (0, 0) is the upper left corner of the container).
pView The view object to add to this container.
mouseableArea The mouseable area for the aded view, in coordinates relative to this container.
mouseEnabled The vstatus of the mouse for the added view.


removeView

2.1

virtual void removeView (CView *pView);

Removes a given view. This view will be destroyed.


removeAll

2.1

virtual void removeAll ();

Removes all views.


isChild

2.0

virtual bool isChild (CView *pView);

Returns true if pView is a child if the container;
pView The view object to check.
return
true : pView is a child if the containe


getNbViews

2.2

virtual long getNbViews ();

Returns the number of views inside the container.


getView

2.2

virtual CView *getView (long index);

Returns the view number index.


notify

2.2

virtual long notify (CView* sender, const char* message);

Used do pass a message from one view to a container.

See also :


draw

2.1

virtual void draw (CDrawContext *pContext);

Draws each subview of the container.

See also :


drawRect

2.2

virtual void drawRect (CDrawContext *pContext, CRect& updateRect);

Draws each subview inside updateRect.

See also :


mouse

2.1

virtual void mouse (CDrawContext *pContext, CPoint &where);

Mouse clicked here...

See also :


onDrop

2.0

virtual bool onDrop (void **ptrItems, long nbItems, long type, CPoint &where);

Something has been dropped here.

See also :


onWheel

2.2

virtual bool onWheel (CDrawContext *pContext, const CPoint &where, float distance);

See also :



update

2.1

virtual void update (CDrawContext *pContext);

Called to tell the container to update itself (it will cause the subviews to update themselves accordingly).

See also :


hitTest

2.2

virtual bool hitTest (const CPoint&where, const long buttons = -1);

Checks whether the mouse click has been done inside the container.

See also :


onKeyDown

2.2

virtual long onKeyDown (VstKeyCode& keyCode);

Called when the user hits a key.

See also :


onKeyUp

2.2

virtual long onKeyUp (VstKeyCode& keyCode);

Called when the user releases the key.

See also :


looseFocus

2.1

virtual void looseFocus (CDrawContext*pContext = 0);

The container has no more the focus.

See also :


takeFocus

2.1

virtual void takeFocus (CDrawContext*pContext = 0);

The container receive the focus.

See also :


isDirty

2.0

virtual bool isDirty ();

Returns true if the container (or one of its subviews) is dirty.

See also :


setBackgroundColor

2.0

virtual void setBackgroundColor (CColor color);

Sets the background color.


getBackgroundColor

2.2

virtual CColor getBackgroundColor ();

Returns the background color.


setViewSize

2.0

virtual void setViewSize (CRect &rect);

Sets the size of the view.

See also :


setBackground

2.0

virtual void setBackground (CBitmap *background);

Sets the background pixmap.


getBackground

2.0

virtual CBitmap *getBackground ();

Returns the background pixmap.


setBackgroundOffset

2.1

virtual void setBackgroundOffset (const CPoint&p);

Sets the offset of the background pixmap.


getBackgroundOffset

2.2

virtual const CPoint& getBackgroundOffset ();

Returns the offset of the background pixmap.


drawBackgroundRect

2.2

void drawBackgroundRect (CDrawContext*pContext, CRect& _updateRect);


getCurrentView

2.1

CView *getCurrentView ();

Returns the current view where the cursor is located.


setMode

2.1

virtual void setMode (long val);

Sets the current mode.

val
kNormalUpdate = 0 : The default
kOnlyDirtyUpdate  : Only dirty subviews are redrawn in update function.

See also :


getMode

2.1

virtual long getMode ();

Returns the current Mode.


useOffscreen

2.2

virtual void useOffscreen ();


removed

2.1

virtual bool removed (CView *parent);

Called when this view is removed from its parent.


attached

2.1

virtual bool attached (CView *view);

Called when this view is attached to its parent.


setParent

2.0

virtual void setParent (CFrame *pParent);

Sets the parent frame.


Copyright ©2003 Steinberg Media Technologies GmbH. All Rights Reserved.