VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GenericStringListDataBrowserSource Class Reference

Generic string list data browser source. More...

`#include <genericstringlistdatabrowsersource.h>`

Inheritance diagram for GenericStringListDataBrowserSource:

## Public Types
using | StringVector = std::vector< UTF8String >
Public Types inherited from IDataBrowserDelegate
enum | Flags { kRowSelected = 1 << 1 }

## Public Member Functions
| GenericStringListDataBrowserSource (const StringVector *stringList, GenericStringListDataBrowserSourceSelectionChanged *delegate=nullptr)
| ~GenericStringListDataBrowserSource () noexcept override
void | setStringList (const StringVector *stringList)
const StringVector * | getStringList () const
void | setupUI (const CColor &selectionColor, const CColor &fontColor, const CColor &rowlineColor, const CColor &rowBackColor, const CColor &rowAlteranteBackColor, CFontRef font=nullptr, int32_t rowHeight=-1, CCoord textInset=2.)
Public Member Functions inherited from DataBrowserDelegateAdapter
int32_t | dbGetNumRows (CDataBrowser *browser) override=0
| return number of rows for CDataBrowser browser More...
int32_t | dbGetNumColumns (CDataBrowser *browser) override=0
| return number of columns for CDataBrowser browser More...
CCoord | dbGetRowHeight (CDataBrowser *browser) override=0
| return height of one row More...
CCoord | dbGetCurrentColumnWidth (int32_t index, CDataBrowser *browser) override=0
| return current width of index column More...
void | dbDrawCell (CDrawContext *context, const CRect &size, int32_t row, int32_t column, int32_t flags, CDataBrowser *browser) override=0
| draw a db cell More...
bool | dbGetColumnDescription (int32_t index, CCoord &minWidth, CCoord &maxWidth, CDataBrowser *browser) override
void | dbSetCurrentColumnWidth (int32_t index, const CCoord &width, CDataBrowser *browser) override
| the width of a column has changed More...
CCoord | dbGetHeaderHeight (CDataBrowser *browser) override
| return height of header More...
bool | dbGetLineWidthAndColor (CCoord &width, CColor &color, CDataBrowser *browser) override
| return the line width and color More...
void | dbDrawHeader (CDrawContext *context, const CRect &size, int32_t column, int32_t flags, CDataBrowser *browser) override
| draw the db header More...
void | dbAttached (CDataBrowser *browser) override
| databrowser view was attached to a parent More...
void | dbRemoved (CDataBrowser *browser) override
| databrowser view will be removed from its parent More...
CMouseEventResult | dbOnMouseDown (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse button was pressed on a cell More...
CMouseEventResult | dbOnMouseMoved (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse was moved over a cell More...
CMouseEventResult | dbOnMouseUp (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse button was released on a cell More...
void | dbOnDragEnterBrowser (IDataPackage *drag, CDataBrowser *browser) override
void | dbOnDragExitBrowser (IDataPackage *drag, CDataBrowser *browser) override
DragOperation | dbOnDragEnterCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser) override
DragOperation | dbOnDragMoveInCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser) override
void | dbOnDragExitCell (int32_t row, int32_t column, IDataPackage *drag, CDataBrowser *browser) override
bool | dbOnDropInCell (int32_t row, int32_t column, const CPoint &where, IDataPackage *drag, CDataBrowser *browser) override
void | dbSelectionChanged (CDataBrowser *browser) override
| the selection of the db changed More...
void | dbCellTextChanged (int32_t row, int32_t column, UTF8StringPtr newText, CDataBrowser *browser) override
| the text of the cell changed beginTextEdit was called for More...
void | dbCellSetupTextEdit (int32_t row, int32_t column, CTextEdit *textEditControl, CDataBrowser *browser) override
| beginTextEdit calls this, so you can setup the textedit control More...
void | dbOnKeyboardEvent (KeyboardEvent &event, CDataBrowser *browser) override
virtual int32_t | dbOnKeyDown (const VstKeyCode &keyCode, CDataBrowser *browser)
Public Member Functions inherited from IDataBrowserDelegate
virtual | ~IDataBrowserDelegate () noexcept=default
Public Member Functions inherited from CBaseObject
| CBaseObject ()=default
| ~CBaseObject () noexcept override=default
| CBaseObject (const CBaseObject &)
CBaseObject & | operator= (const CBaseObject &)
Public Member Functions inherited from ReferenceCounted< T >
| ReferenceCounted ()=default
virtual | ~ReferenceCounted () noexcept=default
| ReferenceCounted (const ReferenceCounted &)
ReferenceCounted & | operator= (const ReferenceCounted &)
void | forget () override
| decrease refcount and delete object if refcount == 0 More...
void | remember () override
| increase refcount More...
virtual int32_t | getNbReference () const
| get refcount More...
virtual void | forget ()=0
| decrease refcount and delete object if refcount == 0 More...
virtual void | remember ()=0
| increase refcount More...

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

## Protected Attributes
const StringVector * | stringList
int32_t | rowHeight
CColor | fontColor
CColor | selectionColor
CColor | rowlineColor
CColor | rowBackColor
CColor | rowAlternateBackColor
CPoint | textInset
CHoriTxtAlign | textAlignment
SharedPointer< CFontDesc > | drawFont
CDataBrowser * | dataBrowser
GenericStringListDataBrowserSourceSelectionChanged * | delegate
SharedPointer< CVSTGUITimer > | timer
std::string | keyDownFindString

## Detailed Description

Generic string list data browser source.

## Member Typedef Documentation

## ◆ StringVector

using StringVector = std::vector<UTF8String>

## Constructor & Destructor Documentation

## ◆ GenericStringListDataBrowserSource()

GenericStringListDataBrowserSource | ( | const StringVector * | stringList,
|  | GenericStringListDataBrowserSourceSelectionChanged * | delegate = `nullptr`
| ) |  |

## ◆ ~GenericStringListDataBrowserSource()

~GenericStringListDataBrowserSource | ( |  | ) |
| override default noexcept

## Member Function Documentation

## ◆ dbAttached()

void dbAttached | ( | CDataBrowser * | browser | ) |
| override protected virtual

databrowser view was attached to a parent

Implements IDataBrowserDelegate.

## ◆ dbCellSetupTextEdit()

void dbCellSetupTextEdit | ( | int32_t | row,
|  | int32_t | column,
|  | CTextEdit * | textEditControl,
|  | CDataBrowser * | browser
| ) |  |
| inline override protected virtual

beginTextEdit calls this, so you can setup the textedit control

Implements IDataBrowserDelegate.

## ◆ dbCellTextChanged()

void dbCellTextChanged | ( | int32_t | row,
|  | int32_t | column,
|  | UTF8StringPtr | newText,
|  | CDataBrowser * | browser
| ) |  |
| inline override protected virtual

the text of the cell changed beginTextEdit was called for

Implements IDataBrowserDelegate.

## ◆ dbDrawCell()

void dbDrawCell | ( | CDrawContext * | context,
|  | const CRect & | size,
|  | int32_t | row,
|  | int32_t | column,
|  | int32_t | flags,
|  | CDataBrowser * | browser
| ) |  |
| override protected virtual

draw a db cell

Implements DataBrowserDelegateAdapter.

## ◆ dbDrawHeader()

void dbDrawHeader | ( | CDrawContext * | context,
|  | const CRect & | size,
|  | int32_t | column,
|  | int32_t | flags,
|  | CDataBrowser * | browser
| ) |  |
| override protected virtual

draw the db header

Implements IDataBrowserDelegate.

## ◆ dbGetColumnDescription()

bool dbGetColumnDescription | ( | int32_t | index,
|  | CCoord & | minWidth,
|  | CCoord & | maxWidth,
|  | CDataBrowser * | browser
| ) |  |
| inline override protected virtual

Implements IDataBrowserDelegate.

## ◆ dbGetCurrentColumnWidth()

CCoord dbGetCurrentColumnWidth | ( | int32_t | index,
|  | CDataBrowser * | browser
| ) |  |
| override protected virtual

return current width of index column

Implements DataBrowserDelegateAdapter.

## ◆ dbGetLineWidthAndColor()

bool dbGetLineWidthAndColor | ( | CCoord & | width,
|  | CColor & | color,
|  | CDataBrowser * | browser
| ) |  |
| override protected virtual

return the line width and color

Implements IDataBrowserDelegate.

## ◆ dbGetNumColumns()

int32_t dbGetNumColumns | ( | CDataBrowser * | browser | ) |
| inline override protected virtual

return number of columns for CDataBrowser browser

Implements DataBrowserDelegateAdapter.

## ◆ dbGetNumRows()

int32_t dbGetNumRows | ( | CDataBrowser * | browser | ) |
| override protected virtual

return number of rows for CDataBrowser browser

Implements DataBrowserDelegateAdapter.

## ◆ dbGetRowHeight()

CCoord dbGetRowHeight | ( | CDataBrowser * | browser | ) |
| override protected virtual

return height of one row

Implements DataBrowserDelegateAdapter.

## ◆ dbOnKeyboardEvent()

void dbOnKeyboardEvent | ( | KeyboardEvent & | event,
|  | CDataBrowser * | browser
| ) |  |
| override protected virtual

Implements IDataBrowserDelegate.

## ◆ dbOnMouseDown()

CMouseEventResult dbOnMouseDown | ( | const CPoint & | where,
|  | const CButtonState & | buttons,
|  | int32_t | row,
|  | int32_t | column,
|  | CDataBrowser * | browser
| ) |  |
| override protected virtual

mouse button was pressed on a cell

Implements IDataBrowserDelegate.

## ◆ dbOnMouseMoved()

CMouseEventResult dbOnMouseMoved | ( | const CPoint & | where,
|  | const CButtonState & | buttons,
|  | int32_t | row,
|  | int32_t | column,
|  | CDataBrowser * | browser
| ) |  |
| inline override protected virtual

mouse was moved over a cell

Implements IDataBrowserDelegate.

## ◆ dbOnMouseUp()

CMouseEventResult dbOnMouseUp | ( | const CPoint & | where,
|  | const CButtonState & | buttons,
|  | int32_t | row,
|  | int32_t | column,
|  | CDataBrowser * | browser
| ) |  |
| inline override protected virtual

mouse button was released on a cell

Implements IDataBrowserDelegate.

## ◆ dbRemoved()

void dbRemoved | ( | CDataBrowser * | browser | ) |
| override protected virtual

databrowser view will be removed from its parent

Implements IDataBrowserDelegate.

## ◆ dbSelectionChanged()

void dbSelectionChanged | ( | CDataBrowser * | browser | ) |
| override protected virtual

the selection of the db changed

Implements IDataBrowserDelegate.

## ◆ dbSetCurrentColumnWidth()

void dbSetCurrentColumnWidth | ( | int32_t | index,
|  | const CCoord & | width,
|  | CDataBrowser * | browser
| ) |  |
| inline override protected virtual

the width of a column has changed

Implements IDataBrowserDelegate.

## ◆ drawRowBackground()

void drawRowBackground | ( | CDrawContext * | context,
|  | const CRect & | size,
|  | int32_t | row,
|  | int32_t | flags,
|  | CDataBrowser * | browser
| ) |  | const
| protected

## ◆ drawRowString()

void drawRowString | ( | CDrawContext * | context,
|  | const CRect & | size,
|  | int32_t | row,
|  | int32_t | flags,
|  | CDataBrowser * | browser
| ) |  | const
| protected

## ◆ getStringList()

const StringVector * getStringList | ( |  | ) | const
| inline

## ◆ notify()

CMessageResult notify | ( | CBaseObject * | sender,
|  | IdStringPtr | message
| ) |  |
| override protected virtual

Reimplemented from CBaseObject.

## ◆ setStringList()

void setStringList | ( | const StringVector * | stringList | ) |

## ◆ setupUI()

void setupUI | ( | const CColor & | selectionColor,
|  | const CColor & | fontColor,
|  | const CColor & | rowlineColor,
|  | const CColor & | rowBackColor,
|  | const CColor & | rowAlteranteBackColor,
|  | CFontRef | font = `nullptr`,
|  | int32_t | rowHeight = `-1`,
|  | CCoord | textInset = `2.`
| ) |  |

## Member Data Documentation

## ◆ dataBrowser

CDataBrowser* dataBrowser
| protected

## ◆ delegate

GenericStringListDataBrowserSourceSelectionChanged* delegate
| protected

## ◆ drawFont

SharedPointer<CFontDesc> drawFont
| protected

## ◆ fontColor

CColor fontColor
| protected

## ◆ keyDownFindString

std::string keyDownFindString
| protected

## ◆ rowAlternateBackColor

CColor rowAlternateBackColor
| protected

## ◆ rowBackColor

CColor rowBackColor
| protected

## ◆ rowHeight

int32_t rowHeight
| protected

## ◆ rowlineColor

CColor rowlineColor
| protected

## ◆ selectionColor

CColor selectionColor
| protected

## ◆ stringList

const StringVector* stringList
| protected

## ◆ textAlignment

CHoriTxtAlign textAlignment
| protected

## ◆ textInset

CPoint textInset
| protected

## ◆ timer

SharedPointer<CVSTGUITimer> timer
| protected

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

- genericstringlistdatabrowsersource.h
- genericstringlistdatabrowsersource.cpp