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.
The background will be drawn at first before all children views.
size |
The enclosing rectangle. |
pParent |
The parent frame. |
pBackground |
The background pixmap. |
virtual ~CViewContainer ();
Destroys a view container object.
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. |
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. |
virtual void removeView (
CView *pView);
Removes a given view. This view will be destroyed.
virtual void removeAll ();
Removes all views.
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 |
|
virtual long getNbViews ();
Returns the number of views inside the container.
virtual
CView *getView (long index);
Returns the view number index
.
virtual long notify (
CView* sender, const char* message);
Used do pass a message from one view to a container.
See also :
Draws each subview of the container.
See also :
Draws each subview inside updateRect.
See also :
Mouse clicked here...
See also :
virtual bool onDrop (void **ptrItems, long nbItems, long type,
CPoint &where);
Something has been dropped here.
See also :
See also :
Called to tell the container to update itself (it will cause the subviews to
update themselves accordingly).
See also :
virtual bool hitTest (const
CPoint&where, const long buttons = -1);
Checks whether the mouse click has been done inside the container.
See also :
Called when the user hits a key.
See also :
Called when the user releases the key.
See also :
The container has no more the focus.
See also :
The container receive the focus.
See also :
virtual bool isDirty ();
Returns true if the container (or one of its subviews) is dirty.
See also :
virtual void setBackgroundColor (
CColor color);
Sets the background color.
virtual
CColor getBackgroundColor ();
Returns the background color.
virtual void setViewSize (CRect &rect);
Sets the size of the view.
See also :
virtual void setBackground (
CBitmap *background);
Sets the background pixmap.
Returns the background pixmap.
virtual void setBackgroundOffset (const
CPoint&p);
Sets the offset of the background pixmap.
virtual const
CPoint& getBackgroundOffset ();
Returns the offset of the background pixmap.
CView *getCurrentView ();
Returns the current view where the cursor is located.
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 :
virtual long getMode ();
Returns the current Mode.
virtual void useOffscreen ();
virtual bool removed (
CView *parent);
Called when this view is removed from its parent.
virtual bool attached (
CView *view);
Called when this view is attached to its parent.
virtual void setParent (
CFrame *pParent);
Sets the parent frame.