1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-29 23:15:55 +02:00

Mark Link::run() as pure virtual.

This is better than providing an empty default implementation, since it
forces subclasses to override the method.
This commit is contained in:
Maarten ter Huurne 2011-12-23 15:49:09 +01:00
parent d90ed635be
commit 4ae4fc675e
3 changed files with 2 additions and 4 deletions

View File

@ -44,8 +44,6 @@ Link::Link(GMenu2X *gmenu2x_, Touchscreen &ts)
updateSurfaces();
}
void Link::run() {}
void Link::paint() {
iconSurface->blit(gmenu2x->s, iconX, rect.y+padding, 32,32);
gmenu2x->s->write( gmenu2x->font, getTitle(), iconX+16, rect.y+gmenu2x->skinConfInt["linkHeight"]-padding, ASFont::HAlignCenter, ASFont::VAlignBottom );

View File

@ -69,7 +69,7 @@ public:
const std::string &getIconPath();
void setIconPath(const std::string &icon);
virtual void run();
virtual void run() = 0;
};
#endif

View File

@ -53,6 +53,7 @@ public:
LinkApp(GMenu2X *gmenu2x, Touchscreen &ts, InputManager &inputMgr,
const char* linkfile);
virtual const std::string &searchIcon();
virtual void run();
const std::string &getExec();
void setExec(const std::string &exec);
@ -78,7 +79,6 @@ public:
void setClock(int mhz);
bool save();
void run();
void showManual();
void selector(int startSelection=0, const std::string &selectorDir="");
void launch(const std::string &selectedFile="",