Here's the code I used for that in CoolReader:
PHP Code:
bool systemPanelShown() {
return GetPanelType()!=PANEL_DISABLED;
}
void hideSystemPanel(bool screenUpdate) {
if( systemPanelShown() ) {
CRLog::trace("hideSystemPanel(): PANEL_DISABLED");
SetPanelType(PANEL_DISABLED);
if( screenUpdate )
CRPocketBookWindowManager::instance->update(true);
}
}
void showSystemPanel(bool screenUpdate) {
if( !systemPanelShown() ) {
CRLog::trace("showSystemPanel(): PANEL_ENABLED");
SetPanelType(PANEL_ENABLED);
DrawPanel(NULL, "", "", 0);
if( screenUpdate )
PartialUpdate(0, 0, ScreenWidth(), ScreenHeight());
}
}
void toggleSystemPanel(bool screenUpdate) {
if( systemPanelShown() )
hideSystemPanel(screenUpdate);
else
showSystemPanel(screenUpdate);
}
void toggleSystemPanel() {
toggleSystemPanel(true);
}