add functions to toggle slit/toolbar hidden

This commit is contained in:
Thomas Lübking 2016-08-15 09:59:13 +02:00 committed by Mathias Gumz
parent 10a9574738
commit 1473bcf655
3 changed files with 36 additions and 0 deletions

View file

@ -441,9 +441,15 @@ doing so.
*ToggleSlitAbove*::
Toggles the slit between its regular and the AboveDock layer
*ToggleSlitHidden*::
Toggles the slit's autohiding state (autohide doesn't have to be enabled)
*ToggleToolbarAbove*::
Toggles the toolbar between its regular and the AboveDock layer
*ToggleToolbarHidden*::
Toggles the toolbar's autohiding state (autohide doesn't have to be enabled)
*Deiconify* 'mode' 'destination'::
Deiconifies windows (or, restores from a minimized state).
+

View file

@ -634,6 +634,16 @@ void ToggleSlitAboveCmd::execute() {
#endif
}
REGISTER_COMMAND(toggleslithidden, ToggleSlitHiddenCmd, void);
void ToggleSlitHiddenCmd::execute() {
#if USE_SLIT
if (BScreen *screen = Fluxbox::instance()->mouseScreen()) {
screen->slit()->toggleHidden();
const_cast<FbTk::FbWindow&>(screen->slit()->window()).raise();
}
#endif
}
REGISTER_COMMAND(toggletoolbarabove, ToggleToolbarAboveCmd, void);
void ToggleToolbarAboveCmd::execute() {
#if USE_TOOLBAR
@ -644,6 +654,16 @@ void ToggleToolbarAboveCmd::execute() {
#endif
}
REGISTER_COMMAND(toggletoolbarvisible, ToggleToolbarHiddenCmd, void);
void ToggleToolbarHiddenCmd::execute() {
#if USE_TOOLBAR
if (BScreen *screen = Fluxbox::instance()->mouseScreen()) {
screen->toolbar()->toggleHidden();
const_cast<FbTk::FbWindow&>(screen->toolbar()->window()).raise();
}
#endif
}
REGISTER_COMMAND(closeallwindows, CloseAllWindowsCmd, void);
void CloseAllWindowsCmd::execute() {

View file

@ -197,11 +197,21 @@ public:
void execute();
};
class ToggleSlitHiddenCmd: public FbTk::Command<void> {
public:
void execute();
};
class ToggleToolbarAboveCmd: public FbTk::Command<void> {
public:
void execute();
};
class ToggleToolbarHiddenCmd: public FbTk::Command<void> {
public:
void execute();
};
class CloseAllWindowsCmd: public FbTk::Command<void> {
public:
void execute();