VSTGUI: GenericStringListDataBrowserSource Class Reference

VSTGUI 4.10 Graphical User Interface Framework not only for VST plugins

Loading...
Searching...
No Matches
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
CCoord | dbGetHeaderHeight (CDataBrowser *browser) override
| return height of header
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
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< int32_t >
| ReferenceCounted ()=default
virtual | ~ReferenceCounted () noexcept=default
| ReferenceCounted (const ReferenceCounted &)
ReferenceCounted & | operator= (const ReferenceCounted &)
| ReferenceCounted ()=default
| ReferenceCounted (const ReferenceCounted &)
virtual | ~ReferenceCounted () noexcept=default
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
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

## ◆ StringVector

using StringVector = std::vector<UTF8String>

## Constructor & Destructor Documentation

## ◆ GenericStringListDataBrowserSource()

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

## ◆ ~GenericStringListDataBrowserSource()

~GenericStringListDataBrowserSource | ( |  | ) |
| overridedefaultnoexcept

## Member Function Documentation

## ◆ dbAttached()

void dbAttached | ( | CDataBrowser * | browser | ) |
| overrideprotectedvirtual

databrowser view was attached to a parent

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbCellSetupTextEdit()

void dbCellSetupTextEdit | ( | int32_t | row,
|  | int32_t | column,
|  | CTextEdit * | textEditControl,
|  | CDataBrowser * | browser )
| inlineoverrideprotectedvirtual

beginTextEdit calls this, so you can setup the textedit control

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbCellTextChanged()

void dbCellTextChanged | ( | int32_t | row,
|  | int32_t | column,
|  | UTF8StringPtr | newText,
|  | CDataBrowser * | browser )
| inlineoverrideprotectedvirtual

the text of the cell changed beginTextEdit was called for

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbDrawCell()

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

draw a db cell

Implements DataBrowserDelegateAdapter.

## ◆ dbDrawHeader()

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

draw the db header

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbGetColumnDescription()

bool dbGetColumnDescription | ( | int32_t | index,
|  | CCoord & | minWidth,
|  | CCoord & | maxWidth,
|  | CDataBrowser * | browser )
| inlineoverrideprotectedvirtual

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbGetCurrentColumnWidth()

CCoord dbGetCurrentColumnWidth | ( | int32_t | index,
|  | CDataBrowser * | browser )
| overrideprotectedvirtual

return current width of index column

Implements DataBrowserDelegateAdapter.

## ◆ dbGetLineWidthAndColor()

bool dbGetLineWidthAndColor | ( | CCoord & | width,
|  | CColor & | color,
|  | CDataBrowser * | browser )
| overrideprotectedvirtual

return the line width and color

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbGetNumColumns()

int32_t dbGetNumColumns | ( | CDataBrowser * | browser | ) |
| inlineoverrideprotectedvirtual

return number of columns for CDataBrowser browser

Implements DataBrowserDelegateAdapter.

## ◆ dbGetNumRows()

int32_t dbGetNumRows | ( | CDataBrowser * | browser | ) |
| overrideprotectedvirtual

return number of rows for CDataBrowser browser

Implements DataBrowserDelegateAdapter.

## ◆ dbGetRowHeight()

CCoord dbGetRowHeight | ( | CDataBrowser * | browser | ) |
| overrideprotectedvirtual

return height of one row

Implements DataBrowserDelegateAdapter.

## ◆ dbOnKeyboardEvent()

void dbOnKeyboardEvent | ( | KeyboardEvent & | event,
|  | CDataBrowser * | browser )
| overrideprotectedvirtual

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbOnMouseDown()

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

mouse button was pressed on a cell

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbOnMouseMoved()

CMouseEventResult dbOnMouseMoved | ( | const CPoint & | where,
|  | const CButtonState & | buttons,
|  | int32_t | row,
|  | int32_t | column,
|  | CDataBrowser * | browser )
| inlineoverrideprotectedvirtual

mouse was moved over a cell

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbOnMouseUp()

CMouseEventResult dbOnMouseUp | ( | const CPoint & | where,
|  | const CButtonState & | buttons,
|  | int32_t | row,
|  | int32_t | column,
|  | CDataBrowser * | browser )
| inlineoverrideprotectedvirtual

mouse button was released on a cell

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbRemoved()

void dbRemoved | ( | CDataBrowser * | browser | ) |
| overrideprotectedvirtual

databrowser view will be removed from its parent

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbSelectionChanged()

void dbSelectionChanged | ( | CDataBrowser * | browser | ) |
| overrideprotectedvirtual

the selection of the db changed

Reimplemented from DataBrowserDelegateAdapter.

## ◆ dbSetCurrentColumnWidth()

void dbSetCurrentColumnWidth | ( | int32_t | index,
|  | const CCoord & | width,
|  | CDataBrowser * | browser )
| inlineoverrideprotectedvirtual

the width of a column has changed

Reimplemented from DataBrowserDelegateAdapter.

## ◆ 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 )
| overrideprotectedvirtual

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