VSTGUI 4.5 Graphical User Interface Framework not only for VST plugins

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

- Namespace List
- Namespace Members

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Enumerations | Functions
VSTGUI::CDrawMethods Namespace Reference

## Enumerations
enum | IconPosition { kIconLeft, kIconCenterAbove, kIconCenterBelow, kIconRight }
enum | TextTruncateMode { kTextTruncateNone, kTextTruncateHead, kTextTruncateTail }
enum | CreateTextTruncateFlags { kReturnEmptyIfTruncationIsPlaceholderOnly = 1 << 0 }

## Functions
UTF8String | createTruncatedText (TextTruncateMode mode, const UTF8String &text, CFontRef font, CCoord maxWidth, const CPoint &textInset=CPoint(0, 0), uint32_t flags=0)
| create a truncated string More...
void | drawIconAndText (CDrawContext *context, CBitmap *iconToDraw, IconPosition iconPosition, CHoriTxtAlign textAlignment, CCoord textIconMargin, CRect drawRect, const UTF8String &title, CFontRef font, CColor textColor, TextTruncateMode truncateMode=kTextTruncateNone)
| draws an icon and a string into a rectangle More...

## Enumeration Type Documentation

enum CreateTextTruncateFlags

Enumerator
kReturnEmptyIfTruncationIsPlaceholderOnly | return an empty string if the truncated text is only the placeholder string

enum IconPosition

Enumerator
kIconLeft | icon left, text centered in the area next to the icon
kIconCenterAbove | icon centered above the text, text centered
kIconCenterBelow | icon centered below the text, text centered
kIconRight | icon right, text centered in the area next to the icon

enum TextTruncateMode

Enumerator
kTextTruncateNone |
kTextTruncateHead |
kTextTruncateTail |

## Function Documentation

UTF8String createTruncatedText | ( | TextTruncateMode | mode,
|  | const UTF8String & | text,
|  | CFontRef | font,
|  | CCoord | maxWidth,
|  | const CPoint & | textInset = `CPoint(0, 0)`,
|  | uint32_t | flags = `0`
| ) |  |

create a truncated string

Parameters

  mode | truncation mode
  text | text string
  font | font
  maxWidth | maximum width
  textInset | text inset
  flags | flags see CreateTextTruncateFlags

Returns
  truncated text or original text if no truncation needed

void drawIconAndText | ( | CDrawContext * | context,
|  | CBitmap * | iconToDraw,
|  | IconPosition | iconPosition,
|  | CHoriTxtAlign | textAlignment,
|  | CCoord | textIconMargin,
|  | CRect | drawRect,
|  | const UTF8String & | title,
|  | CFontRef | font,
|  | CColor | textColor,
|  | TextTruncateMode | truncateMode = `kTextTruncateNone`
| ) |  |

draws an icon and a string into a rectangle

Parameters

  context | draw context
  iconToDraw | icon to draw
  iconPosition | position of the icon
  textAlignment | alignment of the string
  textIconMargin | margin of the string
  drawRect | draw rectangle
  title | string
  font | font
  textColor | font color
  truncateMode | trunaction mode