ofxOui - UI Components for OpenFrameworks

Public Member Functions | Public Attributes | Protected Attributes | List of all members
ofxOui::Icon Class Reference

Icon image box wrapper. More...

#include <ofxOuiIcon.hpp>

Public Member Functions

 Icon ()
 Default Constructor. More...
 
virtual ~Icon ()
 Destructor. More...
 
virtual void update ()
 OF-like update function: updates the position of the icon. More...
 
virtual void draw ()
 OF-like draw function: draws the icon. More...
 
virtual void load (string filename)
 load the image file More...
 

Public Attributes

int x = 0
 x position (of the containing box) More...
 
int y = 0
 y position (of the containing box) More...
 
int width = 100
 width (of the containing box) More...
 
int height = 100
 height (of the containing box) More...
 
int padding = 10
 padding (within the containing box) More...
 
Anchor alignment = ofxOui::Anchor::MiddleCenter
 Alignment. More...
 
ofColor color = ofColor::black
 Color (in case of a binary icon) More...
 
ofRectangle rect
 Actual rectangle where the icon is drawn. More...
 

Protected Attributes

ofImage icon_
 

Detailed Description

Icon image box wrapper.

Constructor & Destructor Documentation

§ Icon()

ofxOui::Icon::Icon ( )

Default Constructor.

§ ~Icon()

ofxOui::Icon::~Icon ( )
virtual

Destructor.

Member Function Documentation

§ draw()

void ofxOui::Icon::draw ( )
virtual

OF-like draw function: draws the icon.

§ load()

void ofxOui::Icon::load ( string  filename)
virtual

load the image file

Parameters
filenamepath to the image file

§ update()

void ofxOui::Icon::update ( )
virtual

OF-like update function: updates the position of the icon.

Member Data Documentation

§ alignment

Anchor ofxOui::Icon::alignment = ofxOui::Anchor::MiddleCenter

Alignment.

§ color

ofColor ofxOui::Icon::color = ofColor::black

Color (in case of a binary icon)

§ height

int ofxOui::Icon::height = 100

height (of the containing box)

§ icon_

ofImage ofxOui::Icon::icon_
protected

§ padding

int ofxOui::Icon::padding = 10

padding (within the containing box)

§ rect

ofRectangle ofxOui::Icon::rect

Actual rectangle where the icon is drawn.

§ width

int ofxOui::Icon::width = 100

width (of the containing box)

§ x

int ofxOui::Icon::x = 0

x position (of the containing box)

§ y

int ofxOui::Icon::y = 0

y position (of the containing box)


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