/*
 * 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 "rotate_options.h"

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

void
RotateOptions::initOptions ()
{
    unsigned int state;
    CompAction action;
    unsigned int edge;

    // edge_flip_pointer
    mOptions[RotateOptions::EdgeFlipPointer].setName ("edge_flip_pointer", CompOption::TypeBool);
    mOptions[RotateOptions::EdgeFlipPointer].value().set(false);

    // edge_flip_window
    mOptions[RotateOptions::EdgeFlipWindow].setName ("edge_flip_window", CompOption::TypeBool);
    mOptions[RotateOptions::EdgeFlipWindow].value().set(true);

    // edge_flip_dnd
    mOptions[RotateOptions::EdgeFlipDnd].setName ("edge_flip_dnd", CompOption::TypeBool);
    mOptions[RotateOptions::EdgeFlipDnd].value().set(true);

    // raise_on_rotate
    mOptions[RotateOptions::RaiseOnRotate].setName ("raise_on_rotate", CompOption::TypeBool);
    mOptions[RotateOptions::RaiseOnRotate].value().set(false);

    // invert_y
    mOptions[RotateOptions::InvertY].setName ("invert_y", CompOption::TypeBool);
    mOptions[RotateOptions::InvertY].value().set(false);

    // snap_top
    mOptions[RotateOptions::SnapTop].setName ("snap_top", CompOption::TypeBool);
    mOptions[RotateOptions::SnapTop].value().set(false);

    // snap_bottom
    mOptions[RotateOptions::SnapBottom].setName ("snap_bottom", CompOption::TypeBool);
    mOptions[RotateOptions::SnapBottom].value().set(false);

    // zoom
    mOptions[RotateOptions::Zoom].setName ("zoom", CompOption::TypeFloat);
    mOptions[RotateOptions::Zoom].rest ().set (0.0, 2.0, 0.1);
    mOptions[RotateOptions::Zoom].value().set((float) 0.0);

    // flip_time
    mOptions[RotateOptions::FlipTime].setName ("flip_time", CompOption::TypeInt);
    mOptions[RotateOptions::FlipTime].rest ().set (0, 1000);
    mOptions[RotateOptions::FlipTime].value().set((int) 350);

    // sensitivity
    mOptions[RotateOptions::Sensitivity].setName ("sensitivity", CompOption::TypeFloat);
    mOptions[RotateOptions::Sensitivity].rest ().set (0.01, 100.0, 0.01);
    mOptions[RotateOptions::Sensitivity].value().set((float) 1.0);

    // acceleration
    mOptions[RotateOptions::Acceleration].setName ("acceleration", CompOption::TypeFloat);
    mOptions[RotateOptions::Acceleration].rest ().set (1.0, 20.0, 0.1);
    mOptions[RotateOptions::Acceleration].value().set((float) 4.0);

    // speed
    mOptions[RotateOptions::Speed].setName ("speed", CompOption::TypeFloat);
    mOptions[RotateOptions::Speed].rest ().set (0.1, 50.0, 0.1);
    mOptions[RotateOptions::Speed].value().set((float) 2.0);

    // timestep
    mOptions[RotateOptions::Timestep].setName ("timestep", CompOption::TypeFloat);
    mOptions[RotateOptions::Timestep].rest ().set (0.1, 50.0, 0.1);
    mOptions[RotateOptions::Timestep].value().set((float) 1.0);

    // initiate_button
    mOptions[RotateOptions::InitiateButton].setName ("initiate_button", CompOption::TypeButton);
    state = CompAction::StateAutoGrab;
    action = CompAction ();
    action.setState (state | CompAction::StateInitButton);
    action.buttonFromString ("<Control><Alt>Button1");
    mOptions[RotateOptions::InitiateButton].value().set (action);
    if (screen) screen->addAction (&mOptions[RotateOptions::InitiateButton].value ().action ());

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

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

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

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

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

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

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

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

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

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

    // rotate_flip_left_edge
    mOptions[RotateOptions::RotateFlipLeftEdge].setName ("rotate_flip_left_edge", CompOption::TypeEdge);
    state = CompAction::StateAutoGrab;
    state |= CompAction::StateNoEdgeDelay;
    state |= CompAction::StateInitEdgeDnd;
    action = CompAction ();
    action.setState (state | CompAction::StateInitEdge);
    edge = 0;
    edge |= 1;
    action.setEdgeMask (edge);
    mOptions[RotateOptions::RotateFlipLeftEdge].value().set (action);
    if (screen) screen->addAction (&mOptions[RotateOptions::RotateFlipLeftEdge].value ().action ());

    // rotate_flip_right_edge
    mOptions[RotateOptions::RotateFlipRightEdge].setName ("rotate_flip_right_edge", CompOption::TypeEdge);
    state = CompAction::StateAutoGrab;
    state |= CompAction::StateNoEdgeDelay;
    state |= CompAction::StateInitEdgeDnd;
    action = CompAction ();
    action.setState (state | CompAction::StateInitEdge);
    edge = 0;
    edge |= (1 << 1);
    action.setEdgeMask (edge);
    mOptions[RotateOptions::RotateFlipRightEdge].value().set (action);
    if (screen) screen->addAction (&mOptions[RotateOptions::RotateFlipRightEdge].value ().action ());

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

}

RotateOptions::~RotateOptions ()
{
}


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

bool
RotateOptions::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 RotateOptions::EdgeFlipPointer:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::EdgeFlipPointer].empty ())
                    mNotify[RotateOptions::EdgeFlipPointer] (o, RotateOptions::EdgeFlipPointer);
                return true;
            }
            break;
        case RotateOptions::EdgeFlipWindow:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::EdgeFlipWindow].empty ())
                    mNotify[RotateOptions::EdgeFlipWindow] (o, RotateOptions::EdgeFlipWindow);
                return true;
            }
            break;
        case RotateOptions::EdgeFlipDnd:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::EdgeFlipDnd].empty ())
                    mNotify[RotateOptions::EdgeFlipDnd] (o, RotateOptions::EdgeFlipDnd);
                return true;
            }
            break;
        case RotateOptions::RaiseOnRotate:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RaiseOnRotate].empty ())
                    mNotify[RotateOptions::RaiseOnRotate] (o, RotateOptions::RaiseOnRotate);
                return true;
            }
            break;
        case RotateOptions::InvertY:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::InvertY].empty ())
                    mNotify[RotateOptions::InvertY] (o, RotateOptions::InvertY);
                return true;
            }
            break;
        case RotateOptions::SnapTop:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::SnapTop].empty ())
                    mNotify[RotateOptions::SnapTop] (o, RotateOptions::SnapTop);
                return true;
            }
            break;
        case RotateOptions::SnapBottom:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::SnapBottom].empty ())
                    mNotify[RotateOptions::SnapBottom] (o, RotateOptions::SnapBottom);
                return true;
            }
            break;
        case RotateOptions::Zoom:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::Zoom].empty ())
                    mNotify[RotateOptions::Zoom] (o, RotateOptions::Zoom);
                return true;
            }
            break;
        case RotateOptions::FlipTime:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::FlipTime].empty ())
                    mNotify[RotateOptions::FlipTime] (o, RotateOptions::FlipTime);
                return true;
            }
            break;
        case RotateOptions::Sensitivity:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::Sensitivity].empty ())
                    mNotify[RotateOptions::Sensitivity] (o, RotateOptions::Sensitivity);
                return true;
            }
            break;
        case RotateOptions::Acceleration:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::Acceleration].empty ())
                    mNotify[RotateOptions::Acceleration] (o, RotateOptions::Acceleration);
                return true;
            }
            break;
        case RotateOptions::Speed:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::Speed].empty ())
                    mNotify[RotateOptions::Speed] (o, RotateOptions::Speed);
                return true;
            }
            break;
        case RotateOptions::Timestep:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::Timestep].empty ())
                    mNotify[RotateOptions::Timestep] (o, RotateOptions::Timestep);
                return true;
            }
            break;
        case RotateOptions::InitiateButton:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::InitiateButton].empty ())
                    mNotify[RotateOptions::InitiateButton] (o, RotateOptions::InitiateButton);
                return true;
            }
            break;
        case RotateOptions::RotateLeftKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateLeftKey].empty ())
                    mNotify[RotateOptions::RotateLeftKey] (o, RotateOptions::RotateLeftKey);
                return true;
            }
            break;
        case RotateOptions::RotateLeftButton:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateLeftButton].empty ())
                    mNotify[RotateOptions::RotateLeftButton] (o, RotateOptions::RotateLeftButton);
                return true;
            }
            break;
        case RotateOptions::RotateRightKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateRightKey].empty ())
                    mNotify[RotateOptions::RotateRightKey] (o, RotateOptions::RotateRightKey);
                return true;
            }
            break;
        case RotateOptions::RotateRightButton:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateRightButton].empty ())
                    mNotify[RotateOptions::RotateRightButton] (o, RotateOptions::RotateRightButton);
                return true;
            }
            break;
        case RotateOptions::RotateLeftWindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateLeftWindowKey].empty ())
                    mNotify[RotateOptions::RotateLeftWindowKey] (o, RotateOptions::RotateLeftWindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateLeftWindowButton:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateLeftWindowButton].empty ())
                    mNotify[RotateOptions::RotateLeftWindowButton] (o, RotateOptions::RotateLeftWindowButton);
                return true;
            }
            break;
        case RotateOptions::RotateRightWindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateRightWindowKey].empty ())
                    mNotify[RotateOptions::RotateRightWindowKey] (o, RotateOptions::RotateRightWindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateRightWindowButton:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateRightWindowButton].empty ())
                    mNotify[RotateOptions::RotateRightWindowButton] (o, RotateOptions::RotateRightWindowButton);
                return true;
            }
            break;
        case RotateOptions::RotateToKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateToKey].empty ())
                    mNotify[RotateOptions::RotateToKey] (o, RotateOptions::RotateToKey);
                return true;
            }
            break;
        case RotateOptions::RotateWindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateWindowKey].empty ())
                    mNotify[RotateOptions::RotateWindowKey] (o, RotateOptions::RotateWindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateFlipLeftEdge:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateFlipLeftEdge].empty ())
                    mNotify[RotateOptions::RotateFlipLeftEdge] (o, RotateOptions::RotateFlipLeftEdge);
                return true;
            }
            break;
        case RotateOptions::RotateFlipRightEdge:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateFlipRightEdge].empty ())
                    mNotify[RotateOptions::RotateFlipRightEdge] (o, RotateOptions::RotateFlipRightEdge);
                return true;
            }
            break;
        case RotateOptions::RotateTo1Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo1Key].empty ())
                    mNotify[RotateOptions::RotateTo1Key] (o, RotateOptions::RotateTo1Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo2Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo2Key].empty ())
                    mNotify[RotateOptions::RotateTo2Key] (o, RotateOptions::RotateTo2Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo3Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo3Key].empty ())
                    mNotify[RotateOptions::RotateTo3Key] (o, RotateOptions::RotateTo3Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo4Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo4Key].empty ())
                    mNotify[RotateOptions::RotateTo4Key] (o, RotateOptions::RotateTo4Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo5Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo5Key].empty ())
                    mNotify[RotateOptions::RotateTo5Key] (o, RotateOptions::RotateTo5Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo6Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo6Key].empty ())
                    mNotify[RotateOptions::RotateTo6Key] (o, RotateOptions::RotateTo6Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo7Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo7Key].empty ())
                    mNotify[RotateOptions::RotateTo7Key] (o, RotateOptions::RotateTo7Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo8Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo8Key].empty ())
                    mNotify[RotateOptions::RotateTo8Key] (o, RotateOptions::RotateTo8Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo9Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo9Key].empty ())
                    mNotify[RotateOptions::RotateTo9Key] (o, RotateOptions::RotateTo9Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo10Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo10Key].empty ())
                    mNotify[RotateOptions::RotateTo10Key] (o, RotateOptions::RotateTo10Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo11Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo11Key].empty ())
                    mNotify[RotateOptions::RotateTo11Key] (o, RotateOptions::RotateTo11Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo12Key:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo12Key].empty ())
                    mNotify[RotateOptions::RotateTo12Key] (o, RotateOptions::RotateTo12Key);
                return true;
            }
            break;
        case RotateOptions::RotateTo1WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo1WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo1WindowKey] (o, RotateOptions::RotateTo1WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo2WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo2WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo2WindowKey] (o, RotateOptions::RotateTo2WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo3WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo3WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo3WindowKey] (o, RotateOptions::RotateTo3WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo4WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo4WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo4WindowKey] (o, RotateOptions::RotateTo4WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo5WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo5WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo5WindowKey] (o, RotateOptions::RotateTo5WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo6WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo6WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo6WindowKey] (o, RotateOptions::RotateTo6WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo7WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo7WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo7WindowKey] (o, RotateOptions::RotateTo7WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo8WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo8WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo8WindowKey] (o, RotateOptions::RotateTo8WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo9WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo9WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo9WindowKey] (o, RotateOptions::RotateTo9WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo10WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo10WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo10WindowKey] (o, RotateOptions::RotateTo10WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo11WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo11WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo11WindowKey] (o, RotateOptions::RotateTo11WindowKey);
                return true;
            }
            break;
        case RotateOptions::RotateTo12WindowKey:
            if (o->set (value))
            {
                if (!mNotify[RotateOptions::RotateTo12WindowKey].empty ())
                    mNotify[RotateOptions::RotateTo12WindowKey] (o, RotateOptions::RotateTo12WindowKey);
                return true;
            }
            break;
        default:
            break;
    }
    return false;

}

