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

A filelist to select a file. More...

#include <filelist.h>

Inheritance diagram for FileList:
List Widget

Public Member Functions

 FileList (Gui *gui, const FileName &dirname, char letter=0)
 Some initialization. More...
 
 ~FileList () ROLAND_DEFAULT void init(const FileName &dirname
 Deafault destructor. More...
 
bool onKeyboard (SDL_KeyboardEvent *event)
 This member catches keyboard events. More...
 
FileListItemselected () const
 Returns a pointer to the selected Item. More...
 
- Public Member Functions inherited from List
 List (Gui *gui)
 Some initialization. More...
 
virtual ~List () ROLAND_DEFAULT void init()
 Deafault destructor. More...
 
virtual void onMouseButton (SDL_MouseButtonEvent *event)
 This member catches mousebutton events. More...
 
virtual bool onUser (SDL_UserEvent *event)
 Tis member catches user events. More...
 
ListItemselected () const
 Returns a pointer to the selected Item. More...
 
void add (ListItem *item)
 Adds a ListItem to the List. More...
 
void reposition (Sint16 val)
 Manages the scrolling. More...
 
void draw ()
 Draw the List and visible elements. More...
 
- 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 void onMouseMotion (SDL_MouseMotionEvent *event)
 Catch MouseMotion events. More...
 
virtual void setPos (int x, int y)
 Sets the Position. 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

char letter = 0)
 

Private Attributes

Directory mDirectory
 

Additional Inherited Members

- Protected Attributes inherited from List
Sint8 mSpeed
 
Uint8 mMotion
 
Uint16 mPosH
 
GuimGui
 
Clock mClock
 
Color mTmpColor
 
std::list< ListItem * >::iterator mSelected
 
- Protected Attributes inherited from Widget
CanvasmCanvas
 
WidgetmParent
 
Rect mRect
 
Rect mCanvasRect
 
Color mColor
 
bool mEnabled
 
bool mMouseOver
 
bool mMouseGrab
 
bool mWantEvents
 

Detailed Description

A filelist to select a file.

Constructor & Destructor Documentation

FileList ( Gui gui,
const FileName dirname,
char  letter = 0 
)
~FileList ( ) const

Deafault destructor.

Member Function Documentation

bool onKeyboard ( SDL_KeyboardEvent *  event)
virtual

This member catches keyboard events.

Reimplemented from List.

References init(), FileList::mDirectory, Widget::mEnabled, List::onKeyboard(), and Directory::path().

FileListItem* selected ( ) const
inline

Returns a pointer to the selected Item.

Referenced by mainloop().

Member Data Documentation

char letter = 0)

Referenced by FileList::FileList().

Directory mDirectory
private

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