OpenCPN Partial API docs
Loading...
Searching...
No Matches
SvgButton Class Reference

A button capable of loading an svg image. More...

#include <svg_button.h>

Inheritance diagram for SvgButton:
CopyClipboardButton FilterButton

Protected Member Functions

 SvgButton (wxWindow *parent)
 
void LoadIcon (const char *svg)
 Load an svg icon available in memory.
 
void LoadIcon (const fs::path &path)
 Load icon from svg file on disk.
 

Detailed Description

A button capable of loading an svg image.

The image is scaled to roughly the size of a character, and the button is made to fit the image.

Internally uses wxBitmapBundle available from wxWidgets 3.2 if available, otherwise falling back to the wxSvg library.

Examples:

Definition at line 44 of file svg_button.h.

Constructor & Destructor Documentation

◆ SvgButton()

SvgButton::SvgButton ( wxWindow *  parent)
inlineprotected

Definition at line 46 of file svg_button.h.

Member Function Documentation

◆ LoadIcon() [1/2]

void SvgButton::LoadIcon ( const char *  svg)
protected

Load an svg icon available in memory.

Parameters
svgSVG icon smaller than 2048 chars.

◆ LoadIcon() [2/2]

void SvgButton::LoadIcon ( const fs::path &  path)
protected

Load icon from svg file on disk.

Parameters
pathPath to svg icon less than 2048 chars.

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