CFrame

#include <vstgui.h>

class CFrame : public CView;

A frame is an user interface object that is used to draw a frame around other objects. A plug-in create a frame, where the other views (control objects) are attached.


CFrame

1.0

CFrame (CRect &size, void *systemWindow, AEffGUIEditor *editor);

Create a frame with a given rect, the plug-in uses it to construct a frame.

size The enclosing rectangle, giving the size of the frame.
systemWindow Initialized by the host appliaction.
editor The editor the frame belongs to.

Example :

long MyEditor::open (void *ptr)
{
AEffGUIEditor::open (ptr);

CRect size (
0,
0,
myBackgroundPixmap->getWidth (),
myBackgroundPixmap->getHeight ()
);
frame = new CFrame (size, ptr, this);
...
}

CFrame

1.0

CFrame (CRect &size, char *title, AEffGUIEditor *editor, const int style = 0);

Create a frame with a given rect which is displayed.

size The enclosing rectangle of the frame.
title -
editor The editor the frame belongs to.
style -

Note :

Use close and open to display or undisplay this frame.


~CFrame

1.0

~CFrame ();

Destroy a frame object.


open

1.0

bool open (CPoint *point = 0);

Open this frame at a given position.

Note :

Use only with the 2nd contructor.


close

1.0

bool close ();

Close this frame.

Note :

Use only with the 2nd contructor.


isOpen

1.0

bool isOpen ();

Returns true if the frame is open.


draw

1.0

void draw (CDrawContext *context);

Called when the frame has to be drawn. The background pixmap and the added view are also drawn.


drawRect

2.2

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

Called when a specific Rect of the frame has to be drawn.


draw

1.0

void draw (CView *view = 0);

Draw the specified view attached to the frame. If view is null then all views attached to the frame are drawn.


mouse

1.0

void mouse (CDrawContext *context,
CPoint
&where);

Called when a mouse-click occurs. Dispatch the event to the added view (such as controls).


onDrop

2.0

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

Something has been dropped here...

See also :


onWheel

2.1

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


onKeyDown

2.2


void onKeyDown (VstKeyCode& keyCode);

The user hits a key.


onKeyUp

2.2

void onKeyUp (VstKeyCode& keyCode);

The user releases the key.


update

1.0

void update (CDrawContext *context);

Called for a update. Only the added view which have a modified value are redrawn.


idle

1.0

void idle ();

Called from VST every Xms for an update. Update the content of the frame.


doIdleStuff

1.0

void doIdleStuff ();

Call the doIdleStuff of the editor.


getTicks

2.2

unsigned long getTicks ();

Returns system time.


getKnobMode

2.2

long getKnobMode ();

Returns the knob mode (can be circular, relativ circular, or linear).


getPosition

1.0

bool getPosition (int &x, int &y);

Gets the position of the window including the frame (top-left corner of the Window).


setSize

1.0

bool setSize (int width, int height);

Sets a new size to the frame with the given new values.


getSize

1.0

bool getSize (CRect *rect);

Gets the size of the frame in the screen.


setBackground

1.0

void setBackground (CBitmap *background);

Sets the background pixmap of the frame.


getBackground

1.0

CBitmap *getBackground ();

Returns the background pixmap of the frame.


addView

1.0

virtual bool addView (CView *view);

Add a view (a control object) to the frame.


removeView

1.0

virtual bool removeView (CView *pView, const bool &withForget = false);

Remove a view of the frame.


removeAll

2.2

virtual bool removeAll (const bool &withForget = true);

Remove all views of the frame..


isChild

2.0

virtual bool isChild (CView *pView);

Check whether pView is contained by the frame.


getNbViews

2.2

virtual long getNbViews ();

Returns the number of views inside the frame.


getView

2.2

virtual CView *getView (long index);

Returns the view number index from the views contained by the frame.


setModalView

1.0

bool setModalView (CView *view);

Sets the given view as a modal view. The other added view are not updated. The value False is returned if the frame is already in modal view.

To unset the modal view, call this function with NULL.


getModalView

2.1

CView *getModalView ();

Returns which view in the frame is in modal view.


getSystemWindow

1.0

void *getSystemWindow ();

Each host provides a window (for a plug-in) which is platform-dependant. But VSTGUI defines another window (directly embedded in the one provided by the host) which is platform-independent. Calling getSystemWindow returns a pointer to the window provided by VSTGUI; getParentSystemWindow (see below) returns a pointer to the window provided by the host.



getParentSystemWindow

2.2

void *getParentSystemWindow ();


setParentSystemWindow

2.2

void setParentSystemWindow (void *val);

Sets the ParentSystemWindow to val.


getEditor

1.0

AEffGUIEditor *getEditor ();

Returns a pointer on the editor of the frame.


getEditor

2.2

virtual void *getEditor ();

Returns a pointer on the editor of the frame.


setEditView

1.0

void setEditView (CView *view);

Sets the current edited view.


getEditView

1.0

CView *getEditView ();

Returns the current edited view.


setDropActive

2.2

bool setDropActive (bool val);


This frame will accept to be used as a drop target.

isDropActive

2.2

bool isDropActive ();

Does this frame accept to be used as a drop target?


invalidate

2.2

void invalidate (const CRect &rect);

All views contained by the frame in this rect are set dirty.


setOpenFlag

2.2

void setOpenFlag (bool val);

Set to true if the frame is open.


getOpenFlag

2.2

bool getOpenFlag ();

Is the frame open?.

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