ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ListItem Class Reference

Represents an item which can be hold by a List. More...

#include <listitem.h>

Inheritance diagram for ListItem:
Button Label Widget FileListItem

Public Member Functions

 ListItem ()
 
virtual ~ListItem () ROLAND_DEFAULT void setOrigin(Sint16 x
 
void reset ()
 
virtual void onMouseButton (SDL_MouseButtonEvent *event)
 Catch MouseButton events. More...
 
- Public Member Functions inherited from Button
 Button ()
 
virtual ~Button () ROLAND_DEFAULT virtual void draw()
 
virtual void onMouseMotion (SDL_MouseMotionEvent *event)
 Catch MouseMotion events. More...
 
void setHighlightColor (const Color &color)
 
bool isDown () const
 
void setDown (bool down)
 
- Public Member Functions inherited from Label
 Label (Widget *parent=nullptr)
 
virtual ~Label ()
 
virtual void draw ()
 
virtual void setPos (int x, int y)
 Sets the Position. More...
 
void setImage (const String &fname, bool autosize=true, bool bg=false)
 
void setBorder (bool val)
 
void setBackground (bool val)
 
void setText (const String &text)
 
void setMoveable (bool moveable)
 
void setBorderColor (const Color &color, const Color &highlite)
 
const StringgetText () const
 
- Public Member Functions inherited from Widget
 Widget (Canvas *const canvas)
 Constructor with Canvas. More...
 
 Widget (Widget *const parent=nullptr)
 Constructor with parent Widget. More...
 
virtual ~Widget () ROLAND_DEFAULT virtual void draw()=0
 Standarddestructor. More...
 
virtual bool onKeyboard (SDL_KeyboardEvent *event)
 Catch Keyboard events. More...
 
virtual bool onUser (SDL_UserEvent *event)
 Catch UserEvents. More...
 
virtual void setSize (int width, int height)
 Sets the Size. More...
 
virtual void setCanvas (Canvas *const canvas)
 Sets the Canvas to draw on. More...
 
void setParent (Widget *const parent)
 Sets the parent Widget. More...
 
const Widgetparent () const
 Returns the parent. More...
 
void setColor (const Color &color)
 Sets the Color of the Widget by Color. More...
 
void setColor (int r, int g, int b, int a=255)
 Sets the Color of the Widget by RGB(A) More...
 
Color color () const
 Returns the Color of the Widget. More...
 
void setEnabled (bool val)
 Set Widget enabled. More...
 
void setWantEvents (bool val)
 Sets whether to catch Events. More...
 
void setMouseOver (bool val)
 Sets whehther to catch MouseOver. More...
 
bool enabled () const
 Returns whether the Widget is enabled. More...
 
bool wantEvents () const
 Returns whether the Widget wants Events. More...
 
bool mouseOver () const
 Returns whether the Widget receives MouseOver. More...
 
bool hasMouseGrab () const
 Returns whether the Widget has MouseGrab. More...
 
Sint16 x () const
 Returns the x position of the upper left corner. More...
 
Sint16 y () const
 Returns the y position of the upper left corner. More...
 
Point pos () const
 Returns the position of the upper left corner. More...
 
Uint16 width () const
 Returns the width of the Widget. More...
 
Uint16 height () const
 Returns the height of the Widget. More...
 
Size size () const
 Returns the Size of the Widget. More...
 
Point relativePos (Sint16 x, Sint16 y) const
 
void relativePos (Sint16 x, Sint16 y, Point &target) const
 
const Rectrect () const
 
const Rectcanvasrect () const
 

Public Attributes

virtual Sint16 y {mOrigin.set(x, y)
 

Protected Attributes

Point mOrigin
 
- Protected Attributes inherited from Button
Color mHighlightColor
 
bool mDown
 
- Protected Attributes inherited from Label
bool mBorder
 
bool mBackground
 
bool mMoveable
 
ImagemImage
 
String mText
 
Point mTextPos
 
Point mTextOffset
 
Point mRelativeMousePos
 
Point mLeftTop
 
Point mRightTop
 
Point mRightBottom
 
Point mLeftBottom
 
Color mBorderColor1
 
Color mBorderColor2
 
- Protected Attributes inherited from Widget
CanvasmCanvas
 
WidgetmParent
 
Rect mRect
 
Rect mCanvasRect
 
Color mColor
 
bool mEnabled
 
bool mMouseOver
 
bool mMouseGrab
 
bool mWantEvents
 

Additional Inherited Members

- Protected Member Functions inherited from Label
void drawBorder ()
 
void drawBackground ()
 
void drawBackground (const Color &color)
 
void drawText ()
 
void moveInit (SDL_MouseButtonEvent *event)
 
void move (SDL_MouseMotionEvent *event)
 

Detailed Description

Represents an item which can be hold by a List.

Constructor & Destructor Documentation

ListItem ( )
virtual ~ListItem ( )
virtual

Member Function Documentation

void onMouseButton ( SDL_MouseButtonEvent *  event)
virtual
void reset ( )
inline

Member Data Documentation

Point mOrigin
protected
virtual Sint16 y {mOrigin.set(x, y)

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