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

Represents a file list entry. More...

#include <filelistitem.h>

Inheritance diagram for FileListItem:
ListItem FileName Button Label Widget

Public Member Functions

 FileListItem () ROLAND_DELETE FileListItem(const FileName &filename)
 Constructs an Item based on FileName. More...
 
virtual ~FileListItem () ROLAND_DEFAULT void setFileName(const FileName &filename)
 Standarddestructor. More...
 
const FileNamefilename ()
 
- Public Member Functions inherited from ListItem
 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 Member Functions inherited from FileName
 FileName ()
 
 FileName (const string &filename)
 
 ~FileName ()
 
bool operator< (const FileName &fn)
 
bool operator== (const FileName &fn)
 
string qualified () const
 
string base (bool ext=true) const
 
string path () const
 
string relpath () const
 
string ext (bool dot=true) const
 
void set (const string &filename)
 
void setBase (const string &basename, bool ext=true)
 
void setExt (const string &extension)
 
void setPath (const string &path)
 
bool isValid ()
 
bool isRelative ()
 

Additional Inherited Members

- Static Public Member Functions inherited from FileName
static void setCaseSensitiveCompare (bool csc)
 
- Public Attributes inherited from ListItem
virtual Sint16 y {mOrigin.set(x, y)
 
- 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)
 
- Protected Attributes inherited from ListItem
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
 

Detailed Description

Represents a file list entry.

Constructor & Destructor Documentation

FileListItem ( ) const

Constructs an Item based on FileName.

virtual ~FileListItem ( ) const
inlinevirtual

Standarddestructor.

References FileListItem::filename().

Member Function Documentation

const FileName& filename ( )
inline

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