Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::ImageView Class Reference

Simple view that displays an image. More...

#include <ImageView.h>

Inheritance diagram for Boardcore::ImageView:
Collaboration diagram for Boardcore::ImageView:

Public Member Functions

 ImageView (const mxgui::Image *image)
 
void setImage (mxgui::Image *image)
 
const mxgui::Image * getImage ()
 
void draw (mxgui::DrawingContext &dc) override
 Draw the view in its bounds.
 
- Public Member Functions inherited from Boardcore::View
 View ()
 
virtual ~View ()
 
virtual void setBounds (Bounds bounds)
 Sets the bounds in which the view will be drawn.
 
Bounds getBounds ()
 
void invalidate ()
 Signal that what has been previously drawn is now invalid and has to be redrawn.
 
void invalidateTree ()
 Invalidate the view tree which has this view as a root.
 
virtual std::vector< View * > getChilds ()
 Returns the list of childs.
 
virtual void setBackgroundColor (mxgui::Color color)
 
virtual mxgui::Color getBackgroundColor ()
 
void setSelectedColor (mxgui::Color color)
 
void setSelectable (bool selectable)
 
bool isSelectable ()
 
void setSelected (bool selected)
 
bool isSelected ()
 
void addOnInteractionListener (OnInteractionListener listener)
 
virtual void performInteraction (Interaction action)
 

Additional Inherited Members

- Public Types inherited from Boardcore::View
using OnInteractionListener = std::function<void(View*, Interaction)>
 
- Protected Member Functions inherited from Boardcore::View
bool isInvalidated ()
 

Detailed Description

Simple view that displays an image.

Definition at line 35 of file ImageView.h.

Constructor & Destructor Documentation

◆ ImageView()

Boardcore::ImageView::ImageView ( const mxgui::Image * image)
inline

Definition at line 38 of file ImageView.h.

Member Function Documentation

◆ draw()

void Boardcore::ImageView::draw ( mxgui::DrawingContext & dc)
inlineoverridevirtual

Draw the view in its bounds.

Parameters
dcReference to a drawingcontext

Reimplemented from Boardcore::View.

Definition at line 48 of file ImageView.h.

◆ getImage()

const mxgui::Image * Boardcore::ImageView::getImage ( )
inline

Definition at line 46 of file ImageView.h.

◆ setImage()

void Boardcore::ImageView::setImage ( mxgui::Image * image)
inline

Definition at line 40 of file ImageView.h.


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