cxWidgets 1.0
FlashcardApp.h
Go to the documentation of this file.
1#ifndef __FLASHCARDAPP_H__
2#define __FLASHCARDAPP_H__
3
4#include "../../src/cxWindow.h"
5#include "../../src/cxUtils.h"
6#include "../../src/cxKeyDefines.h"
7#include <vector>
8#include <string>
9
10struct Card {
11 std::string front;
12 std::string back;
13};
14
15class FlashcardApp : public cx::cxWindow {
16public:
17 FlashcardApp(int pHeight, int pWidth);
18
19 void loadCards(const std::string& filename);
20 void updateStatus();
21 void draw();
22 void showHelp();
23 void run();
24
25private:
26 std::vector<Card> mCards;
27 size_t mCurrentCardIdx;
28 bool mShowBack;
29};
30
31#endif
Definition FlashcardApp.h:15
void showHelp()
Definition FlashcardApp.cpp:78
void draw()
Fills the member ncurses window structure with the current.
Definition FlashcardApp.cpp:57
void updateStatus()
Definition FlashcardApp.cpp:47
void run()
Definition FlashcardApp.cpp:93
void loadCards(const std::string &filename)
Definition FlashcardApp.cpp:19
Represents a text-based window on the screen. Can contain a title, status, and a message to appear wi...
Definition cxWindow.h:195
Definition FlashcardApp.h:10
std::string back
Definition FlashcardApp.h:12
std::string front
Definition FlashcardApp.h:11