/*
 * This file is autogenerated with bcop:
 * The Compiz option code generator
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */


#include <core/core.h>

#include "staticswitcher_options.h"

StaticswitcherOptions::StaticswitcherOptions (bool init /* = true */) :
    mOptions (StaticswitcherOptions::OptionNum),
    mNotify (StaticswitcherOptions::OptionNum)
{
    if (init)
        initOptions ();
}

void
StaticswitcherOptions::initOptions ()
{
    unsigned int state;
    CompAction action;
    unsigned short color[4];

    // next_button
    mOptions[StaticswitcherOptions::NextButton].setName ("next_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::NextButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextButton].value ().action ());

    // next_key
    mOptions[StaticswitcherOptions::NextKey].setName ("next_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    action.keyFromString ("<Alt>Tab");
    mOptions[StaticswitcherOptions::NextKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextKey].value ().action ());

    // prev_button
    mOptions[StaticswitcherOptions::PrevButton].setName ("prev_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::PrevButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevButton].value ().action ());

    // prev_key
    mOptions[StaticswitcherOptions::PrevKey].setName ("prev_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    action.keyFromString ("<Shift><Alt>Tab");
    mOptions[StaticswitcherOptions::PrevKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevKey].value ().action ());

    // next_all_button
    mOptions[StaticswitcherOptions::NextAllButton].setName ("next_all_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::NextAllButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextAllButton].value ().action ());

    // next_all_key
    mOptions[StaticswitcherOptions::NextAllKey].setName ("next_all_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    action.keyFromString ("<Control><Alt>Tab");
    mOptions[StaticswitcherOptions::NextAllKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextAllKey].value ().action ());

    // prev_all_button
    mOptions[StaticswitcherOptions::PrevAllButton].setName ("prev_all_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::PrevAllButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevAllButton].value ().action ());

    // prev_all_key
    mOptions[StaticswitcherOptions::PrevAllKey].setName ("prev_all_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    action.keyFromString ("<Shift><Control><Alt>Tab");
    mOptions[StaticswitcherOptions::PrevAllKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevAllKey].value ().action ());

    // next_group_button
    mOptions[StaticswitcherOptions::NextGroupButton].setName ("next_group_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::NextGroupButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextGroupButton].value ().action ());

    // next_group_key
    mOptions[StaticswitcherOptions::NextGroupKey].setName ("next_group_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    mOptions[StaticswitcherOptions::NextGroupKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextGroupKey].value ().action ());

    // prev_group_button
    mOptions[StaticswitcherOptions::PrevGroupButton].setName ("prev_group_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::PrevGroupButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevGroupButton].value ().action ());

    // prev_group_key
    mOptions[StaticswitcherOptions::PrevGroupKey].setName ("prev_group_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    mOptions[StaticswitcherOptions::PrevGroupKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevGroupKey].value ().action ());

    // next_no_popup_button
    mOptions[StaticswitcherOptions::NextNoPopupButton].setName ("next_no_popup_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::NextNoPopupButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextNoPopupButton].value ().action ());

    // next_no_popup_key
    mOptions[StaticswitcherOptions::NextNoPopupKey].setName ("next_no_popup_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    mOptions[StaticswitcherOptions::NextNoPopupKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextNoPopupKey].value ().action ());

    // prev_no_popup_button
    mOptions[StaticswitcherOptions::PrevNoPopupButton].setName ("prev_no_popup_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::PrevNoPopupButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevNoPopupButton].value ().action ());

    // prev_no_popup_key
    mOptions[StaticswitcherOptions::PrevNoPopupKey].setName ("prev_no_popup_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    mOptions[StaticswitcherOptions::PrevNoPopupKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevNoPopupKey].value ().action ());

    // next_panel_button
    mOptions[StaticswitcherOptions::NextPanelButton].setName ("next_panel_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::NextPanelButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextPanelButton].value ().action ());

    // next_panel_key
    mOptions[StaticswitcherOptions::NextPanelKey].setName ("next_panel_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    mOptions[StaticswitcherOptions::NextPanelKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::NextPanelKey].value ().action ());

    // prev_panel_button
    mOptions[StaticswitcherOptions::PrevPanelButton].setName ("prev_panel_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    mOptions[StaticswitcherOptions::PrevPanelButton].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevPanelButton].value ().action ());

    // prev_panel_key
    mOptions[StaticswitcherOptions::PrevPanelKey].setName ("prev_panel_key", CompOption::TypeKey);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitKey);
    mOptions[StaticswitcherOptions::PrevPanelKey].value().set (action);
    if (screen) screen->addAction (&mOptions[StaticswitcherOptions::PrevPanelKey].value ().action ());

    // speed
    mOptions[StaticswitcherOptions::Speed].setName ("speed", CompOption::TypeFloat);
    mOptions[StaticswitcherOptions::Speed].rest ().set (0.1, 50, 0.1);
    mOptions[StaticswitcherOptions::Speed].value().set((float) 4);

    // timestep
    mOptions[StaticswitcherOptions::Timestep].setName ("timestep", CompOption::TypeFloat);
    mOptions[StaticswitcherOptions::Timestep].rest ().set (0.1, 50, 0.1);
    mOptions[StaticswitcherOptions::Timestep].value().set((float) 1.2);

    // window_match
    mOptions[StaticswitcherOptions::WindowMatch].setName ("window_match", CompOption::TypeMatch);
    mOptions[StaticswitcherOptions::WindowMatch].value().set(CompMatch ("Normal | Dialog | Toolbar | Utility | Unknown"));
    mOptions[StaticswitcherOptions::WindowMatch].value().match ().update ();

    // minimized
    mOptions[StaticswitcherOptions::Minimized].setName ("minimized", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::Minimized].value().set(true);

    // auto_change_vp
    mOptions[StaticswitcherOptions::AutoChangeVp].setName ("auto_change_vp", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::AutoChangeVp].value().set(false);

    // popup_delay
    mOptions[StaticswitcherOptions::PopupDelay].setName ("popup_delay", CompOption::TypeFloat);
    mOptions[StaticswitcherOptions::PopupDelay].rest ().set (0.0, 2.0, 0.05);
    mOptions[StaticswitcherOptions::PopupDelay].value().set((float) 0.0);

    // mouse_select
    mOptions[StaticswitcherOptions::MouseSelect].setName ("mouse_select", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::MouseSelect].value().set(false);

    // saturation
    mOptions[StaticswitcherOptions::Saturation].setName ("saturation", CompOption::TypeInt);
    mOptions[StaticswitcherOptions::Saturation].rest ().set (0, 100);
    mOptions[StaticswitcherOptions::Saturation].value().set((int) 50);

    // brightness
    mOptions[StaticswitcherOptions::Brightness].setName ("brightness", CompOption::TypeInt);
    mOptions[StaticswitcherOptions::Brightness].rest ().set (0, 100);
    mOptions[StaticswitcherOptions::Brightness].value().set((int) 50);

    // opacity
    mOptions[StaticswitcherOptions::Opacity].setName ("opacity", CompOption::TypeInt);
    mOptions[StaticswitcherOptions::Opacity].rest ().set (0, 100);
    mOptions[StaticswitcherOptions::Opacity].value().set((int) 100);

    // icon
    mOptions[StaticswitcherOptions::Icon].setName ("icon", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::Icon].value().set(true);

    // icon_only
    mOptions[StaticswitcherOptions::IconOnly].setName ("icon_only", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::IconOnly].value().set(false);

    // mipmap
    mOptions[StaticswitcherOptions::Mipmap].setName ("mipmap", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::Mipmap].value().set(true);

    // row_align
    mOptions[StaticswitcherOptions::RowAlign].setName ("row_align", CompOption::TypeInt);
    mOptions[StaticswitcherOptions::RowAlign].rest ().set (0, 2);
    mOptions[StaticswitcherOptions::RowAlign].value().set((int) 1);

    // focus_on_switch
    mOptions[StaticswitcherOptions::FocusOnSwitch].setName ("focus_on_switch", CompOption::TypeBool);

    // bring_to_front
    mOptions[StaticswitcherOptions::BringToFront].setName ("bring_to_front", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::BringToFront].value().set(true);

    // highlight_mode
    mOptions[StaticswitcherOptions::HighlightMode].setName ("highlight_mode", CompOption::TypeInt);
    mOptions[StaticswitcherOptions::HighlightMode].rest ().set (0, 2);
    mOptions[StaticswitcherOptions::HighlightMode].value().set((int) 1);

    // highlight_rect_hidden
    mOptions[StaticswitcherOptions::HighlightRectHidden].setName ("highlight_rect_hidden", CompOption::TypeInt);
    mOptions[StaticswitcherOptions::HighlightRectHidden].rest ().set (0, 2);
    mOptions[StaticswitcherOptions::HighlightRectHidden].value().set((int) 1);

    // highlight_color
    mOptions[StaticswitcherOptions::HighlightColor].setName ("highlight_color", CompOption::TypeColor);
    color[0] = MAX (0, MIN (0xffff, 0x0000));
    color[1] = MAX (0, MIN (0xffff, 0x0000));
    color[2] = MAX (0, MIN (0xffff, 0x0000));
    color[3] = MAX (0, MIN (0xffff, 0x9696));
    mOptions[StaticswitcherOptions::HighlightColor].value().set(color);

    // highlight_border_color
    mOptions[StaticswitcherOptions::HighlightBorderColor].setName ("highlight_border_color", CompOption::TypeColor);
    color[0] = MAX (0, MIN (0xffff, 0x0000));
    color[1] = MAX (0, MIN (0xffff, 0x0000));
    color[2] = MAX (0, MIN (0xffff, 0x0000));
    color[3] = MAX (0, MIN (0xffff, 0xc8c8));
    mOptions[StaticswitcherOptions::HighlightBorderColor].value().set(color);

    // highlight_border_inlay_color
    mOptions[StaticswitcherOptions::HighlightBorderInlayColor].setName ("highlight_border_inlay_color", CompOption::TypeColor);
    color[0] = MAX (0, MIN (0xffff, 0xc8c8));
    color[1] = MAX (0, MIN (0xffff, 0xc8c8));
    color[2] = MAX (0, MIN (0xffff, 0xc8c8));
    color[3] = MAX (0, MIN (0xffff, 0xc8c8));
    mOptions[StaticswitcherOptions::HighlightBorderInlayColor].value().set(color);

    // use_background_color
    mOptions[StaticswitcherOptions::UseBackgroundColor].setName ("use_background_color", CompOption::TypeBool);
    mOptions[StaticswitcherOptions::UseBackgroundColor].value().set(false);

    // background_color
    mOptions[StaticswitcherOptions::BackgroundColor].setName ("background_color", CompOption::TypeColor);
    color[0] = MAX (0, MIN (0xffff, 0x3333));
    color[1] = MAX (0, MIN (0xffff, 0x3333));
    color[2] = MAX (0, MIN (0xffff, 0x3333));
    color[3] = MAX (0, MIN (0xffff, 0xd998));
    mOptions[StaticswitcherOptions::BackgroundColor].value().set(color);

}

StaticswitcherOptions::~StaticswitcherOptions ()
{
}


CompOption::Vector &
StaticswitcherOptions::getOptions ()
{
    return mOptions;
}

bool
StaticswitcherOptions::setOption (const CompString &name, CompOption::Value &value)
{
    CompOption   *o;
    unsigned int index;

    o = CompOption::findOption (mOptions, name, &index);

    if (!o)
        return false;

    switch (index)
    {
        case StaticswitcherOptions::NextButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextButton].empty ())
                    mNotify[StaticswitcherOptions::NextButton] (o, StaticswitcherOptions::NextButton);
                return true;
            }
            break;
        case StaticswitcherOptions::NextKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextKey].empty ())
                    mNotify[StaticswitcherOptions::NextKey] (o, StaticswitcherOptions::NextKey);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevButton].empty ())
                    mNotify[StaticswitcherOptions::PrevButton] (o, StaticswitcherOptions::PrevButton);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevKey].empty ())
                    mNotify[StaticswitcherOptions::PrevKey] (o, StaticswitcherOptions::PrevKey);
                return true;
            }
            break;
        case StaticswitcherOptions::NextAllButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextAllButton].empty ())
                    mNotify[StaticswitcherOptions::NextAllButton] (o, StaticswitcherOptions::NextAllButton);
                return true;
            }
            break;
        case StaticswitcherOptions::NextAllKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextAllKey].empty ())
                    mNotify[StaticswitcherOptions::NextAllKey] (o, StaticswitcherOptions::NextAllKey);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevAllButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevAllButton].empty ())
                    mNotify[StaticswitcherOptions::PrevAllButton] (o, StaticswitcherOptions::PrevAllButton);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevAllKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevAllKey].empty ())
                    mNotify[StaticswitcherOptions::PrevAllKey] (o, StaticswitcherOptions::PrevAllKey);
                return true;
            }
            break;
        case StaticswitcherOptions::NextGroupButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextGroupButton].empty ())
                    mNotify[StaticswitcherOptions::NextGroupButton] (o, StaticswitcherOptions::NextGroupButton);
                return true;
            }
            break;
        case StaticswitcherOptions::NextGroupKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextGroupKey].empty ())
                    mNotify[StaticswitcherOptions::NextGroupKey] (o, StaticswitcherOptions::NextGroupKey);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevGroupButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevGroupButton].empty ())
                    mNotify[StaticswitcherOptions::PrevGroupButton] (o, StaticswitcherOptions::PrevGroupButton);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevGroupKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevGroupKey].empty ())
                    mNotify[StaticswitcherOptions::PrevGroupKey] (o, StaticswitcherOptions::PrevGroupKey);
                return true;
            }
            break;
        case StaticswitcherOptions::NextNoPopupButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextNoPopupButton].empty ())
                    mNotify[StaticswitcherOptions::NextNoPopupButton] (o, StaticswitcherOptions::NextNoPopupButton);
                return true;
            }
            break;
        case StaticswitcherOptions::NextNoPopupKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextNoPopupKey].empty ())
                    mNotify[StaticswitcherOptions::NextNoPopupKey] (o, StaticswitcherOptions::NextNoPopupKey);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevNoPopupButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevNoPopupButton].empty ())
                    mNotify[StaticswitcherOptions::PrevNoPopupButton] (o, StaticswitcherOptions::PrevNoPopupButton);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevNoPopupKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevNoPopupKey].empty ())
                    mNotify[StaticswitcherOptions::PrevNoPopupKey] (o, StaticswitcherOptions::PrevNoPopupKey);
                return true;
            }
            break;
        case StaticswitcherOptions::NextPanelButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextPanelButton].empty ())
                    mNotify[StaticswitcherOptions::NextPanelButton] (o, StaticswitcherOptions::NextPanelButton);
                return true;
            }
            break;
        case StaticswitcherOptions::NextPanelKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::NextPanelKey].empty ())
                    mNotify[StaticswitcherOptions::NextPanelKey] (o, StaticswitcherOptions::NextPanelKey);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevPanelButton:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevPanelButton].empty ())
                    mNotify[StaticswitcherOptions::PrevPanelButton] (o, StaticswitcherOptions::PrevPanelButton);
                return true;
            }
            break;
        case StaticswitcherOptions::PrevPanelKey:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PrevPanelKey].empty ())
                    mNotify[StaticswitcherOptions::PrevPanelKey] (o, StaticswitcherOptions::PrevPanelKey);
                return true;
            }
            break;
        case StaticswitcherOptions::Speed:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Speed].empty ())
                    mNotify[StaticswitcherOptions::Speed] (o, StaticswitcherOptions::Speed);
                return true;
            }
            break;
        case StaticswitcherOptions::Timestep:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Timestep].empty ())
                    mNotify[StaticswitcherOptions::Timestep] (o, StaticswitcherOptions::Timestep);
                return true;
            }
            break;
        case StaticswitcherOptions::WindowMatch:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::WindowMatch].empty ())
                    mNotify[StaticswitcherOptions::WindowMatch] (o, StaticswitcherOptions::WindowMatch);
                return true;
            }
            break;
        case StaticswitcherOptions::Minimized:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Minimized].empty ())
                    mNotify[StaticswitcherOptions::Minimized] (o, StaticswitcherOptions::Minimized);
                return true;
            }
            break;
        case StaticswitcherOptions::AutoChangeVp:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::AutoChangeVp].empty ())
                    mNotify[StaticswitcherOptions::AutoChangeVp] (o, StaticswitcherOptions::AutoChangeVp);
                return true;
            }
            break;
        case StaticswitcherOptions::PopupDelay:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::PopupDelay].empty ())
                    mNotify[StaticswitcherOptions::PopupDelay] (o, StaticswitcherOptions::PopupDelay);
                return true;
            }
            break;
        case StaticswitcherOptions::MouseSelect:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::MouseSelect].empty ())
                    mNotify[StaticswitcherOptions::MouseSelect] (o, StaticswitcherOptions::MouseSelect);
                return true;
            }
            break;
        case StaticswitcherOptions::Saturation:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Saturation].empty ())
                    mNotify[StaticswitcherOptions::Saturation] (o, StaticswitcherOptions::Saturation);
                return true;
            }
            break;
        case StaticswitcherOptions::Brightness:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Brightness].empty ())
                    mNotify[StaticswitcherOptions::Brightness] (o, StaticswitcherOptions::Brightness);
                return true;
            }
            break;
        case StaticswitcherOptions::Opacity:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Opacity].empty ())
                    mNotify[StaticswitcherOptions::Opacity] (o, StaticswitcherOptions::Opacity);
                return true;
            }
            break;
        case StaticswitcherOptions::Icon:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Icon].empty ())
                    mNotify[StaticswitcherOptions::Icon] (o, StaticswitcherOptions::Icon);
                return true;
            }
            break;
        case StaticswitcherOptions::IconOnly:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::IconOnly].empty ())
                    mNotify[StaticswitcherOptions::IconOnly] (o, StaticswitcherOptions::IconOnly);
                return true;
            }
            break;
        case StaticswitcherOptions::Mipmap:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::Mipmap].empty ())
                    mNotify[StaticswitcherOptions::Mipmap] (o, StaticswitcherOptions::Mipmap);
                return true;
            }
            break;
        case StaticswitcherOptions::RowAlign:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::RowAlign].empty ())
                    mNotify[StaticswitcherOptions::RowAlign] (o, StaticswitcherOptions::RowAlign);
                return true;
            }
            break;
        case StaticswitcherOptions::FocusOnSwitch:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::FocusOnSwitch].empty ())
                    mNotify[StaticswitcherOptions::FocusOnSwitch] (o, StaticswitcherOptions::FocusOnSwitch);
                return true;
            }
            break;
        case StaticswitcherOptions::BringToFront:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::BringToFront].empty ())
                    mNotify[StaticswitcherOptions::BringToFront] (o, StaticswitcherOptions::BringToFront);
                return true;
            }
            break;
        case StaticswitcherOptions::HighlightMode:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::HighlightMode].empty ())
                    mNotify[StaticswitcherOptions::HighlightMode] (o, StaticswitcherOptions::HighlightMode);
                return true;
            }
            break;
        case StaticswitcherOptions::HighlightRectHidden:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::HighlightRectHidden].empty ())
                    mNotify[StaticswitcherOptions::HighlightRectHidden] (o, StaticswitcherOptions::HighlightRectHidden);
                return true;
            }
            break;
        case StaticswitcherOptions::HighlightColor:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::HighlightColor].empty ())
                    mNotify[StaticswitcherOptions::HighlightColor] (o, StaticswitcherOptions::HighlightColor);
                return true;
            }
            break;
        case StaticswitcherOptions::HighlightBorderColor:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::HighlightBorderColor].empty ())
                    mNotify[StaticswitcherOptions::HighlightBorderColor] (o, StaticswitcherOptions::HighlightBorderColor);
                return true;
            }
            break;
        case StaticswitcherOptions::HighlightBorderInlayColor:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::HighlightBorderInlayColor].empty ())
                    mNotify[StaticswitcherOptions::HighlightBorderInlayColor] (o, StaticswitcherOptions::HighlightBorderInlayColor);
                return true;
            }
            break;
        case StaticswitcherOptions::UseBackgroundColor:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::UseBackgroundColor].empty ())
                    mNotify[StaticswitcherOptions::UseBackgroundColor] (o, StaticswitcherOptions::UseBackgroundColor);
                return true;
            }
            break;
        case StaticswitcherOptions::BackgroundColor:
            if (o->set (value))
            {
                if (!mNotify[StaticswitcherOptions::BackgroundColor].empty ())
                    mNotify[StaticswitcherOptions::BackgroundColor] (o, StaticswitcherOptions::BackgroundColor);
                return true;
            }
            break;
        default:
            break;
    }
    return false;

}

