ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
filelist.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) by Fred Klaus *
3  * development@fkweb.de *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 #ifndef SDLTK_FILE_LIST_H
21 #define SDLTK_FILE_LIST_H
22 
23 #include "list.h"
24 #include "filelistitem.h"
25 #include "filename.h"
26 #include "directory.h"
27 
28 namespace sdltk
29 {
30 
31  class Gui;
32 
34  class FileList : public List
35  {
36 
37  public:
39  FileList(Gui * gui, const FileName & dirname, char letter = 0);
42 
43  void init(const FileName & dirname, char letter = 0);
44 
45  bool onKeyboard(SDL_KeyboardEvent * event);
46 
48  FileListItem * selected() const {return (FileListItem*) (*mSelected);}
49 
50  private:
52 
53  };
54 
55 } // sdltk
56 
57 #endif //SDLTK_FILE_LIST_H
author Fred Klaus development@fkweb.de
Definition: gui.h:34
void init()
Definition: roland.cpp:97
A [std::vector] for directory entries.
Definition: directory.h:40
char letter
Definition: filelist.h:43
FileListItem * selected() const
Returns a pointer to the selected Item.
Definition: filelist.h:48
[std::string] extension for filenames
Definition: filename.h:39
~FileList() ROLAND_DEFAULT void init(const FileName &dirname
Deafault destructor.
Represents a file list entry.
Definition: filelistitem.h:30
sdltk::Gui * gui
Definition: roland.cpp:79
bool onKeyboard(SDL_KeyboardEvent *event)
This member catches keyboard events.
Definition: filelist.cpp:52
FileList(Gui *gui, const FileName &dirname, char letter=0)
Some initialization.
Definition: filelist.cpp:26
Directory mDirectory
Definition: filelist.h:51
#define ROLAND_DEFAULT
Definition: compspec.h:46
A list that can hold several ListItem s.
Definition: list.h:35
A filelist to select a file.
Definition: filelist.h:34
the SDL based Stuff
Definition: audio.cpp:22