VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GenericStringListDataBrowserSource Class Reference

Generic string list data browser source. More...

Inheritance diagram for GenericStringListDataBrowserSource:

## Public Types
using | StringVector = std::vector< UTF8String >

## Public Member Functions
| GenericStringListDataBrowserSource (const StringVector *stringList, GenericStringListDataBrowserSourceSelectionChanged *delegate=nullptr)
| ~GenericStringListDataBrowserSource () noexceptoverride
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
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
CCoord | dbGetHeaderHeight (CDataBrowser *browser) override
| return height of header
bool | dbGetLineWidthAndColor (CCoord &width, CColor &color, CDataBrowser *browser) override
| return the line width and color
void | dbDrawHeader (CDrawContext *context, const CRect &size, int32_t column, int32_t flags, CDataBrowser *browser) override
| draw the db header
void | dbAttached (CDataBrowser *browser) override
| databrowser view was attached to a parent
void | dbRemoved (CDataBrowser *browser) override
| databrowser view will be removed from its parent
CMouseEventResult | dbOnMouseDown (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse button was pressed on a cell
CMouseEventResult | dbOnMouseMoved (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse was moved over a cell
CMouseEventResult | dbOnMouseUp (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse button was released on a cell
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
void | dbCellTextChanged (int32_t row, int32_t column, UTF8StringPtr newText, CDataBrowser *browser) override
| the text of the cell changed beginTextEdit was called for
void | dbCellSetupTextEdit (int32_t row, int32_t column, CTextEdit *textEditControl, CDataBrowser *browser) override
| beginTextEdit calls this, so you can setup the textedit control
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 () noexceptoverride=default
| CBaseObject (const CBaseObject &)
CBaseObject & | operator= (const CBaseObject &)
virtual CMessageResult | notify ([[maybe_unused]] CBaseObject *sender,[[maybe_unused]] IdStringPtr message)
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
void | remember () override
| increase refcount
virtual int32_t | getNbReference () const
| get refcount

## 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
int32_t | dbGetNumColumns (CDataBrowser *browser) override
| return number of columns for CDataBrowser browser
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
void | dbSetCurrentColumnWidth (int32_t index, const CCoord &width, CDataBrowser *browser) override
| the width of a column has changed
CCoord | dbGetRowHeight (CDataBrowser *browser) override
| return height of one row
bool | dbGetLineWidthAndColor (CCoord &width, CColor &color, CDataBrowser *browser) override
| return the line width and color
void | dbDrawHeader (CDrawContext *context, const CRect &size, int32_t column, int32_t flags, CDataBrowser *browser) override
| draw the db header
void | dbDrawCell (CDrawContext *context, const CRect &size, int32_t row, int32_t column, int32_t flags, CDataBrowser *browser) override
| draw a db cell
CMouseEventResult | dbOnMouseDown (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse button was pressed on a cell
CMouseEventResult | dbOnMouseMoved (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse was moved over a cell
CMouseEventResult | dbOnMouseUp (const CPoint &where, const CButtonState &buttons, int32_t row, int32_t column, CDataBrowser *browser) override
| mouse button was released on a cell
void | dbSelectionChanged (CDataBrowser *browser) override
| the selection of the db changed
void | dbCellTextChanged (int32_t row, int32_t column, UTF8StringPtr newText, CDataBrowser *browser) override
| the text of the cell changed beginTextEdit was called for
void | dbCellSetupTextEdit (int32_t row, int32_t column, CTextEdit *textEditControl, CDataBrowser *browser) override
| beginTextEdit calls this, so you can setup the textedit control
void | dbOnKeyboardEvent (KeyboardEvent &event, CDataBrowser *browser) override
void | dbAttached (CDataBrowser *browser) override
| databrowser view was attached to a parent
void | dbRemoved (CDataBrowser *browser) override
| databrowser view will be removed from its parent
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

using StringVector = std::vector<UTF8String>

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

databrowser view was attached to a parent

Implements IDataBrowserDelegate.

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.

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.

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.

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

draw the db header

Implements IDataBrowserDelegate.

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

Implements IDataBrowserDelegate.

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

return current width of index column

Implements DataBrowserDelegateAdapter.

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

return the line width and color

Implements IDataBrowserDelegate.

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

return number of columns for CDataBrowser browser

Implements DataBrowserDelegateAdapter.

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

return number of rows for CDataBrowser browser

Implements DataBrowserDelegateAdapter.

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

return height of one row

Implements DataBrowserDelegateAdapter.

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

Implements IDataBrowserDelegate.

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.

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.

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.

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

databrowser view will be removed from its parent

Implements IDataBrowserDelegate.

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

the selection of the db changed

Implements IDataBrowserDelegate.

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

the width of a column has changed

Implements IDataBrowserDelegate.

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

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

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

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

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

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

CDataBrowser* dataBrowser
| protected

GenericStringListDataBrowserSourceSelectionChanged* delegate
| protected

SharedPointer<CFontDesc> 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

SharedPointer<CVSTGUITimer> timer
| protected

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

- genericstringlistdatabrowsersource.h
- genericstringlistdatabrowsersource.cpp