VSTGUI  4.4
Graphical User Interface Framework not only for VST plugins
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
GenericStringListDataBrowserSource Class Reference

Generic string list data browser source. More...

+ Inheritance diagram for GenericStringListDataBrowserSource:

Public Types

typedef std::vector< std::string > StringVector
 
- Public Types inherited from IDataBrowserDelegate
enum  { kRowSelected = 1 << 1 }
 

Public Member Functions

 GenericStringListDataBrowserSource (const StringVector *stringList, IGenericStringListDataBrowserSourceSelectionChanged *delegate=0)
 
 ~GenericStringListDataBrowserSource ()
 
void setStringList (const StringVector *stringList)
 
const StringVectorgetStringList () const
 
void setupUI (const CColor &selectionColor, const CColor &fontColor, const CColor &rowlineColor, const CColor &rowBackColor, const CColor &rowAlteranteBackColor, CFontRef font=0, int32_t rowHeight=-1, CCoord textInset=2.)
 
- Public Member Functions inherited from IDataBrowserDelegate
virtual void dbOnDragEnterBrowser (IDataPackage *drag, CDataBrowser *browser)
 
virtual void dbOnDragExitBrowser (IDataPackage *drag, CDataBrowser *browser)
 
virtual void dbOnDragEnterCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser)
 
virtual void dbOnDragMoveInCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser)
 
virtual void dbOnDragExitCell (int32_t row, int32_t column, IDataPackage *drag, CDataBrowser *browser)
 
virtual bool dbOnDropInCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser)
 
- Public Member Functions inherited from CBaseObject
 CBaseObject ()
 
virtual ~CBaseObject ()
 
virtual void beforeDelete ()
 
virtual void forget ()
 decrease refcount and delete object if refcount == 0 More...
 
virtual void remember ()
 increase refcount More...
 
virtual int32_t getNbReference () const
 get refcount More...
 

Protected Member Functions

int32_t dbGetNumRows (CDataBrowser *browser)
 return number of rows for CDataBrowser browser More...
 
int32_t dbGetNumColumns (CDataBrowser *browser)
 return number of columns for CDataBrowser browser More...
 
bool dbGetColumnDescription (int32_t index, CCoord &minWidth, CCoord &maxWidth, CDataBrowser *browser)
 
CCoord dbGetCurrentColumnWidth (int32_t index, CDataBrowser *browser)
 return current width of index column More...
 
void dbSetCurrentColumnWidth (int32_t index, const CCoord &width, CDataBrowser *browser)
 the width of a column has changed More...
 
CCoord dbGetRowHeight (CDataBrowser *browser)
 return height of one row More...
 
bool dbGetLineWidthAndColor (CCoord &width, CColor &color, CDataBrowser *browser)
 return the line width and color More...
 
void dbDrawHeader (CDrawContext *context, const CRect &size, int32_t column, int32_t flags, CDataBrowser *browser)
 draw the db header More...
 
void dbDrawCell (CDrawContext *context, const CRect &size, int32_t row, int32_t column, int32_t flags, CDataBrowser *browser)
 draw a db cell More...
 
CMouseEventResult dbOnMouseDown (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser)
 mouse button was pressed on a cell More...
 
CMouseEventResult dbOnMouseMoved (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser)
 mouse was moved over a cell More...
 
CMouseEventResult dbOnMouseUp (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser)
 mouse button was released on a cell More...
 
void dbSelectionChanged (CDataBrowser *browser)
 the selection of the db changed More...
 
void dbCellTextChanged (int32_t row, int32_t column, UTF8StringPtr newText, CDataBrowser *browser)
 the text of the cell changed beginTextEdit was called for More...
 
void dbCellSetupTextEdit (int32_t row, int32_t column, CTextEdit *textEditControl, CDataBrowser *browser)
 beginTextEdit calls this, so you can setup the textedit control More...
 
int32_t dbOnKeyDown (const VstKeyCode &key, CDataBrowser *browser)
 
void dbAttached (CDataBrowser *browser)
 databrowser view was attached to a parent More...
 
void dbRemoved (CDataBrowser *browser)
 databrowser view will be removed from its parent More...
 
CMessageResult notify (CBaseObject *sender, IdStringPtr message)
 

Protected Attributes

const StringVectorstringList
 
int32_t rowHeight
 
CColor fontColor
 
CColor selectionColor
 
CColor rowlineColor
 
CColor rowBackColor
 
CColor rowAlternateBackColor
 
CPoint textInset
 
CHoriTxtAlign textAlignment
 
CFontRef drawFont
 
CDataBrowserdataBrowser
 
IGenericStringListDataBrowserSourceSelectionChangeddelegate
 
CVSTGUITimertimer
 
std::string keyDownFindString
 

Detailed Description

Generic string list data browser source.

Member Typedef Documentation

typedef std::vector<std::string> StringVector

Constructor & Destructor Documentation

Member Function Documentation

void dbAttached ( CDataBrowser browser)
protectedvirtual

databrowser view was attached to a parent

Reimplemented from IDataBrowserDelegate.

void dbCellSetupTextEdit ( int32_t  row,
int32_t  column,
CTextEdit textEditControl,
CDataBrowser browser 
)
inlineprotectedvirtual

beginTextEdit calls this, so you can setup the textedit control

Reimplemented from IDataBrowserDelegate.

void dbCellTextChanged ( int32_t  row,
int32_t  column,
UTF8StringPtr  newText,
CDataBrowser browser 
)
inlineprotectedvirtual

the text of the cell changed beginTextEdit was called for

Reimplemented from IDataBrowserDelegate.

void dbDrawCell ( CDrawContext context,
const CRect size,
int32_t  row,
int32_t  column,
int32_t  flags,
CDataBrowser browser 
)
protectedvirtual

draw a db cell

Implements IDataBrowserDelegate.

void dbDrawHeader ( CDrawContext context,
const CRect size,
int32_t  column,
int32_t  flags,
CDataBrowser browser 
)
protectedvirtual

draw the db header

Implements IDataBrowserDelegate.

bool dbGetColumnDescription ( int32_t  index,
CCoord minWidth,
CCoord maxWidth,
CDataBrowser browser 
)
inlineprotectedvirtual

Reimplemented from IDataBrowserDelegate.

CCoord dbGetCurrentColumnWidth ( int32_t  index,
CDataBrowser browser 
)
protectedvirtual

return current width of index column

Implements IDataBrowserDelegate.

bool dbGetLineWidthAndColor ( CCoord width,
CColor color,
CDataBrowser browser 
)
protectedvirtual

return the line width and color

Reimplemented from IDataBrowserDelegate.

int32_t dbGetNumColumns ( CDataBrowser browser)
inlineprotectedvirtual

return number of columns for CDataBrowser browser

Implements IDataBrowserDelegate.

int32_t dbGetNumRows ( CDataBrowser browser)
protectedvirtual

return number of rows for CDataBrowser browser

Implements IDataBrowserDelegate.

CCoord dbGetRowHeight ( CDataBrowser browser)
protectedvirtual

return height of one row

Implements IDataBrowserDelegate.

int32_t dbOnKeyDown ( const VstKeyCode key,
CDataBrowser browser 
)
protectedvirtual

Reimplemented from IDataBrowserDelegate.

CMouseEventResult dbOnMouseDown ( const CPoint where,
const CButtonState buttons,
int32_t  row,
int32_t  column,
CDataBrowser browser 
)
protectedvirtual

mouse button was pressed on a cell

Reimplemented from IDataBrowserDelegate.

CMouseEventResult dbOnMouseMoved ( const CPoint where,
const CButtonState buttons,
int32_t  row,
int32_t  column,
CDataBrowser browser 
)
inlineprotectedvirtual

mouse was moved over a cell

Reimplemented from IDataBrowserDelegate.

CMouseEventResult dbOnMouseUp ( const CPoint where,
const CButtonState buttons,
int32_t  row,
int32_t  column,
CDataBrowser browser 
)
inlineprotectedvirtual

mouse button was released on a cell

Reimplemented from IDataBrowserDelegate.

void dbRemoved ( CDataBrowser browser)
protectedvirtual

databrowser view will be removed from its parent

Reimplemented from IDataBrowserDelegate.

void dbSelectionChanged ( CDataBrowser browser)
protectedvirtual

the selection of the db changed

Reimplemented from IDataBrowserDelegate.

void dbSetCurrentColumnWidth ( int32_t  index,
const CCoord width,
CDataBrowser browser 
)
inlineprotectedvirtual

the width of a column has changed

Reimplemented from IDataBrowserDelegate.

const StringVector* getStringList ( ) const
inline
CMessageResult notify ( CBaseObject sender,
IdStringPtr  message 
)
protectedvirtual

Reimplemented from CBaseObject.

void setStringList ( const StringVector stringList)
void setupUI ( const CColor selectionColor,
const CColor fontColor,
const CColor rowlineColor,
const CColor rowBackColor,
const CColor rowAlteranteBackColor,
CFontRef  font = 0,
int32_t  rowHeight = -1,
CCoord  textInset = 2. 
)

Member Data Documentation

CDataBrowser* dataBrowser
protected
CFontRef drawFont
protected
CColor fontColor
protected
std::string keyDownFindString
protected
CColor rowAlternateBackColor
protected
CColor rowBackColor
protected
int32_t rowHeight
protected
CColor rowlineColor
protected
CColor selectionColor
protected
const StringVector* stringList
protected
CHoriTxtAlign textAlignment
protected
CPoint textInset
protected
CVSTGUITimer* timer
protected

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