mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-29 23:11:53 +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:
parent
d90ed635be
commit
4ae4fc675e
@ -44,8 +44,6 @@ Link::Link(GMenu2X *gmenu2x_, Touchscreen &ts)
|
|||||||
updateSurfaces();
|
updateSurfaces();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Link::run() {}
|
|
||||||
|
|
||||||
void Link::paint() {
|
void Link::paint() {
|
||||||
iconSurface->blit(gmenu2x->s, iconX, rect.y+padding, 32,32);
|
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 );
|
gmenu2x->s->write( gmenu2x->font, getTitle(), iconX+16, rect.y+gmenu2x->skinConfInt["linkHeight"]-padding, ASFont::HAlignCenter, ASFont::VAlignBottom );
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
const std::string &getIconPath();
|
const std::string &getIconPath();
|
||||||
void setIconPath(const std::string &icon);
|
void setIconPath(const std::string &icon);
|
||||||
|
|
||||||
virtual void run();
|
virtual void run() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -53,6 +53,7 @@ public:
|
|||||||
LinkApp(GMenu2X *gmenu2x, Touchscreen &ts, InputManager &inputMgr,
|
LinkApp(GMenu2X *gmenu2x, Touchscreen &ts, InputManager &inputMgr,
|
||||||
const char* linkfile);
|
const char* linkfile);
|
||||||
virtual const std::string &searchIcon();
|
virtual const std::string &searchIcon();
|
||||||
|
virtual void run();
|
||||||
|
|
||||||
const std::string &getExec();
|
const std::string &getExec();
|
||||||
void setExec(const std::string &exec);
|
void setExec(const std::string &exec);
|
||||||
@ -78,7 +79,6 @@ public:
|
|||||||
void setClock(int mhz);
|
void setClock(int mhz);
|
||||||
|
|
||||||
bool save();
|
bool save();
|
||||||
void run();
|
|
||||||
void showManual();
|
void showManual();
|
||||||
void selector(int startSelection=0, const std::string &selectorDir="");
|
void selector(int startSelection=0, const std::string &selectorDir="");
|
||||||
void launch(const std::string &selectedFile="",
|
void launch(const std::string &selectedFile="",
|
||||||
|
Loading…
Reference in New Issue
Block a user